/* ===== Invoice Generator — shared styles ===== */
:root{
    --ink:#12141c;
    --ink-2:#191c28;
    --bg:#f3f4f9;
    --surface:#ffffff;
    --border:#e6e7f0;
    --accent:#ff6a3d;
    --accent-dark:#e85a2c;
    --accent-soft:#fff1ea;
    --blue:#3a5cff;
    --blue-soft:#eef1ff;
    --green:#17a673;
    --green-soft:#e8f9f2;
    --amber:#f5a524;
    --amber-soft:#fef6e6;
    --red:#e5484d;
    --red-soft:#fdecec;
    --text:#1a1d27;
    --text-muted:#6b7280;
    --text-faint:#9aa0ae;
    --font-display:'Space Grotesk',sans-serif;
    --font-body:'Inter',sans-serif;
    --font-mono:'JetBrains Mono',monospace;
    --radius:14px;
    --shadow:0 1px 2px rgba(18,20,28,.04), 0 8px 24px -12px rgba(18,20,28,.10);
  }
  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    font-family:var(--font-body);
    background:var(--bg);
    color:var(--text);
    -webkit-font-smoothing:antialiased;
  }
  a{color:inherit;text-decoration:none;}
  button{font-family:inherit;cursor:pointer;}
  ::selection{background:var(--accent-soft);color:var(--accent-dark);}

  /* ===== App shell ===== */
  .invoice-app{
    display:flex;
    min-height:100vh;
    width:100%;
  }

  /* ===== Sidebar ===== */
  .invoice-sidebar{
    width:264px;
    flex-shrink:0;
    background:linear-gradient(180deg,var(--ink-2) 0%, var(--ink) 100%);
    color:#fff;
    display:flex;
    flex-direction:column;
    position:fixed;
    top:0;left:0;bottom:0;
    z-index:100;
    transition:transform .28s ease;
  }
  .invoice-sidebar-brand{
    display:flex;
    align-items:center;
    gap:12px;
    padding:24px 22px 20px;
    border-bottom:1px solid rgba(255,255,255,.08);
  }
  .invoice-sidebar-brand-mark{
    width:38px;height:38px;border-radius:10px;
    background:linear-gradient(135deg,var(--accent),var(--accent-dark));
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;
    box-shadow:0 4px 14px -2px rgba(255,106,61,.55);
  }
  .invoice-sidebar-brand-mark svg{width:20px;height:20px;}
  .invoice-sidebar-brand-text{line-height:1.15;}
  .invoice-sidebar-brand-text b{
    font-family:var(--font-display);
    font-size:15.5px;
    font-weight:700;
    letter-spacing:.2px;
    display:block;
  }
  .invoice-sidebar-brand-text span{
    font-size:11px;
    color:#9aa0c0;
    font-family:var(--font-mono);
    letter-spacing:.5px;
  }

  .invoice-nav{
    flex:1;
    padding:18px 14px;
    overflow-y:auto;
  }
  .invoice-nav-label{
    font-size:10.5px;
    text-transform:uppercase;
    letter-spacing:1.2px;
    color:#6b7094;
    font-weight:600;
    padding:6px 12px 10px;
  }
  .invoice-nav-item{
    display:flex;
    align-items:center;
    gap:12px;
    padding:11px 13px;
    border-radius:10px;
    color:#c4c7dd;
    font-size:14px;
    font-weight:500;
    margin-bottom:3px;
    transition:background .15s ease,color .15s ease;
    position:relative;
    border:1px solid transparent;
  }
  .invoice-nav-item svg{width:17px;height:17px;flex-shrink:0;opacity:.85;}
  .invoice-nav-item:hover{background:rgba(255,255,255,.06);color:#fff;}
  .invoice-nav-item.active{
    background:rgba(255,106,61,.14);
    color:#fff;
    border-color:rgba(255,106,61,.35);
  }
  .invoice-nav-item.active svg{opacity:1;}
  .invoice-nav-item.active::before{
    content:"";
    position:absolute;left:-14px;top:8px;bottom:8px;width:3px;
    background:var(--accent);border-radius:0 4px 4px 0;
  }
  .invoice-nav-divider{height:1px;background:rgba(255,255,255,.08);margin:14px 6px;}

  .invoice-sidebar-footer{
    padding:16px 22px 22px;
    border-top:1px solid rgba(255,255,255,.08);
    display:flex;align-items:center;gap:10px;
  }
  .invoice-sidebar-footer .avatar{
    width:34px;height:34px;border-radius:9px;
    background:var(--accent-soft);color:var(--accent-dark);
    display:flex;align-items:center;justify-content:center;
    font-family:var(--font-display);font-weight:700;font-size:13px;
  }
  .invoice-sidebar-footer .who b{display:block;font-size:13px;color:#fff;}
  .invoice-sidebar-footer .who span{font-size:11.5px;color:#8a8fb0;}

  /* ===== Main ===== */
  .invoice-main{
    margin-left:264px;
    flex:1;
    min-width:0;
    display:flex;
    flex-direction:column;
  }
  .invoice-topbar{
    position:sticky;top:0;z-index:40;
    display:flex;align-items:center;justify-content:space-between;
    gap:16px;
    padding:16px 30px;
    background:rgba(243,244,249,.85);
    backdrop-filter:blur(10px);
    border-bottom:1px solid var(--border);
  }
  .invoice-topbar-left{display:flex;align-items:center;gap:14px;min-width:0;}
  .invoice-burger{
    display:none;
    width:38px;height:38px;border-radius:10px;
    background:var(--surface);border:1px solid var(--border);
    align-items:center;justify-content:center;flex-shrink:0;
  }
  .invoice-burger svg{width:18px;height:18px;}
  .invoice-topbar h1{
    font-family:var(--font-display);
    font-size:19px;font-weight:700;margin:0;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  .invoice-topbar-crumb{font-size:12.5px;color:var(--text-faint);font-family:var(--font-mono);}
  .invoice-topbar-right{display:flex;align-items:center;gap:10px;}
  .invoice-search{
    display:flex;align-items:center;gap:8px;
    background:var(--surface);border:1px solid var(--border);
    border-radius:10px;padding:9px 13px;font-size:13px;color:var(--text-faint);
  }
  .invoice-search svg{width:15px;height:15px;flex-shrink:0;}
  .invoice-bell{
    width:38px;height:38px;border-radius:10px;background:var(--surface);
    border:1px solid var(--border);display:flex;align-items:center;justify-content:center;position:relative;
  }
  .invoice-bell svg{width:17px;height:17px;}
  .invoice-bell::after{content:"";position:absolute;top:9px;right:10px;width:6px;height:6px;background:var(--accent);border-radius:50%;border:1.5px solid var(--surface);}

  .invoice-content{padding:26px 30px 60px;}
  .invoice-page{display:none;animation:fadeIn .25s ease;}
  .invoice-page.active{display:block;}
  @keyframes fadeIn{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);}}

  /* ===== Shared bits ===== */
  .invoice-eyebrow{
    font-family:var(--font-mono);
    font-size:11.5px;color:var(--accent-dark);
    text-transform:uppercase;letter-spacing:1.2px;font-weight:600;
    margin:0 0 6px;
  }
  .invoice-page-title{font-family:var(--font-display);font-size:24px;font-weight:700;margin:0 0 4px;}
  .invoice-page-sub{color:var(--text-muted);font-size:13.5px;margin:0 0 24px;}
  .invoice-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:22px;}

  .invoice-card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
  }
  .invoice-card-pad{padding:22px 24px;}
  .invoice-card-head{
    display:flex;align-items:center;justify-content:space-between;gap:12px;
    padding:18px 22px;border-bottom:1px solid var(--border);
  }
  .invoice-card-head h3{font-family:var(--font-display);font-size:15.5px;margin:0;}

  .invoice-btn{
    display:inline-flex;align-items:center;gap:8px;
    padding:10px 18px;border-radius:10px;border:1px solid transparent;
    font-size:13.5px;font-weight:600;transition:all .15s ease;white-space:nowrap;
  }
  .invoice-btn svg{width:15px;height:15px;}
  .invoice-btn-primary{background:var(--accent);color:#fff;box-shadow:0 6px 16px -6px rgba(255,106,61,.6);}
  .invoice-btn-primary:hover{background:var(--accent-dark);}
  .invoice-btn-ghost{background:var(--surface);border-color:var(--border);color:var(--text);}
  .invoice-btn-ghost:hover{border-color:var(--accent);color:var(--accent-dark);}
  .invoice-btn-dark{background:var(--ink);color:#fff;}
  .invoice-btn-sm{padding:7px 12px;font-size:12.5px;border-radius:8px;}

  .invoice-badge{
    display:inline-flex;align-items:center;gap:5px;
    font-family:var(--font-mono);font-size:11px;font-weight:600;
    padding:4px 9px;border-radius:100px;
  }
  .invoice-badge-green{background:var(--green-soft);color:var(--green);}
  .invoice-badge-amber{background:var(--amber-soft);color:#a3690a;}
  .invoice-badge-blue{background:var(--blue-soft);color:var(--blue);}

  /* ===== Dashboard stat cards ===== */
  .invoice-stat-grid{
    display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px;
  }
  .invoice-stat{padding:20px 20px 18px;position:relative;overflow:hidden;}
  .invoice-stat-icon{
    width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;margin-bottom:14px;
  }
  .invoice-stat-icon svg{width:18px;height:18px;}
  .invoice-stat .val{font-family:var(--font-mono);font-size:24px;font-weight:700;letter-spacing:-.3px;}
  .invoice-stat .lbl{font-size:12.5px;color:var(--text-muted);margin-top:4px;}
  .invoice-stat .delta{font-size:11.5px;font-weight:600;margin-top:10px;display:inline-flex;align-items:center;gap:4px;}

  .invoice-two-col{display:grid;grid-template-columns:1.6fr 1fr;gap:18px;align-items:start;}

  .invoice-mini-row{
    display:flex;align-items:center;justify-content:space-between;
    padding:13px 22px;border-bottom:1px solid var(--border);gap:14px;
  }
  .invoice-mini-row:last-child{border-bottom:none;}
  .invoice-mini-row .who{display:flex;align-items:center;gap:11px;min-width:0;}
  .invoice-mini-row .swatch{
    width:34px;height:34px;border-radius:9px;background:var(--accent-soft);color:var(--accent-dark);
    display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-weight:700;font-size:12.5px;flex-shrink:0;
  }
  .invoice-mini-row .name{font-size:13.5px;font-weight:600;}
  .invoice-mini-row .id{font-size:11.5px;color:var(--text-faint);font-family:var(--font-mono);}
  .invoice-mini-row .amt{font-family:var(--font-mono);font-weight:600;font-size:13.5px;white-space:nowrap;}

  .invoice-bars{padding:22px 24px 10px;}
  .invoice-bar-row{display:flex;align-items:center;gap:12px;margin-bottom:16px;}
  .invoice-bar-row .l{font-size:12px;color:var(--text-muted);width:38px;flex-shrink:0;font-family:var(--font-mono);}
  .invoice-bar-track{flex:1;height:9px;border-radius:6px;background:var(--bg);overflow:hidden;}
  .invoice-bar-fill{height:100%;border-radius:6px;background:linear-gradient(90deg,var(--accent),var(--accent-dark));}
  .invoice-bar-row .v{font-size:11.5px;color:var(--text-faint);font-family:var(--font-mono);width:60px;text-align:right;flex-shrink:0;}

  /* ===== Tables ===== */
  .invoice-table-wrap{width:100%;overflow-x:auto;}
  table.invoice-table{width:100%;border-collapse:collapse;min-width:840px;}
  table.invoice-table th{
    text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.6px;
    color:var(--text-faint);font-weight:600;padding:13px 22px;border-bottom:1px solid var(--border);white-space:nowrap;
  }
  table.invoice-table td{
    padding:15px 22px;border-bottom:1px solid var(--border);font-size:13.5px;vertical-align:middle;
  }
  table.invoice-table tr:last-child td{border-bottom:none;}
  table.invoice-table tbody tr{transition:background .15s ease;}
  table.invoice-table tbody tr:hover{background:#fafafd;}
  .invoice-cell-id{font-family:var(--font-mono);color:var(--text-muted);font-size:12.5px;}
  .invoice-cell-name{font-weight:600;}
  .invoice-cell-sub{color:var(--text-faint);font-size:12px;}
  .invoice-cell-amt{font-family:var(--font-mono);font-weight:600;}
  .invoice-row-actions{display:flex;gap:8px;}
  .invoice-icon-btn{
    width:32px;height:32px;border-radius:8px;border:1px solid var(--border);background:var(--surface);
    display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all .15s ease;
  }
  .invoice-icon-btn svg{width:14.5px;height:14.5px;}
  .invoice-icon-btn:hover{border-color:var(--accent);color:var(--accent-dark);background:var(--accent-soft);}
  .invoice-icon-btn.danger:hover{border-color:var(--red);color:var(--red);background:var(--red-soft);}

  .invoice-filterbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px 22px;border-bottom:1px solid var(--border);}
  .invoice-filter-input{
    flex:1;min-width:180px;padding:9px 13px;border-radius:9px;border:1px solid var(--border);
    font-size:13px;background:var(--bg);color:var(--text-muted);
  }
  .invoice-chip{
    padding:8px 14px;border-radius:9px;border:1px solid var(--border);font-size:12.5px;font-weight:600;color:var(--text-muted);background:var(--surface);
  }
  .invoice-chip.on{border-color:var(--accent);color:var(--accent-dark);background:var(--accent-soft);}

  /* ===== Forms ===== */
  .invoice-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
  .invoice-field{display:flex;flex-direction:column;gap:7px;margin-bottom:16px;}
  .invoice-field.full{grid-column:1 / -1;}
  .invoice-field label{font-size:12.5px;font-weight:600;color:var(--text);}
  .invoice-field label span{color:var(--text-faint);font-weight:400;}
  .invoice-field input,.invoice-field textarea,.invoice-field select{
    font-family:inherit;font-size:13.5px;padding:11px 13px;border-radius:10px;
    border:1px solid var(--border);background:var(--bg);color:var(--text);width:100%;
  }
  .invoice-field input:focus,.invoice-field textarea:focus,.invoice-field select:focus{
    outline:none;border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 3px var(--accent-soft);
  }
  .invoice-field textarea{resize:vertical;min-height:80px;}
  .invoice-static-note{
    display:flex;gap:10px;align-items:flex-start;padding:13px 15px;border-radius:10px;
    background:var(--blue-soft);color:#3648b0;font-size:12.5px;line-height:1.5;margin-bottom:20px;
  }
  .invoice-static-note svg{width:16px;height:16px;flex-shrink:0;margin-top:1px;}

  .invoice-items-table{width:100%;border-collapse:collapse;margin-top:4px;}
  .invoice-items-table th{
    text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--text-faint);
    padding:10px 10px;border-bottom:1px solid var(--border);
  }
  .invoice-items-table td{padding:9px 10px;vertical-align:top;}
  .invoice-items-table input{width:100%; padding:5px;}
  .invoice-items-table .amt-col{font-family:var(--font-mono);font-weight:600;padding-top:20px;white-space:nowrap;}
  .invoice-items-table .sl-col{padding-top:20px;color:var(--text-faint);font-family:var(--font-mono);font-size:12.5px;width:30px;}
  .invoice-items-table .rm-col{padding-top:14px;width:34px;}

  .invoice-add-row{margin-top:12px;}
  .invoice-totals-box{margin-top:18px;margin-left:auto;width:300px;}
  .invoice-totals-box .r{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:var(--text-muted);padding:7px 0;}
  .invoice-totals-box .r b{color:var(--text);font-family:var(--font-mono);font-weight:600;}
  .invoice-totals-box .r.total{border-top:1px dashed var(--border);margin-top:6px;padding-top:12px;font-size:15px;color:var(--text);font-weight:700;}
  .invoice-totals-box .r.total b{font-size:16px;color:var(--accent-dark);}
  .item-meta-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:8px;}
  .totals-input-wrap{display:flex;align-items:center;gap:5px;font-family:var(--font-mono);color:var(--text);font-weight:600;font-size:13px;}
  .totals-input{
    width:70px;text-align:right;font-family:var(--font-mono);font-size:13px;font-weight:600;color:var(--text);
    border:1px solid var(--border);border-radius:7px;background:var(--bg);padding:5px 7px;
  }
  .totals-input:focus{outline:none;border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 3px var(--accent-soft);}

  .invoice-form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px;padding-top:20px;border-top:1px solid var(--border);}

  .invoice-logo-upload{
    display:flex;align-items:center;gap:16px;padding:18px;border:1px dashed var(--border);border-radius:12px;background:var(--bg);margin-bottom:22px;
  }
  .invoice-logo-preview{
    width:64px;height:64px;border-radius:14px;background:linear-gradient(135deg,var(--accent),var(--accent-dark));
    display:flex;align-items:center;justify-content:center;flex-shrink:0;
  }
  .invoice-logo-preview svg{width:30px;height:30px;}

  /* ===== Pixel-perfect invoice sheet ===== */
  .invoice-sheet-wrap{display:flex;justify-content:center;}
  .invoice-sheet{
    width:100%;max-width:760px;background:#fff;border:1px solid var(--border);border-radius:10px;
    padding: 32px 48px 18px;box-shadow:var(--shadow);
  }
  .invoice-sheet-brand{text-align:center;margin-bottom:18px;}
  .invoice-sheet-mark{
    width:auto;height:70px; margin:0 auto 10px;
    display:flex;align-items:center;justify-content:center;
  }
  .invoice-sheet-mark svg{width:46px;height:46px;}
  .invoice-sheet-brand .wordmark{
    font-family:var(--font-display);font-weight:700;font-size:22px;letter-spacing:.5px;
    color:var(--accent);text-transform:uppercase;
  }
  .invoice-sheet-addr{text-align:center;font-size:12.5px;color:#555;margin-top:14px;line-height:1.7;}
  .invoice-sheet-pill{
    text-align:center;margin:22px auto 26px;
  }
  .invoice-sheet-pill span{
    display:inline-block;padding:9px 34px;border:1px solid var(--text);border-radius:999px;
    font-family:var(--font-display);font-weight:700;font-size:15px;letter-spacing:.5px;
  }
  .invoice-sheet-meta{display:flex;justify-content:space-between;gap:20px;margin-bottom:10px;}
  .invoice-sheet-meta .left div{font-size:13px;margin-bottom:5px;}
  .invoice-sheet-meta .left b{display:inline-block;width:82px;font-weight:700;}
  .invoice-sheet-meta .right{text-align:right;font-size:13px;}
  .invoice-sheet-meta .right div{margin-bottom:5px;}
  .invoice-sheet-meta .right b{font-weight:700;}
  .invoice-sheet-meta .right span{font-family:var(--font-mono);}

  table.invoice-sheet-table{width:100%;border-collapse:collapse;margin-bottom:22px;}
  table.invoice-sheet-table thead th{
    background:#fafafa;border-top:1px solid #e2e2e2;border-bottom:1px solid #e2e2e2;
    font-size:12.5px;font-weight:700;text-align:left;padding:10px 14px;
  }
  table.invoice-sheet-table thead th:nth-child(1){width:44px;}
  table.invoice-sheet-table thead th:nth-child(3),
  table.invoice-sheet-table thead th:nth-child(4),
  table.invoice-sheet-table thead th:nth-child(5){text-align:right;}
  table.invoice-sheet-table tbody td{padding:14px;border-bottom:1px solid #eee;font-size:13.5px;vertical-align:top;}
  table.invoice-sheet-table tbody td:nth-child(3),
  table.invoice-sheet-table tbody td:nth-child(4),
  table.invoice-sheet-table tbody td:nth-child(5){text-align:right;font-family:var(--font-mono);}
  table.invoice-sheet-table tbody .desc b{display:block;font-size:13.5px;}
  table.invoice-sheet-table tbody .desc small{color:#777;font-size:12px;}

  .invoice-sheet-totals{margin-left:auto;width:270px;}
  .invoice-sheet-totals .r{display:flex;justify-content:space-between;font-size:13.5px;padding:6px 0;}
  .invoice-sheet-totals .r.rule{border-top:1px solid var(--text);margin-top:4px;padding-top:12px;}
  .invoice-sheet-totals .r.total{font-weight:700;font-size:15px;}
  .invoice-sheet-foot{
    text-align:center;font-size:12px;color:#777;margin-top:34px;padding-top:18px;border-top:1px dashed #ddd;
  }
  .invoice-sheet-toolbar{display:flex;justify-content:flex-end;gap:10px;max-width:760px;margin:0 auto 16px;}

  /* ===== A4 print ===== */
  @page{ size:A4; margin:12mm; }
  @media print{
    html,body{background:#fff !important;}
    .invoice-sidebar,
    .invoice-topbar,
    .invoice-backdrop,
    .invoice-sheet-toolbar,
    .invoice-burger{ display:none !important; }
    .invoice-main{ margin-left:0 !important; }
    .invoice-content{ padding:0 !important; }
    .invoice-page{ display:none !important; }
    .invoice-page#page-view-invoice{ display:block !important; }
    .invoice-page#page-view-invoice *{ visibility:visible; }
    .invoice-sheet-wrap{ display:block !important; padding:0 !important; }
    .invoice-sheet{
      box-shadow:none !important;
      border:none !important;
      border-radius:0 !important;
      width:186mm !important;
      max-width:none !important;
      margin:0 auto !important;
      padding:0 !important;
    }
    .invoice-sheet,
    .invoice-sheet *{
      -webkit-print-color-adjust:exact;
      print-color-adjust:exact;
      color-adjust:exact;
    }
    .invoice-sheet-meta{
      display:flex !important;
      flex-direction:row !important;
      justify-content:space-between !important;
      align-items:flex-start !important;
    }
    .invoice-sheet-meta .right{ text-align:right !important; }
  }

  /* ===== Responsive ===== */
  @media (max-width:1180px){
    .invoice-stat-grid{grid-template-columns:repeat(2,1fr);}
    .invoice-two-col{grid-template-columns:1fr;}
  }
  @media (max-width:900px){
    .invoice-sidebar{transform:translateX(-100%);box-shadow:0 0 0 2000px rgba(0,0,0,0);}
    .invoice-sidebar.open{transform:translateX(0);box-shadow:20px 0 60px -20px rgba(0,0,0,.35);}
    .invoice-main{margin-left:0;}
    .invoice-burger{display:flex;}
    .invoice-search{display:none;}
    .invoice-content{padding:20px 16px 50px;}
    .invoice-topbar{padding:14px 16px;}
    .invoice-form-grid{grid-template-columns:1fr;}
    .item-meta-grid{grid-template-columns:1fr;}
    .invoice-items-table{min-width:640px;}
    .invoice-sheet{padding:30px 20px 26px;}
    .invoice-sheet-meta{flex-direction:column;gap:10px;}
    .invoice-sheet-meta .right{text-align:left;}
  }
  @media (max-width:640px){
    .invoice-stat-grid{grid-template-columns:1fr;}
    .invoice-page-head{align-items:flex-start;}
    .invoice-topbar h1{font-size:16.5px;}
  }
  .invoice-backdrop{
    display:none;position:fixed;inset:0;background:rgba(15,16,24,.4);z-index:90;
  }
  .invoice-backdrop.show{display:block;}

/* ===== Login page styles ===== */
.login-wrap{
    min-height:100vh;width:100%;
    display:flex;align-items:center;justify-content:center;
    background:
      radial-gradient(1100px 500px at 15% -10%, rgba(255,106,61,.16), transparent 60%),
      radial-gradient(900px 500px at 110% 10%, rgba(58,92,255,.12), transparent 55%),
      var(--bg);
    padding:24px;
  }
  .login-card{
    width:100%;max-width:392px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:18px;
    box-shadow:0 1px 2px rgba(18,20,28,.04), 0 24px 48px -20px rgba(18,20,28,.18);
    padding:34px 32px 30px;
  }
  .login-brand{display:flex;flex-direction:column;align-items:center;text-align:center;margin-bottom:22px;}
  .login-brand-mark{
    width:52px;height:52px;border-radius:14px;
    background:linear-gradient(135deg,var(--accent),var(--accent-dark));
    display:flex;align-items:center;justify-content:center;
    box-shadow:0 8px 20px -6px rgba(255,106,61,.55);
    margin-bottom:14px;
  }
  .login-brand-mark svg{width:26px;height:26px;}
  .login-brand b{font-family:var(--font-display);font-size:19px;font-weight:700;letter-spacing:.2px;}
  .login-brand span{font-size:11.5px;color:var(--text-faint);font-family:var(--font-mono);letter-spacing:.6px;margin-top:2px;}
  .login-heading{margin:0 0 22px;text-align:center;}
  .login-heading h1{font-family:var(--font-display);font-size:19px;font-weight:700;margin:0 0 4px;}
  .login-heading p{font-size:13px;color:var(--text-muted);margin:0;}
  .login-field{display:flex;flex-direction:column;gap:7px;margin-bottom:16px;}
  .login-field label{font-size:12.5px;font-weight:600;color:var(--text);}
  .login-input-wrap{position:relative;display:flex;align-items:center;}
  .login-input-wrap svg{position:absolute;left:13px;width:16px;height:16px;color:var(--text-faint);pointer-events:none;}
  .login-input-wrap input{
    width:100%;padding:11px 13px 11px 38px;
    border:1px solid var(--border);border-radius:10px;
    font-family:inherit;font-size:13.5px;color:var(--text);
    background:var(--bg);outline:none;
    transition:border-color .15s ease, box-shadow .15s ease;
  }
  .login-input-wrap input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);background:var(--surface);}
  .login-toggle-eye{position:absolute;right:11px;width:32px;height:32px;border:none;background:none;display:flex;align-items:center;justify-content:center;color:var(--text-faint);border-radius:8px;}
  .login-toggle-eye:hover{color:var(--text);background:var(--border);}
  .login-toggle-eye svg{width:16px;height:16px;position:static;}
  .login-row{display:flex;align-items:center;justify-content:space-between;margin:2px 0 22px;font-size:12.5px;}
  .login-remember{display:flex;align-items:center;gap:7px;color:var(--text-muted);}
  .login-remember input{accent-color:var(--accent);width:14px;height:14px;}
  .login-forgot{color:var(--accent-dark);font-weight:600;}
  .login-forgot:hover{text-decoration:underline;}
  .login-submit{
    width:100%;display:flex;align-items:center;justify-content:center;gap:8px;
    padding:12px 16px;border:none;border-radius:11px;
    background:var(--accent);color:#fff;
    font-family:inherit;font-size:14px;font-weight:600;
    box-shadow:0 8px 20px -8px rgba(255,106,61,.65);
    transition:background .15s ease;
  }
  .login-submit svg{width:16px;height:16px;}
  .login-submit:hover{background:var(--accent-dark);}
  .login-error{
    display:none;
    align-items:center;gap:8px;
    background:var(--red-soft);color:var(--red);
    border:1px solid rgba(229,72,77,.25);
    border-radius:10px;padding:10px 12px;
    font-size:12.5px;font-weight:500;
    margin-bottom:16px;
  }
  .login-error svg{width:15px;height:15px;flex-shrink:0;}
  .login-error.show{display:flex;}
  .login-foot{text-align:center;margin-top:22px;font-size:12px;color:var(--text-faint);}
