/* ════════════════ ROOT – DARK (default) ════════════════ */
    :root{
      --bg:#060c18;--bg2:#0b1220;--bg3:#111c30;
      --card:#0f1929;--card2:#141f33;
      --border:#1e2d4a;--border2:#253551;
      --gold:#f5a623;--gold2:#ffc84a;
      --green:#00e87a;--blue:#3d8ef8;--purple:#a78bfa;
      --text:#dce6f5;--text2:#8fa3c0;--text3:#4d6484;
      --sans:'Be Vietnam Pro',sans-serif;
    }

    /* ════════════════ LIGHT THEME ════════════════ */
    html[data-theme="light"]{
      --bg:#f0f4fa;--bg2:#e8eef8;--bg3:#dde5f3;
      --card:#ffffff;--card2:#f7f9fd;
      --border:#d0daea;--border2:#b8c8e0;
      --gold:#d4820a;--gold2:#e8950f;
      --green:#0a7c42;--blue:#1a5fba;--purple:#6d4fc7;
      --text:#0d1b2e;--text2:#374d6e;--text3:#6b82a0;
    }

    *, *::before, *::after {
      transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
      margin: 0; padding: 0; box-sizing: border-box;
    }
    
    body {
      font-family: var(--sans); background: var(--bg); color: var(--text);
      min-height: 100vh; display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      background-image: radial-gradient(ellipse at 50% 0%, rgba(61,142,248,0.1) 0%, transparent 70%);
      padding: 80px 20px 40px 20px; position: relative; overflow-x: hidden;
    }

    .container {
      max-width: 1000px; width: 100%; z-index: 1; position: relative;
    }

    .header { text-align: center; margin-bottom: 60px; }
    .logo-mark {
      width: 64px; height: 64px; margin: 0 auto 24px;
      background: linear-gradient(135deg, var(--gold), #e08800);
      border-radius: 18px; display: flex; align-items: center; justify-content: center;
      font-size: 28px; font-weight: 900; color: #060c18;
      box-shadow: 0 0 40px rgba(245,166,35,0.4), 0 0 80px rgba(245,166,35,0.15);
    }
    .title { font-size: 36px; font-weight: 900; letter-spacing: -1px; margin-bottom: 12px; }
    .subtitle { font-size: 15px; color: var(--text2); line-height: 1.6; max-width: 600px; margin: 0 auto; }

    .grid {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 24px;
    }

    .card {
      background: rgba(11,18,32,0.8);
      border: 1px solid var(--border); border-radius: 20px;
      padding: 32px 24px; text-decoration: none; color: var(--text);
      transition: all 0.3s ease; backdrop-filter: blur(10px);
      display: flex; flex-direction: column; position: relative; overflow: hidden;
    }
    html[data-theme="light"] .card { background: rgba(255,255,255,0.85); }

    .card:hover {
      transform: translateY(-5px);
      border-color: var(--blue);
      box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(61,142,248,0.2);
    }
    .card:nth-child(1):hover { border-color: var(--gold); box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(245,166,35,0.2); }
    .card:nth-child(2):hover { border-color: var(--green); box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(0,232,122,0.2); }
    .card:nth-child(3):hover { border-color: var(--purple); box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(167,139,250,0.2); }
    .card:nth-child(4):hover { border-color: var(--blue); box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(61,142,248,0.2); }
    .card:nth-child(5):hover { border-color: #e74c3c; box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(231,76,60,0.2); }
    .card:nth-child(6):hover { border-color: #2ecc71; box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(46,204,113,0.2); }
    .card:nth-child(7):hover { border-color: #f1c40f; box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(241,196,15,0.2); }
    .card:nth-child(8):hover { border-color: #e67e22; box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(230,126,34,0.2); }
    .card:nth-child(9):hover { border-color: #fd79a8; box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(253,121,168,0.2); }
    .card:nth-child(10):hover { border-color: #00b894; box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(0,184,148,0.2); }

    .card-icon {
      width: 48px; height: 48px; border-radius: 14px;
      display: flex; align-items: center; justify-content: center;
      font-size: 24px; margin-bottom: 20px;
    }
    .card:nth-child(1) .card-icon { background: rgba(245,166,35,0.1); color: var(--gold); }
    .card:nth-child(2) .card-icon { background: rgba(0,232,122,0.1); color: var(--green); }
    .card:nth-child(3) .card-icon { background: rgba(167,139,250,0.1); color: var(--purple); }
    .card:nth-child(4) .card-icon { background: rgba(61,142,248,0.1); color: var(--blue); }
    .card:nth-child(5) .card-icon { background: rgba(231,76,60,0.1); color: #e74c3c; } /* Đỏ cho VAT */
    .card:nth-child(6) .card-icon { background: rgba(46,204,113,0.1); color: #2ecc71; } /* Xanh ngọc cho BHXH */
    .card:nth-child(7) .card-icon { background: rgba(241,196,15,0.1); color: #f1c40f; } /* Vàng cho Gross-Net */
    .card:nth-child(8) .card-icon { background: rgba(230,126,34,0.1); color: #e67e22; } /* Cam cho BHTN */
    .card:nth-child(9) .card-icon { background: rgba(253,121,168,0.1); color: #fd79a8; } /* Hồng cho Thai Sản */
    .card:nth-child(10) .card-icon { background: rgba(0,184,148,0.1); color: #00b894; } /* Xanh ngọc cho Lãi Vay */
    .card:nth-child(11) .card-icon { background: rgba(169,59,141,0.1); color: #a93b8d; } /* Tím hồng cho Khả Năng Vay */
    .card:nth-child(12) .card-icon { background: rgba(9,132,227,0.1); color: #0984e3; } /* Xanh biển cho Tiết Kiệm */

    .card-usage {
      position: absolute;
      top: 32px;
      right: 24px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border2);
      color: var(--text2);
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 4px;
      pointer-events: none;
    }
    html[data-theme="light"] .card-usage {
      background: rgba(0, 0, 0, 0.03);
      color: var(--text3);
    }

    .card-title { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
    .card-desc { font-size: 13px; color: var(--text2); line-height: 1.6; flex: 1; }
    .card-action {
      margin-top: 24px; font-size: 13px; font-weight: 700;
      display: flex; align-items: center; gap: 6px;
    }
    .card:nth-child(1) .card-action { color: var(--gold); }
    .card:nth-child(2) .card-action { color: var(--green); }
    .card:nth-child(3) .card-action { color: var(--purple); }
    .card:nth-child(4) .card-action { color: var(--blue); }
    .card:nth-child(5) .card-action { color: #e74c3c; }
    .card:nth-child(6) .card-action { color: #2ecc71; }
    .card:nth-child(7) .card-action { color: #f1c40f; }
    .card:nth-child(8) .card-action { color: #e67e22; }
    .card:nth-child(9) .card-action { color: #fd79a8; }
    .card:nth-child(10) .card-action { color: #00b894; }
    .card:nth-child(11) .card-action { color: #a93b8d; }
    .card:nth-child(12) .card-action { color: #0984e3; }
    .card:hover .card-action i { transform: translateX(4px); }
    .card-action i { transition: transform 0.2s; font-style: normal; }

    /* Theme toggle */
    .theme-float {
      position: fixed; top: 24px; right: 24px; z-index: 500;
      display: inline-flex; align-items: center; gap: 8px;
      padding: 7px 13px; border-radius: 20px; cursor: pointer;
      border: 1.5px solid var(--border2); background: var(--card2);
      color: var(--text2); font-size: 11px; font-weight: 700;
      transition: all 0.2s ease; user-select: none; font-family: var(--sans);
    }
    .theme-float:hover { border-color: var(--gold); color: var(--gold); background: rgba(245,166,35,0.06); }
    .theme-track { width: 32px; height: 18px; border-radius: 9px; background: var(--border2); position: relative; transition: background 0.3s ease; }
    html[data-theme="light"] .theme-track { background: var(--gold); }
    .theme-thumb {
      position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
      background: var(--text3); transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), background 0.3s;
    }
    html[data-theme="light"] .theme-thumb { transform: translateX(14px); background: #fff; }

    html[data-theme="light"] .theme-thumb { transform: translateX(14px); background: #fff; }

    /* Float Home Button */
    .float-home-btn {
      position: fixed; top: 20px; left: 24px; z-index: 9999; 
      display: inline-flex; align-items: center; gap: 8px; 
      padding: 7px 13px; border-radius: 20px; cursor: pointer; 
      border: 1.5px solid var(--border2); background: var(--card2); 
      color: var(--text2); font-size: 11px; font-weight: 700; 
      font-family: var(--sans); text-decoration: none; 
      transition: all 0.2s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .float-home-btn:hover {
      border-color: var(--gold); color: var(--gold); background: rgba(245,166,35,0.06);
    }
    
    /* Các class CSS dùng chung cho Báo cáo / Report */
    /* Progress Bar */
    .tax-progress-bar {
      display: flex; height: 24px; border-radius: 12px; overflow: hidden; margin-top: 20px;
    }
    .segment { transition: width 0.8s ease-in-out; }
    .segment-net { background-color: #2ed573; }
    .segment-ins { background-color: #f5a623; }
    .segment-tax { background-color: #ff4757; }
    
    /* Legend */
    .tax-legend {
      display: flex; gap: 20px; margin-top: 15px; justify-content: center; flex-wrap: wrap;
    }
    .legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text2); }
    .color-dot { width: 12px; height: 12px; border-radius: 50%; }
    .dot-net { background-color: #2ed573; }
    .dot-ins { background-color: #f5a623; }
    .dot-tax { background-color: #ff4757; }
    
    /* Breakdown Table */
    .tax-breakdown-table {
      width: 100%; border-collapse: collapse; margin-top: 20px; border: 1px solid var(--border2); border-radius: 8px; overflow: hidden;
    }
    .b-row { display: flex; border-bottom: 1px solid var(--border2); padding: 12px 16px; font-size: 14px; }
    .b-row:last-child { border-bottom: none; }
    .b-header { background: var(--bg); font-weight: 700; color: var(--text2); }
    .b-main { font-weight: 700; color: var(--text); background: rgba(0,0,0,0.1); }
    .b-col-name { flex: 1; }
    .b-col-val { font-weight: 600; }

    .help-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.2);
      color: inherit;
      font-size: 11px;
      font-weight: bold;
      cursor: help;
      margin-left: 5px;
    }
    html[data-theme="light"] .help-icon {
      background: rgba(0, 0, 0, 0.1);
    }

    /* Footer */
    .site-footer {
      width: 100%; margin-top: 60px; padding: 30px 20px;
      border-top: 1px solid var(--border); background: rgba(11,18,32,0.8);
      backdrop-filter: blur(10px); text-align: center;
      color: var(--text2); font-size: 12px; line-height: 1.6;
    }
    html[data-theme="light"] .site-footer { background: rgba(255,255,255,0.85); }
    .site-footer .footer-content { max-width: 800px; margin: 0 auto; }
    .site-footer strong { color: var(--text); font-weight: 700; }
    .site-footer p { margin-bottom: 8px; }
    .site-footer .footer-copyright { margin-top: 16px; opacity: 0.7; }

    /* Responsive adjustments for top buttons overlapping header */
    @media (max-width: 768px) {
      .header {
        margin-top: 40px;
      }
      .title {
        font-size: 28px;
      }
    }

    /* Standardized Global Buttons */
    .btn-calculate-large {
      color: white;
      background: var(--blue);
      border: none;
      padding: 15px 40px;
      font-size: 15px;
      font-weight: 700;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s;
      box-shadow: 0 4px 15px rgba(0,0,0,0.1);
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .btn-calculate-large:hover {
      filter: brightness(1.1);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }

    .btn-reset-large {
      color: var(--text);
      background: transparent;
      border: 2px solid var(--border2);
      padding: 13px 30px;
      font-size: 15px;
      font-weight: 700;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .btn-reset-large:hover {
      border-color: var(--text2);
      color: var(--text2);
      transform: translateY(-2px);
    }
