@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: dark;
    /* Color Palette */
    --bg-base: #0a0d16;
    --bg-surface: rgba(18, 24, 40, 0.75);
    --bg-surface-solid: #121828;
    --bg-input: rgba(255, 255, 255, 0.03);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent: #6366f1; /* Indigo */
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-hover: #4f46e5;
    
    --success: #10b981; /* Emerald */
    --success-glow: rgba(16, 185, 129, 0.1);
    --error: #f43f5e; /* Rose */
    --error-glow: rgba(244, 63, 94, 0.1);
    --warning: #f59e0b; /* Amber */
    --warning-glow: rgba(245, 158, 11, 0.1);
    
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 24px -4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px -8px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* Background glowing orbs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}
body::before {
    top: 0;
    left: -100px;
}
body::after {
    bottom: 0;
    right: -100px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.25;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--text-primary);
}

/* Container & Grid Layouts */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* Glassmorphism Cards */
.card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    width: 100%;
    max-width: 480px;
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}
.card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
    text-align: center;
    margin-bottom: 24px;
}
.card-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.card-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 14px;
    position: relative;
}
.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    text-transform: none;
    letter-spacing: normal;
}
.form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Custom Muted Placeholders (Sample Text) */
input::placeholder,
textarea::placeholder,
select::placeholder,
.form-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    opacity: 1;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder,
.form-input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.45);
}
input::-moz-placeholder,
textarea::-moz-placeholder,
.form-input::-moz-placeholder {
    color: rgba(255, 255, 255, 0.45);
    opacity: 1;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder,
.form-input:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.45);
}
input:-moz-placeholder,
textarea:-moz-placeholder,
.form-input:-moz-placeholder {
    color: rgba(255, 255, 255, 0.45);
    opacity: 1;
}

/* De-emphasize Browser Autofill Highlights */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover, 
.form-input:-webkit-autofill:focus, 
.form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #121828 inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #f8fafc !important;
    transition: background-color 5000s ease-in-out 0s !important;
}
select.form-input {
    background-color: var(--bg-surface-solid);
    color: var(--text-primary);
}
select.form-input option {
    background-color: var(--bg-surface-solid);
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px 0 var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
.btn-google {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}
.btn-google img {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}
.btn-google:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}
.btn-sm {
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    width: auto;
    margin: 0 !important;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 24px 0;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.divider:not(:empty)::before {
    margin-right: 16px;
}
.divider:not(:empty)::after {
    margin-left: 16px;
}

/* Alerts / Notices */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 24px;
    border: 1px solid transparent;
}
.alert-error {
    background: var(--error-glow);
    border-color: rgba(244, 63, 94, 0.2);
    color: #fda4af;
}
.alert-success {
    background: var(--success-glow);
    border-color: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}
.alert-warning {
    background: var(--warning-glow);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fde68a;
}

/* Header & Navigation */
header {
    background: rgba(10, 13, 22, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 22px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}
@media (min-width: 992px) {
    .nav-menu {
        margin-left: 24px;
    }
}
.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}
.nav-link:hover {
    color: var(--text-primary);
}

/* Dashboard UI grids */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 24px 0;
}
@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.dashboard-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.panel-title {
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Cards & Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
    white-space: nowrap;
}
.badge-active { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-completed { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.badge-paused { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.badge-error { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.badge-bronze { background: rgba(205, 127, 50, 0.15); color: #cd7f32; border: 1px solid rgba(205, 127, 50, 0.3); }
.badge-silver { background: rgba(192, 192, 192, 0.15); color: #c0c0c0; border: 1px solid rgba(192, 192, 192, 0.3); }
.badge-gold { background: rgba(255, 215, 0, 0.15); color: #ffd700; border: 1px solid rgba(255, 215, 0, 0.3); text-shadow: 0 0 4px rgba(255, 215, 0, 0.2); }
.badge-legend { background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(244, 63, 94, 0.15) 100%); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.3); box-shadow: 0 0 8px rgba(99, 102, 241, 0.2); }
.badge-platinum { background: rgba(0, 229, 255, 0.15); color: #80f5ff; border: 1px solid rgba(0, 229, 255, 0.3); }
.badge-diamond { background: rgba(156, 39, 176, 0.15); color: #e040fb; border: 1px solid rgba(156, 39, 176, 0.3); }

/* Styling for the How It Works page cards and lists */
.principle-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 24px; text-align: left; margin-bottom: 20px; }
.principle-step { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; text-align: left; }
.step-icon-capsule { background: var(--accent-glow); color: var(--accent); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.step-text { font-size: 14.5px; color: #e2e8f0; line-height: 1.6; }
.step-text .step-title { color: var(--text-primary); display: block; font-size: 16.5px; margin-bottom: 6px; font-weight: 700; font-family: var(--font-heading); }
.step-text strong:not(.step-title) { color: #a5b4fc; display: inline; font-size: inherit; margin: 0; font-weight: 700; }

/* Campaign Row elements */
.campaign-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.campaign-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Progress bar styles */
.progress-bar-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    height: 8px;
    border-radius: 50px;
    overflow: hidden;
    margin-top: 8px;
}
.progress-bar {
    background: var(--accent);
    height: 100%;
    border-radius: 50px;
    transition: width 0.5s ease-out;
}

/* Footer styling */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 32px 0 24px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    color: var(--text-muted);
    font-size: 13.5px;
    margin-top: 48px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-logo {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 30%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.footer-desc {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.6;
    max-width: 320px;
    margin: 0;
    text-align: left;
}
.footer-copy {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0;
    margin-top: 12px;
    text-align: left;
}
.footer-links h5 {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    margin-top: 0;
}
.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    transition: color var(--transition-fast);
}
.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.footer-bottom .footer-copy {
    margin-top: 0;
}

/* Tooltip & Inline Help Info Triggers */
.info-trigger, .info-tooltip-btn {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    font-size: 11px;
    font-weight: 800;
    font-style: normal;
    transition: all 0.2s ease;
    border: 1px solid rgba(99, 102, 241, 0.35);
    user-select: none;
    line-height: 1;
    flex-shrink: 0;
}
.info-icon {
    font-size: 11px;
    color: inherit;
    font-style: normal;
    font-weight: bold;
    line-height: 1;
}
.info-trigger:hover, .info-trigger:focus,
.info-tooltip-btn:hover, .info-tooltip-btn:focus {
    background: var(--accent, #6366f1);
    color: #ffffff;
    border-color: #818cf8;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
    transform: scale(1.15);
}
.tooltip-content {
    display: none !important; /* Managed by JS Universal Floating Tooltip */
}

/* Universal Dynamic Floating Tooltip Popover */
.ct-tooltip-popover {
    position: fixed;
    z-index: 99999;
    background: #0f172a;
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: #f1f5f9;
    font-size: 12.5px;
    line-height: 1.55;
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.85);
    max-width: 360px;
    width: max-content;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
    font-family: var(--font-body, system-ui, -apple-system, sans-serif);
    font-weight: 400;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
}
.ct-tooltip-popover.show {
    opacity: 1;
    transform: translateY(0);
}
[data-theme="light"] .ct-tooltip-popover {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}
[data-theme="light"] .ct-tooltip-popover div,
[data-theme="light"] .ct-tooltip-popover p,
[data-theme="light"] .ct-tooltip-popover span {
    color: #0f172a !important;
}
.ct-tooltip-popover div,
.ct-tooltip-popover p {
    margin-bottom: 6px;
}
.ct-tooltip-popover div:last-child,
.ct-tooltip-popover p:last-child {
    margin-bottom: 0;
}

/* Password Toggle Visibility */
.password-wrapper {
    position: relative;
    display: block;
    width: 100%;
}
.password-wrapper .form-input {
    padding-right: 44px;
}
.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 5;
    user-select: none;
    line-height: 1;
}

/* Header active states & navigation enhancements */
.nav-link,
.nav-link-top {
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
}
.nav-link:hover,
.nav-link-top:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}
.nav-link.active,
.nav-link-top.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent) !important;
    font-weight: 700 !important;
}
.nav-link.active::after,
.nav-link-top.active::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 15%;
    width: 70%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
}

/* User dropdown component */
.user-dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-trigger {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}
.dropdown-trigger:hover, .dropdown-trigger.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
}
.dropdown-trigger .user-avatar {
    font-size: 14px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dropdown-trigger .dropdown-arrow {
    font-size: 8px;
    color: var(--text-secondary);
    transition: transform var(--transition-fast);
}
.dropdown-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--bg-surface-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 220px;
    padding: 8px;
    z-index: 1000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: fadeInDropdown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.dropdown-menu.show {
    display: block;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header-info {
    padding: 8px 12px 10px 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
    text-align: left;
}
.dropdown-header-info .user-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dropdown-header-info .user-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
    text-align: left;
}
.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}
.dropdown-item.active {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
}
.dropdown-item.admin-item {
    color: var(--warning);
}
.dropdown-item.admin-item:hover {
    background: rgba(245, 158, 11, 0.04);
    color: var(--warning);
}
.dropdown-item.logout-item {
    color: var(--error);
}
.dropdown-item.logout-item:hover {
    background: rgba(244, 63, 94, 0.04);
    color: var(--error);
}
.dropdown-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 6px 0;
}

/* Credit Ledger & General Tables */
.ledger-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.005);
}
table, .ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}
table th, table td, .ledger-table th, .ledger-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}
table th, .ledger-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}
table tr:last-child td, .ledger-table tr:last-child td {
    border-bottom: none;
}
.ledger-amount {
    font-weight: 700;
}
.ledger-amount-earn { color: var(--success); }
.ledger-amount-spend { color: var(--error); }
.ledger-amount-refund { color: var(--accent); }
.ledger-amount-admin { color: var(--warning); }

