﻿/*===================================
  TABLE OF CONTENTS
=====================================
  1. RESET & BASE STYLES
  2. CSS VARIABLES (THEME & STRUCTURE)
  3. LAYOUT & STRUCTURE (Page, Header, Content, Footer, Container)
  4. TYPOGRAPHY (Headings, Text, Links)
  5. COMPONENTS
      5.1 Buttons & Controls
      5.2 Forms & Inputs
      5.3 Cards & Containers (Base, Article, Profile, Auth, Stat, Coming Soon)
      5.4 Tables & Pagination
      5.5 Modals
      5.6 Navigation (Header Controls, Admin Nav)
      5.7 User Profile & Drawer
      5.8 Status Indicators & Badges
      5.9 Icons (Font Awesome setup)
  6. UTILITIES (Spacing, Visibility, Dividers)
  7. RESPONSIVE STYLES
===================================*/

/*-----------------------------------
  1. RESET & BASE STYLES
-----------------------------------*/
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    max-width: 2560px!important; /* Max overall width */
    min-width: 350px; /* Min overall width */
    width: 100%;
    margin: 0 auto; /* Center the body if max-width is reached */
    font-family: var(--font-family-base);
    font-size: var(--text-base);
    color: var(--color-text); /* THEMED */
    background-color: var(--color-background); /* THEMED */
    line-height: var(--line-height-base);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;

}

img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    color: inherit; /* Will inherit themed text color */
}

