/* ═══════════════════════════════════════════════════════
   Anzar v2.0 — Custom Styles (Mobile-First)
   Bootstrap 5.3.8 base + brand overrides
   ═══════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────── */
:root {
    --anzar-primary: #2563EB;
    --anzar-primary-hover: #1D4ED8;
    --anzar-primary-light: #EFF6FF;
    --anzar-primary-rgb: 37, 99, 235;
    --anzar-gradient: linear-gradient(135deg, #2563EB 0%, #3B82F6 50%, #1D4ED8 100%);
    --anzar-gradient-subtle: linear-gradient(135deg, #EFF6FF 0%, #F0F4F8 50%, #E2E8F0 100%);
    --anzar-bg-dark: #0F172A;
    --anzar-bg-card: rgba(255, 255, 255, 0.97);
    --anzar-text: #0F172A;
    --anzar-text-muted: #64748B;
    --anzar-border: #CBD5E1;
    --anzar-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --anzar-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
    --anzar-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --anzar-radius: 12px;
    --anzar-radius-lg: 16px;
    --anzar-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Base ───────────────────────────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--anzar-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Auth Page Layout ──────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    position: relative;
    overflow: hidden;
}

/* Animated gradient background — nature green theme matching marketing site */
.auth-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #15803d 0%, #16a34a 30%, #0d9488 70%, #134e4a 100%);
    z-index: -2;
}
.auth-wrapper.theme-blue::before {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 30%, #0284c7 70%, #0f172a 100%);
}

/* Subtle animated mesh pattern overlay — nature tones */
.auth-wrapper::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(22, 163, 74, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(13, 148, 136, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(220, 252, 231, 0.08) 0%, transparent 60%);
    z-index: -1;
    animation: meshFloat 20s ease-in-out infinite;
}
.auth-wrapper.theme-blue::after {
    background:
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(2, 132, 199, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(239, 246, 255, 0.08) 0%, transparent 60%);
}

@keyframes meshFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-0.5deg); }
}

/* Auth card container */
.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
}