/* Unified Info Banners */
.info-banner {
    background: rgba(99, 102, 241, 0.03);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}
.info-banner-icon {
    font-size: 16px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Clickable Logo links styling */
a.logo {
    display: inline-block;
    text-decoration: none;
}
a.logo:hover {
    text-decoration: none;
}

/* Legal content pages styling (consolidated) */
.legal-content {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    max-width: 800px;
    margin: 40px auto;
    line-height: 1.7;
}
.legal-content h1 {
    font-size: 32px;
    margin-bottom: 24px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}
.legal-content h2 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 12px;
    color: var(--accent);
}
.legal-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 15px;
}
.legal-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 15px;
}
.legal-content li {
    margin-bottom: 8px;
}

/* Responsive Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}
.hamburger span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-surface-solid);
        border-bottom: 1px solid var(--border-color);
        padding: 24px;
        gap: 20px;
        z-index: 99;
    }
    .nav-menu.active {
        display: flex;
    }
    /* Hamburger toggled states */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Two-column layout grid for forms, tools, and widgets across dashboards */
.admin-layout-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 768px) {
    .admin-layout-2col {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Responsive Checklist and List Action Items */
.action-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.action-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}
.action-item-warning {
    background: rgba(245, 158, 11, 0.04) !important;
    border-color: rgba(245, 158, 11, 0.15) !important;
}
.action-item-accent {
    background: rgba(99, 102, 241, 0.04) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

@media (max-width: 768px) {
    /* Compress metric cards and dashboards */
    .dashboard-panel {
        padding: 20px !important;
    }
    
    /* 2x2 grid for tab navigation on mobile to make all options visible */
    .tabs-nav {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        width: 100% !important;
        padding: 6px !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-sm) !important;
        margin: 24px 0 !important;
    }
    .tabs-nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .tab-btn {
        width: 100% !important;
        text-align: center !important;
        padding: 10px 6px !important;
        font-size: 12.5px !important;
        font-weight: 600 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        border-radius: var(--radius-sm) !important;
    }
    
    /* Site Footer padding reductions & alignment */
    .site-footer {
        padding: 30px 0 20px 0 !important;
        margin-top: 40px !important;
    }
    .footer-bottom {
        text-align: center !important;
    }
    .footer-bottom .footer-copy {
        text-align: center !important;
    }
    
    /* Table padding overrides */
    .ledger-table th, .ledger-table td,
    table th, table td {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 576px) {
    /* Compact authentication screens */
    .auth-wrapper {
        padding: 20px 16px !important;
    }
    .card {
        padding: 20px !important;
        border-radius: var(--radius-md) !important;
    }
    .card-header {
        margin-bottom: 20px !important;
    }
    .card-header h2 {
        font-size: 22px !important;
    }
    
    /* General section paddings and headings */
    .container {
        padding: 0 16px !important;
    }
    .hero {
        padding: 40px 0 30px 0 !important;
    }
    .hero h1 {
        font-size: 28px !important;
        margin-bottom: 16px !important;
    }
    .hero p {
        font-size: 14.5px !important;
        margin-bottom: 24px !important;
    }
    .stats-bar {
        padding: 16px 8px !important;
        margin: 24px 0 !important;
        gap: 12px;
    }
    .stat-value {
        font-size: 24px !important;
    }
    .stat-label {
        font-size: 11px !important;
    }
    
    .feature-card, .prop-card, .step-card, .legal-content {
        padding: 20px !important;
    }
    
    .legal-content {
        margin: 20px auto !important;
    }
    .legal-content h1 {
        font-size: 24px !important;
    }
    
    /* Form inputs and buttons slightly more compact */
    .form-input {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
    .btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    /* Action checklist item stack */
    .action-item {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: left !important;
        gap: 12px !important;
    }
    .action-item .btn, .action-item .btn-sm {
        width: 100% !important;
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    /* Hide Username Greeting in sticky header to prevent horizontal wrapping */
    .dropdown-trigger span:not(.user-avatar):not(.dropdown-arrow) {
        display: none !important;
    }
    .dropdown-trigger {
        padding: 6px 10px !important;
        gap: 4px !important;
    }
    
    /* Stack CTA Buttons vertically */
    .cta-buttons {
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }
    .cta-buttons .btn {
        width: 100% !important;
    }
}

/* Dashboard Application Layout Shell */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styling */
.dashboard-sidebar {
    width: 240px;
    background-color: #080b11;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 150;
    transition: transform var(--transition-normal);
}

.sidebar-brand {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px 16px;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 14.5px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent);
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--error);
    font-size: 14.5px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.sidebar-logout-btn:hover {
    background: rgba(244, 63, 94, 0.04);
}

/* Sidebar Drawer Backdrop Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 140;
    transition: opacity var(--transition-normal);
}

.sidebar-overlay.show {
    display: block;
}

/* Main Dashboard Content Area */
.dashboard-main {
    flex-grow: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-base);
}

/* Sticky Header inside Dashboard */
.dashboard-header {
    background: rgba(10, 13, 22, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.hamburger-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 4px;
}

.hamburger-menu-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
}

#dashboard-page-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Top Stats Banner in Header */
.top-stats-bar {
    display: flex;
    gap: 16px;
    align-items: center;
}

.top-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.top-stat-item:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-1px);
}

