/* =====================================================================
   BENDRA
   ===================================================================== */
:root {
    --navy: #0b1b33;
    --navy-2: #13294b;
    --blue: #1f6feb;
    --blue-dark: #1558c4;
    --accent: #ffb020;
    --green: #1f9d55;
    --green-dark: #17834a;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f5f7fb;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    background-color: var(--bg);
    margin: 0;
    padding: 20px;
    color: var(--text);
    line-height: 1.5;
}
/* Pradinis puslapis – per visą plotį, be paraščių */
body[data-page="search"] { padding: 0; background: #fff; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }

.container {
    max-width: 760px;
    margin: 40px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

h1 { font-size: 22px; margin: 0 0 5px 0; }
h2 { font-size: 17px; margin: 0 0 6px 0; color: #111; }
h3 { font-size: 15px; margin: 20px 0 10px 0; color: #111; }
.subtitle { color: #666; font-size: 14px; margin: 0 0 20px 0; }
.muted { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
code { font-family: Consolas, monospace; background: #eef2f7; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* =====================================================================
   MYGTUKAI
   ===================================================================== */
button {
    padding: 12px 20px;
    background-color: var(--blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
button:hover { background-color: var(--blue-dark); }
button:disabled { background-color: #b8c2cc; cursor: not-allowed; }

.btn-secondary {
    background: #eef2f7;
    color: var(--blue);
    padding: 8px 14px;
    font-size: 13px;
}
.btn-secondary:hover { background: #dde6f0; }

.btn-link, .btn-primary, .btn-outline, .btn-ghost {
    display: inline-block;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--blue); color: #fff; padding: 11px 18px; font-size: 14px; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { border: 2px solid var(--blue); color: var(--blue); padding: 9px 16px; font-size: 14px; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-ghost { color: #dbe6f7; padding: 8px 12px; font-size: 14px; }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

.btn-buy { background: var(--green); padding: 9px 14px; font-size: 14px; width: 100%; }
.btn-buy:hover { background: var(--green-dark); }

/* =====================================================================
   VIRŠUTINĖ JUOSTA
   ===================================================================== */
.site-header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 900;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; font-weight: 700; font-size: 18px; }
.logo-icon { width: 30px; height: 30px; flex-shrink: 0; display: block; }
.logo-text { letter-spacing: -0.2px; }
.logo-text b { color: var(--accent); font-weight: 700; }

.main-nav { display: flex; gap: 4px; margin-left: 12px; }
.main-nav a { color: #b8c7de; text-decoration: none; font-size: 14px; padding: 8px 12px; border-radius: 6px; }
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* =====================================================================
   HERO + PAIEŠKA
   ===================================================================== */
.hero {
    background:
        radial-gradient(1000px 400px at 85% -10%, rgba(31, 111, 235, 0.35), transparent 60%),
        radial-gradient(700px 300px at 0% 110%, rgba(255, 176, 32, 0.12), transparent 60%),
        linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
    padding: 64px 0 72px;
}
.hero-inner { text-align: center; }
.eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(255, 176, 32, 0.1);
    border: 1px solid rgba(255, 176, 32, 0.3);
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 18px;
}
.hero h1 {
    font-size: clamp(28px, 4.5vw, 44px);
    line-height: 1.15;
    margin: 0 auto 16px;
    max-width: 800px;
    color: #fff;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub { color: #c3d0e4; font-size: 17px; max-width: 640px; margin: 0 auto 32px; }

.search-card {
    background: #fff;
    color: var(--text);
    max-width: 720px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    text-align: left;
}

.input-group { display: flex; gap: 10px; margin-bottom: 12px; }

input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    text-transform: uppercase;
    font-family: inherit;
}
.search-card input[type="text"] {
    padding: 16px 18px;
    font-size: 17px;
    letter-spacing: 0.5px;
    border: 2px solid var(--line);
}
.search-card input[type="text"]:focus { outline: none; border-color: var(--blue); }
.search-card input[type="text"]::placeholder { text-transform: none; letter-spacing: 0; color: #9ca3af; }
.search-card #searchBtn { padding: 0 32px; font-size: 16px; }

.search-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.checkbox { font-size: 13px; color: #555; display: flex; align-items: center; gap: 6px; cursor: pointer; }

.trust-row {
    list-style: none;
    padding: 0;
    margin: 26px 0 0;
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #c3d0e4;
}
.tick { color: var(--accent); font-weight: 700; margin-right: 4px; }

/* Pranešimai */
.message-box {
    padding: 10px 12px;
    background: #eef2f7;
    border-radius: 8px;
    font-size: 13px;
    color: #444;
}
.message-box.error { background: #fdecea; color: #a12622; }
.message-box.success { background: #e8f5ec; color: #1e6b34; }

/* =====================================================================
   REZULTATAI
   ===================================================================== */
.results { max-width: 820px; }
.results > .panel:first-child { margin-top: 28px; }
.results .panel { scroll-margin-top: 80px; }

.panel {
    margin-top: 18px;
    background: #f8f9fa;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
}
body[data-page="search"] .panel { background: #fff; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06); }

/* Kelių rezultatų kortelės */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
.select-card {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}
.select-card:hover { transform: translateY(-3px); border-color: var(--blue); }
.select-card img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; background: #ddd; }
.select-card h4 { font-size: 14px; margin: 6px 0 4px 0; color: #111; }
.card-domain { font-size: 12px; font-weight: bold; color: var(--blue); text-transform: uppercase; margin-top: 6px; }

/* Automobilio antraštė */
.vehicle-header {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #ddd;
}
.vehicle-header img {
    width: 160px;
    height: 105px;
    object-fit: cover;
    border-radius: 8px;
    background: #ddd;
    flex-shrink: 0;
}

/* Testinio VIN žymė */
.test-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e8f5ec;
    color: #1e6b34;
    font-size: 11px;
    font-weight: bold;
}

/* Aukciono informacija */
.specs-list { list-style: none; padding: 0; margin: 0; font-size: 13px; background: #fff; border-radius: 8px; border: 1px solid #e1e8ed; }
.specs-list li { padding: 8px 12px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; gap: 15px; }
.specs-list li:last-child { border-bottom: none; }
.specs-list li span:first-child { color: #666; }
.specs-list li span:last-child { font-weight: bold; text-align: right; }
.reserve-row span:last-child { color: var(--blue); }
.hint { display: block; font-weight: normal; color: #888; font-size: 11px; }

/* Ataskaitų kortelės */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.report-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.report-card.empty { opacity: 0.6; }
.report-card strong { font-size: 15px; }

/* Nupirkta ataskaita ir istorija */
.report-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.report-links a {
    display: inline-block;
    padding: 9px 14px;
    background: var(--blue);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}
.report-links a:hover { background: var(--blue-dark); }
.report-warning {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #fff4e5;
    color: #8a4b00;
    font-size: 13px;
}

/* =====================================================================
   SEKCIJOS: KAIP VEIKIA, KĄ GAUNATE, KAINOS, DUK
   ===================================================================== */
.section { padding: 72px 0; }
.section-alt { background: var(--bg); }
.section-title { font-size: 28px; text-align: center; margin: 0 0 8px; color: var(--navy); }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 40px; max-width: 600px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { text-align: center; padding: 10px 16px; }
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--accent);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 32px; }
.feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 20px;
}
.feature-icon { font-size: 26px; margin-bottom: 8px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* Kainos */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.price-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
}
.price-card.featured {
    border: 2px solid var(--blue);
    box-shadow: 0 16px 40px rgba(31, 111, 235, 0.15);
    transform: translateY(-6px);
}
.price-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--blue);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}
.price-card h3 { margin: 0; font-size: 19px; }
.price-desc { margin: 4px 0 16px; color: var(--muted); font-size: 14px; }
.price { display: flex; flex-direction: column; margin-bottom: 18px; }
.price-num { font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.price-unit { font-size: 13px; color: var(--muted); }
.price-list { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.price-list li { padding: 6px 0 6px 24px; position: relative; font-size: 14px; }
.price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* DUK */
.faq {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 0 18px;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    padding: 16px 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 20px; line-height: 1; }
.faq[open] summary::after { content: "−"; }
.faq p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

/* Apačia */
.site-footer { background: var(--navy); color: #c3d0e4; padding: 24px 0; font-size: 13px; }
.site-footer .muted { color: #8796ae; font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* =====================================================================
   ADMIN PUSLAPIAI (admin.html, history.html)
   ===================================================================== */
.page-nav { margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #eef2f7;
    color: var(--blue);
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}
.btn-home:hover { background: #dde6f0; }

.admin-tag {
    display: inline-block;
    background: var(--navy);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}
.admin-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.admin-link {
    display: block;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    background: #fff;
}
.admin-link:hover { border-color: var(--blue); }
.admin-link strong { display: block; color: var(--navy); margin-bottom: 4px; }

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}
.history-item:last-child { border-bottom: none; }
.history-item a { color: var(--blue); margin-left: 10px; font-weight: bold; }
.history-title { font-size: 14px; font-weight: bold; color: #111; margin-bottom: 2px; }

/* Balanso valdiklis + meniu (tik admin) */
.balance-wrap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}
.balance-widget {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 4px;
}
.balance-widget:hover { background: #f8fafc; }
.balance-widget[aria-expanded="true"] { border-color: var(--blue); }
.balance-widget .caret { font-size: 11px; color: #888; margin-left: 4px; transition: transform 0.15s; }
.balance-widget[aria-expanded="true"] .caret { transform: rotate(180deg); }
#balanceAmount { color: #28a745; }

.balance-widget.low { border-color: #e0a100; background: #fff8e6; }
.balance-widget.low #balanceAmount { color: #c0392b; }
.balance-widget.low::before { content: "⚠"; margin-right: 4px; color: #c08000; }
.low-balance-note {
    font-size: 12px;
    color: #8a4b00;
    background: #fff4e5;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 4px;
}

.balance-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 200px;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 6px;
    display: flex;
    flex-direction: column;
    animation: popIn 0.12s ease-out;
}
.balance-menu button {
    background: transparent;
    color: #333;
    text-align: left;
    font-size: 14px;
    font-weight: normal;
    padding: 9px 12px;
    border-radius: 6px;
}
.balance-menu button:hover,
.balance-menu button:focus-visible { background: #eef2f7; color: var(--blue); outline: none; }

/* Admin juosta viešame puslapyje (tik prisijungus) */
.admin-bar { background: #fff4e5; border-bottom: 1px solid #f5d29a; color: #8a4b00; font-size: 13px; }
.admin-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; flex-wrap: wrap; }
.admin-bar-actions { display: flex; align-items: center; gap: 12px; }
.admin-bar a { color: #8a4b00; font-weight: 600; }
.admin-bar button { background: #8a4b00; padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.admin-bar button:hover { background: #6e3c00; }

/* =====================================================================
   PRISIJUNGIMAS, REGISTRACIJA, SLAPTAŽODIS, PASKYRA
   ===================================================================== */
body.auth-page {
    padding: 0;
    min-height: 100vh;
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(31, 111, 235, 0.35), transparent 60%),
        linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
    background-attachment: fixed;
}
.auth-top {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-top {
    background: rgba(255, 255, 255, 0.1);
    color: #dbe6f7;
    padding: 8px 14px;
    font-size: 14px;
}
.btn-top:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

.auth-card {
    background: #fff;
    max-width: 420px;
    margin: 30px auto 60px;
    padding: 32px 30px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.auth-card-wide { max-width: 560px; }
.auth-card h1 { font-size: 24px; color: var(--navy); margin-bottom: 6px; }
.auth-card .message-box { margin-top: 4px; }
.auth-card #welcomeBox { margin: 0 0 18px; }

.auth-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.auth-form label { font-size: 13px; font-weight: 600; color: #444; margin-top: 10px; }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    padding: 12px 14px;
    border: 1px solid #cfd6df;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    text-transform: none;
    width: 100%;
}
.auth-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15); }
.auth-form button { margin-top: 16px; width: 100%; }
.form-hint { font-size: 12px; color: var(--muted); min-height: 0; }
.form-hint.ok { color: var(--green); }
.form-hint.bad { color: #c0392b; }
.form-row-end { text-align: right; font-size: 13px; margin-top: 4px; }
.form-row-end a, .auth-switch a { color: var(--blue); text-decoration: none; font-weight: 600; }
.form-row-end a:hover, .auth-switch a:hover { text-decoration: underline; }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); margin: 20px 0 0; }

/* Paskyra */
.account-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.stat {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.stat-value.stat-small { font-size: 17px; padding-top: 8px; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.btn-disabled {
    display: inline-block;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    background: #eef2f7;
    color: #94a3b8;
    cursor: not-allowed;
}
.account-section { background: var(--bg); }
.account-section .auth-form { margin-bottom: 12px; }
.account-section .message-box { margin-bottom: 16px; }

/* Prisijungęs vartotojas viršutinėje juostoje */
.header-account {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #dbe6f7;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 6px 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 320px;
}
.header-account:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
#headerEmail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit-pill {
    background: var(--accent);
    color: var(--navy);
    font-weight: 700;
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .auth-card { margin: 10px 12px 40px; padding: 24px 20px; }
    .account-stats { grid-template-columns: 1fr; }
    #headerEmail { display: none; }
}

/* =====================================================================
   MODALINIS LANGAS
   ===================================================================== */
body.modal-open { overflow: hidden; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
    animation: fadeIn 0.15s ease-out;
}
.modal {
    background: #fff;
    width: 100%;
    max-width: 440px;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: popIn 0.18s ease-out;
}
.modal h3 { margin: 0 0 12px 0; font-size: 17px; }
.modal-body { font-size: 14px; line-height: 1.5; color: #444; }
.modal-body p { margin: 0 0 10px 0; }
.modal-body .vin { font-family: monospace; font-size: 14px; background: #f1f5f9; padding: 1px 6px; border-radius: 4px; }

.modal-badge {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
}
.modal-badge.free { background: #e8f5ec; color: #1e6b34; border: 1px solid #b7e1c3; }
.modal-badge.warn { background: #fff4e5; color: #8a4b00; border: 1px solid #f5d29a; }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}
.modal-actions button { padding: 10px 18px; font-size: 14px; }
.modal-actions .btn-free { background: var(--green); }
.modal-actions .btn-free:hover { background: var(--green-dark); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* =====================================================================
   MOBILUS
   ===================================================================== */
@media (max-width: 900px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .pricing { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .price-card.featured { transform: none; }
}

@media (max-width: 700px) {
    .main-nav { display: none; }
    .steps { grid-template-columns: 1fr; }
    .hero { padding: 40px 0 48px; }
    .hero-sub { font-size: 15px; }
    .section { padding: 48px 0; }
}

@media (max-width: 600px) {
    .container { padding: 18px; margin-top: 70px; }
    .input-group { flex-direction: column; }
    .search-card #searchBtn { padding: 14px; }
    .features { grid-template-columns: 1fr; }
    .vehicle-header { flex-direction: column; align-items: flex-start; }
    .vehicle-header img { width: 100%; height: 180px; }
    .modal-actions { flex-direction: column-reverse; }
    .modal-actions button { width: 100%; }
    .header-actions .btn-ghost { display: none; }
}

/* =====================================================================
   NEMOKAMA VIN ATASKAITA (NHTSA) + /vin-decoder puslapis
   ===================================================================== */
body[data-page="decoder"] { padding: 0; background: #fff; }
body[data-page="decoder"] .panel { background: #fff; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06); }
.search-card #decoderBtn { padding: 0 28px; font-size: 16px; white-space: nowrap; }
.main-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.08); }

.free-report { margin-top: 18px; padding-top: 4px; border-top: 1px solid #eee; }
.free-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.decoder-head { padding-bottom: 10px; border-bottom: 1px solid #eee; margin-bottom: 4px; }
.decoder-head h2 { font-size: 20px; color: var(--navy); }

.decoder-warning {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fdecea;
    color: #a12622;
    font-size: 13px;
    font-weight: 600;
}

/* Recalls */
.recall-summary {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}
.recall-summary.ok { background: #e8f5ec; color: #1e6b34; }
.recall-summary.warn { background: #fff4e5; color: #8a4b00; }
.recall-summary.danger { background: #fdecea; color: #a12622; }
.recall-summary .hint { margin-top: 4px; }

.recall-list { display: flex; flex-direction: column; gap: 8px; }
.recall-item {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
}
.recall-item summary {
    cursor: pointer;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
}
.recall-item summary::-webkit-details-marker { display: none; }
.recall-item[open] summary { border-bottom: 1px solid #eee; margin-bottom: 8px; }
.recall-component { font-weight: 700; color: #111; }
.recall-meta { color: var(--muted); white-space: nowrap; }
.recall-item p { margin: 0 0 8px; color: #444; }
.recall-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.recall-flag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}
.recall-flag.danger { background: #a12622; color: #fff; }

.source-note { font-size: 11px; color: #94a3b8; margin: 14px 0 0; }

/* Kvietimas į aukciono patikrą /vin-decoder puslapyje */
.cta-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.cta-panel h3 { margin-top: 0; }
.cta-panel p { margin: 0; }
.cta-panel .btn-primary { white-space: nowrap; }

/* VIN struktūros lentelė */
.vin-anatomy li span:last-child { font-weight: normal; }
.vin-anatomy li span:first-child { font-weight: 600; color: var(--navy); white-space: nowrap; }

@media (max-width: 600px) {
    .search-card #decoderBtn { padding: 14px; }
    .cta-panel { flex-direction: column; align-items: stretch; }
    .recall-item summary { flex-direction: column; gap: 2px; }
    .vin-anatomy li { flex-direction: column; gap: 2px; }
    .vin-anatomy li span:last-child { text-align: left; }
}

/* =====================================================================
   VIDINIAI PUSLAPIAI: paskyra, admin, istorija
   Tokia pati viršutinė juosta kaip pradiniame + tamsi antraštė + kortelės
   ===================================================================== */
body.app-page { padding: 0; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
body.app-page main { flex: 1; }
body.app-page .panel { background: #fff; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06); }

.page-head {
    background:
        radial-gradient(900px 300px at 85% -20%, rgba(31, 111, 235, 0.35), transparent 60%),
        linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
    padding: 36px 0 64px;
}
.page-head .eyebrow { margin-bottom: 12px; }
.page-head h1 {
    font-size: clamp(24px, 3.5vw, 32px);
    color: #fff;
    margin: 0 0 6px;
    word-break: break-word;
}
.page-head p { color: #c3d0e4; margin: 0; font-size: 15px; }

/* Turinys „užlipa“ ant tamsios antraštės */
.page-body { max-width: 1100px; margin-top: -40px; padding-bottom: 56px; }
.page-body > .panel, .page-body > details.panel { margin-top: 18px; }
.page-body > .message-box { margin-bottom: 16px; }
.panel-title { margin-top: 0; font-size: 17px; color: var(--navy); }

.dash-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.dash-grid > .panel { margin-top: 0; }

.stat-card { display: flex; flex-direction: column; gap: 4px; }
.stat-card .stat-value small { font-size: 15px; font-weight: 600; color: var(--muted); }
.stat-card.low { border-color: #f5d29a; background: #fff8e6; }
.stat-card.low .stat-value { color: #c0392b; }

.dash-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s, border-color 0.15s;
}
.dash-link:hover { transform: translateY(-2px); border-color: var(--blue); }
.dash-link strong { color: var(--navy); font-size: 16px; }
.dash-link.is-disabled { opacity: 0.6; cursor: not-allowed; }
.dash-link.is-disabled:hover { transform: none; border-color: #e2e8f0; }
.dash-icon { font-size: 24px; margin-bottom: 4px; }

/* Slaptažodžio keitimas paskyroje */
details.account-section { padding: 0 18px; }
details.account-section summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--navy);
    padding: 16px 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
}
details.account-section summary::-webkit-details-marker { display: none; }
details.account-section summary::after { content: "+"; color: var(--blue); font-size: 20px; line-height: 1; }
details.account-section[open] summary::after { content: "−"; }
details.account-section .auth-form { max-width: 420px; }

/* Viršutinėje juostoje „Log out“ ir paskyros burbulas */
.site-header .btn-top { padding: 8px 14px; }
.header-account[aria-current="page"] { border-color: rgba(255, 176, 32, 0.6); }

/* Carstat balansas viršutinėje juostoje (ne plūduriuojantis) */
.site-header .balance-wrap { position: relative; top: auto; right: auto; z-index: 950; }
.site-header .balance-widget {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #dbe6f7;
    box-shadow: none;
    padding: 8px 14px;
    font-weight: 600;
}
.site-header .balance-widget:hover { background: rgba(255, 255, 255, 0.14); }
.site-header .balance-widget #balanceAmount { color: #6ee7a0; }
.site-header .balance-widget.low { background: rgba(255, 176, 32, 0.15); border-color: var(--accent); }
.site-header .balance-widget.low #balanceAmount { color: #ffb4a8; }

@media (max-width: 900px) {
    .dash-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .dash-grid { grid-template-columns: 1fr; }
    .page-head { padding: 28px 0 56px; }
    .site-header .balance-widget { font-size: 13px; padding: 7px 10px; }
}

/* =====================================================================
   APAČIA (footer) – vienoda visuose puslapiuose
   ===================================================================== */
.site-footer { padding: 48px 0 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { color: #8796ae; font-size: 13px; max-width: 300px; margin: 0; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 {
    margin: 0 0 4px;
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #fff;
}
.footer-col a { color: #b8c7de; text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 18px;
    padding-bottom: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: #8796ae;
}

/* Laikini tekstiniai puslapiai (contact, terms, privacy) */
.prose { max-width: 760px; font-size: 15px; line-height: 1.7; }
.prose p { margin: 0 0 12px; }
.prose a { color: var(--blue); }

@media (max-width: 800px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   ATASKAITOS FORMATO PASIRINKIMAS + GENERAVIMO LANGAS (loading screen)
   ===================================================================== */
.format-label { font-weight: 600; color: var(--navy); margin: 14px 0 8px !important; }
.format-choice { display: flex; flex-direction: column; gap: 8px; }
.format-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.format-option:hover { border-color: #b9cdf3; }
.format-option:has(input:checked) { border-color: var(--blue); background: #f2f7ff; }
.format-option input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; flex-shrink: 0; }
.format-text { display: flex; flex-direction: column; }
.format-text strong { color: var(--navy); font-size: 15px; }
.format-text small { color: var(--muted); font-size: 13px; }

/* „Check“ mygtukas paieškos metu */
.btn-loading { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-loading::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.search-card #searchBtn.btn-loading:disabled { background: var(--blue); opacity: 0.85; cursor: progress; }

/* Generavimo langas */
.loading-overlay { z-index: 2100; }
.loading-card { text-align: center; max-width: 420px; padding: 32px 28px 26px; }
.loading-card h3 { font-size: 19px; color: var(--navy); margin: 0 0 4px; }
.spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border: 5px solid #e3ebf8;
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
.loading-format { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.loading-step { font-size: 14px; color: var(--text); min-height: 42px; margin: 0 0 12px; }
.progress { height: 8px; background: #e9eef6; border-radius: 6px; overflow: hidden; }
.progress-bar {
    height: 100%;
    width: 0;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--blue), #5b9bff);
    transition: width 0.25s linear;
}
.loading-note { margin: 12px 0 0; font-size: 12px; }

.loading-done .done-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #e8f5ec;
    color: var(--green);
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-done.is-error .done-icon { background: #fdecea; color: #a12622; }
.loading-done #doneBody p { margin: 0 0 12px; font-size: 14px; }
.done-links { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 14px; }
.done-links a { padding: 12px 18px; font-size: 15px; }
.loading-done #doneClose { margin-top: 4px; }

/* Rezultato panelė po langu: tie patys mygtukai */
.report-links .btn-outline { background: #fff; color: var(--blue); }
.report-links .btn-outline:hover { background: var(--blue); color: #fff; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .spinner, .btn-loading::before { animation-duration: 2.5s; }
}