/* ── Auth Page Green Brand Overrides ───────────────── */
/* Scoped to .auth-wrapper so admin panel stays blue    */
.auth-wrapper {
    --anzar-primary: #16a34a;
    --anzar-primary-hover: #15803d;
    --anzar-primary-light: #dcfce7;
    --anzar-primary-rgb: 22, 163, 74;
    --anzar-gradient: linear-gradient(135deg, #16a34a 0%, #0d9488 100%);
}

.auth-wrapper .btn-anzar {
    background: linear-gradient(135deg, #16a34a 0%, #0d9488 100%);
}

.auth-wrapper .btn-anzar:hover {
    box-shadow: 0 8px 25px -5px rgba(22, 163, 74, 0.4);
}

.auth-wrapper .btn-anzar:focus-visible {
    background: linear-gradient(135deg, #16a34a 0%, #0d9488 100%);
    outline-color: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2);
}

.auth-wrapper .auth-links a { color: #16a34a; }
.auth-wrapper .auth-links a:hover { color: #15803d; }

.auth-wrapper .form-control:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.auth-wrapper .form-check-input:checked {
    background-color: #16a34a;
    border-color: #16a34a;
}

.auth-wrapper .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    border-color: #16a34a;
}

/* ── Auth Page Blue Brand Overrides ────────────────── */
.auth-wrapper.theme-blue {
    --anzar-primary: #2563eb;
    --anzar-primary-hover: #1d4ed8;
    --anzar-primary-light: #eff6ff;
    --anzar-primary-rgb: 37, 99, 235;
    --anzar-gradient: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
}

.auth-wrapper.theme-blue .btn-anzar {
    background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
}

.auth-wrapper.theme-blue .btn-anzar:hover {
    box-shadow: 0 8px 25px -5px rgba(37, 99, 235, 0.4);
}

.auth-wrapper.theme-blue .btn-anzar:focus-visible {
    background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
    outline-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.auth-wrapper.theme-blue .auth-links a { color: #2563eb; }
.auth-wrapper.theme-blue .auth-links a:hover { color: #1d4ed8; }

.auth-wrapper.theme-blue .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-wrapper.theme-blue .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.auth-wrapper.theme-blue .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    border-color: #2563eb;
}

/* ── Auth Card ─────────────────────────────────────── */
.auth-card {
    background: var(--anzar-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--anzar-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--anzar-shadow-xl);
    padding: 32px 28px;
    transition: var(--anzar-transition);
}

/* Larger padding on bigger screens */
@media (min-width: 576px) {
    .auth-card {
        padding: 40px 36px;
    }
}

/* ── Logo Area ─────────────────────────────────────── */
.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo img {
    max-height: 56px;
    max-width: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-logo .logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ── Card Header ───────────────────────────────────── */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--anzar-text);
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--anzar-text-muted);
    font-size: 14px;
    margin-bottom: 0;
}

/* ── Form Inputs ───────────────────────────────────── */
.form-floating-icon {
    position: relative;
}

.form-floating-icon .form-control {
    padding-left: 44px;
    height: 50px;
    border-radius: 10px;
    border: 1.5px solid var(--anzar-border);
    font-size: 15px;
    transition: var(--anzar-transition);
    background-color: #F8FAFC;
}

.form-floating-icon .form-control:focus {
    border-color: var(--anzar-primary);
    box-shadow: 0 0 0 3px rgba(var(--anzar-primary-rgb), 0.12);
    background-color: #fff;
}

.form-floating-icon .form-control.is-invalid:focus {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.form-floating-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--anzar-text-muted);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 4;
}

.form-floating-icon .form-control:focus ~ .input-icon {
    color: var(--anzar-primary);
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--anzar-text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    z-index: 4;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--anzar-primary);
}

/* ── Primary Button ────────────────────────────────── */
.btn-anzar {
    background: var(--anzar-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: var(--anzar-transition);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.btn-anzar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-anzar:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px -5px rgba(var(--anzar-primary-rgb), 0.4);
    color: #fff;
}

.btn-anzar:hover::before {
    opacity: 1;
}

.btn-anzar:focus-visible {
    color: #fff;
    background: var(--anzar-gradient);
    outline: 2px solid var(--anzar-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(var(--anzar-primary-rgb), 0.2);
}

.btn-anzar:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px -3px rgba(var(--anzar-primary-rgb), 0.3);
}

.btn-anzar:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading state */
.btn-anzar .spinner-border {
    width: 18px;
    height: 18px;
    border-width: 2px;
    margin-right: 8px;
}

/* Small / inline variant — used in page headers and action bars */
.btn-anzar.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    width: auto;
}

/* Auto-width variant — used in form submit rows */
.btn-anzar.w-auto {
    width: auto;
}

/* ── Page Header Action Buttons ────────────────────── */
/* Standardises all page-header buttons to equal height, no-wrap, centred text */
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-header-actions .btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Form Links ────────────────────────────────────── */
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 13.5px;
}

.auth-links a {
    color: var(--anzar-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--anzar-primary-hover);
    text-decoration: underline;
}

/* ── Remember Me ───────────────────────────────────── */
.form-check-input:checked {
    background-color: var(--anzar-primary);
    border-color: var(--anzar-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(var(--anzar-primary-rgb), 0.15);
    border-color: var(--anzar-primary);
}

/* ── Divider ───────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--anzar-text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--anzar-border);
}

.auth-divider span {
    padding: 0 12px;
}

/* ── Footer ────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.auth-footer a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.auth-footer .support-phone {
    margin-bottom: 8px;
}

.auth-footer .support-phone a {
    color: rgba(255, 255, 255, 0.95);
}

.auth-footer .support-phone i {
    margin-right: 4px;
}

/* ── Flash Messages / Alerts ───────────────────────── */
.alert {
    border-radius: 10px;
    font-size: 14px;
    border: none;
    padding: 14px 18px;
}

.alert-danger {
    background: #FEF2F2;
    color: #991B1B;
}

.alert-success {
    background: #F0FDF4;
    color: #166534;
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
}

.alert-info {
    background: var(--anzar-primary-light);
    color: #3730A3;
}

/* ── Password Strength Meter ───────────────────────── */
.password-strength {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--anzar-border);
    overflow: hidden;
    margin-bottom: 6px;
}

