* { box-sizing: border-box; }
    body { margin:0; min-height:100vh; padding:32px 18px; background:#101413; color:#f4f7f5; font-family:Arial,sans-serif; }
    main { width:min(100%,1100px); margin:0 auto; padding:clamp(22px,4vw,40px); background:#19211e; border:1px solid #2c3933; border-radius:20px; box-shadow:0 18px 60px rgba(0,0,0,.28); }
    header { text-align:center; }
    .mark { width:52px;height:52px;display:grid;place-items:center;margin:0 auto 16px;border-radius:16px;background:#00c896;color:#071b14;font-size:25px;font-weight:800; }
    h1 { margin:0 0 10px;font-size:clamp(26px,5vw,36px); }
    p { color:#aab8b0;line-height:1.55; }
    .upload-area { margin-top:28px;padding:30px 18px;text-align:center;border:1px dashed #53675d;border-radius:14px;background:#141b18; }
    .upload-icon { margin-bottom:10px;font-size:32px; }
    .upload-button,.secondary { display:inline-block;margin-top:16px;padding:13px 22px;border:0;border-radius:10px;background:#00c896;color:#062018;font-size:15px;font-weight:700;cursor:pointer; }
    .upload-button:hover,.secondary:hover { background:#19dfaa; }
    #fileInput { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%); }
    #fileName { margin-top:14px;color:#d7e5dd;overflow-wrap:anywhere; }
    .hint { margin-top:8px;font-size:12px;color:#82948a; }
    #status { margin-top:20px;padding:12px 14px;border-radius:10px;background:#202c26;color:#c6d6cc;font-size:14px; }
    #status.error { background:#3a2222;color:#ffcaca; }
    #preview { margin-top:28px; }
    .preview-head { display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px; }
    h2 { margin:0;font-size:20px; }
    .meta { color:#aab8b0;font-size:13px; }
    .chips { display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px; }
    .mapping { display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:16px 0;padding:16px;border:1px solid #34443b;border-radius:12px;background:#141b18; }
    .mapping label { display:grid;gap:7px;color:#b9c9c0;font-size:13px; }
    .mapping select { width:100%;padding:10px;border:1px solid #53675d;border-radius:8px;background:#202c26;color:#f4f7f5;font:inherit; }
    .chip { padding:7px 10px;border:1px solid #385347;border-radius:999px;color:#bcebd8;font-size:12px;background:#172820; }
    .table-wrap { width:100%;overflow:auto;border:1px solid #34443b;border-radius:12px; }
    table { width:100%;border-collapse:collapse;white-space:nowrap;font-size:13px; }
    th,td { padding:11px 13px;text-align:left;border-bottom:1px solid #2c3933; }
    th { position:sticky;top:0;background:#24332b;color:#d9f5e8;font-weight:700; }
    td { color:#d3ddd7; }
    tr:last-child td { border-bottom:0; }
    tbody tr:nth-child(even) { background:#1d2822; }
    .empty { padding:20px;text-align:center;color:#aab8b0; }
    .secondary { margin:0;background:#2c3933;color:#e5eee8;padding:9px 13px;font-size:13px; }
    .secondary:hover { background:#405247; }
    @media(max-width:600px) { body{padding:14px 9px} main{padding:20px 14px} th,td{padding:9px 10px} }

    .address-panel { margin:16px 0;padding:14px;border:1px solid #34443b;border-radius:12px;background:#141b18; }
    .address-panel p { margin:10px 0 0;color:#d7e5dd;overflow-wrap:anywhere; }
    .address-control { display:flex;align-items:center;gap:9px;color:#b9c9c0;font-size:13px; }
    .address-control input { accent-color:#00c896; }
    .blurred { filter:blur(7px); user-select:none; }
    .blurred strong { pointer-events:none; }


/* Temos perjungimas */
.header-top { display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;margin-bottom:14px; }
    .header-top .mark { margin:0;flex:0 0 52px; }
    .theme-toggle { position:static;display:inline-flex;align-items:center;gap:8px;margin:0;padding:9px 13px;box-shadow:0 2px 8px rgba(0,0,0,.12);border:1px solid #53675d;border-radius:999px;background:#202c26;color:#e4eee8;font:inherit;font-size:13px;font-weight:700;cursor:pointer; }
.theme-toggle:hover { filter:brightness(1.12); }
body[data-theme="light"] { background:#edf2ef;color:#1c2922; }
body[data-theme="light"] main { background:#fff;border-color:#d5e0d9;box-shadow:0 18px 60px rgba(27,55,39,.10); }
body[data-theme="light"] p { color:#52645a; }
body[data-theme="light"] .upload-area, body[data-theme="light"] .mapping, body[data-theme="light"] .address-panel { background:#f5f8f6;border-color:#cbd8d0; }
body[data-theme="light"] .upload-area { border-color:#aabdb1; }
body[data-theme="light"] .hint, body[data-theme="light"] .meta { color:#687b70; }
body[data-theme="light"] #fileName { color:#34483c; }
body[data-theme="light"] #status { background:#e6eee9;color:#30483a; }
body[data-theme="light"] #status.error { background:#fbe9e9;color:#9b2424; }
body[data-theme="light"] .mapping label, body[data-theme="light"] .address-control { color:#405449; }
body[data-theme="light"] .mapping select { background:#fff;border-color:#bdccc2;color:#23372b; }
body[data-theme="light"] .chip { background:#edf7f1;border-color:#b9d9c6;color:#245b3c; }
body[data-theme="light"] .table-wrap { border-color:#d2ded6; }
body[data-theme="light"] th { background:#e4eee8;color:#244a34; }
body[data-theme="light"] td { color:#304238; }
body[data-theme="light"] th, body[data-theme="light"] td { border-bottom-color:#e0e8e3; }
body[data-theme="light"] tbody tr:nth-child(even) { background:#f4f7f5; }
body[data-theme="light"] .secondary { background:#dce7e0;color:#263b2e; }
body[data-theme="light"] .secondary:hover { background:#cbdad0; }
body[data-theme="light"] .address-panel p { color:#304238; }
body[data-theme="light"] .theme-toggle { background:#fff;border-color:#c6d4cb;color:#304238; }
body[data-theme="light"] #calculator .mapping span { background:#edf3ef !important;border-color:#cbd8d0 !important;color:#405449 !important; }


/* Vartojimo profilio zonų pasiskirstymas */
.profile-panel { margin:20px 0;padding:18px;border:1px solid #34443b;border-radius:12px;background:#141b18; }
.profile-panel h2 { margin-bottom:8px; }
.profile-columns { display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:22px;margin-top:18px; }
.profile-group h3 { margin:0 0 14px;font-size:15px;color:#d9f5e8; }
.profile-row { margin:0 0 14px; }
.profile-label { display:flex;justify-content:space-between;gap:12px;margin-bottom:6px;color:#cbd9d1;font-size:13px; }
.profile-label strong { color:#f0f7f3;font-variant-numeric:tabular-nums;white-space:nowrap; }
.profile-track { height:9px;overflow:hidden;border-radius:99px;background:#2c3933; }
.profile-track span { display:block;height:100%;border-radius:99px;background:#00c896; }
.profile-total { margin:12px 0 0;font-size:12px;color:#aab8b0; }
body[data-theme="light"] .profile-panel { background:#f5f8f6;border-color:#cbd8d0; }
body[data-theme="light"] .profile-group h3, body[data-theme="light"] .profile-label strong { color:#244a34; }
body[data-theme="light"] .profile-label { color:#405449; }
body[data-theme="light"] .profile-track { background:#dce7e0; }
body[data-theme="light"] .profile-total { color:#687b70; }


/* Atsiskaitymo būdų kainų palyginimo grafikas */
.compare-heading { display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap; }
.compare-switch { display:flex;gap:5px;padding:4px;border:1px solid #405449;border-radius:10px;background:#101815; }
.compare-mode { border:0;border-radius:7px;padding:8px 11px;background:transparent;color:#b9c9c0;font:inherit;font-size:12px;cursor:pointer; }
.compare-mode.active { background:#00c896;color:#062018;font-weight:700; }
.compare-chart { display:grid;gap:15px;margin-top:20px; }
.compare-item { display:grid;gap:7px; }
.compare-label { display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#dce9e1; }
.compare-track { height:12px;overflow:hidden;border-radius:99px;background:#2c3933; }
.compare-bar { display:block;height:100%;min-width:0;border-radius:99px;background:#00c896; }
.plan-1 { background:#00c896; }.plan-2 { background:#69a7ff; }.plan-3 { background:#e9b65b; }.plan-4 { background:#c18be8; }
.month-compare { padding:12px 0;border-bottom:1px solid #34443b; }
.month-compare h3 { margin:0 0 10px;color:#d9f5e8;font-size:14px; }
.month-plan { display:grid;grid-template-columns:74px minmax(60px,1fr) 100px;align-items:center;gap:9px;margin:7px 0;font-size:12px;color:#b9c9c0; }
.month-plan strong { text-align:right;color:#f0f7f3;font-variant-numeric:tabular-nums; }
.month-plan .compare-track { height:8px; }
.compare-error { color:#d5a5a5;font-size:11px;text-align:right; }
body[data-theme="light"] .compare-switch { background:#edf3ef;border-color:#cbd8d0; }
body[data-theme="light"] .compare-mode { color:#405449; }
body[data-theme="light"] .compare-mode.active { color:#062018; }
body[data-theme="light"] .compare-label,body[data-theme="light"] .month-plan { color:#405449; }
body[data-theme="light"] .month-compare { border-bottom-color:#dbe5de; }
body[data-theme="light"] .month-compare h3,body[data-theme="light"] .month-plan strong { color:#244a34; }
body[data-theme="light"] .compare-track { background:#dce7e0; }
@media(max-width:520px){.month-plan{grid-template-columns:64px minmax(45px,1fr) 86px;gap:6px;font-size:11px}.compare-switch{width:100%}.compare-mode{flex:1}}

/* Aiškus vartojimo profilio skaičių ir matavimo vienetų atskyrimas */
.profile-label strong { display:inline-flex;align-items:baseline;gap:4px;white-space:nowrap; }
.profile-number { font-variant-numeric:tabular-nums; }
.profile-unit { font-weight:500;opacity:.82; }
.profile-separator { padding:0 3px;opacity:.7; }


/* Linijinė keturių atsiskaitymo būdų kainų diagrama */
.compare-chart { display:block; }
.compare-line-chart { display:block;width:100%;height:auto;overflow:visible; }
.chart-grid { stroke:#34443b;stroke-width:1;stroke-dasharray:3 5; }
.chart-axis { fill:#aab8b0;font-size:12px; }
.chart-line { fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round; }
.chart-point { stroke:#19211e;stroke-width:2;cursor:help; }
.chart-legend { display:flex;flex-wrap:wrap;gap:12px 20px;margin-top:12px; }
.chart-legend-item { display:inline-flex;align-items:center;gap:7px;color:#dce9e1;font-size:12px; }
.chart-legend-item i { width:10px;height:10px;border-radius:50%;display:inline-block;flex:0 0 10px; }
.chart-legend-error { color:#d5a5a5; }
body[data-theme="light"] .chart-grid { stroke:#d5e0d9; }
body[data-theme="light"] .chart-axis { fill:#53665b; }
body[data-theme="light"] .chart-point { stroke:#fff; }
body[data-theme="light"] .chart-legend-item { color:#405449; }
@media(max-width:520px){.chart-axis{font-size:10px}.chart-line{stroke-width:2.5}.chart-legend{gap:9px 13px}}

@media(max-width:520px){.theme-toggle{top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));padding:8px 11px;font-size:12px}}


/* Saugiau atskirtas failo pašalinimo veiksmas */
.clear-file-area { display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:30px;padding:16px;border:1px solid #594141;border-radius:12px;background:rgba(95,42,42,.12); }
.clear-file-area .hint { margin:0; }
.danger-button { border:1px solid #9a5a5a;background:#422b2b;color:#ffdede; }
.danger-button:hover { background:#633535; }
body[data-theme="light"] .clear-file-area { border-color:#e4caca;background:#fff7f7; }
body[data-theme="light"] .danger-button { border-color:#d6a5a5;background:#f8e7e7;color:#842d2d; }
body[data-theme="light"] .danger-button:hover { background:#f0d6d6; }

/* Patikimas sumų rodymas užvedus arba pasirinkus diagramos tašką */
.compare-chart { position:relative; }
.chart-point { pointer-events:all; }
.chart-point:focus { outline:none;stroke-width:4;filter:drop-shadow(0 0 4px rgba(0,200,150,.7)); }
.chart-tooltip { position:absolute;z-index:5;max-width:210px;padding:8px 11px;border:1px solid #6c8979;border-radius:8px;background:#101815;color:#f0f7f3;font-size:12px;font-weight:700;box-shadow:0 5px 18px rgba(0,0,0,.3);pointer-events:none; }
.chart-tooltip[hidden] { display:none; }
body[data-theme="light"] .chart-tooltip { background:#fff;border-color:#aabdb1;color:#20382b; }

/* Failo šalinimas pasiekiamas tik sąmoningai išskleidus atskirą sritį */
.clear-file-area { margin-top:30px;padding:12px 16px;border:1px solid #594141;border-radius:12px;background:rgba(95,42,42,.08);text-align:left; }
.clear-file-area summary { cursor:pointer;color:#d9aaa5;font-size:13px;font-weight:700; }
.clear-file-area[open] { padding-bottom:16px; }
.clear-file-area .hint { margin:12px 0 0; }
.clear-file-area .danger-button { margin-top:12px; }
body[data-theme="light"] .clear-file-area { border-color:#e4caca;background:#fffafa; }
body[data-theme="light"] .clear-file-area summary { color:#8b4141; }
@media(max-width:480px) {
  .theme-toggle { padding:8px 10px;font-size:12px; }
  .header-top .mark { width:46px;height:46px;flex-basis:46px; }
}

/* Mėnesio pasirinkimo plotas apima visą diagramos aukštį, kad nereikėtų pataikyti į tašką. */
.chart-month-hit { fill:transparent;stroke:transparent;cursor:crosshair;outline:none; }
.chart-month-hit:focus { stroke:rgba(120,180,255,.65);stroke-width:1; }
.chart-tooltip { white-space:pre-line;min-width:220px;max-width:260px;line-height:1.55;padding:10px 12px;border:1px solid rgba(160,180,200,.35);border-radius:9px;background:#17231f;color:#f1f5f2;box-shadow:0 8px 24px rgba(0,0,0,.3);pointer-events:none; }
body[data-theme="light"] .chart-tooltip { background:#fff;color:#24342b;border-color:#cbd8cf; }
