/* --- Consolidated from add-admin.html (style block 1) --- */
/* Keep the admin sidebar pinned to the left edge of the viewport. */
aside {
  left: 0;
  top: 0;
}
.export-group {
  display: flex;
  gap: 8px;
}
.export-group .btn {
  padding: 8px 14px;
  font-size: 0.8rem;
}

:root {
        --primary: #4e2a84;
        --primary-hover: #311d52;
        --bg: #f8fafc;
        --sidebar: #ffffff;
        --text-main: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
        --danger: #ef4444;
        --success: #10b981;
        --radius: 12px;
      }

      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        color: var(--text-main);
        margin: 0;
        display: flex;
        min-height: 100vh;
      }

      /* Sidebar */
      aside {
        width: 280px;
        background: var(--sidebar);
        border-right: 1px solid var(--border);
        padding: 32px 20px;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        z-index: 100;
      }

      .logo-container {
        padding: 0 12px;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .logo-img {
        width: 36px;
        height: 36px;
        object-fit: contain;
      }
      .logo-text {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--primary);
      }

      nav {
        flex-grow: 1;
      }

      nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        border-radius: var(--radius);
        transition: 0.2s;
        margin-bottom: 4px;
      }

      nav a:hover,
      nav a.active {
        background: #f4f0fa;
        color: var(--primary);
      }

      nav a.active {
        font-weight: 600;
        background: #f4f0fa;
      }

      #super-admin-nav {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: none;
      }

      .nav-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05rem;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-left: 16px;
        font-weight: 700;
      }

      .logout-container {
        padding-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
      }

      .btn-logout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 90%;
        padding: 12px;
        background: var(--danger);
        color: white;
        text-decoration: none;
        font-weight: 600;
        border-radius: var(--radius);
        transition: opacity 0.2s;
      }

      .btn-logout:hover {
        opacity: 0.9;
      }

      /* Main Content */
      main {
        flex-grow: 1;
        margin-left: 280px;
        padding: 40px 60px;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
      }

      .content-wrapper {
        width: 100%;
        max-width: 650px;
      }

      .back-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 24px;
        transition: color 0.2s;
      }

      .back-link:hover {
        color: var(--primary);
      }

      /* Form Card */
      .form-card {
        background: white;
        padding: 40px;
        border-radius: 20px;
        border: 1px solid var(--border);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      }

      h1 {
        font-size: 2rem;
        margin: 0 0 8px 0;
        font-weight: 800;
        color: #1e1b4b;
      }
      .note {
        color: var(--text-muted);
        font-size: 1rem;
        margin-bottom: 32px;
      }

      label {
        display: block;
        font-weight: 700;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.025em;
        margin-bottom: 8px;
        color: var(--text-muted);
      }

      input,
      select {
        width: 100%;
        padding: 14px;
        margin-bottom: 24px;
        border: 1px solid var(--border);
        border-radius: 10px;
        font-family: inherit;
        font-size: 1rem;
        box-sizing: border-box;
        transition: all 0.2s;
        background: #fcfcfd;
      }

      input:focus,
      select:focus {
        outline: none;
        border-color: var(--primary);
        background: white;
        box-shadow: 0 0 0 4px rgba(78, 42, 132, 0.1);
      }

      .checkbox-group {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 24px;
      }

      .checkbox-group input {
        width: auto;
        margin-bottom: 0;
      }

      .checkbox-group label {
        margin-bottom: 0;
        text-transform: none;
        font-weight: 500;
        letter-spacing: normal;
      }

      .helper-text {
        color: var(--text-muted);
        font-size: 0.75rem;
        margin-top: -20px;
        margin-bottom: 24px;
        margin-left: 28px;
      }

      /* Alert Messages */
      .alert {
        padding: 14px 16px;
        border-radius: 10px;
        margin-bottom: 24px;
        display: none;
        font-weight: 500;
      }

      .alert-error {
        background: #fef2f2;
        color: var(--danger);
        border-left: 4px solid var(--danger);
      }

      .alert-success {
        background: #ecfdf5;
        color: var(--success);
        border-left: 4px solid var(--success);
      }

      /* Buttons */
      .btn-group {
        display: flex;
        gap: 12px;
        margin-top: 10px;
      }

      .btn {
        padding: 14px 24px;
        border-radius: 10px;
        font-weight: 700;
        cursor: pointer;
        font-family: inherit;
        transition: 0.2s;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        font-size: 0.95rem;
        border: 1px solid transparent;
      }

      .btn-primary {
        background: var(--primary);
        color: white;
        flex-grow: 2;
      }

      .btn-primary:hover {
        background: var(--primary-hover);
      }
      .btn-primary:disabled {
        background: #a5b4fc;
        cursor: not-allowed;
      }

      .btn-secondary {
        background: white;
        border: 1px solid var(--border);
        color: var(--text-main);
        flex-grow: 1;
      }

      .btn-secondary:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
      }


/* --- Consolidated from add-lesson.html (style block 1) --- */
:root {
            --primary: #4e2a84;
            --primary-hover: #311d52;
            --bg: #f8fafc;
            --sidebar: #ffffff;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --border: #e2e8f0;
            --danger: #ef4444;
            --radius: 12px;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg);
            color: var(--text-main);
            margin: 0;
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar - Consistent with Dashboard & Lessons */
        aside {
            width: 280px;
            background: var(--sidebar);
            border-right: 1px solid var(--border);
            padding: 32px 20px;
            position: fixed;
            height: 100vh;
            display: flex;
            flex-direction: column;
            box-sizing: border-box;
            z-index: 100;
        }

        .logo-container {
            padding: 0 12px;
            margin-bottom: 40px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .logo-img { width: 36px; height: 36px; object-fit: contain; }
        .logo-text { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

        nav { flex-grow: 1; }

        nav a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            text-decoration: none;
            color: var(--text-muted);
            font-weight: 500;
            border-radius: var(--radius);
            transition: 0.2s;
            margin-bottom: 4px;
        }

        nav a:hover, nav a.active {
            background: #f4f0fa;
            color: var(--primary);
        }

        nav a.active { font-weight: 600; background: #f4f0fa; }

        #super-admin-nav {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid var(--border);
            display: none; 
        }

        .nav-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.05rem;
            color: var(--text-muted);
            margin-bottom: 8px;
            padding-left: 16px;
            font-weight: 700;
        }

        .logout-container {
            padding-top: 20px;
            display: flex;
            justify-content: center;
            width: 100%;
        }

        .btn-logout {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 90%;
            padding: 12px;
            background: var(--danger);
            color: white;
            text-decoration: none;
            font-weight: 600;
            border-radius: var(--radius);
            transition: opacity 0.2s;
        }

        .btn-logout:hover { opacity: 0.9; }

        /* Main Content */
        main {
            flex-grow: 1;
            margin-left: 280px;
            padding: 40px 60px;
            box-sizing: border-box;
            display: flex;
            justify-content: center;
        }

        .content-wrapper { width: 100%; max-width: 650px; }

        .back-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 24px;
            transition: color 0.2s;
        }

        .back-link:hover { color: var(--primary); }

        /* Form Card */
        .form-card {
            background: white;
            padding: 40px;
            border-radius: 20px;
            border: 1px solid var(--border);
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }

        h1 { font-size: 2rem; margin: 0 0 8px 0; font-weight: 800; color: #1e1b4b; }
        .note { color: var(--text-muted); font-size: 1rem; margin-bottom: 32px; }

        label {
            display: block;
            font-weight: 700;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.025em;
            margin-bottom: 8px;
            color: var(--text-muted);
        }

        input, textarea, select {
            width: 100%;
            padding: 14px;
            margin-bottom: 24px;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-family: inherit;
            font-size: 1rem;
            box-sizing: border-box;
            transition: all 0.2s;
            background: #fcfcfd;
        }

        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: var(--primary);
            background: white;
            box-shadow: 0 0 0 4px rgba(78, 42, 132, 0.1);
        }

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

        /* Buttons */
        .btn-group {
            display: flex;
            gap: 12px;
            margin-top: 10px;
        }

        .btn {
            padding: 14px 24px;
            border-radius: 10px;
            font-weight: 700;
            cursor: pointer;
            font-family: inherit;
            transition: 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            font-size: 0.95rem;
            border: 1px solid transparent;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
            flex-grow: 2;
        }

        .btn-primary:hover { background: var(--primary-hover); }
        .btn-primary:disabled { background: #a5b4fc; cursor: not-allowed; }

        .btn-secondary {
            background: white;
            border: 1px solid var(--border);
            color: var(--text-main);
            flex-grow: 1;
        }

        .btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }


/* --- Consolidated from add-question.html (style block 1) --- */
:root {
        --primary: #4e2a84;
        --primary-hover: #311d52;
        --success: #10b981;
        --warning: #f59e0b;
        --bg: #f8fafc;
        --sidebar: #ffffff;
        --text-main: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
        --danger: #ef4444;
        --radius: 12px;
      }

      * {
        box-sizing: border-box;
      }

      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        color: var(--text-main);
        margin: 0;
        display: flex;
        min-height: 100vh;
      }

      /* Sidebar - Consistent with Admin Panels */
      aside {
        width: 280px;
        background: var(--sidebar);
        border-right: 1px solid var(--border);
        padding: 32px 20px;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        z-index: 100;
      }

      .logo-container {
        padding: 0 12px;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .logo-img {
        width: 36px;
        height: 36px;
        object-fit: contain;
      }
      .logo-text {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--primary);
      }

      nav {
        flex-grow: 1;
      }

      nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        border-radius: var(--radius);
        transition: 0.2s;
        margin-bottom: 4px;
      }

      nav a:hover,
      nav a.active {
        background: #f4f0fa;
        color: var(--primary);
      }

      nav a.active {
        font-weight: 600;
        background: #f4f0fa;
      }

      #super-admin-nav {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: none;
      }

      .nav-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05rem;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-left: 16px;
        font-weight: 700;
      }

      .logout-container {
        padding-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
      }

      .btn-logout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 90%;
        padding: 12px;
        background: var(--danger);
        color: white;
        text-decoration: none;
        font-weight: 600;
        border-radius: var(--radius);
        transition: opacity 0.2s;
      }

      .btn-logout:hover {
        opacity: 0.9;
      }

      /* Main Content */
      main {
        flex-grow: 1;
        margin-left: 280px;
        padding: 40px 60px;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
      }

      .content-container {
        width: 100%;
        max-width: 800px;
      }

      .back-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 24px;
        transition: color 0.2s;
      }

      .back-link:hover {
        color: var(--primary);
      }

      .form-card {
        background: white;
        padding: 40px;
        border-radius: 20px;
        border: 1px solid var(--border);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      }

      h1 {
        font-size: 1.75rem;
        margin: 0 0 32px 0;
        font-weight: 800;
        color: #1e1b4b;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .fill-demo-btn {
        background: #ecfdf5;
        color: var(--success);
        border: 1px solid #d1fae5;
        padding: 8px 16px;
        border-radius: 8px;
        font-size: 0.8rem;
        font-weight: 700;
        cursor: pointer;
        transition: 0.2s;
      }

      .fill-demo-btn:hover {
        background: #d1fae5;
      }

      .section-label {
        display: block;
        font-weight: 800;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--primary);
        margin: 32px 0 16px 0;
        padding-bottom: 8px;
        border-bottom: 2px solid #f4f0fa;
      }

      label {
        display: block;
        font-weight: 700;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.025em;
        margin-bottom: 8px;
        color: var(--text-muted);
      }

      input,
      select,
      textarea {
        width: 100%;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 10px;
        font-family: inherit;
        font-size: 1rem;
        box-sizing: border-box;
        background: #fcfcfd;
        transition: all 0.2s;
      }

      input:focus,
      select:focus,
      textarea:focus {
        outline: none;
        border-color: var(--primary);
        background: white;
        box-shadow: 0 0 0 4px rgba(78, 42, 132, 0.1);
      }

      .options-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
      }

      .btn-primary {
        width: 100%;
        padding: 16px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 12px;
        font-weight: 700;
        font-size: 1rem;
        cursor: pointer;
        margin-top: 32px;
        transition: 0.2s;
      }

      .btn-primary:hover {
        background: var(--primary-hover);
      }
      .btn-primary:disabled {
        opacity: 0.7;
        cursor: not-allowed;
      }

      .btn-success-alt {
        background: #f4f0fa;
        color: var(--primary);
        border: 1px solid #e9e2f5;
        padding: 12px;
        border-radius: 10px;
        font-weight: 700;
        font-size: 0.9rem;
        cursor: pointer;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
      }

      .btn-success-alt:hover {
        background: #eee7f8;
      }

      .badge {
        background: #f4f0fa;
        color: var(--primary);
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 0.75rem;
        font-weight: 700;
      }

      .target-word-preview {
        background: #f4f0fa;
        padding: 12px 16px;
        border-radius: 10px;
        margin-top: 12px;
        font-size: 0.9rem;
        color: var(--primary);
        font-weight: 600;
        border: 1px dashed var(--primary);
      }

      .info-note {
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-top: 8px;
        display: flex;
        align-items: center;
        gap: 6px;
      }


