/**
 * Unified Stylesheet
 * FictionPortal - Complete Site Styles
 * Color Theme: Olive Green, Deep Purple, Light Sage, Charcoal, Cream, Gold
 */

/* ============================================
   GOOGLE FONTS & RESET
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

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

/* ============================================
   COLOR VARIABLES
   ============================================ */

:root {
    /* Main Color Palette */
    --olive-green: #4a5d28;
    --deep-purple: #23193f;
    --light-sage: #e4edd6;
    --charcoal: #212121;
    --cream: #fffbf0;
    --gold: #e0ca90;
    
    /* Semantic Colors */
    --primary-color: #4a5d28;
    --primary-dark: #23193f;
    --primary-light: #e4edd6;
    --secondary-color: #e0ca90;
    --error-color: #8b2635;
    --success-color: #4a5d28;
    --warning-color: #d4a574;
    --info-color: #4a5d28;
    --background: #e0ca90;
    --surface: #e4edd6;
    --text-primary: #212121;
    --text-secondary: #4a5d28;
    --border-color: #e0ca90;
    --shadow: 0 2px 8px rgba(35, 25, 63, 0.1);
    --shadow-lg: 0 4px 16px rgba(35, 25, 63, 0.15);
}

/* ============================================
   BASE STYLES
   ============================================ */

body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

/* Material Symbols Settings */
.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
    vertical-align: middle;
    user-select: none;
    color: inherit;
}

/* ============================================
   CONTAINERS
   ============================================ */

.container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
    /*background-color: var(--surface);*/
}

.containerh {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
}

.container-small {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav a:hover {
    background-color: var(--primary-dark);
}

/* ============================================
   MENU SYSTEM
   ============================================ */

/* Desktop Menu */
.desktop-menu {
    background: var(--deep-purple);
    box-shadow: 0 2px 10px rgba(35, 25, 63, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

.menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px 15px 0;
    font-weight: 600;
    color: var(--gold);
    border-right: 2px solid var(--olive-green);
    margin-right: 20px;
}

.menu-logo .material-symbols-outlined {
    font-size: 28px;
}

/* Main Menu */
.menu-main {
    display: flex;
    list-style: none;
    align-items: center;
    flex: 1;
}

.menu-main > .menu-item {
    position: relative;
}

.menu-main > .menu-item > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    color: var(--cream);
    font-weight: 600;
    position: relative;
    text-decoration: none;
}

.menu-main > .menu-item > a:hover {
    color: var(--gold);
    background: rgba(224, 202, 144, 0.1);
}

.menu-main > .menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gold);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.menu-main > .menu-item:hover > a::after {
    width: 100%;
}

.menu-icon {
    font-size: 20px;
}

.submenu-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

/* Submenu Styles */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--cream);
    box-shadow: 0 4px 20px rgba(35, 25, 63, 0.2);
    border-radius: 8px;
    border: 2px solid var(--gold);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.menu-item:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu .menu-item {
    position: relative;
}

.submenu .menu-item > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--charcoal);
    font-weight: 500;
    border-bottom: 1px solid var(--light-sage);
    text-decoration: none;
}

.submenu .menu-item:last-child > a {
    border-bottom: none;
}

.submenu .menu-item > a:hover {
    background: var(--light-sage);
    color: var(--olive-green);
}

/* Nested Submenu */
.submenu .submenu {
    left: 100%;
    top: 0;
    margin-left: 5px;
}

.submenu .has-submenu > a .submenu-arrow {
    margin-left: auto;
    transform: rotate(-90deg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: var(--olive-green);
    color: var(--cream);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(74, 93, 40, 0.3);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: #5c7433;
    transform: scale(1.05);
}

.mobile-menu-toggle .material-symbols-outlined {
    font-size: 28px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--cream);
    box-shadow: 2px 0 20px rgba(35, 25, 63, 0.3);
    z-index: 2000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--deep-purple);
    color: var(--cream);
}

.mobile-menu-header .menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    border: none;
    margin: 0;
    padding: 0;
    color: var(--gold);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mobile-menu-close:hover {
    color: var(--cream);
}

.mobile-menu-close .material-symbols-outlined {
    font-size: 28px;
}

/* Accordion Menu */
.mobile-menu-content {
    padding: 10px 0;
}

.accordion-item {
    border-bottom: 1px solid var(--light-sage);
}

