@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
    --bg-dark: #090a12;
    --bg-darker: #05060b;
    --glass-bg: rgba(18, 20, 38, 0.45);
    --glass-bg-hover: rgba(26, 29, 54, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-focus: rgba(124, 77, 255, 0.4);

    --primary: #6366f1;
    --primary-soft: rgba(99, 102, 241, 0.15);
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.15);
    --info: #06b6d4;
    --info-soft: rgba(6, 182, 212, 0.15);
    --purple: #8b5cf6;
    --purple-soft: rgba(139, 92, 246, 0.15);
    --pink: #ec4899;
    --pink-soft: rgba(236, 72, 153, 0.15);
    --blue: #3b82f6;
    --blue-soft: rgba(59, 130, 246, 0.15);
    --secondary-soft: rgba(156, 163, 175, 0.12);

    --text-main: #f3f4f6;
    --text-muted: #cbd5e1;
    /* Lighter gray for better contrast in dark mode */
    --accent: #7c4dff;
    --accent-soft: rgba(124, 77, 255, 0.2);
    --accent-gradient: linear-gradient(135deg, #7c4dff 0%, #448aff 100%);

    --text-title: #ffffff;
    --text-title-soft: rgba(255, 255, 255, 0.85);

    --table-hover-bg: rgba(255, 255, 255, 0.02);
    --table-border: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] {
    --bg-dark: #f3f4f6;
    --bg-darker: #e5e7eb;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-border-focus: rgba(124, 77, 255, 0.6);

    --text-main: #1f2937;
    --text-muted: #556070;
    /* Darker gray for better contrast in light mode */
    --accent: #6366f1;
    --accent-soft: rgba(99, 102, 241, 0.15);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);

    --text-title: #111827;
    --text-title-soft: #374151;

    --table-hover-bg: rgba(0, 0, 0, 0.025);
    --table-border: rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(124, 77, 255, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

[data-theme="light"] body {
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(124, 77, 255, 0.05) 0px, transparent 50%) !important;
}

/* Typography Helper Classes */
.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-normal {
    font-weight: 400;
}

.text-xs {
    font-size: 0.75rem;
}

.text-accent {
    color: #9d7cff;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Glassmorphism card system */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-nested {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
}

/* Layout modifications */
.navbar-custom {
    background: rgba(9, 10, 18, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 15px 0;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 0.5px;
}


/* Auth Page Containers */
.auth-page-container {
    display: grid;
    grid-template-columns: 1.1fr 1.9fr;
    gap: 24px;
    max-width: 1200px;
    margin: 40px auto;
    width: 100%;
    padding: 0 15px;
}

.auth-page-container.single-card-layout {
    display: flex;
    justify-content: center;
    grid-template-columns: none;
}

.auth-page-container.single-card-layout .login-card {
    max-width: 600px;
    width: 100%;
}

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-title);
    margin-bottom: 8px;
}

/* Inputs & Form styling */
.glass-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    border-radius: 8px !important;
    padding: 10px 14px 10px 40px !important;
    transition: all 0.3s !important;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--glass-border-focus) !important;
    box-shadow: 0 0 12px rgba(124, 77, 255, 0.25) !important;
    outline: none !important;
}

[data-theme="light"] .glass-input {
    background: rgba(0, 0, 0, 0.03) !important;
    color: #1f2937 !important;
}

[data-theme="light"] .glass-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .glass-input:focus {
    background: rgba(0, 0, 0, 0.05) !important;
}

.glass-select {
    appearance: none;
    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='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 12px 10px !important;
}

.glass-select option {
    background: var(--bg-darker);
    color: var(--text-main);
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.btn-gradient {
    background: var(--accent-gradient);
    border: none;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.35);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 77, 255, 0.5);
    opacity: 0.95;
}

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

.text-accent {
    color: #9d7cff !important;
    text-decoration: none;
}

.hover-underline:hover {
    text-decoration: underline !important;
}

/* Quick Login Panel styling */
.quick-login-card {
    display: flex;
    flex-direction: column;
}

.quick-login-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
}

/* Sandbox role category group */
.sandbox-group {
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 14px 14px 10px;
    background: rgba(255, 255, 255, 0.015);
}

