/* Password Manager Autofill Fix (Bitwarden / Chrome / 1Password) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #f8fafc !important;
    transition: background-color 5000s ease-in-out 0s;
}

:root {
    /* === WARM STONE & AMBER — MedPulse AI Design System === */

    /* Background layers (warm depth) */
    --bg-dark: #1C1916;
    --bg-sidebar: #14120F;
    --bg-card: #231F1B;
    --bg-card-elevated: #2D2822;
    --bg-card-hover: #322C26;
    --bg-active-nav: rgba(212, 145, 74, 0.12);

    /* Borders */
    --border-color: #3D3530;
    --border-glow: rgba(212, 145, 74, 0.35);
    --border-sidebar: rgba(200, 169, 110, 0.25);

    /* Accent palette — 4 warm tones */
    --primary: #D4914A;
    --primary-gradient: linear-gradient(135deg, #D4914A 0%, #B8732A 100%);
    --accent-gold: #C8A96E;
    --accent-sage: #7A9E8A;
    --accent-terracotta: #C17A5B;
    --accent-emerald: #7A9E8A;

    /* Text hierarchy */
    --text-main: #F5EDE0;
    --text-muted: #A89880;
    --text-sub: #6B5E52;

    /* Sidebar */
    --sidebar-text: #9C8E7E;
    --sidebar-section: #C8B89A;

    --sidebar-width: 260px;
    --font-heading: 'DM Serif Display', serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(at 0% 0%, rgba(212, 145, 74, 0.07) 0px, transparent 55%),
        radial-gradient(at 100% 100%, rgba(122, 158, 138, 0.05) 0px, transparent 55%);
    background-attachment: fixed;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Toast Floating Notifications */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 380px;
    padding: 12px 18px;
    background: rgba(35, 31, 27, 0.97);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 145, 74, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.fade-out {
    opacity: 0;
    transform: translateX(30px);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.info .toast-icon { color: var(--accent-gold); }
.toast.success .toast-icon { color: var(--accent-sage); }
.toast.warning .toast-icon { color: var(--accent-terracotta); }
.toast.loading .toast-icon { color: var(--primary); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(50px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-sidebar);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    box-shadow: 0 4px 14px rgba(212, 145, 74, 0.35);
}

.brand-text h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.brand-text h2 span {
    color: var(--primary);
}

.user-switcher-select {
    background: rgba(212, 145, 74, 0.08);
    border: 1px solid rgba(212, 145, 74, 0.2);
    color: var(--accent-gold);
    border-radius: 8px;
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    margin-top: 0.25rem;
    width: 100%;
    transition: var(--transition-fast);
}

.user-switcher-select:hover {
    background: rgba(212, 145, 74, 0.14);
    border-color: var(--primary);
}

.user-switcher-select option {
    background: #14120F;
    color: var(--text-main);
}

.brand-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-item i {
    font-size: 1rem;
    width: 20px;
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(212, 145, 74, 0.08);
}

.nav-item.active {
    color: var(--text-main);
    background: var(--bg-active-nav);
    border-left: 3px solid var(--primary);
    padding-left: calc(1rem - 3px);
    box-shadow: none;
}

.badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-status {
    padding: 0.85rem;
    background: rgba(212, 145, 74, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-sub);
}

.status-indicator.active {
    background: var(--accent-sage);
    box-shadow: 0 0 8px var(--accent-sage);
}

.status-info {
    display: flex;
    flex-direction: column;
}

.status-title {
    font-size: 0.8rem;
    font-weight: 600;
}

.status-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Main Content Styling */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem 2.5rem;
    max-width: calc(100vw - var(--sidebar-width));
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-title h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.header-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-header-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
}

.btn-header-action .brand-logo-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-brand-sermo {
    background: rgba(212, 145, 74, 0.1);
    border-color: rgba(212, 145, 74, 0.3);
    color: var(--accent-gold);
}
.btn-brand-sermo:hover {
    background: rgba(212, 145, 74, 0.2);
    border-color: var(--primary);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(212, 145, 74, 0.2);
}

.btn-brand-opinionsite {
    background: rgba(122, 158, 138, 0.1);
    border-color: rgba(122, 158, 138, 0.3);
    color: var(--accent-sage);
}
.btn-brand-opinionsite:hover {
    background: rgba(122, 158, 138, 0.2);
    border-color: var(--accent-sage);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(122, 158, 138, 0.2);
}

.btn-brand-zoomrx {
    background: rgba(193, 122, 91, 0.1);
    border-color: rgba(193, 122, 91, 0.3);
    color: var(--accent-terracotta);
}
.btn-brand-zoomrx:hover {
    background: rgba(193, 122, 91, 0.2);
    border-color: var(--accent-terracotta);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(193, 122, 91, 0.2);
}

.btn-brand-email {
    background: rgba(193, 122, 91, 0.1);
    border-color: rgba(193, 122, 91, 0.3);
    color: var(--accent-terracotta);
}
.btn-brand-email:hover {
    background: rgba(193, 122, 91, 0.2);
    border-color: var(--accent-terracotta);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(193, 122, 91, 0.2);
}

.btn-brand-telegram {
    background: rgba(200, 169, 110, 0.1);
    border-color: rgba(200, 169, 110, 0.3);
    color: var(--accent-gold);
}
.btn-brand-telegram:hover {
    background: rgba(200, 169, 110, 0.2);
    border-color: var(--accent-gold);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(200, 169, 110, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 14px rgba(212, 145, 74, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 145, 74, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Header Action Buttons - Compact & Visual */
.btn-header-action {
    padding: 0.42rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 10px;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: var(--transition-fast);
}

.btn-header-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.brand-mini-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #fff;
    flex-shrink: 0;
}

.brand-mini-icon.email-bg {
    background: linear-gradient(135deg, #ea4335 0%, #c5221f 100%);
    box-shadow: 0 2px 6px rgba(234, 67, 53, 0.4);
}

.brand-mini-icon.sermo-bg {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.brand-mini-icon.opinion-bg {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.brand-mini-icon.zoomrx-bg {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
    box-shadow: 0 2px 6px rgba(168, 85, 247, 0.4);
}

.brand-mini-icon.telegram-bg {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    box-shadow: 0 2px 6px rgba(0, 136, 204, 0.4);
}

.btn-delete {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #f87171;
    color: #fff;
    transform: scale(1.04);
}

/* Layered Cards */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    /* Subtle top accent line */
    border-top: 1px solid rgba(212, 145, 74, 0.18);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-card {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition-fast);
}

.metric-card:hover {
    border-color: rgba(212, 145, 74, 0.45);
    background: var(--bg-card-elevated);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.metric-icon.green { background: rgba(122, 158, 138, 0.15); color: var(--accent-sage); }
.metric-icon.blue { background: rgba(212, 145, 74, 0.15); color: var(--primary); }
.metric-icon.purple { background: rgba(200, 169, 110, 0.15); color: var(--accent-gold); }
.metric-icon.orange { background: rgba(193, 122, 91, 0.15); color: var(--accent-terracotta); }

.metric-data .metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.metric-data h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.2rem 0;
}

.metric-trend, .metric-sub {
    font-size: 0.75rem;
    color: var(--accent-sage);
}

.metric-sub { color: var(--text-sub); }

/* Platforms Banner */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.platforms-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.platform-chip {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(212, 145, 74, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.chip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.platform-chip.sermo i { color: #3b82f6; }
.platform-chip.opinion i { color: #10b981; }
.platform-chip.zoomrx i { color: #a855f7; }
.platform-chip.answers i { color: #a855f7; }
.platform-chip.hub i { color: #f59e0b; }

.chip-status {
    font-size: 0.75rem;
    color: var(--accent-emerald);
}

.chip-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Tables */
.card {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.data-table th {
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.platform-tag.sermo { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.platform-tag.opinion { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.platform-tag.zoomrx { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.platform-tag.answers { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.platform-tag.hub { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.payout-pill {
    font-weight: 700;
    color: var(--accent-emerald);
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    background: var(--accent-emerald-gradient);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.action-link:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Console Box for Logs */
.console-box {
    background: #070a12;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: monospace;
    font-size: 0.825rem;
    height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.log-line {
    line-height: 1.4;
    color: #94a3b8;
}

.log-line.info { color: #38bdf8; }
.log-line.warning { color: #fbbf24; }
.log-line.error { color: #f87171; }

/* Tabs Logic */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Settings Grid & Inputs */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Toggle Switch */
.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--accent-emerald); }
input:checked + .slider:before { transform: translateX(20px); }

.settings-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-msg {
    font-size: 0.9rem;
    font-weight: 600;
}

.status-msg.success { color: var(--accent-emerald); }
.status-msg.error { color: #f87171; }

/* Modal Overlay & Card */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-card {
    width: 90%;
    max-width: 520px;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.modal-header h3 {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close-btn:hover { color: #fff; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-complete-survey {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-complete-survey:hover {
    background: rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

/* ==========================================================================
   MOBILE & RESPONSIVE STYLES (iPhone & Android & iPad)
   ========================================================================== */

.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.25rem;
    align-items: center;
    justify-content: space-between;
    z-index: 999;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #fff;
}

.brand-icon-mini {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent-cyan-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}

.btn-hamburger {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-hamburger:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

/* Screen widths <= 768px (Mobile & Portrait Tablets) */
@media (max-width: 768px) {
    .mobile-top-bar {
        display: flex;
    }

    .app-container {
        display: block;
        width: 100%;
        min-width: 0;
        padding-top: 60px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -290px;
        width: 280px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.sidebar-open {
        left: 0;
    }

    .sidebar-backdrop.active {
        display: block;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 1.25rem 1rem !important;
        box-sizing: border-box !important;
    }

    .top-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        margin-bottom: 1.5rem;
        width: 100%;
    }

    .header-title {
        width: 100%;
    }

    .header-title h1 {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.3rem !important;
        word-break: normal !important;
        white-space: normal !important;
    }

    .header-title p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }

    .header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .btn-header-action {
        width: 100%;
        justify-content: flex-start;
        padding: 0.65rem 0.75rem;
        font-size: 0.82rem;
        box-sizing: border-box;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .metric-card {
        padding: 1rem 1.25rem;
    }

    .platform-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .platform-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .earnings-header-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .earnings-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .earnings-select {
        width: 100%;
    }

    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1.5rem;
        border-radius: var(--radius-md);
    }

    .surveys-table {
        min-width: 650px;
    }

    .modal-card {
        width: 92%;
        padding: 1.25rem;
    }
}

/* Extra small screens <= 480px (Small Smartphones) */
@media (max-width: 480px) {
    .header-actions {
        grid-template-columns: 1fr;
    }
    
    .platform-banner {
        grid-template-columns: 1fr;
    }
}