.accordion-header,
.accordion-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: var(--charcoal);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.accordion-header:hover,
.accordion-link:hover {
    background: var(--light-sage);
    color: var(--olive-green);
}

.accordion-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: var(--olive-green);
}

.accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--light-sage);
}

.accordion-content.active {
    max-height: 1000px;
}

.accordion-content .accordion-item {
    border-bottom: 1px solid var(--gold);
}

.accordion-content .accordion-header,
.accordion-content .accordion-link {
    padding-left: 40px;
}

.level-2 .accordion-header,
.level-2 .accordion-link {
    padding-left: 60px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background-color: var(--cream);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.card-body {
    margin-bottom: 1rem;
}

/* ============================================
   FORMS
   ============================================ */

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label.required::after {
    content: ' *';
    color: var(--error-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--cream);
    color: var(--charcoal);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 93, 40, 0.1);
}

.form-control.error {
    border-color: var(--error-color);
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--error-color);
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-check-input {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--olive-green);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--olive-green);
    color: var(--cream);
}

.btn-primary:hover:not(:disabled) {
    background-color: #5c7433;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 93, 40, 0.3);
}

.btn-secondary {
    background-color: var(--gold);
    color: var(--deep-purple);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #d4be84;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(224, 202, 144, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--cream);
}

.btn-success:hover:not(:disabled) {
    background-color: #5c7433;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 93, 40, 0.3);
}

.btn-danger {
    background-color: var(--error-color);
    color: var(--cream);
}

.btn-danger:hover:not(:disabled) {
    background-color: #6d1f2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 38, 53, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-link {
    background: none;
    color: var(--primary-color);
    padding: 0;
    text-decoration: underline;
    text-transform: none;
    letter-spacing: normal;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.813rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-small .material-symbols-outlined {
    font-size: 16px;
}

.btn-edit {
    background: var(--olive-green);
    color: var(--cream);
}

.btn-edit:hover {
    background: #5c7433;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(74, 93, 40, 0.3);
}

.btn-delete {
    background: var(--deep-purple);
    color: var(--cream);
}

.btn-delete:hover {
    background: #2f2350;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(35, 25, 63, 0.3);
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    border: 2px solid;
}

.alert.show {
    display: flex;
}

.alert-success {
    background-color: var(--light-sage);
    color: var(--olive-green);
    border-color: var(--olive-green);
}

.alert-error {
    background-color: #f5e6e8;
    color: var(--deep-purple);
    border-color: var(--deep-purple);
}

.alert-warning {
    background-color: #fff3e0;
    color: #e65100;
    border-color: var(--warning-color);
}

.alert-info {
    background-color: var(--light-sage);
    color: var(--olive-green);
    border-color: var(--olive-green);
}

.alert .material-symbols-outlined {
    font-size: 24px;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(35, 25, 63, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--olive-green);
    font-size: 1.25rem;
    font-weight: 600;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-header {
    background-color: var(--cream);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.dashboard-title {
    color: var(--deep-purple);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: var(--olive-green);
    font-size: 1rem;
    font-weight: 500;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 100%;
}

@media (min-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.dashboard-card {
    background-color: var(--background);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.dashboard-card-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* ============================================
   MENU MANAGER
   ============================================ */

.menu-manager {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

.stat-card {
    background: var(--light-sage);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(35, 25, 63, 0.1);
    text-align: center;
    border: 2px solid var(--gold);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 25, 63, 0.15);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--olive-green);
    line-height: 1;
}

.stat-card .stat-label {
    color: var(--deep-purple);
    margin-top: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Menu Table */
.menu-table {
    background: var(--cream);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(35, 25, 63, 0.1);
    overflow: hidden;
    border: 2px solid var(--light-sage);
}

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

.menu-table th,
.menu-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--light-sage);
}

.menu-table th {
    background: var(--deep-purple);
    color: var(--cream);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-table tbody tr {
    background: var(--cream);
    transition: background 0.2s ease;
}

.menu-table tbody tr:hover {
    background: var(--light-sage);
}

.menu-table td {
    color: var(--charcoal);
    font-weight: 500;
}

.menu-actions {
    display: flex;
    gap: 8px;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-active {
    background: var(--olive-green);
    color: var(--cream);
}

.status-inactive {
    background: var(--gold);
    color: var(--deep-purple);
}

.indent-level-1 { padding-left: 30px; }
.indent-level-2 { padding-left: 60px; }
.indent-level-3 { padding-left: 90px; }

/* ============================================
   MODAL
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(35, 25, 63, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--cream);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(35, 25, 63, 0.3);
    border: 3px solid var(--gold);
}

.modal-header {
    padding: 24px;
    border-bottom: 2px solid var(--light-sage);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--deep-purple);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--cream);
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gold);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(224, 202, 144, 0.2);
    color: var(--cream);
}

.modal-body {
    padding: 24px;
    background: var(--cream);
}

.modal-footer {
    padding: 20px 24px;
    border-top: 2px solid var(--light-sage);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: var(--light-sage);
}

/* ============================================
   MEMBERS DIRECTORY
   ============================================ */

/* Alphabet Navigation */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--light-sage);
    border-radius: 12px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(35, 25, 63, 0.1);
    border: 2px solid var(--gold);
}

.alphabet-nav a {
    display: inline-block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--charcoal);
    border: 2px solid var(--gold);
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
    font-weight: 600;
    background-color: var(--cream);
}

.alphabet-nav a:hover {
    background-color: var(--olive-green);
    color: var(--cream);
    border-color: var(--olive-green);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(74, 93, 40, 0.3);
}

.alphabet-nav a.active {
    background-color: var(--deep-purple);
    color: var(--cream);
    border-color: var(--deep-purple);
    box-shadow: 0 2px 6px rgba(35, 25, 63, 0.3);
}

.alphabet-nav a.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    background-color: var(--light-sage);
}

/* Search Box */
.search-box {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gold);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--cream);
    color: var(--charcoal);
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--olive-green);
    box-shadow: 0 0 0 3px rgba(74, 93, 40, 0.1);
}