.password-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background-color 0.3s;
    width: 0;
}

.password-strength-fill.strength-weak { width: 25%; background: #EF4444; }
.password-strength-fill.strength-fair { width: 50%; background: #F59E0B; }
.password-strength-fill.strength-good { width: 75%; background: #22C55E; }
.password-strength-fill.strength-strong { width: 100%; background: #16A34A; }

.password-strength-text {
    font-size: 12px;
    color: var(--anzar-text-muted);
}

/* ── Password Requirements ─────────────────────────── */
.password-requirements {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    font-size: 12.5px;
}

.password-requirements li {
    padding: 2px 0;
    color: var(--anzar-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-requirements li i {
    font-size: 11px;
    width: 14px;
    text-align: center;
}

.password-requirements li.met {
    color: #16A34A;
}

.password-requirements li.met i {
    color: #16A34A;
}

.password-requirements li.unmet i {
    color: var(--anzar-border);
}

/* ── reCAPTCHA Badge ───────────────────────────────── */
.grecaptcha-badge {
    visibility: hidden !important;
}

.recaptcha-notice {
    font-size: 11px;
    color: var(--anzar-text-muted);
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}

.recaptcha-notice a {
    color: var(--anzar-text-muted);
    text-decoration: underline;
}

/* ── Error Pages ───────────────────────────────────── */
.error-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #F8FAFC;
    padding: 24px;
}

.error-page .error-code {
    font-size: 80px;
    font-weight: 800;
    background: var(--anzar-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.error-page h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--anzar-text);
    margin-bottom: 10px;
}

.error-page p {
    color: var(--anzar-text-muted);
    font-size: 15px;
    margin-bottom: 24px;
}

/* ── App Layout (Sidebar + Topbar + Content) ───────── */
.app-wrapper {
    min-height: 100vh;
    background: #F1F5F9;
}

/* ── Top Navbar ────────────────────────────────────── */
.app-topbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid var(--anzar-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.app-topbar .topbar-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--anzar-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-topbar .topbar-brand:hover {
    color: var(--anzar-primary);
}

.app-topbar .topbar-brand i {
    color: var(--anzar-primary);
}

.topbar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--anzar-text);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--anzar-transition);
    margin-right: 12px;
}

.topbar-toggle:hover {
    background: var(--anzar-primary-light);
    color: var(--anzar-primary);
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--anzar-text);
}

/* ── Topbar Search ─────────────────────────────────── */
.topbar-search {
    flex: 1;
    max-width: 420px;
    margin: 0 20px;
}

.topbar-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--anzar-text-muted);
    font-size: 13px;
    pointer-events: none;
    z-index: 1;
}

.topbar-search-input {
    width: 100%;
    padding: 6px 12px 6px 32px;
    border: 1px solid var(--anzar-border);
    border-radius: 8px;
    font-size: 13.5px;
    background: var(--anzar-bg);
    color: var(--anzar-text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.topbar-search-input:focus {
    border-color: var(--anzar-primary);
    box-shadow: 0 0 0 3px rgba(var(--anzar-primary-rgb, 79,70,229), 0.12);
}

.global-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--anzar-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 2000;
    overflow: hidden;
    max-height: 480px;
    overflow-y: auto;
}

.gsr-section-header {
    padding: 7px 14px 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--anzar-text-muted);
    background: var(--anzar-bg);
    border-bottom: 1px solid var(--anzar-border);
}