.sandbox-group-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 4px;
}

.quick-login-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-login-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.22s ease-in-out;
    position: relative;
}

.quick-login-item:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(124, 77, 255, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.quick-login-item:hover .quick-login-arrow {
    opacity: 1;
    color: var(--accent) !important;
    transform: translateX(2px);
}

.quick-login-item-active {
    border-color: var(--accent) !important;
    background: rgba(124, 77, 255, 0.08) !important;
}

.quick-login-arrow {
    margin-left: auto;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.role-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.quick-login-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.role-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-title);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.role-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 1.4;
}

/* Role Icon Colors */
.bg-primary-soft {
    background: var(--primary-soft);
}

.bg-success-soft {
    background: var(--success-soft);
}

.bg-info-soft {
    background: var(--info-soft);
}

.bg-purple-soft {
    background: var(--purple-soft);
}

.bg-warning-soft {
    background: var(--warning-soft);
}

.bg-danger-soft {
    background: var(--danger-soft);
}

.bg-pink-soft {
    background: var(--pink-soft);
}

.bg-blue-soft {
    background: var(--blue-soft);
}

.bg-secondary-soft {
    background: var(--secondary-soft);
}

.text-purple {
    color: #a78bfa;
}

.text-pink {
    color: #f472b6;
}

.text-blue {
    color: #60a5fa;
}

/* Dashboard Styling */
.dashboard-container {
    max-width: 1280px;
    margin: 30px auto;
    width: 100%;
    padding: 0 15px;
}

.dashboard-header-banner {
    background: linear-gradient(135deg, rgba(20, 21, 41, 0.6) 0%, rgba(13, 14, 28, 0.4) 100%);
    border: 1px solid var(--glass-border);
}

.dashboard-welcome {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-title);
}

.user-badge-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* Stats Cards */
.stat-card {
    padding: 20px;
    border-radius: 12px;
}

.border-left-primary {
    border-left: 4px solid var(--primary);
}

.border-left-success {
    border-left: 4px solid var(--success);
}

.border-left-warning {
    border-left: 4px solid var(--warning);
}

.border-left-danger {
    border-left: 4px solid var(--danger);
}

.border-left-info {
    border-left: 4px solid var(--info);
}

.border-left-purple {
    border-left: 4px solid var(--purple);
}

.stat-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

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

.stat-label {
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Custom Card Headers */
.card-header-custom {
    display: flex;
    flex-direction: column;
}

.card-title-custom {
    font-size: 1.25rem;
    letter-spacing: 0.3px;
}

/* Activity Timelines */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Scrollable variant for dashboard sidebars */
.activity-timeline-scroll {
    max-height: 520px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 77, 255, 0.35) transparent;
}

.activity-timeline-scroll::-webkit-scrollbar {
    width: 5px;
}

.activity-timeline-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.activity-timeline-scroll::-webkit-scrollbar-thumb {
    background: rgba(124, 77, 255, 0.35);
    border-radius: 99px;
}

.activity-timeline-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 77, 255, 0.6);
}

[data-theme="light"] .activity-timeline-scroll {
    scrollbar-color: rgba(99, 102, 241, 0.35) transparent;
}

[data-theme="light"] .activity-timeline-scroll::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
}

.activity-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 14px;
    position: relative;
    padding-left: 20px;
    transition: all 0.2s;
}

.activity-item-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.activity-badge-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.bg-success {
    background-color: var(--success) !important;
}

.bg-warning {
    background-color: var(--warning) !important;
}

.bg-info {
    background-color: var(--info) !important;
}

.bg-danger {
    background-color: var(--danger) !important;
}

.activity-item-title {
    font-size: 0.9rem;
    color: var(--text-title);
}

.activity-item-time {
    font-size: 0.72rem;
}

.activity-item-desc {
    font-size: 0.82rem;
    line-height: 1.35;
}

/* Action buttons on Dashboard */
.btn-action-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 10px !important;
    transition: all 0.25s !important;
}

.btn-action-card:hover {
    background: var(--glass-bg-hover) !important;
    border-color: rgba(124, 77, 255, 0.3) !important;
    transform: translateX(4px);
}