a {
    color: var(--color-accent); /* THEMED */
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

    a:hover {
        color: var(--color-accent-dark); /* THEMED */
        text-decoration: underline;
    }

/*-----------------------------------
  2. CSS VARIABLES (THEME & STRUCTURE)
-----------------------------------*/
:root {
    /* Mood Theme Color Mappings */
    --color-accent: var(--theme-primary, #984063);
    --color-accent-light: var(--theme-accent, rgba(152, 64, 99, 0.1));
    --color-accent-dark: color-mix(in srgb, var(--theme-primary, #984063) 85%, black);
    --color-text: var(--theme-text, #2d2429);
    --color-text-muted: color-mix(in srgb, var(--theme-text, #2d2429) 65%, var(--theme-bg, #faf6f8));
    --color-background: var(--theme-bg, #faf6f8);
    --color-surface: var(--theme-bg, #ffffff); /* Defaulting surface to theme's background */
    --color-border: var(--theme-border, #e5e7eb);
    /* Derived Colors for specific states (dependent on theme) */
    --color-disabled-bg: color-mix(in srgb, var(--theme-bg, #faf6f8) 90%, var(--theme-text, #2d2429) 10%);
    --color-subtle-bg: var(--theme-accent, rgba(152, 64, 99, 0.05)); /* For subtle backgrounds if --theme-accent is suitable */
    --color-button-primary-text: var(--theme-bg); /* Text on primary buttons, assumes theme-bg is contrasting */
    /* Consider a dedicated --theme-primary-text-color if themes vary widely */
    /* Status Colors (Remain Independent of Mood Theme) */
    --color-success: #10b981;
    --color-success-bg: #e6ffed;
    --color-warning: #f59700;
    --color-warning-bg: #fff7e6;
    --color-danger: #f5222d;
    --color-danger-bg: #fff1f0;
    --color-info: #0078d4;
    --color-info-bg: #e6f7ff;
    --color-neutral: #566a7f;
    --color-neutral-bg: #f0f4f8;
    --color-admin-badge-bg: #f9f0ff;
    --color-admin-badge-text: #722ed1;
    /* Typography (From original site.css - Preserved) */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem; /* From original Index Page styles */
    --line-height-base: 1.6;
    --line-height-heading: 1.3;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    /* Spacing (From original site.css - Preserved) */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    /* Borders & Radius (From original site.css - Preserved) */
    --border-width: 1px;
    --border-style: solid;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    /* Shadows (From original site.css - Preserved) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-inner: inset 0 2px 4px 0 rgba(0,0,0,0.06);
    /* Transitions (From original site.css - Preserved) */
    --transition-speed: 0.2s;
    --transition-timing: ease-in-out;
    --transition-base: all var(--transition-speed) var(--transition-timing);
    /* Layout (From original site.css - Preserved) */
    --header-height: 4rem;
    --container-max-width: 100%;
    --container-padding: var(--space-md);
}

/*-----------------------------------
  3. LAYOUT & STRUCTURE
-----------------------------------*/
.page {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
}

.header {
    height: var(--header-height);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    border: none!important;
    box-shadow: none!important;
    background-color: #fff!important;
}

.content {
    flex-grow: 1;
    width: 100%;
    padding-top: 0;
    padding-bottom: var(--space-xl);
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    padding-top: 10px !important; /* Original !important */
}

.footer {
    padding: 0;
    color: var(--color-text-muted); /* THEMED */
    font-size: var(--text-sm);
    text-align: center;
    border-top: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    margin-top: auto;
    background-color: var(--color-surface); /* THEMED */
   
}

.page-layout-centered {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--header-height));
    padding: var(--space-xl) var(--container-padding);
}

/*-----------------------------------
  4. TYPOGRAPHY
-----------------------------------*/
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text); /* THEMED */
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-heading);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--text-3xl);
}

h2 {
    font-size: var(--text-2xl);
    margin-top: var(--space-xl);
}

h3 {
    font-size: var(--text-xl);
    margin-top: var(--space-lg);
}

h4 {
    font-size: var(--text-lg);
}

h5 {
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
}

h6 {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

p {
    margin-bottom: var(--space-md);
    line-height: var(--line-height-base);
}

strong, .bold {
    font-weight: var(--font-weight-bold);
}

.semibold {
    font-weight: var(--font-weight-semibold);
}

.medium {
    font-weight: var(--font-weight-medium);
}

.normal {
    font-weight: var(--font-weight-normal);
}

.light {
    font-weight: var(--font-weight-light);
}

.text-muted {
    color: var(--color-text-muted);
}
/* THEMED */
.text-accent {
    color: var(--color-accent);
}
/* THEMED */
.text-sm {
    font-size: var(--text-sm);
}

.text-lg {
    font-size: var(--text-lg);
}

.section-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    /* color: var(--color-text); implicit */
}

.subsection-title {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text); /* THEMED */
    margin-bottom: var(--space-md);
    margin-top: var(--space-lg);
}

/*-----------------------------------
  5. COMPONENTS
-----------------------------------*/

/* 5.1 Buttons & Controls */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.65rem var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border: var(--border-width) var(--border-style) transparent;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

    .btn:focus-visible {
        outline: 2px solid var(--color-accent); /* THEMED */
        outline-offset: 2px;
    }

    .btn:disabled, .btn.disabled {
        opacity: 0.65;
        cursor: not-allowed;
        box-shadow: none;
    }

.btn-primary {
    background-color: var(--color-accent); /* THEMED */
    color: var(--color-button-primary-text); /* THEMED - text on primary button */
    box-shadow: var(--shadow-sm);
}

    .btn-primary:hover:not(:disabled) {
        background-color: var(--color-accent-dark); /* THEMED */
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

.btn-secondary {
    background-color: var(--color-surface); /* THEMED */
    color: var(--color-accent); /* THEMED */
    border-color: var(--color-accent); /* THEMED */
}

    .btn-secondary:hover:not(:disabled) {
        background-color: var(--color-accent-light); /* THEMED */
        border-color: var(--color-accent-dark); /* THEMED */
        color: var(--color-accent-dark); /* THEMED */
    }

.btn-ghost {
    background-color: transparent;
    color: var(--color-accent); /* THEMED */
    border-color: transparent;
    box-shadow: none;
}

    .btn-ghost:hover:not(:disabled) {
        background-color: var(--color-accent-light); /* THEMED */
        color: var(--color-accent-dark); /* THEMED */
    }

.btn-danger {
    background-color: var(--color-danger);
    color: var(--color-surface); /* Ensure contrast, #fff is often good here */
    box-shadow: var(--shadow-sm);
}

    .btn-danger:hover:not(:disabled) {
        background-color: color-mix(in srgb, var(--color-danger) 85%, black); /* Darker danger */
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

.btn-link {
    background: none;
    border: none;
    color: var(--color-accent); /* THEMED */
    padding: 0;
    text-decoration: underline;
    font-weight: var(--font-weight-normal);
}

    .btn-link:hover:not(:disabled) {
        color: var(--color-accent-dark); /* THEMED */
    }

.btn-sm {
    padding: 0.4rem var(--space-sm);
    font-size: var(--text-sm);
    gap: var(--space-xs);
}

.btn-lg {
    padding: 0.9rem var(--space-lg);
    font-size: var(--text-lg);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-group {
    display: inline-flex;
    gap: var(--space-sm);
    align-items: center;
}

    .btn-group a:hover {
        text-decoration: none; /* color: #fff; // This was likely for a specific case, button color should handle it */
    }

.delete-data {
    background-color: var(--color-warning);
    color: var(--color-text); /* Ensure contrast on warning */
}

    .delete-data:hover:not(:disabled) {
        background-color: color-mix(in srgb, var(--color-warning) 85%, black); /* Darker warning */
        color: var(--color-surface); /* Using surface for better contrast on darker warning */
    }

.drawer-link.add-to-home {
    font-family: inherit;
    font-size: 1.2em;
    background-color: transparent !important;
    color: var(--color-text); /* THEMED */
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

    .drawer-link.add-to-home:hover {
        background-color: var(--color-accent-light) !important; /* THEMED */
        color: var(--color-accent); /* THEMED */
    }

    .drawer-link.add-to-home i {
        color: var(--color-text-muted); /* THEMED */
        transition: color var(--transition-speed) ease;
    }

    .drawer-link.add-to-home:hover i {
        color: var(--color-accent); /* THEMED */
    }

/* 5.2 Forms & Inputs */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text); /* THEMED */
    margin-bottom: var(--space-sm);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem var(--space-md);
    font-size: var(--text-base);
    line-height: var(--line-height-base);
    color: var(--color-text); /* THEMED */
    background-color: var(--color-surface); /* THEMED */
    background-clip: padding-box;
    border: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    border-radius: var(--radius-md);
    transition: border-color var(--transition-speed) ease-in-out, box-shadow var(--transition-speed) ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select.form-control {
    /* SVG arrow color needs to be themed carefully. Keeping original neutral for now. */
    /* Ideally, use an SVG with `currentColor` for stroke and set text color of select. */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right var(--space-md) center;
    background-size: 16px 12px;
    padding-right: calc(var(--space-md) * 2.5);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent); /* THEMED */
    box-shadow: 0 0 0 3px var(--color-accent-light); /* THEMED */
}

.form-control::placeholder {
    color: var(--color-text-muted); /* THEMED */
    opacity: 0.7;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--color-disabled-bg); /* THEMED */
    color: var(--color-text-muted); /* THEMED */
    cursor: not-allowed;
    border-color: var(--color-border); /* THEMED */
    opacity: 1;
}

.password-input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted); /* THEMED */
    cursor: pointer;
    padding: var(--space-xs);
    background: none;
    border: none;
    line-height: 1;
}

    .toggle-password:hover {
        color: var(--color-text);
    }
    /* THEMED */
    .toggle-password i {
        margin-right: 0;
    }

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.form-check-input {
    flex-shrink: 0;
    width: 1.15em;
    height: 1.15em;
    margin-right: var(--space-sm);
    cursor: pointer;
    border: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    appearance: none;
    transition: var(--transition-base);
    position: relative;
}

    .form-check-input[type="checkbox"] {
        border-radius: var(--radius-sm);
    }

    .form-check-input[type="radio"] {
        border-radius: var(--radius-full);
    }

    .form-check-input:checked {
        background-color: var(--color-accent); /* THEMED */
        border-color: var(--color-accent); /* THEMED */
    }

    .form-check-input[type="checkbox"]:checked::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0.65em;
        height: 0.35em;
        border: 2px solid var(--color-button-primary-text); /* Checkmark color on primary, THEMED */
        border-top: 0;
        border-right: 0;
        transform: translate(-50%, -75%) rotate(-45deg);
        opacity: 1;
    }

    .form-check-input[type="radio"]:checked::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0.5em;
        height: 0.5em;
        border-radius: var(--radius-full);
        background-color: var(--color-button-primary-text); /* Dot color on primary, THEMED */
        transform: translate(-50%, -50%);
        opacity: 1;
    }

    .form-check-input:focus {
        outline: none;
        box-shadow: 0 0 0 3px var(--color-accent-light); /* THEMED */
        border-color: var(--color-accent); /* THEMED */
    }

.form-check-label {
    font-size: var(--text-base);
    color: var(--color-text); /* THEMED */
    cursor: pointer;
    margin-bottom: 0;
}

.form-check-input:disabled, .form-check-input:disabled + .form-check-label {
    cursor: not-allowed;
    opacity: 0.65;
}

.input-note {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-muted); /* THEMED */
    margin-top: var(--space-sm);
}

.error-message {
    display: block;
    color: var(--color-danger);
    font-size: var(--text-sm);
    margin-top: var(--space-sm);
}

.form-control.is-invalid {
    border-color: var(--color-danger);
}

    .form-control.is-invalid:focus {
        box-shadow: 0 0 0 3px var(--color-danger-bg);
    }

.error-summary {
    background-color: var(--color-danger-bg);
    border: var(--border-width) var(--border-style) var(--color-danger);
    border-left-width: 4px;
    color: var(--color-danger);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: var(--text-sm);
}

    .error-summary ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

.form-actions {
    margin-top: var(--space-xl);
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-md);
}