.search-box button {
    padding: 12px 24px;
    background-color: var(--olive-green);
    color: var(--cream);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background-color: #5c7433;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 93, 40, 0.3);
}

/* Member Grid */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.member-card {
    background-color: var(--cream);
    padding: 0.5rem;
    border-radius: 12px;
    border: 2px solid var(--gold);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(35, 25, 63, 0.1);
}

.member-card:hover {
    box-shadow: 0 4px 16px rgba(35, 25, 63, 0.15);
    transform: translateY(-4px);
    border-color: var(--olive-green);
}

/* Member Avatar */
.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--olive-green), var(--deep-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    border: 3px solid var(--gold);
    box-shadow: 0 2px 8px rgba(35, 25, 63, 0.2);
}

/* Member Info */
.member-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--deep-purple);
    text-align: center;
}

.member-info {
    font-size: 0.875rem;
    color: var(--olive-green);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-align: center;
}

.member-info strong {
    color: var(--charcoal);
}

/* Member Badges */
.member-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    justify-content: center;
}

.member-badges .badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-badges .badge-admin {
    background-color: var(--deep-purple);
    color: var(--cream);
}

.member-badges .badge-moderator {
    background-color: var(--olive-green);
    color: var(--cream);
}

.member-badges .badge-user {
    background-color: var(--gold);
    color: var(--deep-purple);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--gold);
    border-radius: 8px;
    text-decoration: none;
    color: var(--charcoal);
    background-color: var(--cream);
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
}

.pagination a:hover {
    background-color: var(--olive-green);
    color: var(--cream);
    border-color: var(--olive-green);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(74, 93, 40, 0.3);
}

.pagination .current {
    background-color: var(--deep-purple);
    color: var(--cream);
    border-color: var(--deep-purple);
    box-shadow: 0 2px 6px rgba(35, 25, 63, 0.3);
}

.pagination .disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Stats Bar */
.stats-bar {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--light-sage), var(--cream));
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid var(--gold);
    box-shadow: 0 2px 8px rgba(35, 25, 63, 0.1);
}

.stats-bar h2 {
    margin: 0;
    color: var(--deep-purple);
    font-size: 2rem;
    font-weight: 700;
}

.stats-bar p {
    margin: 0.5rem 0 0;
    color: var(--olive-green);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Member Count Badge */
.member-count {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: var(--olive-green);
    color: var(--cream);
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

/* Empty State */
.no-members {
    text-align: center;
    padding: 3rem;
    background-color: var(--light-sage);
    border-radius: 12px;
    border: 2px solid var(--gold);
}

.no-members h3 {
    color: var(--deep-purple);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-members p {
    color: var(--olive-green);
    font-weight: 500;
}

/* ============================================
   USER INFO
   ============================================ */

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--surface);
    border-radius: 8px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.user-details h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.user-details p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================
   TABLE
   ============================================ */

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--background);
}

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

