:root {
    /* Premium Color Palette (HSL for better control) */
    --primary-hsl: 245, 75%, 60%;
    --primary: hsl(var(--primary-hsl));
    --primary-dark: hsl(245, 75%, 50%);
    --primary-light: hsl(245, 100%, 96%);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --primary-glow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);

    --secondary: #10b981;
    --secondary-light: #d1fae5;
    --accent: #f59e0b;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.4);

    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

    /* Safari Safe Blur */
    --glass-blur: blur(12px);
    --glass-background: rgba(255, 255, 255, 0.7);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);

    --radius-sm: 0.375rem;
    --radius: 0.625rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --sidebar-width: 280px;
    --header-height: 70px;
    --nav-height: 65px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--gray-800);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
}

.glass-card {
    background: var(--glass-background);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    /* Safari Support */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    padding: 2rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
    max-width: calc(100vw - 260px);
    width: 100%;
}

/* Sidebar Nav */
.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-600);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-link.logout {
    color: var(--danger);
}

/* Sidebar User */
.sidebar-user {
    margin-top: auto;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--gray-100);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}


.table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tr:hover {
    background: var(--gray-50);
}

.table tr:last-child td {
    border-bottom: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Code Textarea */
.code-textarea {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background: var(--gray-900);
    color: #e2e8f0;
    border: none;
    padding: 1rem;
    border-radius: var(--radius);
}

.code-textarea:focus {
    box-shadow: 0 0 0 3px var(--primary);
}

/* Code Display Block */
.code-block {
    background: var(--gray-900);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 1rem 0;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--gray-800);
    border-bottom: 1px solid var(--gray-700);
}

.code-block-lang {
    color: var(--gray-400);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.code-block-copy {
    background: var(--gray-700);
    color: var(--gray-300);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.code-block-copy:hover {
    background: var(--primary);
    color: var(--white);
}

.code-block-copy.copied {
    background: var(--secondary);
    color: var(--white);
}

.code-block pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Buttons - Premium Feel */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.875rem;
    gap: 0.625rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: var(--primary-glow);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-glow:hover {
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #e0f2fe;
    color: #075985;
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: var(--secondary-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
}

.page-subtitle {
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    color: var(--gray-300);
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Progress Bar */
.progress {
    height: 0.5rem;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Deadline Warning */
.deadline-warning {
    background: var(--warning-light);
    border: 1px solid var(--accent);
    color: #92400e;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    transition: background 0.2s;
}

.list-item:hover {
    background: var(--gray-100);
}

.list-item-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 600;
    color: var(--gray-900);
}

.list-item-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.list-item-meta {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Login Page - Premium Glassmorphism */
.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f0f2f5;
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top));
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.animated-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    filter: blur(80px);
    -webkit-filter: blur(80px);
    /* Safari support */
}

.blob {
    position: absolute;
    width: clamp(300px, 40vw, 500px);
    height: clamp(300px, 40vw, 500px);
    border-radius: 50%;
    opacity: 0.6;
    animation: move 20s infinite alternate;
}

.blob-1 {
    background: #6366f1;
    top: -10%;
    left: -10%;
}

.blob-2 {
    background: #a855f7;
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    background: #10b981;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    to {
        transform: translate(100px, 100px) rotate(90deg) scale(1.2);
    }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    margin: auto;
}

.login-card {
    padding: 3rem 2.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.login-header {
    margin-bottom: 2.5rem;
}

.login-logo {
    height: 80px;
    margin-bottom: 1.5rem;
}

.login-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.input-modern {
    position: relative;
    margin-top: 0.5rem;
    width: 100%;
}

.input-modern i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-light);
    transition: color 0.3s;
    pointer-events: none;
}

.input-modern input {
    width: 100%;
    height: 54px;
    padding: 0 1.25rem 0 3.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
    /* Fix Safari input styling */
}

.input-modern input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    outline: none;
}

.input-modern input:focus+i {
    color: var(--primary);
}

.app-install-section {
    margin-top: 2.5rem;
}

.divider {
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

.divider span {
    position: relative;
    background: white;
    padding: 0 1rem;
    font-size: 0.8125rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
}

.install-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.install-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-main);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.install-btn:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.install-btn i {
    width: 24px;
    height: 24px;
}

@media (max-width: 480px) {
    .login-card {
        padding: 2.5rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .install-buttons {
        grid-template-columns: 1fr;
    }
}

/* Modal Overlay Restored if needed by login.html */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Submission Type Toggle */
.submission-type-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.submission-type-option {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.submission-type-option:hover {
    border-color: var(--primary-light);
}

.submission-type-option.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.submission-type-option input {
    display: none;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
        align-items: center;
    }

    .sidebar h2,
    .nav-text,
    .sidebar-user-info {
        display: none;
    }

    .sidebar-user {
        border-top: none;
        justify-content: center;
    }

    .main-content {
        padding: 1.5rem;
        max-width: calc(100vw - 80px);
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .table {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.75rem;
    }
}

@media (max-width: 900px) {
    .dashboard-layout {
        display: block;
    }

    .sidebar {
        display: none !important;
    }

    .main-content {
        padding: 1.25rem !important;
        padding-top: calc(var(--header-height) + 1.5rem) !important;
        padding-bottom: calc(var(--nav-height) + 2rem) !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1.25rem;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header .btn {
        width: 100%;
    }
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gray-900);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.pwa-install-banner.show {
    transform: translateY(0);
}

.pwa-install-banner p {
    margin: 0;
}

.pwa-install-banner .btn {
    margin-left: 1rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-danger {
    color: var(--danger);
}

.text-muted {
    color: var(--gray-500);
}

.font-bold {
    font-weight: 700;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

/* Progress Bars */
.progress {
    width: 100%;
    background: var(--gray-200);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile and Desktop Separation */
.mobile-header,
.mobile-bottom-nav {
    display: none !important;
}

@media (max-width: 900px) {
    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--header-height);
        background: var(--bg-glass);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: var(--glass-border);
        padding: 0 1.25rem;
        align-items: center;
        justify-content: space-between;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .mobile-bottom-nav {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--nav-height);
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: var(--glass-border);
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 1000;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-light);
        font-size: 0.65rem;
        font-weight: 600;
        gap: 4px;
        transition: all 0.2s;
    }

    .mobile-nav-item i {
        width: 20px;
        height: 20px;
    }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .mobile-action-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(99, 102, 241, 0.1);
        color: var(--primary);
        transition: all 0.2s;
    }

    .mobile-action-btn:active {
        background: rgba(99, 102, 241, 0.2);
        transform: scale(0.95);
    }

}

/* Better Table for Mobile */
@media (max-width: 768px) {
    .table-container {
        border-radius: var(--radius);
        margin: 0 -0.25rem;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Profile Page Styles */
.profile-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
    margin-left: auto;
    margin-right: auto;
}

.user-fullname {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.user-role-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 2rem;
}

.p-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.p-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.p-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

.groups-mini-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.group-mini-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius);
}

.group-mini-icon {
    width: 36px;
    height: 36px;
    background: var(--secondary-light);
    color: var(--secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-mini-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.group-mini-course {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .profile-stats-row {
        gap: 1.5rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .p-stat {
        min-width: 0;
        text-align: center;
    }

    .p-stat-value {
        font-size: 1.25rem;
    }

    .user-fullname {
        font-size: 1.5rem;
    }

    .profile-avatar-large {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }
}