.form-row {
    display: grid;
    gap: var(--space-lg);
}

.inline-form {
    display: inline;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    background-color: var(--color-surface); /* THEMED */
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.search-form {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1 1 300px;
}

.search-input {
    padding-left: calc(var(--space-md) * 2.5);
    width: 100%; /* form-control styles */
}

.search-button {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted); /* THEMED */
    cursor: pointer;
    padding: 0;
}

    .search-button i {
        margin-right: 0;
    }

.sort-options {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

    .sort-options label {
        font-size: var(--text-sm);
        font-weight: var(--font-weight-medium);
        color: var(--color-text); /* THEMED */
        margin-bottom: 0;
    }

.sort-select {
    min-width: 150px; /* form-control styles */
}

/* 5.3 Cards & Containers */
.card {
    background-color: var(--color-surface); /* THEMED */
    border: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    margin-bottom: var(--space-lg);
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    background-color: var(--color-subtle-bg); /* THEMED subtle background */
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text); /* THEMED */
}

.card-body {
    padding: var(--space-lg);
}

.card-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    background-color: var(--color-subtle-bg); /* THEMED subtle background */
    /* color: var(--color-text); Implicitly inherits */
}

.article-card { /* Inherits .card */
}

.article-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

    .article-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: var(--space-lg);
}

.article-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-accent-light); /* THEMED */
    color: var(--color-accent); /* THEMED */
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-md);
}

.article-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm); /* color: var(--color-text); Implicit */
}

.article-excerpt {
    color: var(--color-text-muted); /* THEMED */
    margin-bottom: var(--space-lg);
}

.profile-card { /* Inherits .card */
    box-shadow: var(--shadow-md); /* Original: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; */
    padding: 20px 30px;
}

.profile-header {
    margin-bottom: var(--space-lg);
    border-bottom: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    padding-bottom: var(--space-lg);
}
/* .profile-title uses heading styles */
.profile-subtitle {
    color: var(--color-text-muted); /* THEMED */
    font-size: var(--text-base);
    margin-top: var(--space-xs);
    margin-bottom: 0;
}

.profile-container {
    min-width: 360px;
    width: 1200px;
    margin: 0 auto;
}

.auth-card { /* Inherits .card */
    width: 100%;
    max-width: 450px;
    min-width: 320px;
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg); /* Original: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px; */
}

.auth-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text); /* THEMED */
    margin-bottom: var(--space-sm);
    text-align: center;
}

.auth-subtitle {
    color: var(--color-text-muted); /* THEMED */
    text-align: center;
    margin-bottom: var(--space-xl);
    font-size: var(--text-base);
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    text-align: center;
    font-size: var(--text-sm);
}

