@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;
}

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;
}

/* 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: #f1f5f9;
    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) */
.form-input::placeholder {
    color: rgba(255, 255, 255, 0.28) !important;
    opacity: 1 !important;
}
.form-input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.28) !important;
}
.form-input::-moz-placeholder {
    color: rgba(255, 255, 255, 0.28) !important;
    opacity: 1 !important;
}
.form-input:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.28) !important;
}
.form-input:-moz-placeholder {
    color: rgba(255, 255, 255, 0.28) !important;
    opacity: 1 !important;
}

/* De-emphasize Browser Autofill Highlights */
.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 30px #111827 inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}
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;
}
.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;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.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; }

/* 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);
}

/* Tooltip & Inline Help Info Triggers */
.info-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
}
.info-icon {
    font-size: 11px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), color var(--transition-fast);
    font-style: normal;
    font-weight: bold;
}
.info-trigger:hover .info-icon {
    background: var(--accent);
    color: #fff;
}
.tooltip-content {
    visibility: hidden;
    width: 260px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-align: left;
    border-radius: var(--radius-sm);
    padding: 12px;
    position: absolute;
    z-index: 999;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    font-size: 12px;
    line-height: 1.4;
    box-shadow: var(--shadow-md);
    pointer-events: none;
    font-weight: normal;
}
.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}
.info-trigger:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* 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 {
    position: relative;
    padding: 8px 0;
    transition: color var(--transition-fast);
}
.nav-link.active {
    color: var(--text-primary) !important;
    font-weight: 600;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent);
}

/* 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;
    }
    
    /* Horizontal tab scroll bar */
    .tabs-nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .tabs-nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .tab-btn {
        flex: 0 0 auto !important;
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    
    /* Site Footer padding reductions */
    .site-footer {
        padding: 30px 0 20px 0 !important;
        margin-top: 40px !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;
    }
}