/* --- Consolidated from edit-admin.html (style block 1) --- */
:root {
            --primary: #4e2a84;
            --primary-hover: #311d52;
            --bg: #f8fafc;
            --sidebar: #ffffff;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --border: #e2e8f0;
            --danger: #ef4444;
            --success: #10b981;
            --warning: #f59e0b;
            --radius: 12px;
        }

        body {
            font-family: "Inter", sans-serif;
            background: var(--bg);
            color: var(--text-main);
            margin: 0;
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar */
        aside {
            width: 280px;
            background: var(--sidebar);
            border-right: 1px solid var(--border);
            padding: 32px 20px;
            position: fixed;
            height: 100vh;
            display: flex;
            flex-direction: column;
            box-sizing: border-box;
            z-index: 100;
        }

        .logo-container {
            padding: 0 12px;
            margin-bottom: 40px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .logo-img { width: 36px; height: 36px; object-fit: contain; }
        .logo-text { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

        nav { flex-grow: 1; }

        nav a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            text-decoration: none;
            color: var(--text-muted);
            font-weight: 500;
            border-radius: var(--radius);
            transition: 0.2s;
            margin-bottom: 4px;
        }

        nav a:hover, nav a.active {
            background: #f4f0fa;
            color: var(--primary);
        }

        nav a.active { font-weight: 600; background: #f4f0fa; }

        #super-admin-nav {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid var(--border);
            display: none;
        }

        .nav-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.05rem;
            color: var(--text-muted);
            margin-bottom: 8px;
            padding-left: 16px;
            font-weight: 700;
        }

        .logout-container {
            padding-top: 20px;
            display: flex;
            justify-content: center;
            width: 100%;
        }

        .btn-logout {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 90%;
            padding: 12px;
            background: var(--danger);
            color: white;
            text-decoration: none;
            font-weight: 600;
            border-radius: var(--radius);
            transition: opacity 0.2s;
        }

        .btn-logout:hover { opacity: 0.9; }

        /* Main Content */
        main {
            flex-grow: 1;
            margin-left: 280px;
            padding: 40px 60px;
            box-sizing: border-box;
            display: flex;
            justify-content: center;
        }

        .content-wrapper { width: 100%; max-width: 650px; }

        .back-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 24px;
            transition: color 0.2s;
        }

        .back-link:hover { color: var(--primary); }

        /* Form Card */
        .form-card {
            background: white;
            padding: 40px;
            border-radius: 20px;
            border: 1px solid var(--border);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        }

        h1 {
            font-size: 2rem;
            margin: 0 0 8px 0;
            font-weight: 800;
            color: #1e1b4b;
        }
        .note {
            color: var(--text-muted);
            font-size: 1rem;
            margin-bottom: 32px;
        }

        label {
            display: block;
            font-weight: 700;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.025em;
            margin-bottom: 8px;
            color: var(--text-muted);
        }

        input, select {
            width: 100%;
            padding: 14px;
            margin-bottom: 24px;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-family: inherit;
            font-size: 1rem;
            box-sizing: border-box;
            transition: all 0.2s;
            background: #fcfcfd;
        }

        input:focus, select:focus {
            outline: none;
            border-color: var(--primary);
            background: white;
            box-shadow: 0 0 0 4px rgba(78, 42, 132, 0.1);
        }

        input:disabled {
            background: #f1f5f9;
            color: var(--text-muted);
            cursor: not-allowed;
        }

        .checkbox-group {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 24px;
        }

        .checkbox-group input {
            width: auto;
            margin-bottom: 0;
        }

        .checkbox-group label {
            margin-bottom: 0;
            text-transform: none;
            font-weight: 500;
            letter-spacing: normal;
        }

        .helper-text {
            color: var(--text-muted);
            font-size: 0.75rem;
            margin-top: -20px;
            margin-bottom: 24px;
            margin-left: 28px;
        }

        .divider {
            height: 1px;
            background: var(--border);
            margin: 28px 0;
        }

        .danger-zone {
            margin-top: 8px;
            padding-top: 8px;
        }

        .danger-zone-title {
            color: var(--danger);
            font-size: 0.85rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.025em;
            margin-bottom: 16px;
        }

        /* Alert Messages */
        .alert {
            padding: 14px 16px;
            border-radius: 10px;
            margin-bottom: 24px;
            display: none;
            font-weight: 500;
        }

        .alert-error {
            background: #fef2f2;
            color: var(--danger);
            border-left: 4px solid var(--danger);
        }

        .alert-success {
            background: #ecfdf5;
            color: var(--success);
            border-left: 4px solid var(--success);
        }

        .alert-warning {
            background: #fffbeb;
            color: var(--warning);
            border-left: 4px solid var(--warning);
        }

        /* Buttons */
        .btn-group {
            display: flex;
            gap: 12px;
            margin-top: 10px;
        }

        .btn {
            padding: 14px 24px;
            border-radius: 10px;
            font-weight: 700;
            cursor: pointer;
            font-family: inherit;
            transition: 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            font-size: 0.95rem;
            border: 1px solid transparent;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
            flex-grow: 2;
        }

        .btn-primary:hover { background: var(--primary-hover); }
        .btn-primary:disabled { background: #a5b4fc; cursor: not-allowed; }

        .btn-secondary {
            background: white;
            border: 1px solid var(--border);
            color: var(--text-main);
            flex-grow: 1;
        }

        .btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }

        .btn-danger {
            background: var(--danger);
            color: white;
            flex-grow: 1;
        }

        .btn-danger:hover { background: #dc2626; }

        .reset-link {
            display: inline-block;
            margin-top: 16px;
            color: var(--primary);
            text-decoration: none;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
        }

        .reset-link:hover { text-decoration: underline; }


/* --- Consolidated from edit-admin.html (style block 2) --- */
@keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }


/* --- Consolidated from edit-lesson.html (style block 1) --- */
:root {
        --primary: #4e2a84;
        --primary-hover: #311d52;
        --bg: #f8fafc;
        --sidebar: #ffffff;
        --text-main: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
        --danger: #ef4444;
        --radius: 12px;
      }

      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        color: var(--text-main);
        margin: 0;
        display: flex;
        min-height: 100vh;
      }

      /* Sidebar - Consistent with Dashboard & Lessons */
      aside {
        width: 280px;
        background: var(--sidebar);
        border-right: 1px solid var(--border);
        padding: 32px 20px;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        z-index: 100;
      }

      .logo-container {
        padding: 0 12px;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .logo-img { width: 36px; height: 36px; object-fit: contain; }
      .logo-text { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

      nav { flex-grow: 1; }

      nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        border-radius: var(--radius);
        transition: 0.2s;
        margin-bottom: 4px;
      }

      nav a:hover, nav a.active {
        background: #f4f0fa;
        color: var(--primary);
      }

      nav a.active { font-weight: 600; background: #f4f0fa; }

      #super-admin-nav {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: none; 
      }

      .nav-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05rem;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-left: 16px;
        font-weight: 700;
      }

      .logout-container {
        padding-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
      }

      .btn-logout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 90%;
        padding: 12px;
        background: var(--danger);
        color: white;
        text-decoration: none;
        font-weight: 600;
        border-radius: var(--radius);
        transition: opacity 0.2s;
      }

      .btn-logout:hover { opacity: 0.9; }

      /* Main Content */
      main {
        flex-grow: 1;
        margin-left: 280px;
        padding: 40px 60px;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
      }

      .content-wrapper { width: 100%; max-width: 700px; }

      .back-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 24px;
        transition: color 0.2s;
      }

      .back-link:hover { color: var(--primary); }

      /* Form Styling */
      .form-card {
        background: white;
        padding: 40px;
        border-radius: 20px;
        border: 1px solid var(--border);
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
      }

      h1 { font-size: 2rem; margin: 0 0 32px 0; font-weight: 800; color: #1e1b4b; }

      label {
        display: block;
        font-weight: 700;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.025em;
        margin-bottom: 8px;
        color: var(--text-muted);
      }

      input, textarea, select {
        width: 100%;
        padding: 14px;
        margin-bottom: 24px;
        border: 1px solid var(--border);
        border-radius: 10px;
        font-family: inherit;
        font-size: 1rem;
        box-sizing: border-box;
        transition: all 0.2s;
        background: #fcfcfd;
      }

      input:focus, textarea:focus, select:focus {
        outline: none;
        border-color: var(--primary);
        background: white;
        box-shadow: 0 0 0 4px rgba(78, 42, 132, 0.1);
      }

      textarea { min-height: 140px; resize: vertical; }

      /* Buttons */
      .actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-top: 10px;
      }

      .btn {
        padding: 14px;
        border-radius: 10px;
        font-weight: 700;
        cursor: pointer;
        font-size: 0.9rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        transition: 0.2s;
        border: 1px solid transparent;
        text-decoration: none;
      }

      .btn-update {
        background: var(--primary);
        color: white;
        grid-column: span 2;
      }

      .btn-update:hover { background: var(--primary-hover); }

      .btn-secondary {
        background: white;
        border-color: var(--border);
        color: var(--text-main);
      }

      .btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }

      .btn-danger {
        background: #fff5f5;
        border-color: #fecaca;
        color: var(--danger);
      }

      .btn-danger:hover { background: var(--danger); color: white; }

      .message {
        margin-top: 24px;
        padding: 16px;
        border-radius: 10px;
        font-size: 0.9rem;
        font-weight: 600;
        display: none;
        text-align: center;
      }