.auth-alternative {
    color: var(--color-text-muted); /* THEMED */
    font-size: var(--text-sm);
    margin-top: var(--space-lg);
    text-align: center;
    position: relative;
}

    .auth-alternative::before, .auth-alternative::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 35%;
        height: 1px;
        background-color: var(--color-border); /* THEMED */
    }

    .auth-alternative::before {
        left: 0;
    }

    .auth-alternative::after {
        right: 0;
    }

.stats-container {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: var(--space-lg);
}

.stat-card { /* Inherits .card */
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

    .stat-card:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--color-border); /* THEMED (ensure border doesn't change color on hover unless intended) */
    }

.stat-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: var(--text-xl);
    background-color: var(--color-info-bg);
    color: var(--color-info); /* Default, uses status colors */
}

    .stat-icon.active {
        background-color: var(--color-success-bg);
        color: var(--color-success);
    }

    .stat-icon.warning {
        background-color: var(--color-warning-bg);
        color: var(--color-warning);
    }

    .stat-icon.danger {
        background-color: var(--color-danger-bg);
        color: var(--color-danger);
    }

.stat-details {
    flex-grow: 1;
    min-width: 0;
}

.stat-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text); /* THEMED */
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-label {
    color: var(--color-text-muted); /* THEMED */
    font-size: var(--text-sm);
    margin-top: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coming-soon {
    padding: var(--space-2xl) var(--space-lg);
    background-color: var(--color-surface); /* THEMED */
    border: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--color-text-muted); /* THEMED */
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.coming-soon-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    color: var(--color-accent); /* THEMED */
}

.coming-soon-title {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text); /* THEMED */
    margin-bottom: var(--space-sm);
}

.coming-soon-text {
    font-size: var(--text-base);
    max-width: 50ch;
    margin: 0 auto; /* color is inherited (muted) */
}

.admin-edit-banner { /* Uses status colors, remains independent */
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    background-color: var(--color-info-bg);
    border-left: 4px solid var(--color-info);
    color: var(--color-info);
}

    .admin-edit-banner.readonly {
        background-color: var(--color-neutral-bg);
        border-left-color: var(--color-neutral);
        color: var(--color-neutral);
    }

    .admin-edit-banner i {
        font-size: 1.2rem;
        flex-shrink: 0;
        margin-right: 0;
    }

    .admin-edit-banner p {
        margin-bottom: 0;
        flex-grow: 1;
    }

    .admin-edit-banner a {
        margin-left: auto;
        color: inherit;
        font-weight: var(--font-weight-medium);
        text-decoration: underline;
    }

        .admin-edit-banner a:hover {
            text-decoration: none;
        }

/* 5.4 Tables & Pagination */
.table-container {
    background-color: var(--color-surface); /* THEMED */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
    margin-top: var(--space-md);
    overflow: hidden;
    border: var(--border-width) var(--border-style) var(--color-border); /* THEMED, added border */
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--color-text); /* THEMED */
    font-size: var(--text-sm);
}

    .table th, .table td {
        padding: var(--space-md) var(--space-lg);
        text-align: left;
        vertical-align: middle;
        border-bottom: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
        white-space: nowrap;
    }

    .table th {
        background-color: var(--color-subtle-bg); /* THEMED */
        color: var(--color-text-muted); /* THEMED */
        font-weight: var(--font-weight-semibold);
        font-size: var(--text-sm);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .table tbody tr:last-child td {
        border-bottom: none;
    }

    .table tbody tr:hover {
        background-color: var(--color-subtle-bg); /* THEMED, was --color-background, now uses subtle for more distinction */
    }

    .table .wrap-text {
        white-space: normal;
    }

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--color-subtle-bg); /* THEMED, was --color-background */
}

.table-striped tbody tr:hover {
    background-color: color-mix(in srgb, var(--color-subtle-bg) 90%, var(--color-text) 5%); /* Darken subtle for hover */
}

/* User Table Specifics - Colors are inherited or use status/utility classes */
.users-table .user-name {
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-base);
    color: var(--color-text); /* THEMED */
    margin-bottom: var(--space-xs);
}

.users-table .user-detail {
    font-size: var(--text-sm);
    color: var(--color-text-muted); /* THEMED */
    display: block;
    margin-bottom: var(--space-xs);
}

.users-table .unavailable {
    color: var(--color-text-muted); /* THEMED */
    font-style: italic;
}

.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.action-buttons {
    display: inline-flex;
    gap: var(--space-sm);
}

.action-button { /* Base for action icons in tables */
    padding: var(--space-xs);
    color: var(--color-text-muted); /* THEMED */
    border-radius: var(--radius-sm);
    line-height: 1;
    background-color: transparent;
    border: none;
}

    .action-button i {
        margin: 0;
        font-size: var(--text-lg);
    }

    .action-button:hover {
        background-color: var(--color-neutral-bg); /* Uses neutral for general action hover */
    }

    .action-button.view:hover {
        color: var(--color-info); /* Status color */
    }

    .action-button.edit:hover {
        color: var(--color-success); /* Status color */
    }

    .action-button.lock:hover, .action-button.delete:hover {
        color: var(--color-danger); /* Status color */
    }

    .action-button.unlock:hover {
        color: var(--color-success); /* Status color */
    }

.no-results td {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--color-text-muted); /* THEMED */
    border-bottom: none;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    color: var(--color-border); /* THEMED */
}

.empty-state h3 {
    font-size: var(--text-lg);
    color: var(--color-text); /* THEMED */
    margin-bottom: var(--space-xs);
}

.empty-state p {
    font-size: var(--text-base);
    margin-bottom: 0; /* color: var(--color-text-muted); Inherited */
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--space-xl);
    padding: 0;
    list-style: none;
}

