    /* === DESIGN TOKENS === */
    :root {
      --bg-base: #0a0e1a;
      --bg-card: #111827;
      --bg-surface: #1a2237;
      --bg-input: #0a0e1a;
      --border: #1e293b;
      --border-accent: #c8a87c;
      --accent: #c8a87c;
      --accent-hover: #dfc4a0;
      --accent-bg: rgba(200,168,124,.15);
      --text-primary: #e2e8f0;
      --text-secondary: #8892a8;
      --text-muted: #6b7280;
      --success: #4ade80;
      --danger: #f87171;
      --info: #60a5fa;
      --warning: #fb923c;
      --purple: #a78bfa;
      --radius-sm: 6px;
      --radius-md: 8px;
      --radius-lg: 12px;
      --radius-xl: 16px;
      --space-xs: 4px;
      --space-sm: 8px;
      --space-md: 16px;
      --space-lg: 24px;
      --space-xl: 32px;
      --font-mono: 'IBM Plex Mono', monospace;
      --font-sans: 'DM Sans', sans-serif;
      --transition: all .2s ease;
    }

    *{margin:0;padding:0;box-sizing:border-box}
    body{font-family:'DM Sans',sans-serif;background:var(--bg-base);color:var(--text-primary);min-height:100vh;line-height:1.5}
    .login-container{display:flex;align-items:center;justify-content:center;min-height:100vh}
    .login-box{background:var(--bg-card);border:1px solid var(--border);border-radius:16px;padding:40px;width:400px}
    .login-box h1{color:var(--accent);font-size:28px;margin-bottom:8px}
    .login-box p{color:var(--text-secondary);margin-bottom:24px;font-size:14px}
    .login-box input{width:100%;padding:12px 16px;background:var(--bg-base);border:1px solid var(--border);border-radius:8px;color:var(--text-primary);font-size:14px;margin-bottom:12px;outline:none;font-family:'DM Sans',sans-serif}
    .login-box input:focus{border-color:var(--accent)}
    .login-box button{width:100%;padding:14px;background:var(--accent);color:var(--bg-base);border:none;border-radius:8px;font-size:15px;font-weight:600;cursor:pointer;font-family:'DM Sans',sans-serif}
    .login-box button:hover{background:var(--accent-hover)}
    .login-error{color:var(--danger);font-size:13px;margin-bottom:12px}
    .header{border-bottom:1px solid var(--border);padding:16px 32px;display:flex;align-items:center;justify-content:space-between;background:var(--bg-card);flex-wrap:wrap;gap:12px}
    .header-left{display:flex;align-items:center;gap:16px}
    .logo{font-size:22px;font-weight:700;color:var(--accent)}
    .logo span{color:var(--text-secondary);font-weight:400;font-size:14px;margin-left:8px}
    .store-bar{display:flex;gap:6px;align-items:center}
    .store-btn{padding:6px 14px;background:var(--bg-base);border:1px solid var(--border);border-radius:8px;color:var(--text-secondary);font-size:13px;font-family:'DM Sans',sans-serif;cursor:pointer;transition:all .2s;white-space:nowrap}
    .store-btn:hover{border-color:var(--accent);color:var(--accent)}
    .store-btn.active{background:var(--bg-surface);border-color:var(--accent);color:var(--accent);font-weight:600}
    .header-right{display:flex;align-items:center;gap:12px}
    .btn{padding:8px 16px;background:var(--bg-surface);color:var(--text-secondary);border:1px solid var(--border);border-radius:8px;cursor:pointer;font-size:13px;font-family:'DM Sans',sans-serif;transition:all .2s}
    .btn:hover{border-color:var(--accent);color:var(--accent)}
    .btn-primary{background:var(--accent);color:var(--bg-base);border-color:var(--accent);font-weight:600}
    .btn-primary:hover{background:var(--accent-hover)}
    .btn-danger{color:var(--danger)}.btn-danger:hover{border-color:var(--danger)}
    .btn-sm{font-size:12px;padding:4px 10px}
    .main{max-width:1800px;margin:0 auto;padding:24px 32px}
    .tabs{display:flex;gap:4px;background:var(--bg-card);border:1px solid var(--border);border-radius:10px;padding:4px;margin-bottom:24px;overflow-x:auto}
    .tab{padding:10px 20px;background:transparent;color:var(--text-secondary);border:1px solid transparent;border-radius:8px;cursor:pointer;font-size:14px;white-space:nowrap;font-family:'DM Sans',sans-serif;transition:all .2s}
    .tab.active{background:rgba(200,168,124,.15);color:var(--accent);border-color:rgba(200,168,124,.2);font-weight:600}
    .card{background:var(--bg-card);border:1px solid var(--border);border-radius:12px;padding:24px;margin-bottom:24px;overflow-x:auto}
    .card h3{color:var(--text-secondary);font-size:13px;text-transform:uppercase;letter-spacing:1px;margin-bottom:16px}
    table{width:100%;border-collapse:collapse}
    th{padding:12px 14px;text-align:left;color:var(--text-secondary);font-size:11px;text-transform:uppercase;letter-spacing:1px;font-weight:500;border-bottom:1px solid var(--border)}
    td{padding:12px 14px;font-size:14px;border-bottom:1px solid var(--border)}
    tr:hover{background:var(--bg-surface)}
    .badge{padding:3px 8px;border-radius:6px;font-size:13px;font-weight:500}
    .badge-green{background:rgba(74,222,128,.12);color:#22c55e}
    .badge-red{background:rgba(248,113,113,.12);color:#ef4444}
    .badge-blue{background:rgba(96,165,250,.12);color:var(--info)}
    .badge-purple{background:rgba(167,139,250,.12);color:var(--purple)}
    .badge-orange{background:rgba(251,146,60,.12);color:#f97316}
    .date-range{display:flex;gap:2px;background:var(--bg-base);border-radius:8px;padding:3px;flex-wrap:wrap}
    .date-btn{padding:6px 10px;background:transparent;color:var(--text-muted);border:none;border-radius:6px;cursor:pointer;font-size:12px;font-family:'DM Sans',sans-serif;white-space:nowrap}
    .date-btn.active{background:var(--bg-surface);color:var(--text-primary)}
    .custom-dates{display:flex;gap:6px;align-items:center;margin-top:6px}
    .custom-dates input[type="date"]{padding:5px 8px;background:var(--bg-base);border:1px solid var(--border);border-radius:6px;color:var(--text-primary);font-size:12px;font-family:'DM Sans',sans-serif;outline:none}
    .custom-dates input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(1);cursor:pointer}
    .empty-state{text-align:center;padding:60px 20px;color:var(--text-secondary)}
    .empty-state h2{color:var(--accent);margin-bottom:12px}
    .modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.7);z-index:1000;display:flex;align-items:center;justify-content:center}
    .modal{background:var(--bg-card);border:1px solid var(--border);border-radius:16px;padding:32px;width:520px;max-height:90vh;overflow-y:auto}
    .modal h2{color:var(--accent);font-size:20px;margin-bottom:20px}
    .modal label{display:block;color:var(--text-secondary);font-size:12px;margin-bottom:4px;margin-top:12px}
    .modal input,.modal select,.modal textarea{width:100%;padding:10px 12px;background:var(--bg-base);border:1px solid var(--border);border-radius:8px;color:var(--text-primary);font-size:14px;outline:none;font-family:'DM Sans',sans-serif;box-sizing:border-box}
    .modal-actions{display:flex;gap:12px;margin-top:24px}
    .sync-indicator{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted)}
    .sync-dot{width:6px;height:6px;border-radius:50%;background:var(--success);animation:pulse 2s infinite}
    @keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}
    .loading{display:flex;align-items:center;justify-content:center;padding:60px;color:var(--text-secondary)}
    .funnel{display:flex;flex-direction:column;gap:14px}
    .funnel-header{display:flex;align-items:center;gap:16px;padding-bottom:4px;border-bottom:1px solid var(--border)}
    .funnel-header span{color:var(--text-muted);font-size:11px;text-transform:uppercase;letter-spacing:.5px;font-weight:600}
    .funnel-row{display:flex;align-items:center;gap:16px}
    .funnel-label{width:160px;text-align:right;color:var(--text-secondary);font-size:13px;flex-shrink:0}
    .funnel-bar-wrap{flex:1}
    .funnel-bar{border-radius:6px;padding:12px 16px;display:flex;justify-content:space-between;align-items:center;transition:width .6s ease}
    .funnel-value{font-weight:600;font-size:15px}
    .funnel-rate{font-size:13px;font-weight:500}
    .funnel-drop{width:80px;text-align:right;color:var(--danger);font-size:12px;flex-shrink:0}
    .cost-input{width:90px;padding:4px 8px;background:var(--bg-base);border:1px solid var(--border);border-radius:6px;color:var(--text-primary);font-size:13px;font-family:'DM Sans',sans-serif;outline:none}
    .cost-input:focus{border-color:var(--accent)}

    /* Dashboard tiles grid */
    .dash-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:24px}
    .dash-tile{background:var(--bg-card);border-radius:12px;padding:20px 24px;position:relative;overflow:visible;border-left:4px solid transparent}
    .dash-tile .tile-value{font-size:28px;font-weight:700;letter-spacing:-.02em;margin-bottom:4px}
    .dash-tile .tile-label{color:var(--text-secondary);font-size:13px;display:flex;align-items:center;gap:8px}
    .dash-tile .tile-change{font-size:12px;font-weight:600;padding:2px 6px;border-radius:4px}
    .tile-change.up{color:var(--success);background:rgba(74,222,128,.1)}
    .tile-change.down{color:var(--danger);background:rgba(248,113,113,.1)}
    .tile-change.neutral{color:var(--text-secondary);background:rgba(136,146,168,.1)}
    .dash-tile .tile-spark{position:absolute;right:16px;top:50%;transform:translateY(-50%);opacity:.6}
    .tile-green{border-left-color:var(--success)}
    .tile-blue{border-left-color:var(--info)}
    .tile-gold{border-left-color:var(--accent)}
    .tile-red{border-left-color:var(--danger)}
    .tile-purple{border-left-color:var(--purple)}
    .tile-orange{border-left-color:var(--warning)}
    .tile-cyan{border-left-color:#22d3ee}
    .tile-pink{border-left-color:#f472b6}

    .summary-card{background:linear-gradient(135deg,#111827,#1a2237);border:1px solid #c8a87c33;border-radius:12px;padding:24px;margin-bottom:24px}
    .summary-card h3{color:var(--accent);font-size:16px;margin-bottom:16px}

    .tc-sep{border-left:2px solid #4ade8033}
    .fb-sep{border-left:2px solid #8892a833}

    /* Ads tile grids */
    .ads-row1{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:12px}
    .ads-row2{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-bottom:24px}

    /* ===== RESPONSIVE ===== */
    @media(max-width:1200px){
      .ads-row1{grid-template-columns:repeat(3,1fr)}
      .ads-row2{grid-template-columns:repeat(3,1fr)}
    }
    @media(max-width:900px){
      .dash-grid{grid-template-columns:repeat(2,1fr)}
      .ads-row1{grid-template-columns:repeat(2,1fr)}
      .ads-row2{grid-template-columns:repeat(2,1fr)}
    }
    @media(max-width:768px){
      .header{padding:12px 16px;flex-wrap:nowrap}
      .header-left{flex:1;min-width:0;flex-wrap:wrap;gap:8px}
      .header-right{flex-wrap:wrap;gap:8px}
      .main{padding:16px}
      .tab{padding:8px 14px;font-size:13px}
      .modal{width:calc(100vw - 32px);padding:20px;border-radius:12px}
      .login-box{width:calc(100vw - 32px);padding:24px}
      .funnel{gap:12px}
      .funnel-row{gap:10px}
      .funnel-label{width:110px;font-size:12px}
      .funnel-value{font-size:14px}
      .funnel-rate{font-size:12px}
      .funnel-drop{width:65px;font-size:11px}
      .funnel-bar{padding:10px 12px}
      .funnel-header span{font-size:10px}
      .summary-card{padding:16px}
      .summary-card table{font-size:13px}
      .date-range{gap:1px}
      .date-btn{padding:10px 12px;font-size:12px;min-height:44px}
      /* Only shrink tiles inside FB Ads grids */
      .ads-row1{grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:8px}
      .ads-row2{grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:16px}
      .ads-row1 .dash-tile,.ads-row2 .dash-tile{padding:14px 16px}
      .ads-row1 .tile-value,.ads-row2 .tile-value{font-size:18px}
      .ads-row1 .tile-value span,.ads-row2 .tile-value span{font-size:10px !important}
      .ads-row1 .tile-label,.ads-row2 .tile-label{font-size:11px}
      .sync-indicator{display:none}
      .cost-input{width:70px;font-size:12px}
    }
    @media(max-width:480px){
      .header{padding:10px 12px}
      .header-left{flex:1;min-width:0}
      .store-bar{flex-wrap:wrap}
      .main{padding:10px}
      .dash-grid{grid-template-columns:1fr}
      .dash-tile{padding:16px 20px}
      .dash-tile .tile-value{font-size:24px}
      .card{padding:16px;margin-bottom:16px}
      .tab{padding:10px 14px;font-size:12px;min-height:44px}
      .btn{padding:6px 10px;font-size:12px}
      .ads-row1,.ads-row2{grid-template-columns:1fr 1fr;gap:6px}
      .ads-row1 .dash-tile,.ads-row2 .dash-tile{padding:10px 12px}
      .ads-row1 .tile-value,.ads-row2 .tile-value{font-size:15px}
      .ads-row1 .tile-label,.ads-row2 .tile-label{font-size:10px}
      .funnel{gap:10px}
      .funnel-header{display:none}
      .funnel-row{flex-wrap:wrap;gap:6px}
      .funnel-label{width:100%;text-align:left;font-size:12px;font-weight:600}
      .funnel-bar{padding:10px 12px}
      .funnel-drop{width:auto;margin-left:auto;font-size:11px}
      .summary-card table td{padding:8px 6px}
      .store-cards-grid{grid-template-columns:1fr !important}
    }

    /* === UTILITY CLASSES === */
    .text-accent { color: var(--accent) }
    .text-secondary { color: var(--text-secondary) }
    .text-muted { color: var(--text-muted) }
    .text-success { color: var(--success) }
    .text-danger { color: var(--danger) }
    .text-sm { font-size: 13px }
    .text-xs { font-size: 11px }
    .text-mono { font-family: var(--font-mono) }
    .fw-600 { font-weight: 600 }
    .mt-sm { margin-top: var(--space-sm) }
    .mt-md { margin-top: var(--space-md) }
    .mb-sm { margin-bottom: var(--space-sm) }
    .mb-md { margin-bottom: var(--space-md) }
    .gap-sm { gap: var(--space-sm) }
    .gap-md { gap: var(--space-md) }

    /* Hint text below inputs */
    .input-hint { color: var(--text-muted); font-size: 11px; margin: 4px 0 0 }
    .input-hint code { color: var(--accent); font-family: var(--font-mono) }

    /* Loading state for buttons */
    .btn-loading { pointer-events: none; opacity: .6; position: relative }
    .btn-loading::after {
      content: '';
      width: 14px; height: 14px;
      border: 2px solid transparent;
      border-top-color: currentColor;
      border-radius: 50%;
      animation: spin .6s linear infinite;
      display: inline-block;
      margin-left: 8px;
      vertical-align: middle;
    }
    @keyframes spin { to { transform: rotate(360deg) } }

    /* Tooltip system */
    [data-tooltip] { position: relative; cursor: help; border-bottom: 1px dotted var(--text-muted) }
    [data-tooltip].tooltip-active::after,
    [data-tooltip]:hover::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: calc(100% + 6px);
      left: 50%;
      transform: translateX(-50%);
      background: var(--bg-surface);
      color: var(--text-primary);
      border: 1px solid var(--border);
      padding: 6px 10px;
      border-radius: var(--radius-sm);
      font-size: 12px;
      white-space: nowrap;
      z-index: 9999;
      pointer-events: none;
      font-weight: 400;
      text-transform: none;
      letter-spacing: 0;
    }

    /* Focus rings for accessibility */
    .btn:focus-visible, .tab:focus-visible, .store-btn:focus-visible, .date-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .modal input:focus, .modal select:focus, .modal textarea:focus, .cost-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 2px rgba(200,168,124,.15);
    }

    /* Scrollable tabs with fade indicators */
    .tabs { position: relative; scrollbar-width: none; -ms-overflow-style: none }
    .tabs::-webkit-scrollbar { display: none }
    .tabs-wrap { position: relative }
    .tabs-wrap::after {
      content: '';
      position: absolute;
      right: 0; top: 0; bottom: 0;
      width: 40px;
      background: linear-gradient(to right, transparent, var(--bg-card));
      pointer-events: none;
      opacity: 0;
      transition: opacity .2s;
      border-radius: 0 10px 10px 0;
    }
    .tabs-wrap.has-overflow::after { opacity: 1 }

    /* Improved empty state */
    .empty-state svg { margin-bottom: 16px; opacity: .5 }
    .empty-state p { max-width: 400px; margin: 0 auto 20px; line-height: 1.6 }

    /* Status dot (reusable) */


    /* Subtle card hover */



    /* === FORM VALIDATION === */
    .form-error { color: var(--danger); font-size: 12px; margin-top: 4px; display: none }
    .form-error.visible { display: block }
    .input-error { border-color: var(--danger) !important; box-shadow: 0 0 0 2px rgba(248,113,113,.15) !important }
    .form-group { margin-bottom: 12px }
    .form-group label { display: block; color: var(--text-secondary); font-size: 12px; margin-bottom: 4px }
    .required-mark { color: var(--danger); margin-left: 2px }

    /* === CONSISTENT INPUTS (outside modals too) === */
    input.input, select.input, textarea.input {
      width: 100%; padding: 10px 12px; background: var(--bg-base); border: 1px solid var(--border);
      border-radius: var(--radius-md); color: var(--text-primary); font-size: 14px; outline: none;
      font-family: var(--font-sans); box-sizing: border-box; transition: border-color .2s;
    }
    input.input:focus, select.input:focus, textarea.input:focus {
      border-color: var(--accent); box-shadow: 0 0 0 2px rgba(200,168,124,.15);
    }
    input.input::placeholder { color: var(--text-muted) }

    /* === IMPROVED EMPTY STATES === */
    .empty-state-icon { width: 48px; height: 48px; margin: 0 auto 16px; opacity: .4 }

    /* === TOAST NOTIFICATION === */
    .toast {
      position: fixed; bottom: 24px; right: 24px; background: var(--bg-card); border: 1px solid var(--border);
      color: var(--text-primary); padding: 14px 24px; border-radius: var(--radius-lg); font-size: 14px;
      z-index: 10001; box-shadow: 0 8px 32px rgba(0,0,0,.4); transform: translateY(80px); opacity: 0;
      transition: all .3s ease; display: flex; align-items: center; gap: 10px;
    }
    .toast.visible { transform: translateY(0); opacity: 1 }
    .toast.success { border-left: 4px solid var(--success) }
    .toast.error { border-left: 4px solid var(--danger) }
    .toast.info { border-left: 4px solid var(--info) }


    /* Tabular numbers for financial data alignment */
    .tile-value, td, .funnel-value, .funnel-rate, .summary-card td { font-variant-numeric: tabular-nums; }

    /* Right-aligned numeric cells */
    td.num, th.num { text-align: right; }

    /* Sticky table headers */
    .card table th { position: sticky; top: 0; background: var(--bg-card); z-index: 1; }

    /* Zebra striping */
    tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
    tbody tr:hover { background: var(--bg-surface); }


    /* Skeleton loading screens */
    .skeleton { background: linear-gradient(90deg, var(--bg-surface) 25%, #1e2a3f 50%, var(--bg-surface) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-md); }
    @keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
    .skeleton-tile { height: 88px; border-radius: 12px; }
    .skeleton-table-row { height: 44px; margin-bottom: 2px; border-radius: 6px; }
    .skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 4px; }
    .skeleton-text.w60 { width: 60%; }
    .skeleton-text.w40 { width: 40%; }
    .skeleton-text.w80 { width: 80%; }




    /* === IMPROVED MOBILE HEADER === */
    @media(max-width:768px) {
      .header { padding: 10px 16px; gap: 8px; align-items: center; }
      .logo { font-size: 18px; flex-shrink: 0; }
      .logo span { display: none; }
      .store-bar { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; flex-wrap: nowrap !important; }
      .store-bar::-webkit-scrollbar { display: none; }
      .store-btn { padding: 6px 10px; font-size: 11px; min-height: 32px; flex-shrink: 0; }
      .header-right .btn { padding: 8px 12px; font-size: 12px; min-height: 36px; }
      #user-public-id { display: none; }
      .sync-indicator { display: none !important; }
    }
    @media(max-width:480px) {
      .header { padding: 8px 12px; gap: 6px; }
      .header-left { gap: 4px; }
      .store-bar { gap: 3px; }
      .store-btn { padding: 5px 8px; font-size: 10px; min-height: 28px; }
    }


    /* === IMPROVED DATE PICKER === */
    .date-range { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
    .date-btn { border-radius: 6px; transition: all .15s; }
    .date-btn:hover { background: var(--bg-surface); color: var(--text-primary); }
    .date-btn.active { background: var(--accent); color: var(--bg-base); font-weight: 600; }
    @media(max-width:768px) {
      .date-range { border-radius: 8px; gap: 2px; padding: 3px; }
      .date-btn { padding: 8px 10px; font-size: 11px; min-height: 36px; }
    }

    /* === DATE PICKER MOBILE FIX === */
    @media(max-width:480px) {
      .date-range {
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
      }
      .date-btn {
        flex: 0 0 auto;
        padding: 7px 8px;
        font-size: 11px;
      }
      .custom-dates { flex-wrap: wrap; }
      .custom-dates input[type="date"] { flex: 1; min-width: 120px; }
    }



    /* === ENHANCED CARD & TILE EFFECTS === */
    .dash-tile { transition: transform .15s ease, box-shadow .15s ease; border: 1px solid var(--border); }
    .dash-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); border-color: rgba(200,168,124,.2); }
    .card { transition: border-color .15s ease; }
    .card:hover { border-color: rgba(200,168,124,.15); }
    /* Better tile value readability */
    .dash-tile .tile-value { line-height: 1.1; }
    .dash-tile .tile-label { margin-top: 6px; }
    @media(max-width:768px) {
      .dash-tile:hover { transform: none; box-shadow: none; }
    }


    /* === SORTABLE TABLE HEADERS === */
    th.sortable { cursor: pointer; user-select: none; position: relative; }
    th.sortable:hover { color: var(--accent); }
    th.sortable::after { content: "\2195"; margin-left: 4px; opacity: .3; font-size: 10px; }
    th.sortable.sort-asc::after { content: "\25B2"; opacity: .8; color: var(--accent); }
    th.sortable.sort-desc::after { content: "\25BC"; opacity: .8; color: var(--accent); }


    /* === PAGINATION === */
    .pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-size: 13px; color: var(--text-secondary); flex-wrap: wrap; gap: 8px; }
    .pagination-btns { display: flex; gap: 4px; }
    .pagination-btns button { padding: 6px 12px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text-secondary); cursor: pointer; font-family: var(--font-sans); font-size: 12px; transition: all .15s; min-width: 36px; }
    .pagination-btns button:hover { border-color: var(--accent); color: var(--accent); }
    .pagination-btns button.active { background: var(--accent); color: var(--bg-base); border-color: var(--accent); font-weight: 600; }
    .pagination-btns button:disabled { opacity: .3; cursor: default; pointer-events: none; }
    .pagination-info { color: var(--text-muted); font-size: 12px; }


    /* === PASSWORD TOGGLE === */
    .password-wrap { position: relative; width: 100%; margin-bottom: 12px; }
    .password-wrap input { padding-right: 40px !important; margin-bottom: 0 !important; }
    .password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none !important; border: none !important; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 4px !important; width: auto !important; border-radius: 0 !important; min-width: 0 !important; }
    .password-toggle:hover { color: var(--text-primary); }


    /* === BETTER MOBILE TILES === */
    @media(max-width:768px) {
      .dash-grid { gap: 8px; }
      .dash-tile { padding: 14px 16px; border-radius: 10px; }
      .dash-tile .tile-value { font-size: 22px; }
      .dash-tile .tile-label { font-size: 11px; }
      .dash-tile .tile-spark { display: none; }
      .card { padding: 16px; border-radius: 10px; }
      .card h3 { font-size: 12px; margin-bottom: 12px; }
      td { padding: 10px 8px; font-size: 13px; }
      th { padding: 10px 8px; font-size: 10px; }
      .summary-card { padding: 14px; border-radius: 10px; }
      .summary-card table { font-size: 13px !important; }
    }
    @media(max-width:480px) {
      .dash-tile .tile-value { font-size: 20px; }
      .dash-tile .tile-change { font-size: 10px; }
    }


    /* === PAGE TRANSITIONS === */
    #content { animation: fadeIn .2s ease; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }


    /* === CUSTOM SCROLLBAR === */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
    * { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }


    /* === MOBILE TABS — horizontal scroll === */
    @media(max-width:768px) {
      .tabs-wrap { margin-bottom: 16px; }
      .tabs {
        display: flex !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 2px;
        padding: 3px;
        border-radius: 8px;
      }
      .tabs::-webkit-scrollbar { display: none; }
      .tabs .tab {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 6px;
        min-height: 40px;
        flex-shrink: 0;
      }
      .tabs .tab::before { display: none !important; }
      .main { padding-bottom: 24px !important; }
    }
    @media(max-width:480px) {
      .tabs .tab {
        padding: 8px 12px;
        font-size: 12px;
      }
    }


    /* === MOBILE HAMBURGER MENU === */
    .mobile-menu-btn { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 20px; padding: 6px 10px; cursor: pointer; line-height: 1; flex-shrink: 0; margin-left: auto; }
    .mobile-menu-btn:hover { border-color: var(--accent); }
    @media(max-width:768px) {
      .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
      .header-right {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 0 0 12px 12px;
        padding: 12px;
        flex-direction: column;
        gap: 8px;
        min-width: 180px;
        box-shadow: 0 8px 32px rgba(0,0,0,.3);
        z-index: 200;
      }
      .header-right.open { display: flex; }
      .header-right .btn { width: 100%; text-align: center; }
      .header { position: relative; flex-wrap: nowrap; }
    }


    /* === PREVENT VALUE+UNIT WRAPPING === */
    td.num, .tile-value, .funnel-value { white-space: nowrap; }

    /* === FUNNEL MOBILE FIX === */
    @media(max-width:768px) {
      .funnel-row { flex-wrap: nowrap; }
      .funnel-label { width: 80px; font-size: 11px; }
      .funnel-bar { padding: 8px 10px; min-width: 60px; }
      .funnel-value { font-size: 13px; }
      .funnel-rate { font-size: 11px; }
      .funnel-drop { width: 50px; font-size: 10px; }
    }
    @media(max-width:480px) {
      .funnel-label { width: 65px; font-size: 10px; }
      .funnel-bar { padding: 6px 8px; flex-wrap: wrap; gap: 2px; }
      .funnel-value { font-size: 12px; width: 100%; }
      .funnel-rate { font-size: 10px; }
      .funnel-drop { width: 40px; font-size: 9px; }
    }

    /* === TABLE MOBILE FIX === */
    @media(max-width:768px) {
      .card table { font-size: 12px; }
      .card table td, .card table th { padding: 6px 4px; }
      .card table td:first-child { min-width: 60px; }
    }

    /* === TABS MOBILE VISIBILITY === */
    @media(max-width:768px) {
      .tabs-wrap { margin-bottom: 12px; }
      .tabs {
        background: var(--bg-card) !important;
        border: 1px solid var(--border) !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 44px;
      }
      .tabs .tab {
        white-space: nowrap;
        flex-shrink: 0;
      }
    }

    /* === SUMMARY CARD MOBILE === */
    @media(max-width:768px) {
      .summary-card table td { white-space: nowrap; padding: 5px 3px; font-size: 11px; }
      .summary-card table th { white-space: nowrap; padding: 5px 3px; font-size: 10px; }
      .summary-card { overflow-x: auto; }
    }
    @media(max-width:480px) {
      .summary-card table td { font-size: 10px; padding: 4px 2px; }
      .summary-card table th { font-size: 9px; padding: 4px 2px; }
    }

    /* === FORM INPUT FOCUS INDICATORS === */
    input:focus-visible, select:focus-visible, textarea:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    /* === MOBILE TOUCH TARGETS 44px === */
    @media(max-width:768px) {
      .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
      .tab { min-height: 44px; }
      .store-btn { min-height: 36px; }
    }

    /* === SKIP TO CONTENT === */
    .skip-link { position: absolute; top: -50px; left: 16px; background: var(--accent); color: var(--bg-base); padding: 8px 16px; border-radius: 0 0 8px 8px; z-index: 9999; font-size: 14px; text-decoration: none; transition: top .2s; }
    .skip-link:focus { top: 0; }

    /* === FB ADS MOBILE === */
    @media(max-width:768px) {
      #ads-tbl td:first-child,
      #ads-tbl th:first-child { position: static !important; background: transparent !important; }
      #ads-tbl td:first-child { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
      #ads-tbl { min-width: 900px !important; font-size: 11px !important; }
      #ads-tbl td.num { white-space: nowrap; font-size: 11px; padding: 5px 3px; }
      #ads-tbl th { font-size: 10px !important; padding: 5px 3px !important; white-space: nowrap; }
    }

    /* === ANALYTICS MOBILE === */
    @media(max-width:768px) {
      .card h3 { font-size: 15px; }
      .card table th { font-size: 10px; padding: 5px 3px; white-space: nowrap; }
      .card table td { font-size: 11px; padding: 5px 3px; white-space: nowrap; }
    }
    @media(max-width:480px) {
      .card table th { font-size: 9px; padding: 4px 2px; }
      .card table td { font-size: 10px; padding: 4px 2px; }
    }

    /* === ANALYTICS GRID MOBILE === */
    @media(max-width:600px) {
      .card > div[style*="grid-template-columns:1fr 1fr 1fr"],
      .card > div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
      }
      .card > div[style*="grid-template-columns:1fr 1fr"],
      .card > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
      }
      .card > div[style*="grid-template-columns:repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
      }
    }

    /* === AB TEST CARDS MOBILE === */
    @media(max-width:768px) {
      .abtest-tbl { table-layout: fixed; width: 100%; }
      .abtest-tbl td:first-child { white-space: nowrap; font-size: 12px; }
      .abtest-tbl td { font-size: 12px; white-space: nowrap; }
      .abtest-tbl th { font-size: 10px; white-space: normal !important; word-wrap: break-word; overflow-wrap: break-word; }
    }