/* --- Consolidated from edit-question.html (style block 1) --- */
:root {
        --primary: #4e2a84;
        --primary-hover: #311d52;
        --success: #10b981;
        --warning: #f59e0b;
        --danger: #ef4444;
        --bg: #f8fafc;
        --sidebar: #ffffff;
        --text-main: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
        --radius: 12px;
      }

      * {
        box-sizing: border-box;
      }

      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        color: var(--text-main);
        margin: 0;
        display: flex;
        min-height: 100vh;
      }

      /* Sidebar Navigation */
      aside {
        width: 280px;
        background: var(--sidebar);
        border-right: 1px solid var(--border);
        padding: 32px 20px;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
        z-index: 100;
      }

      .logo-container {
        padding: 0 12px;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .logo-text {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--primary);
      }
      nav {
        flex-grow: 1;
      }

      nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        border-radius: var(--radius);
        margin-bottom: 4px;
        transition: 0.2s;
      }

      nav a:hover,
      nav a.active {
        background: #f4f0fa;
        color: var(--primary);
      }

      #super-admin-nav {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: none;
      }

      .nav-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        font-weight: 700;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-left: 16px;
      }

      .logout-container {
        padding-top: 20px;
        display: flex;
        justify-content: center;
      }

      .btn-logout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 90%;
        padding: 12px;
        background: var(--danger);
        color: white;
        text-decoration: none;
        font-weight: 600;
        border-radius: var(--radius);
      }

      /* Main Content */
      main {
        flex-grow: 1;
        margin-left: 280px;
        padding: 40px 60px;
        display: flex;
        justify-content: center;
      }

      .content-container {
        width: 100%;
        max-width: 800px;
      }

      .form-card {
        background: white;
        padding: 40px;
        border-radius: 20px;
        border: 1px solid var(--border);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      }

      h1 {
        font-weight: 800;
        color: #1e1b4b;
        margin-bottom: 32px;
        display: flex;
        justify-content: space-between;
      }

      .section-label {
        display: block;
        font-weight: 800;
        font-size: 0.8rem;
        text-transform: uppercase;
        color: var(--primary);
        margin: 32px 0 16px 0;
        border-bottom: 2px solid #f4f0fa;
        padding-bottom: 8px;
      }

      input,
      select,
      textarea {
        width: 100%;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: #fcfcfd;
        font-family: inherit;
        margin-bottom: 24px;
      }

      input:focus,
      select:focus,
      textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(78, 42, 132, 0.1);
      }

      .btn-primary {
        width: 100%;
        padding: 16px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 12px;
        font-weight: 700;
        cursor: pointer;
      }

      .badge {
        background: #f4f0fa;
        color: var(--primary);
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 0.75rem;
        font-weight: 700;
      }


/* --- Consolidated from index.html (style block 1) --- */
:root {
            --primary: #4E2A84; 
            --primary-hover: #311D52;
            --bg: #F8FAFC;
            --sidebar: #ffffff;
            --text-main: #0F172A;
            --text-muted: #64748B;
            --border: #E2E8F0;
            --danger: #EF4444;
            --radius: 12px;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg);
            color: var(--text-main);
            margin: 0;
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar Styling */
        aside {
            width: 280px;
            background: var(--sidebar);
            border-right: 1px solid var(--border);
            padding: 32px 20px;
            position: fixed;
            height: 100vh;
            display: flex;
            flex-direction: column;
            box-sizing: border-box;
            z-index: 100;
        }

        .logo-container {
            padding: 0 12px;
            margin-bottom: 40px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .logo-img { width: 36px; height: 36px; object-fit: contain; }
        .logo-text { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

        nav { flex-grow: 1; }

        nav a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            text-decoration: none;
            color: var(--text-muted);
            font-weight: 500;
            border-radius: var(--radius);
            transition: 0.2s;
            margin-bottom: 4px;
        }

        nav a:hover, nav a.active {
            background: #F4F0FA;
            color: var(--primary);
        }

        nav a.active { font-weight: 600; background: #F4F0FA; }

        /* Super Admin Toggle Section */
        #super-admin-nav {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid var(--border);
            display: none; 
        }

        .nav-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.05rem;
            color: var(--text-muted);
            margin-bottom: 8px;
            padding-left: 16px;
            font-weight: 700;
        }

        /* Centered Red Logout Button */
        .logout-container {
            padding-top: 20px;
            display: flex;
            justify-content: center;
            width: 100%;
        }

        .btn-logout {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 90%;
            padding: 12px;
            background: var(--danger);
            color: white;
            text-decoration: none;
            font-weight: 600;
            border-radius: var(--radius);
            transition: opacity 0.2s;
        }

        .btn-logout:hover { opacity: 0.9; }

        /* Main Content with Max-Width for better 100% Zoom viewing */
        main {
            flex-grow: 1;
            margin-left: 280px;
            padding: 40px 60px;
            box-sizing: border-box;
        }

        .content-wrapper { max-width: 1100px; margin: 0 auto; }

        header { margin-bottom: 48px; }
        h1 { font-size: 2.4rem; margin: 0 0 8px 0; font-weight: 800; color: #1E1B4B; }
        .subtitle { color: var(--text-muted); font-size: 1.1rem; }

        /* Grid - Better spacing for desktop */
        .grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 24px;
        }

        .card {
            background: white;
            padding: 32px;
            border-radius: 24px;
            border: 1px solid var(--border);
            text-decoration: none;
            color: inherit;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 20px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }

        .card:hover {
            transform: translateY(-4px);
            border-color: var(--primary);
            box-shadow: 0 10px 20px -5px rgba(78, 42, 132, 0.1);
        }

        .icon-box {
            width: 60px;
            height: 60px;
            background: #F1EDF7;
            color: var(--primary);
            border-radius: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .card-content h3 { margin: 0 0 4px 0; font-size: 1.25rem; font-weight: 700; color: #1E1B4B; }
        .card-content p { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

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


/* --- Consolidated from lesson-questions.html (style block 1) --- */
:root {
        --primary: #4e2a84;
        --primary-hover: #311d52;
        --bg: #f8fafc;
        --sidebar: #ffffff;
        --text-main: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
        --danger: #ef4444;
        --radius: 12px;
      }

      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        color: var(--text-main);
        margin: 0;
        display: flex;
        min-height: 100vh;
      }

      /* Sidebar - Consistent with Lessons */
      aside {
        width: 280px;
        background: var(--sidebar);
        border-right: 1px solid var(--border);
        padding: 32px 20px;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        z-index: 100;
      }

      .logo-container {
        padding: 0 12px;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .logo-img {
        width: 36px;
        height: 36px;
        object-fit: contain;
      }
      .logo-text {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--primary);
      }

      nav {
        flex-grow: 1;
      }

      nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        border-radius: var(--radius);
        transition: 0.2s;
        margin-bottom: 4px;
      }

      nav a:hover,
      nav a.active {
        background: #f4f0fa;
        color: var(--primary);
      }

      nav a.active {
        font-weight: 600;
        background: #f4f0fa;
      }

      #super-admin-nav {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: none;
      }

      .nav-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05rem;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-left: 16px;
        font-weight: 700;
      }

      .logout-container {
        padding-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
      }

      .btn-logout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 90%;
        padding: 12px;
        background: var(--danger);
        color: white;
        text-decoration: none;
        font-weight: 600;
        border-radius: var(--radius);
        transition: opacity 0.2s;
      }

      .btn-logout:hover {
        opacity: 0.9;
      }

      /* Main Content */
      main {
        flex-grow: 1;
        margin-left: 280px;
        padding: 40px 60px;
        box-sizing: border-box;
      }

      .content-wrapper {
        max-width: 1100px;
        margin: 0 auto;
      }

      .header-flex {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 32px;
      }

      .back-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.875rem;
        font-weight: 600;
        margin-bottom: 12px;
        transition: 0.2s;
      }
      .back-link:hover {
        color: var(--primary);
      }

      h1 {
        font-size: 2.4rem;
        margin: 0 0 8px 0;
        font-weight: 800;
        color: #1e1b4b;
      }
      .subtitle {
        color: var(--text-muted);
        font-size: 1.1rem;
      }

      /* Table Styles for Questions */
      .table-container {
        background: white;
        border-radius: 20px;
        border: 1px solid var(--border);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        overflow: hidden;
      }

      table {
        width: 100%;
        border-collapse: collapse;
        text-align: left;
      }

      th {
        background: #fcfcfd;
        padding: 16px 24px;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-muted);
        font-weight: 700;
        border-bottom: 1px solid var(--border);
      }

      td {
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        font-size: 0.95rem;
      }

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

      .badge {
        padding: 4px 12px;
        border-radius: 99px;
        font-size: 0.75rem;
        font-weight: 600;
        background: #f4f0fa;
        color: var(--primary);
      }

      /* Action Buttons */
      .btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border-radius: 8px;
        text-decoration: none;
        font-size: 0.875rem;
        font-weight: 600;
        transition: 0.2s;
        cursor: pointer;
        border: 1px solid transparent;
      }

      .btn-primary {
        background: var(--primary);
        color: white;
      }
      .btn-primary:hover {
        background: var(--primary-hover);
      }

      .btn-outline {
        background: white;
        border-color: var(--border);
        color: var(--text-main);
      }
      .btn-outline:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
      }

      .btn-danger-outline {
        background: white;
        border-color: #fecaca;
        color: var(--danger);
      }
      .btn-danger-outline:hover {
        background: #fef2f2;
        border-color: var(--danger);
      }

      .actions-cell {
        display: flex;
        gap: 8px;
        justify-content: flex-end;
      }