.page-item {
    margin: 0 var(--space-xs);
}

.page-link {
    display: block;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    color: var(--color-accent); /* THEMED */
    background-color: var(--color-surface); /* THEMED */
    border: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    transition: var(--transition-base);
    font-size: var(--text-sm);
    line-height: 1.2;
}

    .page-link:hover {
        background-color: var(--color-accent-light); /* THEMED */
        border-color: var(--color-accent-light); /* THEMED */
        color: var(--color-accent-dark); /* THEMED */
        text-decoration: none;
        z-index: 2;
    }

.page-item.active .page-link {
    background-color: var(--color-accent); /* THEMED */
    border-color: var(--color-accent); /* THEMED */
    color: var(--color-button-primary-text); /* THEMED text on primary */
    z-index: 3;
}

.page-item.disabled .page-link {
    color: var(--color-text-muted); /* THEMED */
    background-color: var(--color-surface); /* THEMED */
    border-color: var(--color-border); /* THEMED */
    cursor: not-allowed;
    opacity: 0.65;
}

.page-info {
    margin: 0 var(--space-md);
    color: var(--color-text-muted); /* THEMED */
    font-size: var(--text-sm);
}

/* 5.5 Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay, typically not themed by mood */
    opacity: 0;
    transition: opacity var(--transition-speed) ease-in-out;
}

    .modal.is-active {
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
    }

.modal-content {
    position: relative;
    background-color: var(--color-surface); /* THEMED */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    transition: transform var(--transition-speed) ease-out, opacity var(--transition-speed) ease-out;
    border: var(--border-width) var(--border-style) var(--color-border); /* THEMED, added border */
}

.modal.is-active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

    .modal-header h2, .modal-title {
        margin: 0;
        font-size: var(--text-lg);
        font-weight: var(--font-weight-semibold);
        color: var(--color-text); /* THEMED */
    }

.close-modal {
    font-size: 1.5rem;
    color: var(--color-text-muted); /* THEMED */
    background: none;
    border: none;
    padding: var(--space-xs);
    line-height: 1;
    cursor: pointer;
    transition: color var(--transition-speed) ease;
}

    .close-modal:hover {
        color: var(--color-text); /* THEMED */
    }

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    background-color: var(--color-subtle-bg); /* THEMED */
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* 5.6 Navigation (Header Controls, Admin Nav) */
.header-row {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: var(--space-md);
}

.logo {
    color: var(--color-accent); /* THEMED - logo text uses primary theme color */
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

    .logo img.icon-brand {
        width: auto;
        height: 28px;
        margin-right: var(--space-sm);
    }

.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

    .header-controls .btn-sm {
        padding: 0.3rem 0.6rem;
    }

.manage-nav { /* From original admin styles */
    position: relative;
    display: inline-block;
    padding: 20px 0;
    display: flex; /* Added from duplicate admin styles for centering */
    justify-content: center; /* Added from duplicate admin styles for centering */
    margin-bottom: 30px; /* Added from duplicate admin styles */
    width: 100%; /* Added from duplicate admin styles */
}

.dropdown {
    position: relative;
    display: inline-block;
}
/* .account-dropdown specific style for dropdown toggle if needed */
.account-dropdown .dropdown-toggle { /* Styles from the admin section for this specific dropdown */
    background-color: var(--color-surface); /* THEMED */
    color: var(--color-text); /* THEMED */
    padding: 12px 20px;
    border: 1px solid var(--color-border); /* THEMED */
    border-radius: var(--radius-md); /* Using global radius */
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
    min-width: 220px; /* Original explicit size */
    width: 350px; /* Original explicit size */
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm); /* Using global shadow */
}

    .account-dropdown .dropdown-toggle i {
        margin-right: 10px;
        color: var(--color-accent); /* THEMED */
        font-size: 18px;
    }

    .account-dropdown .dropdown-toggle:hover {
        background-color: var(--color-subtle-bg); /* THEMED */
    }

    .account-dropdown .dropdown-toggle::after { /* Original specific arrow */
        content: '';
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid var(--color-text); /* THEMED text color for arrow */
        margin-left: auto;
    }

.dropdown-toggle::after { /* General dropdown arrow, if not overridden by .account-dropdown */
    content: '';
    display: inline-block;
    margin-left: var(--space-sm);
    vertical-align: 0.15em;
    border-top: 0.3em solid; /* Color will be inherited from button text */
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 200px;
    padding: var(--space-sm) 0;
    margin-top: var(--space-xs);
    background-color: var(--color-surface); /* THEMED */
    background-clip: padding-box;
    border: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
}
/* Specific width for account dropdown menu from admin styles */
.account-dropdown .dropdown-menu {
    min-width: 220px; /* Original explicit size */
    width: 350px; /* Original explicit size */
    margin-top: 5px; /* Original specific margin */
    /* display: none; // managed by JS or hover */
    overflow: hidden; /* Original */
}
    /* Hover/focus to display for .account-dropdown specifically if it's not JS controlled */
    .account-dropdown:hover .dropdown-menu,
    .account-dropdown .dropdown-toggle:focus + .dropdown-menu, /* Ensure toggle focus works */
    .account-dropdown .dropdown-menu:hover { /* Keep menu open on its own hover */
        display: block; /* From original admin styles */
    }