.gsr-item {
    display: block;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--anzar-text);
    transition: background 0.1s;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.gsr-item:hover {
    background: var(--anzar-primary-light);
    color: var(--anzar-primary);
}

.gsr-item-name {
    font-size: 13.5px;
    font-weight: 500;
}

.gsr-item-sub {
    font-size: 11.5px;
    color: var(--anzar-text-muted);
    margin-top: 1px;
}

.gsr-status {
    text-transform: capitalize;
}

.gsr-no-results {
    padding: 16px 14px;
    font-size: 13px;
    color: var(--anzar-text-muted);
    text-align: center;
}

/* ── Sidebar ───────────────────────────────────────── */
.app-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: #fff;
    border-right: 1px solid var(--anzar-border);
    display: flex;
    flex-direction: column;
    z-index: 1020;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

/* Mobile: sidebar hidden off-screen by default */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    .app-sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1019;
    opacity: 0;
    transition: opacity 0.25s;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ── Sidebar Navigation ───────────────────────────── */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.sidebar-nav .nav-section {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--anzar-text-muted);
    padding: 8px 12px 6px;
    margin-top: 8px;
}

.sidebar-nav .nav-section:first-child {
    margin-top: 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--anzar-text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--anzar-transition);
    margin-bottom: 2px;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.sidebar-nav .nav-link:hover {
    background: var(--anzar-primary-light);
    color: var(--anzar-primary);
}

.sidebar-nav .nav-link.active {
    background: var(--anzar-primary-light);
    color: var(--anzar-primary);
    font-weight: 600;
}

/* ── Sidebar User Panel (bottom) ──────────────────── */
.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--anzar-border);
    background: #FAFBFC;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--anzar-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

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

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

.sidebar-user-role {
    font-size: 12px;
    color: var(--anzar-text-muted);
}

.sidebar-user-meta {
    font-size: 11.5px;
    color: var(--anzar-text-muted);
    margin-bottom: 10px;
    line-height: 1.5;
}

.sidebar-user-meta i {
    width: 14px;
    text-align: center;
    margin-right: 2px;
}

.sidebar-user .btn-manage-account {
    display: block;
    width: 100%;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--anzar-primary);
    background: var(--anzar-primary-light);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    transition: var(--anzar-transition);
}

.sidebar-user .btn-manage-account:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.25);
}

/* ── Main Content Area ─────────────────────────────── */
.app-content {
    padding-top: 56px; /* Below topbar */
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop: content shifts right for sidebar */
@media (min-width: 992px) {
    .app-content {
        margin-left: 260px;
    }
    .app-topbar {
        left: 0;
    }
    body.sidebar-collapsed .app-sidebar {
        transform: translateX(-260px);
    }
    body.sidebar-collapsed .app-content {
        margin-left: 0;
    }
}

.app-content-inner {
    padding: 24px 16px;
}

@media (min-width: 576px) {
    .app-content-inner {
        padding: 24px;
    }
}

@media (min-width: 1200px) {
    .app-content-inner {
        padding: 28px 32px;
    }
}

/* ── Page Header ───────────────────────────────────── */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--anzar-text);
    margin-bottom: 4px;
}

.page-header p {
    font-size: 14px;
    color: var(--anzar-text-muted);
    margin-bottom: 0;
}

/* ── Content Cards ─────────────────────────────────── */
.content-card {
    background: #fff;
    border: 1px solid var(--anzar-border);
    border-radius: var(--anzar-radius);
    box-shadow: var(--anzar-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

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

.content-card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--anzar-text);
    margin: 0;
}

.content-card-header h2 i {
    margin-right: 8px;
    color: var(--anzar-primary);
}

.content-card-body {
    padding: 20px;
    overflow-x: auto;
}

/* ── Account Page ──────────────────────────────────── */
.account-section + .account-section {
    margin-top: 20px;
}

.account-section .form-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--anzar-text);
    margin-bottom: 4px;
}