/* Workflow Flowchart / Vertical timeline */
.workflow-timeline-wrapper {
    display: flex;
    flex-direction: column;
}

.workflow-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 20px;
    /* Cap height so long workflows scroll inside the card instead of growing forever */
    max-height: 560px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 77, 255, 0.35) transparent;
}

.workflow-grid::-webkit-scrollbar {
    width: 5px;
}

.workflow-grid::-webkit-scrollbar-track {
    background: transparent;
}

.workflow-grid::-webkit-scrollbar-thumb {
    background: rgba(124, 77, 255, 0.35);
    border-radius: 99px;
}

.workflow-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 77, 255, 0.6);
}

[data-theme="light"] .workflow-grid {
    scrollbar-color: rgba(99, 102, 241, 0.35) transparent;
}

[data-theme="light"] .workflow-grid::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
}

/* Vertical timeline connector line — using left border on items instead of ::before
   so it works correctly inside the scrollable workflow-grid */
.workflow-grid::before {
    display: none;
}

.workflow-card-item {
    position: relative;
    padding-left: 25px;
    z-index: 2;
    border-left: 2px solid rgba(255, 255, 255, 0.06);
    margin-left: 12px;
}

.workflow-card-item:last-child {
    border-left-color: transparent;
}

.workflow-step-num {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-darker);
    border: 2px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 3;
}

.workflow-card-body {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.3s;
}

.workflow-step-title {
    font-size: 1.05rem;
    color: var(--text-title-soft);
}

.workflow-step-owner {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.workflow-step-desc {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Status: Completed */
.step-completed .workflow-card-body {
    background: rgba(16, 185, 129, 0.02);
    border-color: rgba(16, 185, 129, 0.15);
}

.step-completed .workflow-step-title {
    color: var(--success);
}

.step-completed .workflow-step-num {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

/* Status: Active (Pulsing Glow) */
.step-active .workflow-card-body {
    background: rgba(245, 158, 11, 0.03);
    border-color: rgba(245, 158, 11, 0.4);
}

.step-active .workflow-step-title {
    color: #f5b02b;
}

.step-active .workflow-step-num {
    border-color: var(--warning);
    background: var(--warning);
    color: var(--bg-darker);
}

/* Status: Sign-off Pending (Pulsing Glow Purple) */
.step-signoff .workflow-card-body {
    background: rgba(139, 92, 246, 0.04);
    border-color: rgba(139, 92, 246, 0.5);
}

.step-signoff .workflow-step-title {
    color: #a78bfa;
}

.step-signoff .workflow-step-num {
    border-color: var(--purple);
    background: var(--purple);
    color: #fff;
}

/* Status: ReadOnly */
.step-readonly .workflow-card-body {
    background: rgba(6, 182, 212, 0.02);
    border-color: rgba(6, 182, 212, 0.2);
}

.step-readonly .workflow-step-title {
    color: var(--info);
}

.step-readonly .workflow-step-num {
    border-color: var(--info);
    background: var(--info);
    color: var(--bg-darker);
}

/* Status: Upcoming */
.step-upcoming .workflow-step-title {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Pulsing Keyframe Animations */
.pulsing-glow .workflow-card-body {
    animation: glow-pulse-warn 2s infinite ease-in-out;
}

.pulsing-glow-purple .workflow-card-body {
    animation: glow-pulse-purple 2s infinite ease-in-out;
}

@keyframes glow-pulse-warn {
    0% {
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.1);
    }

    50% {
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
        border-color: rgba(245, 158, 11, 0.6);
    }

    100% {
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.1);
    }
}

@keyframes glow-pulse-purple {
    0% {
        box-shadow: 0 0 5px rgba(139, 92, 246, 0.1);
    }

    50% {
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
        border-color: rgba(139, 92, 246, 0.7);
    }

    100% {
        box-shadow: 0 0 5px rgba(139, 92, 246, 0.1);
    }
}

/* Entry Animation Helpers */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-fade-in-delayed {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.2s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

/* Responsive Overrides */
@media (max-width: 991px) {
    .auth-page-container {
        grid-template-columns: 1fr;
    }
}

/* Force text-muted override */
.text-muted {
    color: var(--text-muted) !important;
}

/* Admin Navigation Pills */
.custom-admin-tabs .nav-link {
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.custom-admin-tabs .nav-link:hover {
    color: var(--text-title);
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .custom-admin-tabs .nav-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

.custom-admin-tabs .nav-link.active {
    color: #fff !important;
    background: var(--accent-gradient) !important;
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.25);
}

/* ============================================================
   TABLES — improved list UI for both light and dark mode
   ============================================================ */

/* ── Scrollable table wrapper ──────────────────────────────────────────────
   Allows scrolling in BOTH directions when content overflows.
   The rounded corners are applied to the table itself, not the wrapper,
   so border-radius never clips the scrollbars or cuts off content.
   ───────────────────────────────────────────────────────────────────────── */
.table-responsive {
    overflow-x: auto;
    /* horizontal scroll when columns overflow  */
    overflow-y: auto;
    /* vertical scroll for long lists            */
    max-height: 520px;
    /* cap height so long lists scroll in-place  */
    border-radius: 12px;
    /* Custom thin scrollbar — dark & light themes */
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 77, 255, 0.35) transparent;
    -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 99px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(124, 77, 255, 0.35);
    border-radius: 99px;
    transition: background 0.2s;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 77, 255, 0.6);
}

.table-responsive::-webkit-scrollbar-corner {
    background: transparent;
}

[data-theme="light"] .table-responsive {
    scrollbar-color: rgba(99, 102, 241, 0.35) transparent;
}

[data-theme="light"] .table-responsive::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.55);
}