.dropdown.is-active .dropdown-menu {
    display: block;
}
/* General JS controlled toggle */
.dropdown-menu-right {
    left: auto;
    right: 0;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem var(--space-lg);
    clear: both;
    font-weight: var(--font-weight-normal);
    color: var(--color-text); /* THEMED */
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    text-decoration: none;
    font-size: var(--text-sm);
}

    .dropdown-item:hover, .dropdown-item:focus {
        color: var(--color-text); /* THEMED */
        background-color: var(--color-subtle-bg); /* THEMED */
        text-decoration: none;
    }

    .dropdown-item.active, .dropdown-item:active { /* General active style */
        color: var(--color-accent); /* THEMED */
        background-color: var(--color-accent-light); /* THEMED */
    }
/* Specific active style for account dropdown items */
.account-dropdown .dropdown-item.active {
    background-color: var(--color-disabled-bg); /* Was #e9ecef, now themed disabled/very light gray */
    font-weight: bold; /* Original specific style */
    color: var(--color-text); /* Ensure text is readable */
}

.dropdown-item.disabled, .dropdown-item:disabled {
    color: var(--color-text-muted); /* THEMED */
    pointer-events: none;
    background-color: transparent;
}

.dropdown-divider {
    height: 0;
    margin: var(--space-sm) 0;
    overflow: hidden;
    border-top: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
}

.dropdown-header {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    margin-bottom: 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted); /* THEMED */
    white-space: nowrap;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
}

/* 5.7 User Profile & Drawer */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    border-radius: var(--radius-full);
    padding: var(--space-xs);
    transition: background-color var(--transition-speed) ease;
}

    .user-profile:hover {
        background-color: var(--color-subtle-bg); /* THEMED */
    }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-color: var(--color-accent-light); /* THEMED */
    color: var(--color-accent); /* THEMED */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-medium);
    font-size: var(--text-sm);
    transition: transform var(--transition-speed) ease;
    overflow: hidden;
}

    .user-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.user-profile .user-name-header {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text); /* THEMED */
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease, visibility 0s var(--transition-speed);
    z-index: 1040;
}

    .drawer-overlay.is-active {
        opacity: 1;
        visibility: visible;
        transition: opacity var(--transition-speed) ease, visibility 0s;
    }

.user-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 90%;
    max-width: 380px;
    min-width: 300px;
    height: 100vh;
    background-color: var(--color-surface); /* THEMED */
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1045;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
}

    .user-drawer.is-active {
        transform: translateX(0);
    }

.drawer-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.drawer-title {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text); /* THEMED */
    margin: 0;
}

.drawer-close {
    padding: var(--space-xs);
    color: var(--color-text-muted); /* THEMED */
    border-radius: var(--radius-sm);
    line-height: 1;
}

    .drawer-close:hover {
        background-color: var(--color-neutral-bg); /* Neutral for utility close */
        color: var(--color-text); /* THEMED */
    }

    .drawer-close i {
        font-size: var(--text-xl);
        margin: 0;
    }

.drawer-content {
    padding: var(--space-lg);
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.user-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
}

.user-avatar-large {
    width: 5rem;
    height: 5rem;
    background-color: var(--color-accent); /* THEMED */
    color: var(--color-button-primary-text); /* THEMED text on primary */
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-medium);
    flex-shrink: 0;
    overflow: hidden;
}

    .user-avatar-large img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.user-details {
    text-align: center;
}

.user-greeting {
    font-size: var(--text-lg);
    color: var(--color-text); /* THEMED */
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-xs);
    word-break: break-all;
}

.user-email {
    font-size: var(--text-sm);
    color: var(--color-text-muted); /* THEMED */
    margin-bottom: var(--space-xs);
    word-break: break-all;
}

.user-role {
    margin-top: var(--space-sm); /* Badges will provide their own styling */
}

.drawer-nav {
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.drawer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: 0;
    list-style: none;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.75rem var(--space-lg);
    border-radius: var(--radius-md);
    color: var(--color-text); /* THEMED */
    text-decoration: none;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    font-size: 1.2em;
}

    .drawer-link:hover, .drawer-link.active {
        background-color: var(--color-accent-light); /* THEMED */
        color: var(--color-accent); /* THEMED */
        text-decoration: none;
    }

    .drawer-link img.icon-buttons { /* For SVG/img icons */
        width: 20px;
        height: 20px;
        filter: grayscale(50%) opacity(0.7);
        transition: filter var(--transition-speed) ease;
    }

    .drawer-link:hover img.icon-buttons, .drawer-link.active img.icon-buttons {
        filter: grayscale(0%) opacity(1);
    }

.drawer-footer {
    margin-top: auto;
    padding-top: var(--space-lg);
    border-top: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
    display: flex;
    justify-content: flex-end;
}

/* 5.8 Status Indicators & Badges (Uses independent status colors) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.25em 0.6em;
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-full);
    line-height: 1;
    white-space: nowrap;
}

    .badge i {
        font-size: 0.9em;
        margin-right: 0;
        vertical-align: middle;
    }

.badge-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.badge-warning {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge-danger {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}

.badge-info {
    background-color: var(--color-info-bg);
    color: var(--color-info);
}

.badge-neutral {
    background-color: var(--color-neutral-bg);
    color: var(--color-neutral);
}

.badge-admin {
    background-color: var(--color-admin-badge-bg);
    color: var(--color-admin-badge-text);
}

.lockout-time {
    font-size: 0.85em;
    display: block;
    margin-top: var(--space-xs);
    margin-left: calc(1em + var(--space-xs));
    color: var(--color-text-muted); /* THEMED */
}

