/* ==========================================================================
   DESIGN SYSTEM TOKENS
   ========================================================================== */

:root {
    /* Colors - Light Mode (Default) */
    --bg-primary: #F5F5F0;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #FFFFFF;
    --bg-sidebar: #F5F5F0;
    --bg-card: #FFFFFF;
    --bg-main: #F5F5F0;
    /* Added from line 898 */

    --sidebar-border: #E5E5E5;
    --accent: #C9A961;
    --accent-dim: rgba(201, 169, 97, 0.1);
    --accent-rgb: 201, 169, 97;

    --text-primary: #1A1A1A;
    --text-secondary: rgba(26, 26, 26, 0.7);
    --text-muted: rgba(26, 26, 26, 0.38);
    --text-main: #1A1A1A;
    /* Added from line 1190 */

    --text-success: #2D7A5F;
    --text-danger: #be123c;
    --text-warning: #b45309;
    --text-info: #0369a1;

    --border: #E5E5E5;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
    --glow: 0 0 10px rgba(45, 122, 95, 0.15);

    /* Z-Index Scale */
    --z-dropdown: 900;
    --z-sticky: 950;
    --z-fixed: 990;
    --z-modal-backdrop: 10000;
    --z-modal: 10001;
    --z-tooltip: 10002;
    --z-toast: 10003;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 20px;
    --space-xl: 24px;
    --space-2xl: 40px;

    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Fonts */
    --font-arabic: 'Cairo', sans-serif;
    --font-latin: 'inter', sans-serif;

    /* Layout */
    --sidebar-width: 260px;
}

[data-bs-theme="dark"] {
    --bg-primary: #0F1E1A;
    --bg-secondary: #1A3A2E;
    --bg-tertiary: #234C3E;
    --bg-sidebar: #162B25;
    --bg-card: #1A3A2E;
    --bg-main: #0F1E1A;

    --sidebar-border: #2D5A47;
    --accent: #C9A961;
    --accent-dim: rgba(201, 169, 97, 0.15);

    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.38);
    --text-main: #FFFFFF;

    --text-success: #3A9B7A;
    --text-danger: #fca5a5;
    --text-warning: #fcd34d;
    --text-info: #7dd3fc;

    --border: #2D5A47;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glow: 0 0 20px rgba(58, 155, 122, 0.2);
}

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

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

body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-latin);
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    --bs-body-color: var(--text-primary) !important;
}

[dir="rtl"],
.rtl,
*:lang(ar),
input[dir="rtl"],
textarea[dir="rtl"] {
    font-family: var(--font-arabic) !important;
    font-weight: 400 !important;
}

strong,
b {
    color: var(--text-primary);
    font-weight: 700;
}

code {
    background: var(--bg-tertiary);
    color: var(--accent);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

img[alt*="QR"] {
    background: #fff;
    padding: 8px;
    border-radius: 8px;
}

canvas {
    background: transparent;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dim);
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar) !important;
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.25);
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    padding: 0;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

.sidebar-header {
    padding: 24px 24px;
}

.sidebar-nav {
    flex: 1;
    padding: 0 15px;
    overflow-y: auto;
}

/* Admin Header */
.admin-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 70px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    transition: all var(--transition-base);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 32px;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.main-content {
    padding: 16px 24px 24px 24px;
    background: var(--bg-primary);
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    margin-top: 70px;
    /* Space for header */
    position: relative;
    transition: all var(--transition-base);
}

.main-content.ml-0 {
    width: 100% !important;
}

.mobile-navbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    z-index: 998;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-icon-btn:hover {
    background: var(--bg-secondary);
}

.mobile-icon-btn.text-danger {
    color: #ef4444;
}

.mobile-icon-btn.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* ==========================================================================
   COMPONENTS - CARDS
   ========================================================================== */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    /* Combined from line 750 */
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.15);
}

.card-body {
    padding: 0;
}

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6 {
    color: var(--text-primary);
    font-weight: 700;
}

.card strong,
.card b {
    color: var(--text-primary);
    font-weight: 700;
}

/* ==========================================================================
   COMPONENTS - BUTTONS
   ========================================================================== */

.btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Generic Semantic Buttons */
.btn-primary {
    background: var(--accent);
    color: #fff !important;
    border: 1px solid rgba(201, 169, 97, 0.5);
    /* Added subtle border */
}

.btn-primary:hover {
    background: #d4b574;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 8px 24px rgba(201, 169, 97, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: #e11d48;
    color: #fff !important;
    /* Combined from line 746 */
}

.btn-danger:hover {
    background: #be123c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 8px 24px rgba(225, 29, 72, 0.4);
}

.btn-success {
    background: #10b981;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-info {
    background: #0d9488;
    color: #fff;
}

.btn-info:hover {
    background: #0f766e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 8px 24px rgba(13, 148, 136, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-inline {
    display: inline-flex;
    width: auto;
}

/* UI Action Buttons (Edit/Delete/Listen) - Resolve L1242 vs L1874 conflict */
.btn-edit,
.btn-delete {
    padding: 8px 12px;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    line-height: 1;
}

.btn-edit {
    background: rgba(201, 169, 97, 0.1) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(201, 169, 97, 0.3) !important;
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    transform: scale(1.05);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    transform: scale(1.05);
}

/* Compact versions from Reciters grid */
.action-buttons .btn-edit,
.action-buttons .btn-delete {
    /* These inherit the premium styles from above but are contained in .action-buttons */
}

.btn-listen {
    background: rgba(45, 122, 95, 0.1) !important;
    color: var(--text-success) !important;
    border: 1px solid rgba(45, 122, 95, 0.3) !important;
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-listen:hover {
    background: rgba(45, 122, 95, 0.2) !important;
    border-color: rgba(45, 122, 95, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   COMPONENTS - TABLES
   ========================================================================== */

.table,
.table-responsive {
    background: transparent;
}

.table {
    color: var(--text-primary);
    margin-bottom: 0;
}

.table thead,
.table thead th {
    background: var(--bg-tertiary);
}

.table thead th {
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
}

.table tbody,
.table tbody tr,
.table tbody td {
    background: transparent;
}

.table tbody td {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05) !important;
    transform: scale(1.001);
}

/* Explicit inheritance for nested table elements */
table,
thead,
tbody,
tr,
th,
td {
    background: transparent;
    color: var(--text-primary);
}

/* Specialized: Surahs Table */
.surahs-table {
    font-size: 0.95rem;
}

.surahs-table thead th {
    padding: 18px 20px !important;
    font-weight: 700;
}

.surahs-table tbody td {
    padding: 20px !important;
}

/* Specialized: Logs Table */
.logs-table {
    font-size: 0.9rem;
}

.logs-table thead th {
    padding: 16px 20px !important;
    font-weight: 700;
}

.logs-table tbody td {
    padding: 16px 20px !important;
}

/* ==========================================================================
   COMPONENTS - FORMS
   ========================================================================== */

/* Consolidated Form Controls - Resolve L564 vs L940 conflict */
.form-control,
.form-select,
.form-input {
    background: var(--bg-card) !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary) !important;
    padding: 12px 16px !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base) !important;
    width: 100%;
    /* From L919/L1473 */
}

.form-control:focus,
.form-select:focus,
.form-input:focus {
    background: var(--bg-secondary) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-dim) !important;
    color: var(--text-primary) !important;
    outline: none;
}

.form-control:hover,
.form-select:hover,
.form-input:hover {
    border-color: var(--accent-dim) !important;
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}

.modal-card .form-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-left: 4px;
}

/* Select specifics */
select.form-select,
select.form-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23C9A961' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 36px !important;
}

select.form-select option,
select.form-input option {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Search Input */
.search-input {
    padding: 10px 15px 10px 40px !important;
    background: var(--bg-card);
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-dim) !important;
}

/* ==========================================================================
   COMPONENTS - BADGES & ALERTS
   ========================================================================== */

/* Resolve duplicate .badge (L1334 wins) */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--text-success);
}

.bg-danger {
    background: rgba(255, 51, 102, 0.15);
    color: var(--text-danger);
}

.bg-warning {
    background: rgba(255, 193, 7, 0.15);
    color: var(--text-warning);
}