.table th {
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--surface);
}

.table tr:hover {
    background-color: var(--surface);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 12px;
}

.badge-admin {
    background-color: var(--deep-purple);
    color: var(--cream);
}

.badge-moderator {
    background-color: var(--olive-green);
    color: var(--cream);
}

.badge-user {
    background-color: var(--gold);
    color: var(--deep-purple);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: var(--background);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
    color: var(--text-secondary);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    accent-color: var(--olive-green);
}

.checkbox-group label {
    margin: 0 !important;
    text-transform: none !important;
    font-weight: 600 !important;
    color: var(--charcoal) !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-direction: column;
        width: 100%;
    }
    
    .nav a {
        width: 100%;
        text-align: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 1rem;
    }
    
    .menu-manager {
        padding: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-table {
        overflow-x: auto;
    }
    
    .menu-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .alphabet-nav {
        padding: 1rem;
        gap: 0.25rem;
    }
    
    .alphabet-nav a {
        padding: 0.5rem 0.75rem;
        min-width: 38px;
        font-size: 0.875rem;
    }
    
    .member-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box button {
        width: 100%;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
        left: -100%;
    }
    
    .mobile-menu.active {
        left: 0;
    }
    
    .member-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .member-name {
        font-size: 1.1rem;
    }
    
    .stats-bar h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   PROFILE PAGE STYLES
   ============================================ */

.profile-header {
    background: linear-gradient(135deg, var(--olive-green), var(--olive-green));
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.profile-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.profile-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.profile-info p {
    margin: 0.25rem 0;
    opacity: 0.95;
}

.profile-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.profile-badges .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.profile-section {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.profile-section h2 {
    margin-top: 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--background);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateX(5px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-box {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .profile-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info h1 {
        font-size: 1.5rem;
    }
}

/* ============================================
   AMCP (ADMIN) SPECIFIC STYLES
   ============================================ */

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1rem;
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.filter-tab:hover {
    background-color: var(--primary-light);
    color: white;
}

.filter-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* User Actions */
.user-actions {
    display: flex;
    gap: 0.5rem;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-active {
    background-color: var(--success-color);
}

.status-inactive {
    background-color: var(--error-color);
}

.status-flagged {
    background-color: var(--warning-color);
}

/* Info Grid (for user-view) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    padding: 1rem;
    background-color: var(--surface);
    border-radius: 4px;
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

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

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Ban Actions */
.ban-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   ARCHIVE SYSTEM STYLES
   ============================================ */

/* Breadcrumb Navigation */
.breadcrumb {
    background: var(--light-sage);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--olive-green);
}

.breadcrumb a {
    color: var(--olive-green);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--deep-purple);
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--text-secondary);
}

.breadcrumb-inline {
    color: var(--light-sage);
}

.breadcrumb-inline a {
    color: var(--cream);
    text-decoration: none;
}

.breadcrumb-inline a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.35rem;
    margin-bottom: 2rem;
}

.category-card {
    background: var(--light-sage);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 2px solid var(--gold);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 25, 63, 0.15);
    border-color: var(--olive-green);
}

.category-card a {
    text-decoration: none;
    color: var(--deep-purple);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
}

.category-card a:hover {
    color: var(--olive-green);
}

.category-count {
    color: var(--olive-green);
    font-weight: 500;
    font-size: 0.95rem;
    margin-left: 0.25rem;
}

.category-desc {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Story Entry */
.story-entry {
    background: var(--cream);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--gold);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(35, 25, 63, 0.1);
}

.story-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.story-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--deep-purple);
    text-decoration: none;
}

.story-title:hover {
    color: var(--olive-green);
    text-decoration: underline;
}

.story-separator {
    color: var(--gold);
    font-weight: 600;
}

.story-author {
    color: var(--olive-green);
    font-weight: 600;
    text-decoration: none;
}