.status-message { /* Uses status colors */
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-md);
    border: var(--border-width) var(--border-style) transparent;
    border-left-width: 4px;
    font-size: var(--text-base);
}

    .status-message.success {
        background-color: var(--color-success-bg);
        border-color: var(--color-success);
        color: var(--color-success);
    }

    .status-message.error {
        background-color: var(--color-danger-bg);
        border-color: var(--color-danger);
        color: var(--color-danger);
    }

    .status-message.warning {
        background-color: var(--color-warning-bg);
        border-color: var(--color-warning);
        color: var(--color-warning);
    }

    .status-message.info {
        background-color: var(--color-info-bg);
        border-color: var(--color-info);
        color: var(--color-info);
    }

.status-icon-display {
    text-align: center;
    margin-bottom: var(--space-md);
}

.icon-circle { /* Uses status colors */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    font-size: 1.5rem;
}

    .icon-circle.success {
        background: var(--color-success-bg);
        color: var(--color-success);
    }

    .icon-circle.error {
        background: var(--color-danger-bg);
        color: var(--color-danger);
    }

    .icon-circle.warning {
        background: var(--color-warning-bg);
        color: var(--color-warning);
    }

    .icon-circle.info {
        background: var(--color-info-bg);
        color: var(--color-info);
    }

/* 5.9 Icons (Font Awesome setup) */
.fas, .fab, .far, .fa {
    display: inline-block;
    line-height: 1;
    vertical-align: -0.125em;
}

.btn i, .btn svg {
    margin-right: 0 !important;
}

/*-----------------------------------
  6. UTILITIES
-----------------------------------*/
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.section-divider {
    margin: var(--space-xl) 0;
    border: none;
    border-top: var(--border-width) var(--border-style) var(--color-border); /* THEMED */
}

.optional-text {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-normal);
    color: var(--color-text-muted); /* THEMED */
    font-style: italic;
    margin-left: var(--space-sm);
}

.mt-1 {
    margin-top: var(--space-xs);
}

.mt-2 {
    margin-top: var(--space-sm);
}

.mt-3 {
    margin-top: var(--space-md);
}

.mt-4 {
    margin-top: var(--space-lg);
}

.mt-5 {
    margin-top: var(--space-xl);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/*-----------------------------------
  7. RESPONSIVE STYLES
-----------------------------------*/
/* Original responsive styles are preserved below. Only color-related overrides within media queries need checking. */
@media (min-width: 1400px) {
    .container {
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }
}

@media (max-width: 992px) {
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .col-md-4, .col-md-6, .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 3.5rem;
        --container-padding: var(--space-sm);
    }

    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .content {
        padding-top: var(--space-md);
    }

    .section-title {
        font-size: var(--text-xl);
    }

    h1 {
        font-size: var(--text-2xl);
    }

    h2 {
        font-size: var(--text-xl);
    }

    h3 {
        font-size: var(--text-lg);
    }

    .hero-title {
        font-size: var(--text-2xl);
    }
    /* From original index styles */
    .filters-container {
        flex-direction: column;
        padding: var(--space-md);
    }

    .sort-options {
        width: 100%;
        justify-content: space-between;
    }

    .sort-select {
        flex-grow: 1;
    }

    .user-profile .user-name-header {
        display: none;
    }

    .article-image {
        aspect-ratio: 3 / 2;
    }

    .article-content {
        padding: var(--space-md);
    }

    .table th, .table td {
        padding: var(--space-sm) var(--space-md);
        white-space: nowrap;
    }

    .users-table .user-cell {
        white-space: normal;
    }

    .form-actions {
        justify-content: center;
    }

    .modal-content {
        max-width: 95%;
    }
}

@media (max-width: 576px) {
    :root {
        --text-base: 0.9375rem;
    }

    .header .logo span { /* display: none; // Original, review if logo text should be hidden */
    }

    .header-controls {
        gap: var(--space-xs);
    }

        .header-controls .btn-sm {
            padding: 0.4rem 0.6rem;
            font-size: var(--text-sm);
        }

        .header-controls .mood-trigger.btn-sm {
            padding: 0.4rem;
        }

    .btn {
        padding: 0.6rem var(--space-sm);
    }

    .btn-lg {
        padding: 0.8rem var(--space-md);
    }

    .auth-card {
        padding: var(--space-lg);
        min-width: unset;
        box-shadow: none;
        border: none;
    }

    .auth-title {
        font-size: var(--text-xl);
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: var(--space-md);
    }

    .stat-value {
        font-size: var(--text-xl);
    }

    .article-card {
        border-radius: var(--radius-md);
    }

    .pagination {
        justify-content: space-between;
    }

    .page-item:not(:first-child):not(:last-child):not(.active) {
        display: none;
    }

    .page-info {
        display: none;
    }

    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

        .modal-footer .btn {
            width: 100%;
        }

    .hero .btn-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

        .hero .btn-group .btn {
            margin-bottom: var(--space-sm);
        }

            .hero .btn-group .btn:last-child {
                margin-bottom: 0;
            }
}

@media (max-width: 400px) {
    .header-controls {
        gap: 2px;
    }

        .header-controls .btn-sm {
            padding: 0.3rem 0.5rem;
        }

        .header-controls .mood-trigger.btn-sm {
            padding: 0.3rem;
        }

    .header .logo span span:last-child {
        display: none;
    }
    /* Hides " Society" */
}

/*===========================================================================*/
/* STYLES FROM DUPLICATE SECTIONS (Admin Dashboard, Index Page specific)     */
/* These are now themed by using the global color variables.                 */
/* Sizes and specific layout from these sections are preserved.              */
/*===========================================================================*/

