:root {
    --primary-blue: #0071e3;
    --primary-blue-hover: #005bb5;
    --status-green: #22c55e;
    --danger-red: #ef4444;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #e0f2fe 0%, #ede9fe 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

#app {
    width: 100%;
    min-height: 100vh;
}

/* Glass Basics */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* Forms & Buttons */
input, select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.7);
    outline: none;
    font-size: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: var(--text-primary);
}

input:focus {
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

button {
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    border-radius: 12px;
}

.btn-primary {
    background: linear-gradient(180deg, #1e87f0 0%, var(--primary-blue) 100%);
    color: white;
    padding: 12px 24px;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.4);
    background: linear-gradient(180deg, #3795f2 0%, #006ce0 100%);
}

.btn-icon {
    background: rgba(255,255,255,0.8);
    color: var(--primary-blue);
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.btn-icon:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Auth Page */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
    animation: float 6s ease-in-out infinite, fadeIn 0.8s ease-out;
}

.auth-card h1 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-card p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 15px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0px); }
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 16px 16px;
    margin-bottom: 32px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.nav-center {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.7);
    color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), #8b5cf6);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
}

.main-content {
    flex: 1;
    padding: 0 32px 32px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto 40px;
}

.search-input {
    width: 100%;
    padding: 20px 24px 20px 56px;
    font-size: 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);    
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-input:focus {
    transform: scale(1.02);
    box-shadow: 0 12px 48px rgba(0, 113, 227, 0.15);
    border-color: rgba(0, 113, 227, 0.3);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 24px;
    height: 24px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255,255,255,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-blue);
}

.stat-info h3 {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Upload Page */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-area {
    border: 2px dashed rgba(0, 113, 227, 0.3);
    border-radius: 24px;
    padding: 60px 20px;
    text-align: center;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.upload-area:hover, .upload-area.drag-over {
    background: rgba(255,255,255,0.8);
    border-color: var(--primary-blue);
    transform: scale(1.01);
}

.upload-area input {
    display: none;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-blue);
    margin-bottom: 16px;
    opacity: 0.8;
}

.upload-area h3 {
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Tables */
.table-container {
    width: 100%;
    margin-top: 24px;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.glass-table th {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.glass-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    font-size: 15px;
    color: var(--text-primary);
}

.glass-table tbody tr {
    transition: all 0.2s ease;
}

.glass-table tbody tr:hover {
    background: rgba(255,255,255,0.8);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transform: scale(1.001);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--status-green);
}

.status-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-red);
}

/* User Detail View (Modal) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.modal-close {
    background: rgba(0,0,0,0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-item {
    margin-bottom: 16px;
}

.detail-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.detail-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.full-width {
    grid-column: 1 / -1;
}

/* Hidden elements */
.d-none {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .glass-nav {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .main-content {
        padding: 0 16px 16px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}