.top-stat-item .stat-icon {
    font-size: 14px;
}

.top-stat-item .stat-label {
    color: var(--text-secondary);
}

.top-stat-item .stat-val {
    color: var(--accent);
}

.dashboard-content {
    padding: 32px;
    flex-grow: 1;
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .dashboard-main {
        margin-left: 0;
    }
    .dashboard-sidebar {
        transform: translateX(-100%);
    }
    .dashboard-sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close-btn {
        display: block;
    }
    .hamburger-menu-btn {
        display: flex;
    }
    .dashboard-header {
        padding: 0 16px;
    }
    .top-stats-bar {
        gap: 8px;
    }
    .top-stat-item {
        padding: 4px 10px;
        font-size: 12px;
    }
    .top-stat-item .stat-label {
        display: none; /* Hide label texts on mobile to fit the bar */
    }
}

/* ==========================================================================
   Dashboard UI & UX Enhancement System (SaaS Premium Visuals)
   ========================================================================== */

/* Global Width Constraint Wrapper */
.dashboard-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Sidebar Profile Card */
.sidebar-user-profile {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-user-profile .profile-avatar {
    font-size: 16px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.sidebar-user-profile .profile-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar-user-profile .profile-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-profile .profile-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.sidebar-user-profile .profile-status {
    margin-top: 4px;
    display: flex;
}
.sidebar-status-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 50px;
    text-transform: none;
    line-height: 1.2;
}
.sidebar-status-badge.status-verified {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}
.sidebar-status-badge.status-unverified {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

/* Constrained Empty State Card */
.empty-state-card {
    text-align: center;
    padding: 40px 24px;
    max-width: 500px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.005);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: border-color var(--transition-normal);
}
.empty-state-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}
.empty-state-icon {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 4px;
    display: block;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.1));
}
.empty-state-card h4 {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.empty-state-card p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Dashboard Hero Header */
.dashboard-hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(16, 185, 129, 0.02) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}
.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    filter: blur(10px);
}
.hero-welcome-text h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff 40%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-welcome-text p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}
.hero-welcome-text .current-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

/* Verification Banner inside Hero */
.hero-verification-notice {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInDropdown 0.3s ease-out;
}
.verification-notice-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.verification-notice-content .notice-icon {
    font-size: 20px;
    color: var(--warning);
}
.verification-notice-info h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: #fde68a;
    margin-bottom: 2px;
}
.verification-notice-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* Metrics Overview Grid */
.stats-grid-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.metric-card-custom {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
    position: relative;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.metric-card-custom:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5), 0 0 1px 1px var(--accent-glow);
}
.metric-card-custom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);
}
.metric-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}
.metric-card-header .metric-title {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.metric-card-header .metric-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}
.metric-card-custom:hover .metric-icon {
    background: rgba(99, 102, 241, 0.1);
}
.metric-card-body {
    margin-top: 14px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.metric-card-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-heading);
    line-height: 1.1;
}
.metric-card-unit {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Split Column Grid (Left Content / Right Sidebar) */
.dashboard-split-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 1024px) {
    .dashboard-split-layout {
        grid-template-columns: 1.8fr 1fr;
    }
}

/* Quick Actions Launchpad Button Card */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.quick-action-card-btn {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    transition: all var(--transition-normal);
    text-decoration: none;
    cursor: pointer;
}
.quick-action-card-btn:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.quick-action-card-btn .action-icon {
    font-size: 24px;
    line-height: 1;
    transition: transform var(--transition-fast);
}
.quick-action-card-btn:hover .action-icon {
    transform: scale(1.15);
}
.quick-action-card-btn strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Custom Checklist Items */
.action-item-custom {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.action-item-custom:hover {
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
}
.action-item-custom.checkin-required {
    border-left-color: var(--warning);
}
.action-item-custom.proof-required {
    border-left-color: var(--accent);
}
.action-item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.action-item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}
.action-item-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Compact Wallet Transactions Ledger */
.compact-ledger {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.ledger-row-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.005);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    transition: background var(--transition-fast);
}
.ledger-row-compact:hover {
    background: rgba(255, 255, 255, 0.02);
}
.ledger-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.ledger-badge-compact {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}
.ledger-details-compact {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ledger-desc-compact {
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ledger-time-compact {
    font-size: 10px;
    color: var(--text-muted);
}
.ledger-amount-compact {
    font-weight: 700;
    font-size: 13px;
    padding-left: 8px;
    flex-shrink: 0;
}

/* Mobile responsive fixes for custom metrics & grids */
@media (max-width: 576px) {
    .stats-grid-dashboard {
        grid-template-columns: 1fr !important;
    }
    .quick-actions-grid {
        grid-template-columns: 1fr !important;
    }
    .action-item-custom {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .action-item-custom .btn {
        width: 100% !important;
    }
    .hero-verification-notice {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .hero-verification-notice form {
        width: 100% !important;
    }
    .hero-verification-notice form .btn {
        width: 100% !important;
    }
    .dashboard-hero {
        padding: 20px !important;
    }
}

/* ==========================================================================
   Top Navigation Layout & Component Styles
   ========================================================================== */

/* Top Navigation Layout Wrapper */
.dashboard-layout-topnav {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Sticky Top Navigation Header */
.dashboard-header-topnav {
    background: rgba(10, 13, 22, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo override */
.dashboard-header-topnav .logo {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform var(--transition-fast);
}
.dashboard-header-topnav .logo:hover {
    transform: scale(1.02);
}

/* Desktop Horizontal Nav Menu */
.header-nav-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link-top {
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
}
.nav-link-top:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}
.nav-link-top.active {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent);
}
.nav-link-top.active::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 15%;
    width: 70%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent);
}

/* Header Right Group */
.header-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Top Stats Bar inside Top Nav */
.top-stats-bar-topnav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.top-stat-item-topnav {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition-fast);
}
.top-stat-item-topnav:hover {
    border-color: rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.04);
}
.top-stat-item-topnav .stat-icon {
    font-size: 13px;
}
.top-stat-item-topnav .stat-label {
    color: var(--text-muted);
}
.top-stat-item-topnav .stat-val {
    color: var(--accent);
}

/* Hamburger menu button for top nav mobile dropdown */
.hamburger-topnav {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 4px;
    z-index: 1100;
}
.hamburger-topnav span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* Mobile dropdown navigation menu */
.mobile-nav-dropdown {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #080b11;
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    animation: fadeInDropdown 0.2s ease-out;
}
.mobile-nav-dropdown.open {
    display: flex;
}
.mobile-nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-fast);
}
.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}
.mobile-nav-link.active {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent);
}