/* Admin Dashboard Specifics (Original body and .admin-dashboard container styles) */
/* body styling is handled globally */
.admin-dashboard { /* From original admin section */
    max-width: 2560px; /* Original size */
    min-width: 360px; /* Original size */
    margin: 0 auto;
    padding: 15px; /* Original padding */
}

/* .manage-nav is already defined and themed in section 5.6 */
/* .account-dropdown styles are handled by .dropdown and specific overrides in 5.6 */
/* .stat-filter from admin section - this seems like a layout container */
.stat-filter { /* From original admin styles */
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}
/* .stats-container, .stat-card, .stat-icon, .stat-details, .stat-value, .stat-label */
/* are already defined and themed in section 5.3 */

/* .filters-container, .search-form, .search-box, .search-input, .search-button */
/* .sort-options, .sort-select are already defined and themed in section 5.2 */

/* .table-container, .users-table, .users-table th/td, .user-cell, .user-info, etc. */
/* are already defined and themed in section 5.4 */
/* Specific status badge styling within users-table from admin section */
.users-table .user-roles.admin { /* uses .badge-admin which is defined with status colors */
    background-color: var(--color-admin-badge-bg);
    color: var(--color-admin-badge-text);
}

.users-table .status-badge.active {
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

.users-table .status-badge.unconfirmed {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
}

.users-table .status-badge.locked {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}

.users-table .status-badge.mfa {
    background-color: var(--color-info-bg);
    color: var(--color-info);
    margin-top: 5px;
}

/* .pagination, .page-link, .page-info are already defined and themed in section 5.4 */
/* .modal, .modal-content, .modal-header, .close-modal, .modal-body are themed in 5.5 */
.user-details-container {
    min-height: 200px; /* Original sizing */
}


/* Index Page Specific Styles (from original CSS end part) */
.home.container { /* This appears to be a specific container for the home page */
    width: 100%;
    max-width: 2560px; /* Original size */
    min-width: 350px; /* Original size */
    margin: 0 auto;
    padding: 0 var(--space-md); /* Original padding */
}

.hero {
    text-align: center;
    padding: var(--space-2xl) 0;
    max-width: 800px; /* Original size */
    margin: 0 auto;
}

.hero-title { /* Already covered by h1/h2 and responsive, color themed */
    font-size: var(--text-4xl); /* Keeping specific font size from index styles */
    color: var(--color-accent); /* THEMED */
    margin-bottom: var(--space-md);
    font-weight: 700; /* Original weight */
}

.hero-subtitle { /* Already covered, color themed */
    font-size: var(--text-lg);
    color: var(--color-text-muted); /* THEMED */
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.hero .btn-group { /* Sizing and layout preserved */
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.feature-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Original layout */
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
}

.feature-box { /* uses .card principles, ensure background/border is themed */
    background-color: var(--color-surface); /* THEMED */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: center;
}

    .feature-box:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

.feature-image {
    width: 100%;
    height: 400px; /* Original size */
    overflow: hidden;
}

    .feature-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }
/* .feature-box:hover .feature-image img { } // No transform rule in original, kept as is */
.feature-content {
    padding: var(--space-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-accent); /* THEMED */
}

.feature-text {
    color: var(--color-text-muted); /* THEMED */
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.feature-link {
    margin-top: auto;
    color: var(--color-accent); /* THEMED */
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

    .feature-link:hover {
        color: var(--color-accent-dark); /* THEMED */
    }

    .feature-link svg {
        width: 18px;
        height: 18px;
        margin-left: var(--space-xs);
        transition: transform 0.2s ease;
    }

    .feature-link:hover svg {
        transform: translateX(3px);
    }

.text-section {
    background-color: var(--color-accent-light); /* THEMED */
    padding: var(--space-2xl) var(--space-xl);
    margin: var(--space-2xl) 0;
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .text-section::before { /* SVG background pattern color is hardcoded in original. Needs JS or multiple ::before for theming */
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M10 10L90 90M30 10L90 70M50 10L90 50M70 10L90 30M10 30L70 90M10 50L50 90M10 70L30 90" stroke="%23984063" stroke-width="0.5" stroke-opacity="0.1"/></svg>');
        opacity: 0.7;
        z-index: 0;
    }

.text-section-title {
    font-size: var(--text-2xl);
    color: var(--color-accent); /* THEMED */
    margin-bottom: var(--space-lg);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.text-section-content {
    max-width: 1600px; /* Original size */
    margin: 0 auto;
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--color-text); /* THEMED */
    position: relative;
    z-index: 1;
}

    .text-section-content p {
        margin-bottom: var(--space-lg);
    }

        .text-section-content p:last-child {
            margin-bottom: 0;
        }

.seasonal-article {
    margin: var(--space-2xl) 0;
}

    .seasonal-article .section-title { /* General .section-title is used */
        /* text-align: center; // already in general .section-title if needed, or specific here */
        /* position: relative; // already in general .section-title if needed */
    }

        .seasonal-article .section-title:after { /* Original specific underline */
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 50px;
            height: 3px;
            background-color: var(--color-accent); /* THEMED */
            border-radius: 2px;
        }

    /* .article-card styles are globally defined and themed */
    /* .article-image height specific to index page */
    .seasonal-article .article-image {
        height: 300px; /* Original size */
    }
/* Other .article-card sub-elements (.article-content, .article-tag, .article-title, .article-excerpt)
   use the globally themed styles. */

/* .coming-soon styles are globally defined and themed */

/* Button styling specific to index page if any - current .btn, .btn-primary, .btn-secondary use global themed styles */