.bg-info {
    background: rgba(3, 169, 244, 0.15);
    color: var(--text-info);
}

.bg-secondary {
    background: rgba(160, 160, 160, 0.15);
    color: var(--text-secondary);
}

.badge-success {
    background: rgba(45, 122, 95, 0.08) !important;
    color: #2D7A5F !important;
    border: 2px solid #3A9B7A !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 6px 12px;
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 12px;
}

.badge-warning {
    background: rgba(225, 29, 72, 0.08) !important;
    color: #be123c !important;
    border: 2px solid #e11d48 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 6px 12px;
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 12px;
}

.reciter-badge {
    background: rgba(201, 169, 97, 0.1) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(201, 169, 97, 0.3);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reciter-badge:hover {
    background: rgba(201, 169, 97, 0.15) !important;
    border-color: rgba(201, 169, 97, 0.5);
}

.error-alert {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.success-alert {
    background: rgba(16, 185, 129, 0.1);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 24px;
}

/* ==========================================================================
   COMPONENTS - PAGINATION
   ========================================================================== */

.pagination {
    gap: 8px;
}

.page-link {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    color: var(--accent);
}

.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.page-item.disabled .page-link {
    background: var(--bg-tertiary);
    border-color: var(--border);
    color: var(--text-muted);
    opacity: 0.5;
}

/* ==========================================================================
   SIDEBAR COMPONENTS
   ========================================================================== */

.logo {
    text-align: center;
}

.logo-emoji {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
}

.logo-img-admin {
    height: 80px;
    width: auto;
    border-radius: 8px;
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.2));
}

.nav-section {
    padding: 24px 20px 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    opacity: 0.8;
    margin-bottom: 4px;
}

.nav-links {
    list-style: none;
    padding: 0 12px;
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none !important;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
    width: 100%;
}

.nav-icon {
    font-size: 1.5rem;
    width: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.nav-text {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-link:hover .nav-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--accent);
}

.nav-link.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.05);
}

.nav-link.active .nav-icon {
    color: var(--accent);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--accent);
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-modal-backdrop);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay[style*="display: flex"] {
    opacity: 1;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 550px;
    margin: auto;
    border-radius: var(--radius-2xl);
    padding: 32px;
    box-shadow: var(--shadow-2xl), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1.0);
    }
}

.modal-card h2 {
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 24px !important;
}

/* ==========================================================================
   FEATURE: DASHBOARD & STATS
   ========================================================================== */

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

.stat-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(201, 169, 97, 0.03) 100%);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(201, 169, 97, 0.1) 0%, transparent 70%);
    border-radius: 100%;
    transform: translate(30%, -30%);
}

.stat-card:hover {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(34, 197, 94, 0.08) 100%);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.health-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.health-icon {
    width: 48px;
    height: 48px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.health-icon.up {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.health-icon.down {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.health-badge {
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.health-badge.up {
    background: rgba(16, 185, 129, 0.2) !important;
    color: var(--text-success) !important;
    border: 2px solid rgba(16, 185, 129, 0.5);
}

.health-badge.down {
    background: rgba(239, 68, 68, 0.2) !important;
    color: var(--text-danger) !important;
    border: 2px solid rgba(239, 68, 68, 0.5);
}

.stat-card[title] {
    cursor: help;
}

.stat-card[title]:hover {
    position: relative;
}

.stat-card[title]::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.9);
    color: var(--accent);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base);
    z-index: var(--z-tooltip);
    border: 1px solid var(--accent);
}

.stat-card[title]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* ==========================================================================
   FEATURE: RECITERS & SURAHS
   ========================================================================== */

.reciters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.reciters-grid h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-weight: 700;
    margin-top: 10px;
}

.reciter-avatar {
    width: 64px;
    height: 64px;
    border-radius: 100%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 3px solid transparent;
    background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)),
        linear-gradient(135deg, var(--accent) 0%, var(--text-success) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.2);
}

.reciter-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reciter-placeholder {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.reciter-count {
    color: var(--text-secondary) !important;
    margin: 10px 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 10px;
    opacity: 0.5;
}

.surah-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 50px;
    display: inline-block;
}

.surah-name {
    font-weight: 600;
    color: var(--text-primary);
}