/* --- Consolidated from lessons.html (style block 1) --- */
:root {
        --primary: #4e2a84;
        --primary-hover: #311d52;
        --bg: #f8fafc;
        --sidebar: #ffffff;
        --text-main: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
        --danger: #ef4444;
        --radius: 12px;
      }

      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        color: var(--text-main);
        margin: 0;
        display: flex;
        min-height: 100vh;
      }

      aside {
        width: 280px;
        background: var(--sidebar);
        border-right: 1px solid var(--border);
        padding: 32px 20px;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        z-index: 100;
      }

      .logo-container {
        padding: 0 12px;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .logo-img { width: 36px; height: 36px; object-fit: contain; }
      .logo-text { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

      nav { flex-grow: 1; }
      nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        border-radius: var(--radius);
        transition: 0.2s;
        margin-bottom: 4px;
      }
      nav a:hover, nav a.active {
        background: #f4f0fa;
        color: var(--primary);
      }
      nav a.active { font-weight: 600; background: #f4f0fa; }

      #super-admin-nav {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: none; 
      }
      .nav-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05rem;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-left: 16px;
        font-weight: 700;
      }

      .logout-container {
        padding-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
      }
      .btn-logout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 90%;
        padding: 12px;
        background: var(--danger);
        color: white;
        text-decoration: none;
        font-weight: 600;
        border-radius: var(--radius);
        transition: opacity 0.2s;
      }
      .btn-logout:hover { opacity: 0.9; }

      main {
        flex-grow: 1;
        margin-left: 280px;
        padding: 40px 60px;
        box-sizing: border-box;
      }
      .content-wrapper { max-width: 1100px; margin: 0 auto; }

      .header-flex {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 32px;
      }
      h1 { font-size: 2.4rem; margin: 0 0 8px 0; font-weight: 800; color: #1e1b4b; }
      .subtitle { color: var(--text-muted); font-size: 1.1rem; }

      .table-container {
        background: white;
        border-radius: 20px;
        border: 1px solid var(--border);
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        overflow: hidden;
      }
      table { width: 100%; border-collapse: collapse; text-align: left; }
      th {
        background: #fcfcfd;
        padding: 16px 24px;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-muted);
        font-weight: 700;
        border-bottom: 1px solid var(--border);
      }
      td { padding: 16px 24px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
      tr:last-child td { border-bottom: none; }

      .badge {
        padding: 4px 12px;
        border-radius: 99px;
        font-size: 0.75rem;
        font-weight: 600;
        background: #f4f0fa;
        color: var(--primary);
      }

      .btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border-radius: 8px;
        text-decoration: none;
        font-size: 0.875rem;
        font-weight: 600;
        transition: 0.2s;
        cursor: pointer;
        border: 1px solid transparent;
      }
      .btn-primary { background: var(--primary); color: white; }
      .btn-primary:hover { background: var(--primary-hover); }
      .btn-outline {
        background: white;
        border-color: var(--border);
        color: var(--text-main);
      }
      .btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }
      .btn-danger-outline {
        background: white;
        border-color: #fecaca;
        color: var(--danger);
      }
      .btn-danger-outline:hover { background: #fef2f2; border-color: var(--danger); }

      .actions-cell { display: flex; gap: 8px; justify-content: flex-end; }

      .controls-row {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 20px;
        gap: 12px;
      }
      .limit-select {
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: white;
        font-family: inherit;
        cursor: pointer;
      }
      .pagination {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        padding: 16px 24px;
        background: #fcfcfd;
        border-top: 1px solid var(--border);
      }
      .page-btn {
        padding: 6px 12px;
        border-radius: 6px;
        border: 1px solid var(--border);
        background: white;
        cursor: pointer;
        font-weight: 500;
        transition: 0.2s;
      }
      .page-btn:hover:not(:disabled) { background: #f8fafc; }
      .page-btn:disabled { cursor: not-allowed; opacity: 0.5; }
      .loading-spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 2px solid var(--border);
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
      }
      @keyframes spin { to { transform: rotate(360deg); } }


/* --- Consolidated from login.html (style block 1) --- */
:root {
            --kamunica-primary: #8E44AD;
            --kamunica-dark: #2D1343;
            --kamunica-field: #F1EDF7;
            --error-red: #ff5252;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: #ffffff;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            color: var(--kamunica-dark);
        }

        .login-card {
          text-align: center;
          width: 100%;
          max-width: 400px;
          padding: 40px;
        }

        .logo {
            height: 80px;
            margin-bottom: 24px;
        }

        .login-card .logo {
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
            margin-bottom: 16px;
          }

          .login-card h1 {
            text-align: center;
          }

        h1 {
            font-size: 32px;
            font-weight: 800;
            margin: 0 0 8px 0;
            letter-spacing: -0.5px;
        }

        p {
            color: #666;
            font-size: 16px;
            margin-bottom: 40px;
        }

        .input-group {
            margin-bottom: 16px;
            position: relative;
        }

        input {
            width: 100%;
            padding: 18px 24px;
            border-radius: 30px;
            border: none;
            background-color: var(--kamunica-field);
            font-size: 16px;
            font-weight: 600;
            color: var(--kamunica-dark);
            box-sizing: border-box;
            outline: none;
        }

        input::placeholder {
            color: #aaa;
        }

        .login-btn {
            width: 100%;
            padding: 18px;
            border-radius: 30px;
            border: none;
            background-color: var(--kamunica-primary);
            color: white;
            font-size: 16px;
            font-weight: 800;
            letter-spacing: 1.2px;
            cursor: pointer;
            margin-top: 16px;
            transition: transform 0.2s, opacity 0.2s;
            box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
        }

        .login-btn:disabled {
            background-color: #ccc;
            box-shadow: none;
            cursor: not-allowed;
        }

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

        #errorMessage {
            margin-top: 20px;
            padding: 12px;
            background-color: #fff1f1;
            border: 1px solid #ffcccc;
            border-radius: 12px;
            color: var(--error-red);
            font-size: 14px;
            font-weight: 600;
            display: none; /* Hidden by default */
        }