/* Content Area Wrapper for Top Nav Layout */
.dashboard-content-topnav {
    padding: 32px 24px;
    flex-grow: 1;
    background-color: var(--bg-base);
}

/* Responsive Rules for Top Navigation */
@media (max-width: 991px) {
    .header-nav-desktop {
        display: none !important;
    }
    .hamburger-topnav {
        display: flex !important;
    }
    .top-stats-bar-topnav .stat-label {
        display: none !important; /* Hide labels to conserve space */
    }
    .user-username-label {
        display: none !important; /* Hide username text next to avatar */
    }
    .dropdown-trigger {
        padding: 6px 10px !important;
    }
    .dashboard-content-topnav {
        padding: 24px 16px !important;
    }
}
@media (max-width: 480px) {
    .top-stats-bar-topnav {
        display: none !important; /* Hide Stats in Header on very small screens */
    }
}

/* Custom Page & Component Enhancements */
.testing-phase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 768px) {
    .testing-phase-grid {
        grid-template-columns: 1fr;
    }
}
.ct-hero-panel {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.02) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    padding: 28px;
}
.ct-hero-panel h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.ct-hero-panel p {
    color: var(--text-secondary);
    font-size: 15.5px;
    max-width: 100%;
    line-height: 1.6;
}
.ct-rule-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 40px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}
.ct-rule-banner-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.ct-rule-banner-title h2 {
    font-size: 22px;
    font-weight: 800;
    color: #10b981;
    margin: 0;
}
.ct-rule-banner-desc {
    color: var(--text-primary);
    font-size: 15.5px;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 500;
}
.ct-reciprocal-callout {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}
.ct-reciprocal-callout strong {
    color: #10b981;
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
}
.ct-reciprocal-callout span {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}
.ct-step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.ct-step-box {
    background: rgba(18, 24, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
    border-radius: var(--radius-sm);
}
.ct-step-box-featured {
    border-color: rgba(16, 185, 129, 0.4);
}
.ct-step-box-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.ct-step-box-title.success {
    color: #10b981;
}
.ct-phase-box {
    background: rgba(18, 24, 40, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px;
    border-radius: var(--radius-md);
}
.ct-phase-header {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ct-phase-badge-p1 {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}
.ct-phase-badge-p2 {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}
.ct-mechanics-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.ct-mechanics-icon {
    font-size: 36px;
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-admin {
    background: var(--warning);
    color: #121828;
    font-weight: 700;
}
.btn-admin:hover {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
}
.sitemap-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: border-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sitemap-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.sitemap-card h3 {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sitemap-card p {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}
.sitemap-card .sitemap-link {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition-fast);
}
.sitemap-card:hover .sitemap-link {
    color: var(--accent);
}

/* Landing Page Styles */
.hero {
    text-align: center;
    padding: 100px 0 60px 0;
    max-width: 800px;
    margin: 0 auto;
}
.hero h1 {
    font-size: 54px;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 30%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    max-width: 400px;
    margin: 0 auto;
}
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 60px 0;
}
@media (min-width: 768px) {
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
}
.feature-card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: left;
    transition: transform var(--transition-fast);
}
.feature-card:hover {
    transform: translateY(-4px);
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}
.stats-bar {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    margin: 40px 0;
    text-align: center;
}
.stat-value {
    font-size: 36px;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--accent);
}
.stat-label {
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Value Prop Grid */
.value-prop-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 40px;
    margin-bottom: 60px;
}
@media (min-width: 768px) {
    .value-prop-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.prop-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0.005) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.prop-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.25);
}
.prop-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 4px;
}
.prop-badge.developer {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}
.prop-badge.tester {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}
.prop-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
.prop-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: left;
}
.prop-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: bold;
}
@media (min-width: 768px) {
    .stepper-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* FAQ Component Styles */
.faq-container {
    max-width: 100%;
    margin: 0 auto 60px auto;
}
.faq-category-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    margin: 36px 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.faq-item[open] {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-md);
}
.faq-question {
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.faq-question::-webkit-details-marker {
    display: none;
}
.faq-question::after {
    content: "＋";
    font-size: 18px;
    color: var(--accent);
    font-weight: bold;
    transition: transform var(--transition-fast);
}
.faq-item[open] .faq-question::after {
    content: "－";
    color: var(--success);
}
.faq-answer {
    padding: 0 24px 20px 24px;
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.65;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    margin-top: 4px;
    padding-top: 14px;
}
.faq-answer p {
    margin-bottom: 10px;
}
.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Workflow & Collapsible Details Card Panel */
.workflow-card-panel, details.dashboard-panel {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.workflow-card-panel summary, details.dashboard-panel > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
    user-select: none;
    gap: 16px;
    flex-wrap: wrap;
}
.workflow-card-panel summary::-webkit-details-marker, details.dashboard-panel > summary::-webkit-details-marker {
    display: none;
}
.faq-highlight-box {
    background: rgba(16, 185, 129, 0.08);
    border-left: 3.5px solid #10b981;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    color: var(--text-primary);
    font-size: 13.5px;
}

/* ==========================================================================
   Comprehensive Light Theme Support (No Conflict with Dark Theme)
   ========================================================================== */

[data-theme="light"] {
    color-scheme: light;
    
    /* Color Palette Variables for Light Mode */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-solid: #ffffff;
    --bg-input: #ffffff;
    
    --border-color: #cbd5e1;
    --border-focus: rgba(99, 102, 241, 0.6);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --accent: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.12);
    --accent-hover: #4338ca;
    
    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.12);
    --error: #dc2626;
    --error-glow: rgba(220, 38, 38, 0.12);
    --warning: #d97706;
    --warning-glow: rgba(217, 119, 6, 0.12);
    
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 20px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 32px -6px rgba(0, 0, 0, 0.1);
}