/* Keep the rounded look via table-custom itself — not the overflow wrapper */
.table-custom {
    color: var(--text-main) !important;
    margin-top: 0;
    border-collapse: separate;
    border-spacing: 0 3px;
    width: 100%;
    border-radius: 10px;
}

/* Header row */
.table-custom thead tr {
    background: transparent;
}

.table-custom thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.table-custom th {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 700;
    border-bottom: 2px solid var(--table-border) !important;
    border-top: none !important;
    padding: 11px 14px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.025);
}

.table-custom th:first-child {
    border-radius: 10px 0 0 0;
}

.table-custom th:last-child {
    border-radius: 0 10px 0 0;
}

/* Body cells */
.table-custom td {
    border-bottom: 1px solid var(--table-border) !important;
    border-top: none !important;
    padding: 14px 14px;
    vertical-align: middle;
    color: var(--text-main);
    background: transparent;
    transition: background 0.18s;
}

.table-custom td:first-child {
    border-left: none;
}

.table-custom td:last-child {
    border-right: none;
}

/* Row background — alternating */
.table-custom tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.018);
}

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

/* Hover highlight */
.table-custom tbody tr:hover td {
    background: rgba(124, 77, 255, 0.08) !important;
    border-bottom-color: rgba(124, 77, 255, 0.15) !important;
}

.table-custom tbody tr {
    transition: all 0.18s;
}

/* First col rounded left edge, last col rounded right */
.table-custom tbody tr td:first-child {
    border-radius: 8px 0 0 8px;
}

.table-custom tbody tr td:last-child {
    border-radius: 0 8px 8px 0;
}

/* User-name primary text in tables */
.table-custom .user-name-cell {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-title);
}

.table-custom .user-sub-cell {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Avatar circle in table */
.table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0;
    background: var(--accent-soft);
    color: var(--accent);
    border: 2px solid rgba(124, 77, 255, 0.2);
}

/* Inline edit row */
.table-custom .inline-edit-row td {
    background: rgba(124, 77, 255, 0.03) !important;
    border-bottom: 2px solid rgba(124, 77, 255, 0.15) !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.inline-edit-inner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(124, 77, 255, 0.22);
    border-radius: 12px;
    padding: 20px;
    margin: 6px 10px 12px;
}

/* Empty state inside table */
.table-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.table-empty-state i {
    font-size: 2.5rem;
    opacity: 0.4;
    display: block;
    margin-bottom: 12px;
}

.bg-dark-soft {
    background: rgba(255, 255, 255, 0.015);
}

/* ── Light mode table overrides ── */
[data-theme="light"] .table-custom {
    color: #1f2937 !important;
}