/* --- Consolidated from manage-admins.html (style block 1) --- */
:root {
        --primary: #4e2a84;
        --primary-hover: #311d52;
        --bg: #f8fafc;
        --sidebar: #ffffff;
        --text-main: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
        --danger: #ef4444;
        --success: #10b981;
        --warning: #f59e0b;
        --radius: 12px;
      }

      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        margin: 0;
        display: flex;
        min-height: 100vh;
      }

      /* Sidebar */
      aside {
        width: 280px;
        background: var(--sidebar);
        border-right: 1px solid var(--border);
        padding: 32px 20px;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        z-index: 100;
      }

      .logo-container {
        padding: 0 12px;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .logo-img {
        width: 36px;
        height: 36px;
        object-fit: contain;
      }
      .logo-text {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--primary);
      }

      nav {
        flex-grow: 1;
      }
      nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        border-radius: var(--radius);
        transition: 0.2s;
        margin-bottom: 4px;
      }
      nav a:hover,
      nav a.active {
        background: #f4f0fa;
        color: var(--primary);
      }
      nav a.active {
        font-weight: 600;
        background: #f4f0fa;
      }

      #super-admin-nav {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: none;
      }
      .nav-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05rem;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-left: 16px;
        font-weight: 700;
      }

      .logout-container {
        padding-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
      }
      .btn-logout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 90%;
        padding: 12px;
        background: var(--danger);
        color: white;
        text-decoration: none;
        font-weight: 600;
        border-radius: var(--radius);
        transition: opacity 0.2s;
      }

      /* Main Content */
      main {
        flex-grow: 1;
        margin-left: 280px;
        padding: 40px 60px;
        box-sizing: border-box;
      }
      h1 {
        font-size: 2.4rem;
        color: #1e1b4b;
        font-weight: 800;
        margin: 0;
      }
      .subtitle {
        color: var(--text-muted);
        margin-bottom: 30px;
      }

      .controls-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        gap: 16px;
      }

      .search-wrapper {
        position: relative;
        flex-grow: 1;
        max-width: 400px;
        display: flex;
        align-items: center;
      }

      .search-wrapper svg {
        position: absolute;
        left: 14px;
        color: var(--text-muted);
        pointer-events: none;
      }

      .search-input {
        width: 100%;
        padding: 12px 12px 12px 42px;
        border-radius: 10px;
        border: 1px solid var(--border);
        font-family: inherit;
        font-size: 0.95rem;
        outline: none;
        transition: 0.2s;
        background: white;
      }

      .btn-add {
        background: var(--primary);
        color: white;
        padding: 12px 20px;
        border-radius: 10px;
        text-decoration: none;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
      }

      /* Table Styles */
      .table-wrapper {
        background: white;
        border-radius: var(--radius);
        border: 1px solid var(--border);
        overflow: hidden;
      }

      table {
        width: 100%;
        border-collapse: collapse;
      }
      th {
        background: #fcfcfd;
        padding: 16px 24px;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: var(--text-muted);
        text-align: left;
        border-bottom: 1px solid var(--border);
      }
      td {
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        font-size: 0.95rem;
      }

      .admin-cell {
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .admin-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary);
        font-weight: 700;
      }

      .badge {
        padding: 4px 12px;
        border-radius: 99px;
        font-size: 0.75rem;
        font-weight: 600;
      }
      .badge-super {
        background: #fef3c7;
        color: #92400e;
      }
      .badge-standard {
        background: #e0e7ff;
        color: var(--primary);
      }

      .action-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: white;
        cursor: pointer;
        font-weight: 600;
        transition: 0.2s;
        color: var(--primary);
      }
      .action-btn:hover {
        background: #f4f0fa;
        border-color: var(--primary);
      }
      .action-btn.delete {
        color: var(--danger);
      }
      .action-btn.delete:hover {
        background: #fef2f2;
        border-color: var(--danger);
      }


/* --- Consolidated from manage-avatars.html (style block 1) --- */
:root {
        --primary: #4e2a84;
        --primary-hover: #311d52;
        --bg: #f8fafc;
        --sidebar: #ffffff;
        --text-main: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
        --danger: #ef4444;
        --success: #10b981;
        --warning: #f59e0b;
        --radius: 12px;
      }

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

      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        color: var(--text-main);
        display: flex;
        min-height: 100vh;
      }

      /* Sidebar */
      aside {
        width: 280px;
        background: var(--sidebar);
        border-right: 1px solid var(--border);
        padding: 32px 20px;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
        z-index: 100;
      }

      .logo-container {
        padding: 0 12px;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .logo-img { width: 36px; height: 36px; object-fit: contain; }
      .logo-text { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

      nav { flex-grow: 1; }
      nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        border-radius: var(--radius);
        transition: 0.2s;
        margin-bottom: 4px;
      }
      nav a:hover, nav a.active { background: #f4f0fa; color: var(--primary); }
      nav a.active { font-weight: 600; }

      #super-admin-nav {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: none; 
      }

      .nav-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-left: 16px;
        font-weight: 700;
      }

      .logout-container { padding-top: 20px; display: flex; justify-content: center; }
      .btn-logout {
        display: flex; align-items: center; justify-content: center; gap: 8px;
        width: 90%; padding: 12px; background: var(--danger);
        color: white; text-decoration: none; font-weight: 600; border-radius: var(--radius);
      }

      /* Main Content */
      main { flex-grow: 1; margin-left: 280px; padding: 40px 60px; }
      .content-wrapper { max-width: 1100px; margin: 0 auto; }

      .page-header { margin-bottom: 32px; }
      .back-link { 
        display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted);
        text-decoration: none; font-size: 0.9rem; margin-bottom: 16px; transition: 0.2s;
      }
      .back-link:hover { color: var(--primary); }

      .header-main { display: flex; justify-content: space-between; align-items: flex-end; }
      h1 { font-size: 2.4rem; font-weight: 800; color: #1e1b4b; }
      .subhead { color: var(--text-muted); font-size: 1.1rem; }

      /* Stats Grid */
      .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
      .stat-item {
        background: white; padding: 24px; border-radius: 20px;
        border: 1px solid var(--border); display: flex; align-items: center; gap: 20px;
      }
      .stat-icon {
        width: 48px; height: 48px; border-radius: 12px; background: #f4f0fa;
        display: flex; align-items: center; justify-content: center; color: var(--primary);
      }
      .stat-info h3 { font-size: 1.5rem; font-weight: 800; color: #1e1b4b; }
      .stat-info p { color: var(--text-muted); font-size: 0.875rem; }

      /* Table Wrapper */
      .table-wrapper { background: white; border-radius: 20px; border: 1px solid var(--border); overflow: hidden; }
      table { width: 100%; border-collapse: collapse; }
      th {
        background: #fcfcfd; padding: 16px 24px; font-size: 0.75rem;
        text-transform: uppercase; color: var(--text-muted); font-weight: 700; border-bottom: 1px solid var(--border); text-align: left;
      }
      td { padding: 16px 24px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }

      .badge { padding: 4px 12px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
      .badge-active { background: #ecfdf5; color: var(--success); }
      .badge-inactive { background: #fef2f2; color: var(--danger); }

      .file-path-cell { max-width: 200px; }
      .file-link { color: var(--primary); text-decoration: none; font-size: 0.85rem; font-family: monospace; }
      .file-link:hover { text-decoration: underline; }

      .action-btns { display: flex; gap: 8px; justify-content: flex-end; }
      .icon-btn { 
        background: white; border: 1px solid var(--border); padding: 8px; border-radius: 8px;
        cursor: pointer; color: var(--text-muted); transition: 0.2s;
      }
      .icon-btn:hover { background: #f8fafc; color: var(--primary); border-color: var(--primary); }
      .icon-btn.delete:hover { color: var(--danger); border-color: var(--danger); background: #fef2f2; }

      /* Modals */
      .modal {
        display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; padding: 20px;
      }
      .modal.active { display: flex; }
      .modal-content {
        background: white; width: 100%; max-width: 500px; border-radius: 20px;
        padding: 24px; position: relative; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
      }
      .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
      .close-modal { background: none; border: none; cursor: pointer; color: var(--text-muted); }

      .form-group { margin-bottom: 20px; }
      .form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
      .form-group input, .form-group select {
        width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; font-family: inherit;
      }
      .field-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
      .file-info { font-size: 0.8rem; margin-top: 8px; font-weight: 500; }

      .btn-save { background: var(--primary); color: white; border: none; padding: 12px 24px; border-radius: 10px; font-weight: 600; cursor: pointer; }
      .btn-cancel { background: white; border: 1px solid var(--border); padding: 12px 24px; border-radius: 10px; font-weight: 600; cursor: pointer; }
      .btn-danger { background: var(--danger); color: white; border: none; padding: 12px 24px; border-radius: 10px; font-weight: 600; cursor: pointer; }

      .modal-buttons { display: flex; gap: 12px; justify-content: flex-end; margin-top: 32px; }

      /* Toast */
      .toast {
        position: fixed; bottom: 24px; right: 24px; padding: 16px 24px;
        border-radius: 12px; color: white; font-weight: 600; display: flex;
        align-items: center; gap: 12px; z-index: 2000; animation: slideUp 0.3s ease-out;
      }
      @keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
      @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }


/* --- Consolidated from manage-users.html (style block 1) --- */
:root {
        --primary: #4e2a84;
        --primary-hover: #311d52;
        --bg: #f8fafc;
        --sidebar: #ffffff;
        --text-main: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
        --danger: #ef4444;
        --success: #10b981;
        --radius: 12px;
      }

      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        margin: 0;
        display: flex;
        min-height: 100vh;
      }

      /* Sidebar */
      aside {
        width: 280px;
        background: var(--sidebar);
        border-right: 1px solid var(--border);
        padding: 32px 20px;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        z-index: 100;
      }

      .logo-container {
        padding: 0 12px;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .logo-img {
        width: 36px;
        height: 36px;
        object-fit: contain;
      }
      .logo-text {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--primary);
      }

      nav {
        flex-grow: 1;
      }
      nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        border-radius: var(--radius);
        transition: 0.2s;
        margin-bottom: 4px;
      }
      nav a:hover,
      nav a.active {
        background: #f4f0fa;
        color: var(--primary);
      }
      nav a.active {
        font-weight: 600;
        background: #f4f0fa;
      }

      #super-admin-nav {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: none;
      }
      .nav-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05rem;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-left: 16px;
        font-weight: 700;
      }

      .logout-container {
        padding-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
      }
      .btn-logout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 90%;
        padding: 12px;
        background: var(--danger);
        color: white;
        text-decoration: none;
        font-weight: 600;
        border-radius: var(--radius);
        transition: opacity 0.2s;
      }

      /* Main Content */
      main {
        flex-grow: 1;
        margin-left: 280px;
        padding: 40px 60px;
        box-sizing: border-box;
      }
      h1 {
        font-size: 2.4rem;
        color: #1e1b4b;
        font-weight: 800;
        margin: 0;
      }
      .subtitle {
        color: var(--text-muted);
        margin-bottom: 30px;
      }

      /* Controls Row */
      .controls-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        gap: 16px;
      }

      .search-wrapper {
        position: relative;
        flex-grow: 1;
        max-width: 400px;
        display: flex;
        align-items: center;
      }

      .search-wrapper svg {
        position: absolute;
        left: 14px;
        color: var(--text-muted);
        pointer-events: none;
      }

      .search-input {
        width: 100%;
        padding: 12px 12px 12px 42px;
        border-radius: 10px;
        border: 1px solid var(--border);
        font-family: inherit;
        font-size: 0.95rem;
        outline: none;
        transition: 0.2s;
        background: white;
      }

      .search-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(78, 42, 132, 0.1);
      }

      .filter-select {
        padding: 12px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: white;
        font-family: inherit;
        color: var(--text-main);
        outline: none;
        cursor: pointer;
      }

      /* Table Styles */
      .table-wrapper {
        background: white;
        border-radius: var(--radius);
        border: 1px solid var(--border);
        overflow: hidden;
      }

      table {
        width: 100%;
        border-collapse: collapse;
      }
      th {
        background: #fcfcfd;
        padding: 16px 24px;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: var(--text-muted);
        text-align: left;
        border-bottom: 1px solid var(--border);
      }
      td {
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        font-size: 0.95rem;
      }

      .user-cell {
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #e2e8f0;
        object-fit: cover;
      }

      .badge {
        padding: 4px 12px;
        border-radius: 99px;
        font-size: 0.75rem;
        font-weight: 600;
      }
      .badge-active {
        background: #ecfdf5;
        color: var(--success);
      }

      .action-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: white;
        cursor: pointer;
        font-weight: 600;
        transition: 0.2s;
        color: var(--primary);
      }
      .action-btn:hover {
        background: #f4f0fa;
        border-color: var(--primary);
      }

      /* Pagination */
      .pagination {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        background: #fcfcfd;
        border-top: 1px solid var(--border);
      }

      .page-info {
        color: var(--text-muted);
        font-size: 0.9rem;
      }
      .page-controls {
        display: flex;
        gap: 8px;
      }
      .page-btn {
        padding: 6px 12px;
        border-radius: 6px;
        border: 1px solid var(--border);
        background: white;
        cursor: pointer;
        font-weight: 500;
        transition: 0.2s;
      }
      .page-btn:hover:not(:disabled) {
        background: #f8fafc;
      }
      .page-btn:disabled {
        cursor: not-allowed;
        opacity: 0.5;
      }
      .page-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
      }

      .loading-spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 2px solid var(--border);
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
      }

      @keyframes spin {
        to { transform: rotate(360deg); }
      }