.story-author:hover {
    text-decoration: underline;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.story-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.story-meta-item .material-symbols-outlined {
    font-size: 18px;
    vertical-align: middle;
}

.story-location {
    background: var(--light-sage);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.story-location strong {
    color: var(--deep-purple);
}

.story-description {
    color: var(--charcoal);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.story-tag {
    background: var(--olive-green);
    color: var(--cream);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.pagination-ellipsis {
    border: none;
    padding: 0.5rem;
}

.no-stories {
    text-align: center;
    padding: 3rem;
    background: var(--light-sage);
    border-radius: 12px;
    border: 2px solid var(--gold);
}

.no-stories .material-symbols-outlined {
    font-size: 64px;
    color: var(--olive-green);
}

/* Story Page Styles */
.story-header-card {
    background: linear-gradient(135deg, var(--olive-green), var(--deep-purple));
    color: var(--cream);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(35, 25, 63, 0.2);
}

.story-title-main {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--cream);
}

.story-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.story-meta-row strong {
    color: var(--gold);
}

.story-meta-row a {
    color: var(--cream);
    text-decoration: underline;
}

.story-meta-row a:hover {
    color: var(--gold);
}

.disclaimer-box {
    background: var(--light-sage);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--gold);
    margin-bottom: 2rem;
}

.disclaimer-box strong {
    color: var(--deep-purple);
    display: block;
    margin-bottom: 0.5rem;
}

/* Chapter Navigation */
.chapter-navigation {
    background: var(--cream);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--gold);
    margin-bottom: 2rem;
}

.chapter-nav-title {
    color: var(--deep-purple);
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chapter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.chapter-select {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid var(--gold);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--cream);
    color: var(--charcoal);
}

.chapter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--olive-green);
    color: var(--cream);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.chapter-btn:hover {
    background: var(--deep-purple);
    transform: translateY(-2px);
}

.chapter-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

/* Chapter Content */
.chapter-content-card {
    background: var(--cream);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--gold);
    margin-bottom: 2rem;
}

.chapter-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--deep-purple);
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--gold);
}

.chapter-body {
    color: var(--charcoal);
    line-height: 1.8;
    font-size: 1.1rem;
}

.chapter-body p {
    margin-bottom: 1rem;
}

.chapter-info {
    background: var(--light-sage);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.no-chapters {
    text-align: center;
    padding: 3rem;
    background: var(--light-sage);
    border-radius: 12px;
    border: 2px solid var(--gold);
}

.no-chapters .material-symbols-outlined {
    font-size: 64px;
    color: var(--olive-green);
}

/* Tag Filter Grid */
.tag-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    column-gap: 1.5rem;
}

.tag-filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tag-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: var(--cream);
    border: 1px solid var(--gold);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    min-height: 36px;
    position: relative;
}

.tag-filter-checkbox:hover {
    background: var(--light-sage);
    border-color: var(--olive-green);
    transform: translateX(2px);
}

.tag-filter-checkbox[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: var(--deep-purple);
    color: var(--cream);
    font-size: 0.85rem;
    line-height: 1.4;
    border-radius: 6px;
    white-space: normal;
    max-width: 250px;
    width: max-content;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(35, 25, 63, 0.3);
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease;
}

.tag-filter-checkbox[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 6px solid transparent;
    border-top-color: var(--deep-purple);
    z-index: 1000;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.tag-filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--olive-green);
    flex-shrink: 0;
}

.tag-filter-checkbox input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--olive-green);
}

.tag-filter-checkbox span {
    flex: 1;
    color: var(--charcoal);
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Tag Mode Selector */
.tag-mode-selector {
    display: flex;
    gap: 0.25rem;
    padding-left: 1.5rem;
}

.tag-mode-option {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: var(--light-sage);
    border: 1px solid var(--gold);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 0.85rem;
}

.tag-mode-option:hover {
    background: var(--cream);
    border-color: var(--olive-green);
}

.tag-mode-option input[type="radio"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin: 0;
}

.tag-mode-option input[type="radio"]:checked + .mode-label {
    font-weight: 700;
}

.mode-label {
    font-size: 0.8rem;
    font-weight: 500;
}

.mode-label.include {
    color: var(--olive-green);
}

.mode-label.exclude {
    color: var(--deep-purple);
}

.tag-mode-option input[type="radio"]:checked + .mode-label.include {
    color: var(--olive-green);
}

.tag-mode-option input[type="radio"]:checked + .mode-label.exclude {
    color: var(--deep-purple);
}

/* Archive Responsive */
@media (max-width: 768px) {
    .story-title-main {
        font-size: 1.8rem;
    }
    
    .story-meta-row {
        font-size: 1rem;
        gap: 1rem;
    }
    
    .chapter-controls {
        flex-direction: column;
    }
    
    .chapter-select {
        width: 100%;
    }
    
    .chapter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .tag-filter-grid {
        grid-template-columns: 1fr;
    }
}