.surah-arabic {
    font-size: 1.3rem;
    font-weight: 500;
    direction: rtl;
    font-family: var(--font-arabic);
}

.duration-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

/* ==========================================================================
   FEATURE: LOGS & IMPORT
   ========================================================================== */

.log-level-badge {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.log-level-error {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.log-level-warning {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.5);
}

.log-level-info {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.log-level-debug {
    background: rgba(107, 114, 128, 0.2) !important;
    color: #9ca3af !important;
    border: 1px solid rgba(107, 114, 128, 0.5);
}

.log-tag {
    background: var(--bg-tertiary);
    color: var(--accent);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.log-message {
    color: var(--text-primary);
    line-height: 1.5;
}

.log-exception {
    color: #fca5a5;
    font-size: 0.85rem;
    margin-top: 4px;
}

.log-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.import-status-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(59, 130, 246, 0.03) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.import-action-card {
    transition: all var(--transition-base);
    height: 100%;
}

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

.import-action-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.import-action-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.progress-animated {
    background: linear-gradient(90deg, var(--accent) 0%, #2563eb 25%, #1d4ed8 50%, #2563eb 75%, var(--accent) 100%);
    background-size: 200% 100%;
    animation: progressShine 2s linear infinite;
}

@keyframes progressShine {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.danger-card {
    border: 2px solid rgba(239, 68, 68, 0.3) !important;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(239, 68, 68, 0.03) 100%);
}

/* ==========================================================================
   FEATURE: LOGIN & 404
   ========================================================================== */

.login-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.15) 0%, var(--bg-primary) 100%);
    padding: 60px 20px 20px 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 50px 40px;
    box-shadow: var(--shadow-2xl);
    animation: loginFadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes loginFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(201, 169, 97, 0.2);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 15px;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    text-align: center;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
    display: block;
}

.login-card .form-group {
    margin-bottom: 25px;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
    color: #fff !important;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    filter: brightness(1.1);
}

.error-404-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.error-404-title {
    font-size: 6rem;
    font-weight: 700;
    color: var(--text-success);
    margin-bottom: 20px;
}

/* ==========================================================================
   UTILITIES & GLOBAL MODIFIERS
   ========================================================================== */

.hidden {
    display: none;
}

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

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

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

.text-success {
    color: var(--accent);
}

.text-danger {
    color: #ff3366;
}

.p-20 {
    padding: 20px;
}

.mb-4 {
    margin-bottom: 4px;
}

.mb-5 {
    margin-bottom: 5px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-25 {
    margin-bottom: 25px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mt-5 {
    margin-top: 5px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-40 {
    margin-top: 40px;
}

.my-10 {
    margin: 10px 0;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.ml-auto {
    margin-left: auto;
}

.ml-0 {
    margin-left: 0 !important;
}

.w-40 {
    width: 40px !important;
}

.w-250 {
    width: 250px;
}

.mw-150 {
    max-width: 150px;
}

.max-w-420 {
    max-width: 420px;
}

.max-w-500 {
    max-width: 500px;
}

.max-w-600 {
    max-width: 600px;
}

.h-20 {
    height: 20px !important;
}

.h-350 {
    height: 350px;
}

.flex-1 {
    flex: 1;
}

.gap-12 {
    gap: 12px !important;
}

.flex-center {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.qr-code-container {
    background: #ffffff;
    padding: 20px;
    display: inline-block;
    border-radius: 16px;
    margin-bottom: 20px;
}

/* ==========================================================================
   MOBILE & RESPONSIVE
   ========================================================================== */

@media (max-width: 991.98px) {
    .mobile-navbar {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        color: var(--text-primary);
        width: auto;
        height: auto;
        font-size: 1.8rem;
    }

    .sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        display: none;
    }

    .sidebar.mobile-open {
        transform: translateX(0) !important;
        display: flex;
        flex-direction: column;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .main-content {
        margin-left: 0 !important;
        padding: 16px 16px 24px 16px;
        width: 100% !important;
    }

    .page-header,
    .d-flex.justify-content-between.align-items-center,
    .d-flex.gap-3.align-items-center {
        flex-direction: column;
        align-items: stretch !important;
        gap: 15px;
    }

    .w-250 {
        width: 100% !important;
    }

    .table-responsive {
        margin: 0 -20px;
        padding: 0 20px;
        width: calc(100% + 40px);
    }

    .login-card {
        width: 100% !important;
        max-width: 400px;
        padding: 30px 20px !important;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px 12px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .card {
        padding: 16px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        width: 100%;
    }

    #modal-reciter {
        padding: 0 !important;
    }

    #modal-reciter .card {
        max-width: 100% !important;
        min-height: 100vh;
        border-radius: 0 !important;
        margin: 0 !important;
    }
}

/* ==========================================================================
   MODERN UI HELPERS & OTHERS
   ========================================================================== */

.bulk-toolbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-fixed);
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 989;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

.progress-container {
    background: var(--bg-main);
    border-radius: 8px;
    overflow: hidden;
    height: 4px;
}

.progress-bar {
    background: var(--accent);
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}

.card-actions {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.action-btn:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    transform: scale(1.1);
}

.reciter-avatar {
    width: 100px !important;
    height: 100px !important;
    border-radius: 100%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: var(--bg-tertiary);
}

.reciters-grid .card {
    text-align: center;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reciter-name-ar {
    font-family: var(--font-arabic);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* ==========================================================================
   UI/UX FIXES - January 2026
   ========================================================================== */

/* Token Truncation for Logs & Notifications Tables */
.token-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: inline-block;
    vertical-align: middle;
}

.token-truncate:hover {
    overflow: visible;
    white-space: normal;
    word-break: break-all;
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 100;
    position: relative;
}

/* Improved Action Buttons for Reciters Cards */
.action-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.action-btn:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    transform: scale(1.1);
}

/* Sidebar Text Optimization */
.nav-link {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.nav-link:hover {
    overflow: visible;
    white-space: normal;
}

/* Reduce System Health Glow on Dashboard */
.system-health-card {
    box-shadow: var(--shadow-md), 0 0 20px rgba(45, 122, 95, 0.08) !important;
}

/* Log Message Container - Prevent Overflow */
.log-message-container {
    max-width: 400px;
}

.log-message {
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* Reciter Placeholder Initials Only */
.reciter-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 100%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent);
    margin: 0 auto 15px;
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

/* ========================================
   Toast Container
   ======================================== */

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

#toast-container>* {
    pointer-events: all;
}

/* ========================================
   Notification Page - Stat Cards
   ======================================== */

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--accent);
}

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

.stat-card.android {
    border-left-color: #3DDC84;
}

.stat-card.ios {
    border-left-color: #000000;
}

[data-bs-theme="dark"] .stat-card.ios {
    border-left-color: #FFFFFF;
}

.stat-card.testers {
    border-left-color: #f59e0b;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

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

.filters-bar {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 15px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-icon {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   SURAHS PAGE IMPROVEMENTS
   ========================================================================== */

/* Improved Bulk Toolbar */
.bulk-toolbar {
    background: var(--bg-card) !important;
    border: 2px solid var(--accent) !important;
    box-shadow: 0 8px 32px rgba(201, 169, 97, 0.3) !important;
}

.bulk-toolbar .btn-danger {
    background: rgba(225, 29, 72, 0.1) !important;
    color: #e11d48 !important;
    border: 1px solid rgba(225, 29, 72, 0.3) !important;
}

.bulk-toolbar .btn-danger:hover {
    background: rgba(225, 29, 72, 0.2) !important;
    border-color: #e11d48 !important;
}

.bulk-toolbar .btn-secondary {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
}

.bulk-toolbar .btn-secondary:hover {
    background: var(--bg-secondary) !important;
    border-color: var(--accent) !important;
}

/* Filter button consistency */
.card-body .btn-primary[type="submit"] {
    background: var(--accent) !important;
    color: #000 !important;
    border: 1px solid rgba(201, 169, 97, 0.5) !important;
}

.card-body .btn-primary[type="submit"]:hover {
    background: #d4b574 !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 8px 24px rgba(201, 169, 97, 0.3) !important;
}

/* Saved filters dropdown button */
.btn-outline-info,
.btn-outline-secondary {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
}

.btn-outline-info:hover,
.btn-outline-secondary:hover {
    background: var(--bg-secondary) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

/* Improve table reciter column */
.surahs-table .reciter-badge {
    max-width: 180px;
    justify-content: center;
}

/* Better visual hierarchy for actions */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Improve checkbox visibility */
.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Row selection highlight */
.row-selected {
    background: rgba(201, 169, 97, 0.08) !important;
    border-left: 3px solid var(--accent) !important;
}

/* Better spacing for filter bar */
.filters-bar .row {
    align-items: center;
}

.filters-bar .form-select,
.filters-bar .form-control {
    height: 42px;
}

/* ==========================================================================
   LOADING STATES & FEEDBACK
   ========================================================================== */

/* Universal button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    color: #fff !important;
}

.btn-primary.btn-loading::after {
    border-top-color: #000;
}

.btn-secondary.btn-loading::after,
.btn-outline-secondary.btn-loading::after {
    border-top-color: var(--text-primary);
}

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

/* Save indicator */
.save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    animation: slideInRight 0.3s ease;
}

.save-indicator.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--text-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.save-indicator.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--text-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Preview modals */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.preview-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.preview-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.preview-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: all var(--transition-base);
}

.preview-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

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

.preview-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.preview-field {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.preview-field-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 700;
}

.preview-field-value {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.preview-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   UX/UI MODERNIZATION - 2026-01-11
   ========================================================================== */

/* Pages Management - Card Hover Effects */
.page-card {
    transition: all 0.2s ease;
    cursor: default;
}

.page-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Pages Management - Button Hover Effects */
.btn-edit-page {
    transition: all 0.2s ease;
}

.btn-edit-page:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-edit-page:active {
    transform: translateY(0);
}

/* Pages Management - Slug Code Styling */
.slug-code {
    background: rgba(100, 116, 139, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Status Badges - LIVE */
.badge-live {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Status Badges - DRAFT */
.badge-draft {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Visibility Badges - Menu */
.badge-menu {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Visibility Badges - Footer */
.badge-footer {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Settings - Security Requirements */
.security-requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 6px;
    font-size: 0.875rem;
}

.security-requirement i {
    color: #64748b;
}

/* Settings - Form Input Focus */
.form-input:focus,
.form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Alert Improvements */
.alert-success {
    border-left: 4px solid #10b981;
}

.alert-danger {
    border-left: 4px solid #ef4444;
}

.alert-warning {
    border-left: 4px solid #f59e0b;
}

.alert-info {
    border-left: 4px solid #3b82f6;
}

/* Card Border-left Colors */
.card-border-live {
    border-left: 4px solid #10b981;
}

.card-border-draft {
    border-left: 4px solid #64748b;
}

.card-border-primary {
    border-left: 4px solid #3b82f6;
}

.card-border-warning {
    border-left: 4px solid #f59e0b;
}

/* Security Best Practices Card */
.card-security-tips {
    background: rgba(251, 191, 36, 0.05);
    border-left: 4px solid #f59e0b;
}

/* Dark Mode Adjustments */
[data-bs-theme="dark"] .slug-code {
    background: rgba(100, 116, 139, 0.2);
    border-color: rgba(100, 116, 139, 0.3);
}

[data-bs-theme="dark"] .security-requirement {
    background: rgba(100, 116, 139, 0.15);
}

[data-bs-theme="dark"] .card-security-tips {
    background: rgba(251, 191, 36, 0.08);
}

/* ==========================================================================
   PAGE HEADER IMPROVEMENTS - 2026-01-11
   ========================================================================== */

/* Reduce top spacing and align title with buttons */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 0;
    gap: 20px;
}

.page-header>div {
    flex: 1;
}

.page-header h1 {
    margin-bottom: 4px;
    font-size: 1.5rem;
}

.page-header .text-muted {
    margin-top: 4px;
    font-size: 0.875rem;
}

/* Smaller buttons with Phosphor icons */
.page-header .btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    white-space: nowrap;
}

.page-header .btn i {
    font-size: 1rem;
}

/* Flex center for button groups */
.page-header .flex-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .page-header .flex-center {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

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