/* --- Consolidated from user-statistics.html (style block 1) --- */
* {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      :root {
        --primary: #4e2a84;
        --primary-hover: #311d52;
        --primary-light: #f4f0fa;
        --bg: #f8fafc;
        --sidebar: #ffffff;
        --text-main: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
        --danger: #ef4444;
        --success: #10b981;
        --warning: #f59e0b;
        --radius-sm: 8px;
        --radius-md: 12px;
        --radius-xl: 20px;
      }

      body {
        font-family: "Inter", sans-serif;
        background: var(--bg);
        color: var(--text-main);
        display: flex;
        min-height: 100vh;
      }

      aside {
        width: 280px;
        background: var(--sidebar);
        border-right: 1px solid var(--border);
        padding: 32px 20px;
        position: fixed;
        height: 100vh;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        z-index: 100;
      }

      .logo-container {
        padding: 0 12px;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .logo-img {
        width: 36px;
        height: 36px;
        object-fit: contain;
      }
      .logo-text {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--primary);
      }

      nav {
        flex-grow: 1;
      }
      nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        border-radius: var(--radius-md);
        transition: 0.2s;
        margin-bottom: 4px;
      }
      nav a:hover,
      nav a.active {
        background: var(--primary-light);
        color: var(--primary);
      }
      nav a.active {
        font-weight: 600;
        background: var(--primary-light);
      }

      #super-admin-nav {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
        display: none;
      }
      .nav-label {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05rem;
        color: var(--text-muted);
        margin-bottom: 8px;
        padding-left: 16px;
        font-weight: 700;
      }

      .logout-container {
        padding-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
      }
      .btn-logout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 90%;
        padding: 12px;
        background: var(--danger);
        color: white;
        text-decoration: none;
        font-weight: 600;
        border-radius: var(--radius-md);
        transition: opacity 0.2s;
      }
      .btn-logout:hover {
        opacity: 0.9;
      }

      main {
        flex-grow: 1;
        margin-left: 280px;
        padding: 40px 60px;
        box-sizing: border-box;
      }
      .content-wrapper {
        max-width: 1100px;
        margin: 0 auto;
      }

      .header-flex {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 32px;
      }
      h1 {
        font-size: 2.4rem;
        margin: 0 0 8px 0;
        font-weight: 800;
        color: #1e1b4b;
      }
      .subtitle {
        color: var(--text-muted);
        font-size: 1.1rem;
      }

      .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
        gap: 20px;
        margin-bottom: 40px;
      }
      .stat-card {
        background: white;
        border: 1px solid var(--border);
        border-radius: var(--radius-xl);
        padding: 24px 20px;
        display: flex;
        align-items: center;
        gap: 18px;
        transition: all 0.2s ease;
        box-shadow: 0 1px 2px rgba(0,0,0,0.03);
      }
      .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 20px -12px rgba(0, 0, 0, 0.1);
      }
      .stat-icon {
        width: 52px;
        height: 52px;
        background: var(--primary-light);
        border-radius: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary);
      }
      .stat-info h3 {
        font-size: 2rem;
        font-weight: 800;
        line-height: 1.2;
        margin-bottom: 4px;
        color: var(--text-main);
      }
      .stat-info p {
        color: var(--text-muted);
        font-size: 0.8rem;
        font-weight: 500;
        letter-spacing: 0.3px;
        text-transform: uppercase;
      }

      .table-container {
        background: white;
        border-radius: 20px;
        border: 1px solid var(--border);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        overflow: hidden;
        margin-bottom: 32px;
      }
      table {
        width: 100%;
        border-collapse: collapse;
        text-align: left;
      }
      th {
        background: #fcfcfd;
        padding: 16px 24px;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-muted);
        font-weight: 700;
        border-bottom: 1px solid var(--border);
      }
      td {
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        font-size: 0.95rem;
        vertical-align: middle;
      }
      tr:last-child td {
        border-bottom: none;
      }

      .badge {
        padding: 4px 12px;
        border-radius: 99px;
        font-size: 0.75rem;
        font-weight: 600;
        background: #f4f0fa;
        color: var(--primary);
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
      .difficulty-level {
        background: #eef2ff;
        color: #4338ca;
      }

      .progress-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 140px;
      }
      .progress-bar-bg {
        flex: 1;
        background: var(--border);
        border-radius: 20px;
        height: 8px;
        overflow: hidden;
      }
      .progress-fill {
        height: 8px;
        background: var(--primary);
        border-radius: 20px;
        width: 0%;
        transition: width 0.25s ease;
      }
      .progress-fill-success {
        background: var(--success);
      }
      .score-badge {
        font-weight: 700;
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 20px;
        font-size: 0.8rem;
      }

      .user-cell {
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .avatar-img {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        object-fit: cover;
        background: #f1f5f9;
        border: 1px solid var(--border);
      }
      .user-info {
        font-weight: 500;
      }
      .user-email {
        font-size: 0.7rem;
        color: var(--text-muted);
      }

      .loading-spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 2px solid var(--border);
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
      }
      @keyframes spin {
        to { transform: rotate(360deg); }
      }

      .refresh-btn {
        background: var(--primary);
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 10px;
        font-weight: 600;
        font-size: 0.85rem;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        transition: 0.2s;
        font-family: inherit;
      }
      .refresh-btn:hover {
        background: var(--primary-hover);
        transform: translateY(-1px);
      }
      .refresh-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
      }

      .toast {
        position: fixed;
        bottom: 24px;
        right: 24px;
        background: var(--success);
        color: white;
        padding: 12px 20px;
        border-radius: 40px;
        font-size: 0.85rem;
        font-weight: 500;
        z-index: 1200;
        animation: slideIn 0.25s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      }
      .toast.error {
        background: var(--danger);
      }
      @keyframes slideIn {
        from { transform: translateX(100%); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
      }

      .empty-row td {
        text-align: center;
        padding: 48px 24px;
        color: var(--text-muted);
      }

      /* Shared management-page styling for similar admin list screens */
      .content-wrapper {
        max-width: 1100px;
        margin: 0 auto;
      }

      .page-header {
        margin-bottom: 32px;
      }

      .header-main {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 20px;
        flex-wrap: wrap;
      }

      .subhead,
      .subtitle {
        color: var(--text-muted);
        font-size: 1rem;
        margin: 8px 0 0;
      }

      .controls-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        gap: 16px;
        margin-bottom: 24px;
        flex-wrap: wrap;
      }

      .search-wrapper {
        position: relative;
        flex: 1;
        min-width: 240px;
        max-width: 440px;
        display: flex;
        align-items: center;
      }

      .search-wrapper svg {
        position: absolute;
        left: 14px;
        color: var(--text-muted);
        pointer-events: none;
      }

      .search-input,
      .filter-select {
        width: 100%;
        padding: 12px 12px 12px 42px;
        border: 1px solid var(--border);
        border-radius: 10px;
        font-family: inherit;
        font-size: 0.95rem;
        background: white;
        color: var(--text-main);
        outline: none;
        transition: 0.2s;
      }

      .search-input:focus,
      .filter-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(78, 42, 132, 0.1);
      }

      .filter-select {
        padding-left: 12px;
      }

      .btn-add,
      .btn-save {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 16px;
        border-radius: 10px;
        border: none;
        text-decoration: none;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        background: var(--primary);
        color: white;
        transition: 0.2s;
      }

      .btn-add:hover,
      .btn-save:hover {
        background: var(--primary-hover);
      }

      .table-wrapper {
        background: white;
        border-radius: 20px;
        border: 1px solid var(--border);
        overflow: hidden;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
      }

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

      th {
        background: #fcfcfd;
        padding: 16px 24px;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--text-muted);
        text-align: left;
        border-bottom: 1px solid var(--border);
        font-weight: 700;
      }

      td {
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        font-size: 0.95rem;
        color: var(--text-main);
      }

      tbody tr:hover {
        background: #f8fafc;
      }

      .admin-cell,
      .user-cell {
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .admin-avatar,
      .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary);
        font-weight: 700;
        object-fit: cover;
      }

      .badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 12px;
        border-radius: 999px;
        font-size: 0.75rem;
        font-weight: 600;
      }

      .badge-active,
      .badge-standard {
        background: #ecfdf5;
        color: var(--success);
      }

      .badge-inactive,
      .badge-super {
        background: #fef2f2;
        color: var(--danger);
      }

      .action-btn,
      .icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: white;
        cursor: pointer;
        font-weight: 600;
        transition: 0.2s;
        color: var(--primary);
      }

      .action-btn:hover,
      .icon-btn:hover {
        background: #f4f0fa;
        border-color: var(--primary);
      }

      .action-btn.delete,
      .icon-btn.delete {
        color: var(--danger);
      }

      .action-btn.delete:hover,
      .icon-btn.delete:hover {
        background: #fef2f2;
        border-color: var(--danger);
      }

      .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        margin-bottom: 32px;
      }

      .stat-item {
        background: white;
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 20px;
        display: flex;
        align-items: center;
        gap: 16px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
      }

      .stat-icon {
        width: 48px;
        height: 48px;
        background: #f4f0fa;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary);
      }

      .stat-info h3 {
        font-size: 1.5rem;
        font-weight: 800;
        margin: 0;
      }

      .stat-info p {
        color: var(--text-muted);
        font-size: 0.8rem;
        margin: 4px 0 0;
        text-transform: uppercase;
        font-weight: 600;
      }

      .pagination {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        background: #fcfcfd;
        border-top: 1px solid var(--border);
      }

      .page-info {
        color: var(--text-muted);
        font-size: 0.9rem;
      }

      .page-controls,
      .pagination-controls {
        display: flex;
        gap: 8px;
      }

      .page-btn,
      .pagination-btn {
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: white;
        cursor: pointer;
        font-weight: 600;
        color: var(--text-main);
        transition: 0.2s;
      }

      .page-btn:hover:not(:disabled),
      .pagination-btn:hover:not(:disabled) {
        background: #f8fafc;
        border-color: var(--primary);
      }

      .page-btn:disabled,
      /* Ensure centered forms still work via content-wrapper */
      .content-wrapper { margin: 0 auto; }
      
      /* --- Master-Detail Split Pane Layout --- */
      .master-detail-main {
          display: flex !important;
          height: 100vh !important;
          gap: 32px;
          margin-left: 280px !important;
          padding: 40px 60px !important;
          box-sizing: border-box;
          width: calc(100vw - 280px) !important;
          overflow: hidden !important;
      }
      .master-pane {
          flex: 0 0 360px;
          display: flex;
          flex-direction: column;
          height: 100%;
          border-right: 1px solid var(--border);
          padding-right: 60px;
      }
      .detail-pane {
          flex: 1;
          display: flex;
          flex-direction: column;
          height: 100%;
          overflow-y: auto;
          padding-left: 8px;
          padding-right: 16px;
          min-width: 0;
      }
      @media (max-width: 900px) {
          .master-detail-main {
              flex-direction: column !important;
              height: auto !important;
              overflow: visible !important;
              padding: 16px !important;
          }
          .master-pane {
              flex: none;
              width: 100%;
              border-right: none;
              border-bottom: 1px solid var(--border);
              padding-right: 0;
              padding-bottom: 24px;
              height: auto;
              max-height: 400px;
          }
          .detail-pane {
              flex: none;
              width: 100%;
              padding-left: 0;
              padding-right: 0;
              overflow: visible;
          }
      }