.account-section .form-control {
    border-radius: 8px;
    border: 1.5px solid var(--anzar-border);
    padding: 10px 14px;
    font-size: 14px;
    transition: var(--anzar-transition);
}

.account-section .form-control:focus {
    border-color: var(--anzar-primary);
    box-shadow: 0 0 0 3px rgba(var(--anzar-primary-rgb), 0.1);
}

.account-section .form-select {
    border-radius: 8px;
    border: 1.5px solid var(--anzar-border);
    padding: 10px 14px;
    font-size: 14px;
    transition: var(--anzar-transition);
}

.account-section .form-select:focus {
    border-color: var(--anzar-primary);
    box-shadow: 0 0 0 3px rgba(var(--anzar-primary-rgb), 0.1);
}

.account-section .form-text {
    font-size: 12.5px;
    color: var(--anzar-text-muted);
}

.btn-save {
    background: var(--anzar-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--anzar-transition);
}

.btn-save:hover {
    background: var(--anzar-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--anzar-primary-rgb), 0.25);
}

.btn-save:focus-visible {
    color: #fff;
    background: var(--anzar-primary);
    outline: 2px solid var(--anzar-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(var(--anzar-primary-rgb), 0.2);
}

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

/* ── Stat Cards ────────────────────────────────────── */
.stat-card {
    background: #fff;
    border: 1px solid var(--anzar-border);
    border-radius: var(--anzar-radius);
    box-shadow: var(--anzar-shadow);
    padding: 20px;
    text-align: center;
    height: 100%;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--anzar-text);
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 13px;
    color: var(--anzar-text-muted);
    font-weight: 500;
}

/* ── Responsive Adjustments ────────────────────────── */

/* Small mobile (< 375px) */
@media (max-width: 374px) {
    .auth-card {
        padding: 24px 20px;
    }
    .auth-header h1 {
        font-size: 20px;
    }
}

/* Desktop (1920+) */
@media (min-width: 1200px) {
    .auth-container {
        max-width: 460px;
    }
    .auth-card {
        padding: 44px 40px;
    }
}

/* Large desktop (2560+) */
@media (min-width: 2400px) {
    .auth-container {
        max-width: 480px;
    }
    .auth-card {
        padding: 48px 44px;
    }
    .auth-header h1 {
        font-size: 26px;
    }
    .form-floating-icon .form-control {
        height: 54px;
        font-size: 16px;
    }
}


/* ── Inner Auth Card Logo ──────────────────────────── */
.auth-logo-card {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo-card img {
    max-height: 80px;
    max-width: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-logo-card .logo-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--anzar-text);
    letter-spacing: -0.02em;
}


/* ── Content Card Footer & Pagination ──────────────── */
.content-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--anzar-border);
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-card-footer .pagination {
    gap: 4px;
}

.content-card-footer .page-item .page-link {
    color: var(--anzar-text);
    background: #fff;
    border: 1px solid var(--anzar-border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.content-card-footer .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--anzar-primary);
}

.content-card-footer .page-item.active .page-link {
    background: var(--anzar-primary);
    border-color: var(--anzar-primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(var(--anzar-primary-rgb), 0.3);
}

.content-card-footer .page-item.disabled .page-link {
    background: #f8fafc;
    border-color: var(--anzar-border);
    color: #94a3b8;
}

/* ── Print — hide non-essential ────────────────────── */
@media print {
    .auth-wrapper::before,
    .auth-wrapper::after,
    .auth-footer,
    .grecaptcha-badge {
        display: none !important;
    }
}


/* ═══════════════════════════════════════════════════════
   AnzarFileUploader — Upload Progress Overlay
   ═══════════════════════════════════════════════════════ */

/* Full-screen frosted backdrop */
.anzar-upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: all;
}

.anzar-upload-overlay.visible {
    opacity: 1;
}