/* Light Theme Base & Body Reset */
[data-theme="light"] body {
    background-color: var(--bg-base) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] body::before,
[data-theme="light"] body::after {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%) !important;
}

/* Structural Layouts, Cards, Blocks, Panels & Sections */
[data-theme="light"] .card,
[data-theme="light"] .dashboard-panel,
[data-theme="light"] .workflow-card-panel,
[data-theme="light"] details.dashboard-panel,
[data-theme="light"] .principle-card,
[data-theme="light"] .ct-hero-panel,
[data-theme="light"] .settings-profile-card,
[data-theme="light"] .mobile-user-footer-card,
[data-theme="light"] .metric-card,
[data-theme="light"] .metric-card-custom,
[data-theme="light"] .quick-action-card,
[data-theme="light"] .quick-action-card-btn,
[data-theme="light"] .dashboard-stat-card,
[data-theme="light"] .reciprocity-card,
[data-theme="light"] .campaign-item,
[data-theme="light"] .hero-action-pill,
[data-theme="light"] .faq-item {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] div.dashboard-panel[style*="background"] {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] .card:hover,
[data-theme="light"] .dashboard-panel:hover,
[data-theme="light"] .campaign-item:hover,
[data-theme="light"] .metric-card-custom:hover {
    border-color: #94a3b8 !important;
}

/* Headings & Texts */
/* ==========================================================================
   Comprehensive Light Theme Contrast Fixes (No Conflict with Dark Theme)
   ========================================================================== */