[data-theme="light"] .table-custom th {
    color: #4b5563;
    background: rgba(0, 0, 0, 0.03);
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .table-custom td {
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
    color: #1f2937;
}

[data-theme="light"] .table-custom tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .table-custom tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.028);
}

[data-theme="light"] .table-custom tbody tr:hover td {
    background: rgba(99, 102, 241, 0.07) !important;
    border-bottom-color: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .table-custom .user-name-cell {
    color: #111827;
}

[data-theme="light"] .table-custom .user-sub-cell {
    color: #6b7280;
}

[data-theme="light"] .table-avatar {
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
    border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .table-custom .inline-edit-row td {
    background: rgba(99, 102, 241, 0.03) !important;
    border-bottom-color: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .inline-edit-inner {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .bg-dark-soft {
    background: rgba(0, 0, 0, 0.015);
}

/* btn-outline-secondary — adaptive across both themes */
.btn-outline-secondary {
    color: var(--text-main) !important;
    border-color: var(--glass-border) !important;
    background: transparent !important;
}

.btn-outline-secondary:hover {
    background: var(--glass-bg-hover) !important;
    border-color: rgba(124, 77, 255, 0.3) !important;
    color: var(--text-title) !important;
}

[data-theme="light"] .btn-outline-secondary {
    border-color: #9ca3af !important;
}

[data-theme="light"] .btn-outline-secondary:hover {
    background: #f3f4f6 !important;
    border-color: #6b7280 !important;
}

/* ============================================================
   LIGHT MODE — Comprehensive adaptive overrides
   ============================================================ */

/* Body text defaults */
[data-theme="light"] body {
    color: #1f2937;
}

/* Glass card nested — adapts background for light mode */
[data-theme="light"] .glass-card-nested {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.07);
}

/* Dashboard header banner — adapt to light */
[data-theme="light"] .dashboard-header-banner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(240, 242, 255, 0.6) 100%);
}

/* Force white-text utility classes to adapt in light mode */
[data-theme="light"] .text-white,
[data-theme="light"] .text-light {
    color: #111827 !important;
}

/* text-muted already handled via CSS var, but reinforce */
[data-theme="light"] .text-muted {
    color: #556070 !important;
}

/* Auth titles */
[data-theme="light"] .auth-title {
    color: #111827;
}

/* Dashboard welcome heading */
[data-theme="light"] .dashboard-welcome {
    color: #111827;
}

/* Workflow card bodies */
[data-theme="light"] .workflow-card-body {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .workflow-step-title {
    color: #111827;
}

[data-theme="light"] .step-upcoming .workflow-step-title {
    color: #556070;
    opacity: 0.7;
}

[data-theme="light"] .workflow-step-num {
    background: #e5e7eb;
    border-color: rgba(0, 0, 0, 0.12);
    color: #374151;
}

[data-theme="light"] .workflow-grid::before {
    background: transparent;
}

[data-theme="light"] .workflow-card-item {
    border-left-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .workflow-card-item:last-child {
    border-left-color: transparent;
}

/* Activity cards */
[data-theme="light"] .activity-item-card {
    background: rgba(0, 0, 0, 0.025);
    border-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .activity-item-card:hover {
    background: rgba(0, 0, 0, 0.045);
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .activity-item-title {
    color: #111827;
}

/* Quick login items */
[data-theme="light"] .quick-login-item {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .quick-login-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .role-name {
    color: #111827;
}

/* Table */
[data-theme="light"] .table-custom {
    color: #1f2937 !important;
}

[data-theme="light"] .table-custom th {
    color: #556070;
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .table-custom td {
    border-bottom-color: rgba(0, 0, 0, 0.07);
}

/* btn-outline-light — invisible on white in light mode; swap to dark outline */
[data-theme="light"] .btn-outline-light {
    color: #374151 !important;
    border-color: #9ca3af !important;
    background: transparent !important;
}

[data-theme="light"] .btn-outline-light:hover {
    background: #f3f4f6 !important;
    border-color: #6b7280 !important;
    color: #111827 !important;
}

/* Landing page headings */
[data-theme="light"] .landing-page-wrapper h1,
[data-theme="light"] .landing-page-wrapper h4 {
    color: #111827;
}

/* PendingApproval / info rows */
[data-theme="light"] .glass-card-nested .row .col-8,
[data-theme="light"] .glass-card-nested .text-white {
    color: #111827 !important;
}

/* Action buttons */

/* ============================================================
   DASHBOARD CARDS — improved dark mode styling
   ============================================================ */

/* Stat cards in dark mode */
[data-theme="dark"] .card.border-0.shadow-sm {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .card.border-0.shadow-sm:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(124, 77, 255, 0.2) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Card headers in dark mode */
[data-theme="dark"] .card-header.bg-white {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-title) !important;
}

/* Table in dark mode */
[data-theme="dark"] .table {
    color: var(--text-main) !important;
}

[data-theme="dark"] .table thead {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .table th {
    color: var(--text-muted) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .table td {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background: rgba(124, 77, 255, 0.08) !important;
}

/* Progress bar in dark mode */
[data-theme="dark"] .progress {
    background: rgba(255, 255, 255, 0.1);
}

/* Badge improvements in dark mode */
[data-theme="dark"] .badge.bg-light {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ============================================================
   IQA DASHBOARD — improved dark mode styling
   ============================================================ */

/* IQA specific card styling */
[data-theme="dark"] .card.border-danger {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.3) !important;
}

[data-theme="dark"] .card.border-danger .card-header {
    background: rgba(239, 68, 68, 0.1) !important;
    border-bottom-color: rgba(239, 68, 68, 0.2) !important;
}

[data-theme="light"] .btn-action-card {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #1f2937 !important;
}

[data-theme="light"] .btn-action-card:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

/* Section dividers */
[data-theme="light"] .border-bottom {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Admin tabs container */
[data-theme="light"] .custom-admin-tabs .nav-link {
    color: #374151;
}

[data-theme="light"] .custom-admin-tabs .nav-link:hover {
    color: #111827;
}

/* Stat card values */
[data-theme="light"] .stat-value {
    color: #111827 !important;
}

/* Form check labels in light mode */
[data-theme="light"] .form-check-label {
    color: #374151 !important;
}

/* Logout link — keep red but darker shade in light */
[data-theme="light"] .nav-link.text-danger {
    color: #dc2626 !important;
}

/* Light Theme Nav overrides */
[data-theme="light"] .navbar-custom {
    background: rgba(255, 255, 255, 0.9) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .navbar-custom .nav-link {
    color: #1f2937 !important;
}

[data-theme="light"] .navbar-custom .navbar-brand {
    color: #111827 !important;
}

[data-theme="light"] .navbar-custom .btn.bg-accent-soft {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--accent) !important;
}

[data-theme="light"] #theme-toggle i {
    color: #111827 !important;
}

/* ============================================================
   SEARCHABLE COMBOBOX
   ============================================================ */
.combo-wrapper {
    position: relative;
}

.combo-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.combo-input-wrap .input-icon {
    pointer-events: none;
    z-index: 2;
}

.combo-input {
    width: 100%;
    padding-right: 32px !important;
    cursor: text;
}

.combo-caret {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: transform 0.2s;
    z-index: 2;
}

.combo-wrapper.open .combo-caret {
    transform: translateY(-50%) rotate(180deg);
}

/* Hidden native select — keeps form submission working */
.combo-hidden-select {
    display: none !important;
}

.combo-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-darker);
    border: 1px solid var(--glass-border-focus);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    display: none;
    max-height: 240px;
    flex-direction: column;
}

.combo-wrapper.open .combo-dropdown {
    display: flex;
}

.combo-search-row {
    padding: 8px 10px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.combo-search-row i {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.combo-search {
    width: 100%;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: var(--text-main) !important;
    font-size: 0.88rem;
    padding: 0 !important;
    box-shadow: none !important;
    font-family: inherit;
}

.combo-search::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.combo-list {
    overflow-y: auto;
    flex: 1;
    padding: 4px;
}

.combo-option {
    padding: 9px 14px;
    font-size: 0.88rem;
    color: var(--text-main);
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.combo-option:hover,
.combo-option.combo-highlighted {
    background: rgba(124, 77, 255, 0.15);
    color: var(--text-title);
}

.combo-option.combo-selected {
    background: rgba(124, 77, 255, 0.2);
    color: #a78bfa;
    font-weight: 600;
}

.combo-option.combo-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.combo-no-results {
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* Custom value "use this" option */
.combo-option-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 0.88rem;
    color: var(--accent);
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s;
    font-style: italic;
    border-top: 1px solid var(--glass-border);
    margin-top: 2px;
}

.combo-option-custom i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.combo-option-custom:hover,
.combo-option-custom.combo-highlighted {
    background: rgba(124, 77, 255, 0.12);
    color: #c4b5fd;
}

[data-theme="light"] .combo-option-custom {
    color: #4338ca;
    border-top-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .combo-option-custom:hover,
[data-theme="light"] .combo-option-custom.combo-highlighted {
    background: rgba(99, 102, 241, 0.1);
    color: #3730a3;
}

/* Scrollbar styling for combo-list */
.combo-list::-webkit-scrollbar {
    width: 5px;
}

.combo-list::-webkit-scrollbar-track {
    background: transparent;
}

.combo-list::-webkit-scrollbar-thumb {
    background: rgba(124, 77, 255, 0.3);
    border-radius: 3px;
}

/* Light mode overrides */
[data-theme="light"] .combo-dropdown {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .combo-search-row {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .combo-search {
    color: #1f2937 !important;
}

[data-theme="light"] .combo-option {
    color: #1f2937;
}

[data-theme="light"] .combo-option:hover,
[data-theme="light"] .combo-option.combo-highlighted {
    background: rgba(99, 102, 241, 0.1);
    color: #111827;
}

[data-theme="light"] .combo-option.combo-selected {
    background: rgba(99, 102, 241, 0.15);
    color: #4338ca;
}

[data-theme="light"] .combo-option.combo-placeholder {
    color: #9ca3af;
}

[data-theme="light"] .combo-no-results {
    color: #9ca3af;
}


/* ============================================================
   NAVBAR LOGO IMAGE — theme-aware
   ============================================================ */

/* The logo PNG has a transparent background.
   In dark mode we show it as-is (light logo on dark nav).
   In light mode we invert the brightness slightly so it reads
   well on the white/light navbar without a jarring halo. */

.navbar-logo-img {
    display: block;
    object-fit: contain;
    border-radius: 6px;
    /* Subtle drop shadow so it pops on both backgrounds */
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
    transition: filter 0.3s, transform 0.2s;
}

.navbar-logo-img:hover {
    transform: scale(1.08);
}

/* Light mode: darken the logo so it contrasts against the white navbar */
[data-theme="light"] .navbar-logo-img {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15)) brightness(0.85) saturate(1.1);
}

/* Brand text colour adapts via existing light-mode overrides for .navbar-brand */
.navbar-brand-text {
    color: inherit;
}

/* ============================================================
   GLOBAL DARK MODE FIXES (Table headers, text contrast, badges, cards)
   ============================================================ */

/* Fix table-light headers in dark mode */
[data-theme="dark"] .table-light,
[data-theme="dark"] .table thead.table-light,
[data-theme="dark"] .table thead.table-light th {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-title) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    --bs-table-bg: rgba(255, 255, 255, 0.05) !important;
    --bs-table-color: var(--text-title) !important;
}

/* Fix text-dark visibility in dark mode */
[data-theme="dark"] .text-dark {
    color: var(--text-title) !important;
}

/* Fix bg-light utility class in dark mode */
[data-theme="dark"] .bg-light {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-main) !important;
}

/* General card styling in dark mode */
[data-theme="dark"] .card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

/* Card header styling in dark mode */
[data-theme="dark"] .card-header {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-title) !important;
}

/* Fix standard Bootstrap table cells in dark mode */
[data-theme="dark"] .table tbody td,
[data-theme="dark"] .table tbody th {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .table {
    --bs-table-bg: transparent !important;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
    --bs-table-active-bg: rgba(255, 255, 255, 0.05) !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.07) !important;
    color: var(--text-main) !important;
}


/* ============================================================
   FOOTER — Fancy glassmorphism, dark & light mode
   ============================================================ */

.site-footer {
    position: relative;
    z-index: 0;
    margin-top: auto;
    /* Dark mode base — solid enough, no backdrop-filter to avoid stacking context issues */
    background: rgba(9, 10, 18, 0.96);
    /* Subtle dot-grid texture */
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px),
        radial-gradient(at 0% 100%, rgba(124, 77, 255, 0.12) 0px, transparent 55%),
        radial-gradient(at 100% 0%, rgba(68, 138, 255, 0.10) 0px, transparent 55%);
    background-size: 28px 28px, 100% 100%, 100% 100%;
}

/* Animated gradient top border */
.footer-top-bar {
    height: 2px;
    background: var(--accent-gradient);
    background-size: 200% 100%;
    animation: footer-bar-shift 6s linear infinite;
    opacity: 0.85;
}

@keyframes footer-bar-shift {
    0%   { background-position: 0% 50%;   }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%;   }
}

.footer-inner {
    padding: 40px 0 24px;
}

/* Logo */
.footer-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(124, 77, 255, 0.3));
    transition: filter 0.3s, transform 0.25s;
    display: block;
}

.footer-logo:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 4px 12px rgba(124, 77, 255, 0.5));
}

/* Description text */
.footer-desc {
    font-size: 0.83rem;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 300px;
    margin-bottom: 0;
}

/* Links section label */
.footer-links-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links-label::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Links grid — 2 columns by default */
.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 20px;
}

/* Individual link pill */
.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.84rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px 0;
    border-radius: 6px;
    transition: color 0.2s, gap 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-link-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.footer-link:hover {
    color: var(--text-title);
    gap: 5px;
}

.footer-link:hover .footer-link-icon {
    opacity: 1;
    transform: translateX(2px);
}

/* Bottom bar */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.footer-copyright {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

/* Decorative dots */
.footer-bottom-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    opacity: 0.55;
    animation: dot-pulse 2.8s ease-in-out infinite;
}

.footer-dot--purple { background: #7c4dff; animation-delay: 0s; }
.footer-dot--blue   { background: #448aff; animation-delay: 0.4s; }
.footer-dot--pink   { background: #ec4899; animation-delay: 0.8s; }

@keyframes dot-pulse {
    0%, 100% { opacity: 0.35; transform: scale(1);    }
    50%       { opacity: 0.85; transform: scale(1.25); }
}

/* ── Light mode footer ── */
[data-theme="light"] .site-footer {
    background: rgba(245, 246, 255, 0.98);
    background-image:
        radial-gradient(circle, rgba(99, 102, 241, 0.045) 1px, transparent 1px),
        radial-gradient(at 0% 100%, rgba(124, 77, 255, 0.06) 0px, transparent 55%),
        radial-gradient(at 100% 0%, rgba(68, 138, 255, 0.05) 0px, transparent 55%);
    background-size: 28px 28px, 100% 100%, 100% 100%;
}

[data-theme="light"] .footer-desc {
    color: #556070;
}

[data-theme="light"] .footer-links-label {
    color: #6b7280;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .footer-link {
    color: #556070;
}

[data-theme="light"] .footer-link:hover {
    color: #111827;
}

[data-theme="light"] .footer-link-icon {
    color: var(--accent);
}

[data-theme="light"] .footer-bottom {
    border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .footer-copyright {
    color: #6b7280;
}

[data-theme="light"] .footer-logo {
    filter: drop-shadow(0 2px 6px rgba(99, 102, 241, 0.2)) brightness(0.9);
}

/* Responsive — stack links to 1 col on small screens */
@media (max-width: 575px) {
    .footer-links-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   DASHBOARD LAYOUT — fix admin-panel overflow / h-100 stretch
   ============================================================ */

/* Admin panels should be auto height — h-100 was forcing the left
   col to stretch the full row height and pushing the right sidebar down */
.admin-panel {
    height: auto !important;
}

/* Right sidebar sticks in view while left panel scrolls */
.dashboard-sidebar-sticky {
    position: sticky;
    top: 90px; /* clears the navbar */
}

/* ============================================================
   NUMBER INPUT — hide native browser spin buttons
   ============================================================ */

/* Chrome, Safari, Edge, Opera */
input[type=number].no-spinners::-webkit-outer-spin-button,
input[type=number].no-spinners::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number].no-spinners {
    -moz-appearance: textfield;
    appearance: textfield;
}