/* Card */
.anzar-upload-box {
    background: var(--anzar-bg-card);
    border-radius: var(--anzar-radius-lg);
    box-shadow: var(--anzar-shadow-xl);
    padding: 2.5rem 3rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: anzar-upload-slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes anzar-upload-slide-in {
    from { transform: translateY(20px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* Cloud icon */
.anzar-upload-icon {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    background: var(--anzar-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: anzar-upload-float 1.8s ease-in-out infinite alternate;
}

@keyframes anzar-upload-float {
    from { transform: translateY(0); }
    to   { transform: translateY(-6px); }
}

/* Status label */
.anzar-upload-status {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--anzar-text);
    margin-bottom: 1.25rem;
    letter-spacing: 0.01em;
}

/* Progress track */
.anzar-upload-track {
    width: 100%;
    height: 8px;
    background: var(--anzar-primary-light);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.625rem;
}

/* Progress fill */
.anzar-upload-bar {
    height: 100%;
    border-radius: 9999px;
    background: var(--anzar-gradient);
    transition: width 0.25s ease-out;
    position: relative;
}

/* Shimmer pulse when "Processing" (server → S3 leg) */
.anzar-upload-bar.processing {
    background-size: 200% 100%;
    background-image: linear-gradient(
        90deg,
        var(--anzar-primary) 0%,
        #60A5FA 50%,
        var(--anzar-primary) 100%
    );
    animation: anzar-upload-shimmer 1.4s ease-in-out infinite;
}

@keyframes anzar-upload-shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* Percentage label */
.anzar-upload-pct {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--anzar-primary);
    min-height: 1.25em;
    letter-spacing: 0.02em;
}

/* Quantity Inputs Spinner Hide */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* ── Inventory Photos Drag and Drop & Glow ──────── */
.photo-card-wrapper {
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.photo-card-wrapper.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}
.photo-card {
    border: 2px solid transparent;
    box-shadow: var(--anzar-shadow);
    transition: var(--anzar-transition);
}
.photo-card:hover {
    box-shadow: var(--anzar-shadow-lg);
}

/* Drag handle overlay style */
.photo-card .drag-handle {
    opacity: 0.6;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}
.photo-card:hover .drag-handle {
    opacity: 1;
}
.photo-card .drag-handle:hover {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Set primary star overlay style */
.photo-card .btn-set-primary {
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}
/* Keep the star button always visible if it is primary, or when card is hovered */
.photo-card:hover .btn-set-primary,
.photo-card .btn-set-primary.is-primary {
    opacity: 1;
}
.photo-card .btn-set-primary:hover {
    background-color: rgba(0, 0, 0, 0.8) !important;
    color: #FBBF24 !important; /* Gold on hover */
}

/* Green hazy glow border for just-uploaded photos */
.just-uploaded {
    animation: green-haze-glow 6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes green-haze-glow {
    0% {
        border-color: #22C55E !important;
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.4), var(--anzar-shadow-lg);
    }
    80% {
        border-color: #22C55E !important;
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.3), var(--anzar-shadow-lg);
    }
    100% {
        border-color: transparent;
        box-shadow: var(--anzar-shadow);
    }
}

/* ── Photo Editor UI Styles ─────────────────────── */
/* Edit Photo overlay button */
.photo-card .btn-edit-photo {
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}
.photo-card:hover .btn-edit-photo {
    opacity: 1;
}
.photo-card .btn-edit-photo:hover {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Delete Photo overlay button */
.photo-card .btn-delete-photo {
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}
.photo-card:hover .btn-delete-photo {
    opacity: 1;
}
.photo-card .btn-delete-photo:hover {
    background-color: rgba(220, 38, 38, 1) !important;
}

/* Image Editor Canvas Container */
.editor-canvas-container {
    max-height: 450px;
    background: #111827; /* Dark background */
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--anzar-border);
}
.editor-canvas-container img,
.editor-canvas-container canvas {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
}

/* Tool Buttons */
.editor-tool-btn {
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
}
.editor-tool-btn.active {
    background-color: var(--anzar-primary) !important;
    border-color: var(--anzar-primary) !important;
    color: #fff !important;
}