.footer-logo-text {
    font-size: 22px;
    font-weight: 800;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, #ffffff 30%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero h1,
[data-theme="light"] .hero-welcome-text h1,
[data-theme="light"] .hero-title,
[data-theme="light"] .card-header h2,
[data-theme="light"] .logo,
[data-theme="light"] .footer-logo,
[data-theme="light"] .footer-logo-text,
[data-theme="light"] .footer-column-brand .footer-logo-text {
    background: linear-gradient(135deg, #0f172a 30%, #4f46e5 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #0f172a !important;
}

/* Paragraphs & Text Contrast */
[data-theme="light"] body,
[data-theme="light"] p,
[data-theme="light"] div,
[data-theme="light"] li,
[data-theme="light"] span:not(.btn *):not(.badge) {
    color: #0f172a;
}

[data-theme="light"] .hero p,
[data-theme="light"] .hero-welcome-text p,
[data-theme="light"] .step-text,
[data-theme="light"] .faq-answer,
[data-theme="light"] .footer-desc,
[data-theme="light"] .footer-motto-desc,
[data-theme="light"] .footer-copy,
[data-theme="light"] .site-footer {
    color: #334155 !important;
}

[data-theme="light"] strong,
[data-theme="light"] b,
[data-theme="light"] .step-text strong {
    color: #0f172a !important;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .step-text .step-title,
[data-theme="light"] .panel-title h3,
[data-theme="light"] .footer-column-heading,
[data-theme="light"] .footer-links h5 {
    color: #0f172a !important;
}

[data-theme="light"] .footer-links-list a,
[data-theme="light"] .footer-links a {
    color: #475569 !important;
}

[data-theme="light"] .footer-links-list a:hover,
[data-theme="light"] .footer-links a:hover {
    color: #4f46e5 !important;
}

/* Badges & Pills High Contrast for Light Mode */
[data-theme="light"] .badge-gold {
    background: rgba(217, 119, 6, 0.14) !important;
    color: #b45309 !important; /* High contrast amber: 4.8:1 ratio on light bg */
    border: 1px solid rgba(217, 119, 6, 0.35) !important;
    text-shadow: none !important;
}

[data-theme="light"] .badge-warning,
[data-theme="light"] .badge-pending {
    background: rgba(217, 119, 6, 0.14) !important;
    color: #b45309 !important;
    border: 1px solid rgba(217, 119, 6, 0.35) !important;
}

[data-theme="light"] .badge-silver {
    background: rgba(71, 85, 105, 0.12) !important;
    color: #334155 !important;
    border: 1px solid rgba(71, 85, 105, 0.3) !important;
}

[data-theme="light"] .badge-bronze {
    background: rgba(180, 83, 9, 0.12) !important;
    color: #92400e !important;
    border: 1px solid rgba(180, 83, 9, 0.3) !important;
}

[data-theme="light"] .badge-active {
    background: rgba(5, 150, 105, 0.14) !important;
    color: #047857 !important;
    border: 1px solid rgba(5, 150, 105, 0.35) !important;
}

[data-theme="light"] .badge-paused,
[data-theme="light"] .badge-muted {
    background: rgba(100, 116, 139, 0.12) !important;
    color: #475569 !important;
    border: 1px solid rgba(100, 116, 139, 0.3) !important;
}

[data-theme="light"] .badge-error {
    background: rgba(220, 38, 38, 0.14) !important;
    color: #b91c1c !important;
    border: 1px solid rgba(220, 38, 38, 0.35) !important;
}

[data-theme="light"] .badge-completed {
    background: rgba(79, 70, 229, 0.14) !important;
    color: #4338ca !important;
    border: 1px solid rgba(79, 70, 229, 0.35) !important;
}

/* Overriding hardcoded inline style colors in PHP files for light mode */
[data-theme="light"] :not(.btn):not(.btn *):not(.badge):not(.badge *)[style*="color: #fff"],
[data-theme="light"] :not(.btn):not(.btn *):not(.badge):not(.badge *)[style*="color: #ffffff"],
[data-theme="light"] :not(.btn):not(.btn *):not(.badge):not(.badge *)[style*="color:#fff"],
[data-theme="light"] :not(.btn):not(.btn *):not(.badge):not(.badge *)[style*="color:#ffffff"] {
    color: #0f172a !important;
}

[data-theme="light"] :not(.btn):not(.btn *):not(.badge):not(.badge *)[style*="color: #f1f5f9"],
[data-theme="light"] :not(.btn):not(.btn *):not(.badge):not(.badge *)[style*="color: #f8fafc"],
[data-theme="light"] :not(.btn):not(.btn *):not(.badge):not(.badge *)[style*="color: #e2e8f0"] {
    color: #1e293b !important;
}

/* Light Theme Public Header & Nav Overrides */
[data-theme="light"] header,
[data-theme="light"] .dashboard-header-topnav {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .nav-container,
[data-theme="light"] .header-inner {
    background: transparent !important;
}

@media (min-width: 992px) {
    [data-theme="light"] .nav-menu,
    [data-theme="light"] .nav-links {
        background: transparent !important;
    }
}

@media (max-width: 991px) {
    [data-theme="light"] .nav-menu,
    [data-theme="light"] .nav-links,
    [data-theme="light"] .mobile-nav-dropdown {
        background: #ffffff !important;
        border-bottom: 1px solid #cbd5e1 !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
        color: #0f172a !important;
    }
}

[data-theme="light"] .nav-link,
[data-theme="light"] .nav-link-top {
    color: #334155 !important;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link-top:hover {
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.08) !important;
}

[data-theme="light"] .nav-link.active,
[data-theme="light"] .nav-link-top.active {
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.12) !important;
}

[data-theme="light"] .hamburger span,
[data-theme="light"] .hamburger-topnav span {
    background-color: #0f172a !important;
}

[data-theme="light"] .logo,
[data-theme="light"] a.logo {
    background: linear-gradient(135deg, #0f172a 30%, #4f46e5 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #0f172a !important;
}

/* Light Theme Step Cards, Phase Containers, Sitemap Cards & Callouts */
[data-theme="light"] .ct-step-box {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .ct-step-box-featured {
    border-color: rgba(5, 150, 105, 0.4) !important;
}

[data-theme="light"] .ct-step-box-title {
    color: #0f172a !important;
}

[data-theme="light"] .ct-step-box-title.success {
    color: #059669 !important;
}

[data-theme="light"] .ct-phase-box {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .ct-phase-header {
    color: #0f172a !important;
}

[data-theme="light"] .ct-reciprocal-callout {
    background: rgba(79, 70, 229, 0.06) !important;
    border: 1px solid rgba(79, 70, 229, 0.2) !important;
    color: #0f172a !important;
}

[data-theme="light"] .principle-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .step-icon-capsule {
    background: rgba(79, 70, 229, 0.1) !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .sitemap-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .sitemap-card h3 {
    color: #0f172a !important;
}

[data-theme="light"] .sitemap-card p {
    color: #334155 !important;
}

[data-theme="light"] .sitemap-link {
    color: #4f46e5 !important;
}

[data-theme="light"] .sitemap-card:hover {
    border-color: #4f46e5 !important;
}

/* ==========================================================================
   Modern Interactive Theme Toggle Switch Component & Auth Page Layout
   ========================================================================== */

/* Auth Page Top Navigation Bar */
.auth-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 32px;
    box-sizing: border-box;
    z-index: 100;
}

.auth-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Modern Toggle Switch Component */
.theme-switch-toggle {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.theme-switch-track {
    position: relative;
    width: 52px;
    height: 28px;
    background: rgba(18, 24, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.theme-switch-toggle:hover .theme-switch-track {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}

.theme-switch-icon {
    font-size: 11.5px;
    z-index: 1;
    line-height: 1;
    transition: opacity 0.25s ease;
}

.theme-switch-icon.icon-sun {
    opacity: 0.5;
}

.theme-switch-icon.icon-moon {
    opacity: 1;
}

.theme-switch-thumb {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 50%;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Light Theme Toggle Switch State */
[data-theme="light"] .theme-switch-track {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .theme-switch-thumb {
    transform: translateX(22px);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35) !important;
}

[data-theme="light"] .theme-switch-icon.icon-sun {
    opacity: 1;
}

[data-theme="light"] .theme-switch-icon.icon-moon {
    opacity: 0.4;
}

/* Additional Auth Page Contrast Fixes for Light Mode */
[data-theme="light"] .form-label,
[data-theme="light"] label,
[data-theme="light"] .form-group label {
    color: #0f172a !important;
}

[data-theme="light"] .divider {
    color: #64748b !important;
}

[data-theme="light"] .divider::before,
[data-theme="light"] .divider::after {
    border-bottom-color: #cbd5e1 !important;
}

[data-theme="light"] .auth-wrapper p,
[data-theme="light"] .card-header p {
    color: #475569 !important;
}

[data-theme="light"] .auth-wrapper a:not(.btn) {
    color: #4f46e5 !important;
    font-weight: 600;
}

[data-theme="light"] .auth-wrapper a:not(.btn):hover {
    color: #4338ca !important;
}

/* ==========================================================================
   Comprehensive Light Theme Header, Menu, Submenu & Dropdown Fixes
   ========================================================================== */

/* Public Header & Topnav Bar */
[data-theme="light"] header,
[data-theme="light"] .dashboard-header-topnav {
    background: #ffffff !important;
    border-bottom: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .nav-link-top,
[data-theme="light"] .nav-link {
    color: #334155 !important;
    font-weight: 600 !important;
}

[data-theme="light"] .nav-link-top:hover,
[data-theme="light"] .nav-link:hover {
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.08) !important;
}

[data-theme="light"] .nav-link-top.active,
[data-theme="light"] .nav-link.active {
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.12) !important;
}

/* Submenus & User Dropdowns in Light Mode */
[data-theme="light"] .nav-submenu,
[data-theme="light"] .dropdown-menu,
[data-theme="light"] .user-dropdown .dropdown-menu,
[data-theme="light"] .mobile-nav-dropdown {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}

[data-theme="light"] .nav-submenu::before {
    background: #ffffff !important;
    border-left: 1px solid #cbd5e1 !important;
    border-top: 1px solid #cbd5e1 !important;
}

/* Submenu Items & Dropdown Items in Light Mode */
[data-theme="light"] .submenu-item,
[data-theme="light"] .dropdown-item {
    color: #334155 !important;
    font-weight: 600 !important;
}

[data-theme="light"] .submenu-item:hover,
[data-theme="light"] .dropdown-item:hover {
    background: #f1f5f9 !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .submenu-item.active,
[data-theme="light"] .dropdown-item.active {
    background: rgba(79, 70, 229, 0.12) !important;
    color: #4f46e5 !important;
}

/* User Dropdown Trigger Button in Light Mode */
[data-theme="light"] .dropdown-trigger {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .dropdown-trigger:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

[data-theme="light"] .user-avatar {
    background: rgba(79, 70, 229, 0.12) !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .user-username-label strong,
[data-theme="light"] .dropdown-arrow {
    color: #0f172a !important;
}

/* Dropdown Header Info & Internal Stat Links in Light Mode */
[data-theme="light"] .dropdown-header-info {
    border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .dropdown-header-info .user-name strong {
    color: #0f172a !important;
}

[data-theme="light"] .dropdown-header-info .user-email {
    color: #64748b !important;
}

[data-theme="light"] .dropdown-header-info div[style*="border-top"] {
    border-top-color: #e2e8f0 !important;
}

[data-theme="light"] .dropdown-header-info a {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

[data-theme="light"] .dropdown-header-info a:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] .dropdown-divider {
    border-top-color: #e2e8f0 !important;
}

[data-theme="light"] .dropdown-item.logout-item {
    color: #dc2626 !important;
}

[data-theme="light"] .dropdown-item.logout-item:hover {
    background: rgba(220, 38, 38, 0.08) !important;
    color: #b91c1c !important;
}

/* ==========================================================================
   Comprehensive Light Theme Hover States for Buttons, Pills, Links & Items
   ========================================================================== */

/* Hero Action Pills in Light Mode */
[data-theme="light"] .hero-action-pill {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .hero-action-pill:hover {
    background: #4f46e5 !important;
    border-color: #4338ca !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
    transform: translateY(-1px);
}

[data-theme="light"] .hero-action-pill:hover span {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Primary Buttons in Light Mode */
[data-theme="light"] .btn-primary,
[data-theme="light"] a.btn-primary,
[data-theme="light"] button.btn-primary {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4338ca !important;
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] a.btn-primary:hover,
[data-theme="light"] button.btn-primary:hover {
    background: #4338ca !important;
    color: #ffffff !important;
    border-color: #3730a3 !important;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35) !important;
}

/* Secondary & Google Buttons in Light Mode */
[data-theme="light"] .btn-secondary {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-secondary:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .btn-google {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-google:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* Tab & Filter Buttons in Light Mode */
[data-theme="light"] .tab-btn,
[data-theme="light"] .filter-btn {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .tab-btn:hover,
[data-theme="light"] .filter-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

[data-theme="light"] .tab-btn.active,
[data-theme="light"] .filter-btn.active {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4338ca !important;
}

/* Cards & Panel Hover Effects in Light Mode */
[data-theme="light"] .card:hover,
[data-theme="light"] .dashboard-panel:hover,
[data-theme="light"] .campaign-item:hover,
[data-theme="light"] .quick-action-card:hover,
[data-theme="light"] .metric-card-custom:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

/* Dashboard Hero Light Theme Fixes */
[data-theme="light"] .dashboard-hero {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .dashboard-hero::before {
    background: radial-gradient(circle, rgba(79, 70, 229, 0.06) 0%, transparent 70%) !important;
}

[data-theme="light"] .hero-welcome-text h1,
[data-theme="light"] .hero-welcome-text h2 {
    color: #0f172a !important;
}

[data-theme="light"] .hero-welcome-text p {
    color: #475569 !important;
}

/* ==========================================================================
   Comprehensive Light Theme Text Box, Input & Placeholder Fixes
   ========================================================================== */

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select,
[data-theme="light"] .form-input {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus,
[data-theme="light"] .form-input:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Light Mode Input Placeholders (Suggested Content) */
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder,
[data-theme="light"] select::placeholder,
[data-theme="light"] .form-input::placeholder {
    color: #64748b !important;
    opacity: 0.85 !important;
}

[data-theme="light"] input::-webkit-input-placeholder,
[data-theme="light"] textarea::-webkit-input-placeholder,
[data-theme="light"] select::-webkit-input-placeholder,
[data-theme="light"] .form-input::-webkit-input-placeholder {
    color: #64748b !important;
    opacity: 0.85 !important;
}

[data-theme="light"] input::-moz-placeholder,
[data-theme="light"] textarea::-moz-placeholder,
[data-theme="light"] select::-moz-placeholder,
[data-theme="light"] .form-input::-moz-placeholder {
    color: #64748b !important;
    opacity: 0.85 !important;
}

[data-theme="light"] input:-ms-input-placeholder,
[data-theme="light"] textarea:-ms-input-placeholder,
[data-theme="light"] select:-ms-input-placeholder,
[data-theme="light"] .form-input:-ms-input-placeholder {
    color: #64748b !important;
    opacity: 0.85 !important;
}

/* Light Theme Browser Autofill Overrides */
[data-theme="light"] input:-webkit-autofill,
[data-theme="light"] input:-webkit-autofill:hover, 
[data-theme="light"] input:-webkit-autofill:focus, 
[data-theme="light"] .dropdown-divider {
    border-top-color: #e2e8f0 !important;
}

[data-theme="light"] .dropdown-item.logout-item {
    color: #dc2626 !important;
}

[data-theme="light"] .dropdown-item.logout-item:hover {
    background: rgba(220, 38, 38, 0.08) !important;
    color: #b91c1c !important;
}

/* ==========================================================================
   Comprehensive Light Theme Hover States for Buttons, Pills, Links & Items
   ========================================================================== */

/* Hero Action Pills in Light Mode */
[data-theme="light"] .hero-action-pill {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .hero-action-pill:hover {
    background: #4f46e5 !important;
    border-color: #4338ca !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
    transform: translateY(-1px);
}

[data-theme="light"] .hero-action-pill:hover span {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Primary Buttons in Light Mode */
[data-theme="light"] .btn-primary,
[data-theme="light"] a.btn-primary,
[data-theme="light"] button.btn-primary {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4338ca !important;
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] a.btn-primary:hover,
[data-theme="light"] button.btn-primary:hover {
    background: #4338ca !important;
    color: #ffffff !important;
    border-color: #3730a3 !important;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35) !important;
}

/* Secondary & Google Buttons in Light Mode */
[data-theme="light"] .btn-secondary {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-secondary:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .btn-google {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-google:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* Tab & Filter Buttons in Light Mode */
[data-theme="light"] .tab-btn,
[data-theme="light"] .filter-btn {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .tab-btn:hover,
[data-theme="light"] .filter-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

[data-theme="light"] .tab-btn.active,
[data-theme="light"] .filter-btn.active {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4338ca !important;
}

/* Cards & Panel Hover Effects in Light Mode */
[data-theme="light"] .card:hover,
[data-theme="light"] .dashboard-panel:hover,
[data-theme="light"] .campaign-item:hover,
[data-theme="light"] .quick-action-card:hover,
[data-theme="light"] .metric-card-custom:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

/* Dashboard Hero Light Theme Fixes */
[data-theme="light"] .dashboard-hero {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .dashboard-hero::before {
    background: radial-gradient(circle, rgba(79, 70, 229, 0.06) 0%, transparent 70%) !important;
}

[data-theme="light"] .hero-welcome-text h1,
[data-theme="light"] .hero-welcome-text h2 {
    color: #0f172a !important;
}

[data-theme="light"] .hero-welcome-text p {
    color: #475569 !important;
}

/* ==========================================================================
   Comprehensive Light Theme Text Box, Input & Placeholder Fixes
   ========================================================================== */

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select,
[data-theme="light"] .form-input {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus,
[data-theme="light"] .form-input:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Light Mode Input Placeholders (Suggested Content) */
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder,
[data-theme="light"] select::placeholder,
[data-theme="light"] .form-input::placeholder {
    color: #64748b !important;
    opacity: 0.85 !important;
}

[data-theme="light"] input::-webkit-input-placeholder,
[data-theme="light"] textarea::-webkit-input-placeholder,
[data-theme="light"] select::-webkit-input-placeholder,
[data-theme="light"] .form-input::-webkit-input-placeholder {
    color: #64748b !important;
    opacity: 0.85 !important;
}

[data-theme="light"] input::-moz-placeholder,
[data-theme="light"] textarea::-moz-placeholder,
[data-theme="light"] select::-moz-placeholder,
[data-theme="light"] .form-input::-moz-placeholder {
    color: #64748b !important;
    opacity: 0.85 !important;
}

[data-theme="light"] input:-ms-input-placeholder,
[data-theme="light"] textarea:-ms-input-placeholder,
[data-theme="light"] select:-ms-input-placeholder,
[data-theme="light"] .form-input:-ms-input-placeholder {
    color: #64748b !important;
    opacity: 0.85 !important;
}

/* Light Theme Browser Autofill Overrides */
[data-theme="light"] input:-webkit-autofill,
[data-theme="light"] input:-webkit-autofill:hover, 
[data-theme="light"] input:-webkit-autofill:focus, 
[data-theme="light"] input:-webkit-autofill:active,
[data-theme="light"] .form-input:-webkit-autofill,
[data-theme="light"] .form-input:-webkit-autofill:hover, 
[data-theme="light"] .form-input:-webkit-autofill:focus, 
[data-theme="light"] .form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a !important;
}

/* Light Mode Campaign Card, Inner Panels, Feedback & Chat Overrides */
[data-theme="light"] .campaign-inner-card,
[data-theme="light"] .feedback-chat-col,
[data-theme="light"] .tester-feedback-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .campaign-inner-card div[style*="background"],
[data-theme="light"] .campaign-inner-card div[style*="background: rgba"],
[data-theme="light"] .campaign-inner-card div[style*="background:rgba"] {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .campaign-inner-card p,
[data-theme="light"] .campaign-inner-card span,
[data-theme="light"] .campaign-inner-card small,
[data-theme="light"] .campaign-inner-card label,
[data-theme="light"] .feedback-chat-col p,
[data-theme="light"] .feedback-chat-col span,
[data-theme="light"] .feedback-chat-col small,
[data-theme="light"] .tester-feedback-card p,
[data-theme="light"] .tester-feedback-card span {
    color: #334155 !important;
}

[data-theme="light"] .campaign-inner-card h5,
[data-theme="light"] .feedback-chat-col h5 {
    border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .chat-bubble.chat-bubble-other {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] div[style*="background: rgba(16, 185, 129, 0.12)"],
[data-theme="light"] div[style*="background:rgba(16, 185, 129, 0.12)"] {
    background: #ecfdf5 !important;
    border-color: #059669 !important;
    color: #065f46 !important;
}

[data-theme="light"] div[style*="background: rgba(16, 185, 129, 0.12)"] span,
[data-theme="light"] div[style*="background: rgba(16, 185, 129, 0.12)"] strong {
    color: #065f46 !important;
}

/* Capitalize User Profiles & Username Labels Site-wide */
.user-username-label,
.user-username-label strong,
.user-name strong,
.mobile-username,
.settings-username,
.profile-username,
.username-display {
    text-transform: capitalize !important;
}

/* Mobile Layout & Typography Improvements for Available Apps Hub */
@media (max-width: 576px) {
    .panel-title {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px 10px !important;
    }
    .panel-title h3 {
        font-size: 15px !important;
        line-height: 1.35 !important;
    }
    .campaign-queue-item {
        padding: 14px !important;
    }
    .campaign-queue-item h4 {
        font-size: 14.5px !important;
    }
}

[data-theme="light"] .campaign-queue-item {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

/* Discussion & Dispute Chat Contrast Overhaul */
.chat-bubble.chat-bubble-me {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
}

.chat-bubble.chat-bubble-me,
.chat-bubble.chat-bubble-me *,
.chat-bubble.chat-bubble-me div,
.chat-bubble.chat-bubble-me span,
.chat-bubble.chat-bubble-me strong {
    color: #ffffff !important;
}

.chat-bubble.chat-bubble-me span[style*="opacity"] {
    color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="light"] .chat-bubble.chat-bubble-me,
[data-theme="light"] .chat-bubble.chat-bubble-me *,
[data-theme="light"] .chat-bubble.chat-bubble-me div,
[data-theme="light"] .chat-bubble.chat-bubble-me span,
[data-theme="light"] .chat-bubble.chat-bubble-me strong {
    color: #ffffff !important;
}

[data-theme="light"] .chat-bubble.chat-bubble-other {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .chat-bubble.chat-bubble-other,
[data-theme="light"] .chat-bubble.chat-bubble-other div,
[data-theme="light"] .chat-bubble.chat-bubble-other strong {
    color: #0f172a !important;
}

[data-theme="light"] .chat-bubble.chat-bubble-other span {
    color: #475569 !important;
}

/* Chat Input Field Contrast in Light Mode */
[data-theme="light"] .feedback-chat-col input.form-input,
[data-theme="light"] .feedback-chat-col .form-input {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .feedback-chat-col input.form-input::placeholder {
    color: #64748b !important;
    opacity: 1 !important;
}

/* Tester Control Board Table Mobile Card Responsiveness */
@media (max-width: 768px) {
    .tester-board-table {
        display: block !important;
        width: 100% !important;
        table-layout: auto !important;
    }
    .tester-board-table thead {
        display: none !important;
    }
    .tester-board-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        width: 100% !important;
    }
    .tester-board-table tr {
        display: block !important;
        background: var(--bg-surface) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-md) !important;
        padding: 16px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    [data-theme="light"] .tester-board-table tr {
        background: #ffffff !important;
        border-color: #cbd5e1 !important;
    }
    .tester-board-table td {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: right !important;
        position: relative !important;
    }
    [data-theme="light"] .tester-board-table td {
        border-bottom: 1px solid #e2e8f0 !important;
    }
    .tester-board-table td:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }
    .tester-board-table td::before {
        content: attr(data-label) !important;
        font-weight: 700 !important;
        font-size: 11px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.04em !important;
        color: var(--text-secondary) !important;
        text-align: left !important;
        flex-shrink: 0 !important;
        position: static !important;
    }
    .tester-board-table td.col-tester {
        align-items: flex-start !important;
    }
    .tester-board-table td.col-tester > div {
        align-items: flex-end !important;
        text-align: right !important;
    }
}
