* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; background: #f5f5f5; color: #333; }

.container { max-width: 800px; margin: 0 auto; padding: 24px 16px; }

/* ── Topbar (chat vidinis puslapis) ──────────────────────────────────── */
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0 18px;
}
.topbar-logo { font-size: 1.2rem; font-weight: bold; color: #0066cc; }
.topbar-user { font-size: 0.88rem; color: #555; display: flex; align-items: center; gap: 10px; }
.topbar-logout { color: #c00; text-decoration: none; font-size: 0.85rem; }
.topbar-logout:hover { text-decoration: underline; }
.plan-badge {
    font-size: 0.72rem; font-weight: bold; text-transform: uppercase;
    padding: 2px 7px; border-radius: 10px; letter-spacing: .5px;
}
.plan-free  { background: #e0e0e0; color: #555; }
.plan-basic { background: #d1ecf1; color: #0c5460; }
.plan-pro   { background: #d4edda; color: #155724; }

/* ── Auth puslapiai (login / register) ───────────────────────────────── */
body.auth-page { background: #f0f4f8; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-wrap { width: 100%; max-width: 400px; padding: 16px; }
.auth-logo {
    display: block; text-align: center; font-size: 1.4rem; font-weight: bold;
    color: #0066cc; text-decoration: none; margin-bottom: 20px;
}
.auth-card {
    background: #fff; border-radius: 10px; padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.auth-card h1 { font-size: 1.3rem; margin-bottom: 20px; }
.auth-error {
    background: #fff0f0; border-left: 3px solid #c00;
    padding: 10px 14px; border-radius: 4px;
    font-size: 0.9rem; color: #c00; margin-bottom: 16px;
}
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 0.85rem; font-weight: bold; color: #555; margin-bottom: 5px; }
.auth-field label .hint { font-weight: normal; color: #999; }
.auth-field input {
    width: 100%; padding: 10px 12px; border: 1px solid #ccc;
    border-radius: 5px; font-size: 0.95rem; transition: border-color .2s;
}
.auth-field input:focus { outline: none; border-color: #0066cc; }
.auth-btn {
    width: 100%; padding: 11px; background: #0066cc; color: #fff;
    border: none; border-radius: 5px; font-size: 1rem;
    font-weight: bold; cursor: pointer; margin-top: 4px; transition: background .2s;
}
.auth-btn:hover { background: #0052a3; }
.auth-switch { margin-top: 18px; text-align: center; font-size: 0.9rem; color: #666; }
.auth-switch a { color: #0066cc; }

/* ── Landing puslapis ────────────────────────────────────────────────── */
body.landing { background: #fff; }

.nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 40px; border-bottom: 1px solid #eee;
    position: sticky; top: 0; background: #fff; z-index: 10;
}
.nav-logo { font-size: 1.2rem; font-weight: bold; color: #0066cc; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { text-decoration: none; color: #333; font-size: 0.95rem; }
.nav-cta {
    background: #0066cc; color: #fff !important; padding: 8px 18px;
    border-radius: 5px; font-weight: bold; transition: background .2s;
}
.nav-cta:hover { background: #0052a3; }

.hero { text-align: center; padding: 80px 24px 60px; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 2.2rem; line-height: 1.25; margin-bottom: 18px; color: #111; }
.hero-sub { font-size: 1.05rem; color: #555; line-height: 1.6; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
    display: inline-block; background: #0066cc; color: #fff;
    padding: 12px 28px; border-radius: 6px; text-decoration: none;
    font-weight: bold; font-size: 1rem; transition: background .2s;
}
.btn-primary:hover { background: #0052a3; }
.btn-secondary {
    display: inline-block; background: #f0f4f8; color: #0066cc;
    padding: 12px 28px; border-radius: 6px; text-decoration: none;
    font-weight: bold; font-size: 1rem; border: 1px solid #d0dbe8; transition: background .2s;
}
.btn-secondary:hover { background: #e0e9f5; }

.features { background: #f8fafc; padding: 60px 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto; }
.feature-card { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; font-size: 1rem; }
.feature-card p { font-size: 0.9rem; color: #555; line-height: 1.5; }

.how { text-align: center; padding: 60px 24px; }
.how h2 { font-size: 1.5rem; margin-bottom: 36px; }
.how-steps { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.how-step { background: #f0f4f8; border-radius: 8px; padding: 20px 24px; max-width: 200px; }
.step-num { display: inline-flex; width: 32px; height: 32px; background: #0066cc; color: #fff; border-radius: 50%; align-items: center; justify-content: center; font-weight: bold; margin-bottom: 10px; }
.how-step p { font-size: 0.9rem; color: #444; line-height: 1.4; }
.how-arrow { font-size: 1.4rem; color: #aaa; }

.plans { background: #f8fafc; padding: 60px 24px; text-align: center; }
.plans h2 { font-size: 1.5rem; margin-bottom: 36px; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: 780px; margin: 0 auto; }
.plan-card { background: #fff; border-radius: 10px; padding: 28px 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); position: relative; }
.plan-featured { border: 2px solid #0066cc; }
.plan-badge-top { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #0066cc; color: #fff; font-size: 0.75rem; padding: 3px 12px; border-radius: 10px; white-space: nowrap; }
.plan-name { font-size: 1.1rem; font-weight: bold; margin-bottom: 6px; }
.plan-price { font-size: 1.8rem; font-weight: bold; color: #0066cc; margin-bottom: 16px; }
.plan-price span { font-size: 0.9rem; color: #888; font-weight: normal; }
.plan-card ul { list-style: none; text-align: left; margin-bottom: 20px; }
.plan-card li { font-size: 0.88rem; color: #444; padding: 4px 0; }
.plan-card li::before { content: '✓ '; color: #0066cc; font-weight: bold; }

.footer { text-align: center; padding: 30px; font-size: 0.85rem; color: #999; border-top: 1px solid #eee; }
.footer a { color: #999; }

h1 { font-size: 1.6rem; margin-bottom: 4px; }
.subtitle { color: #666; margin-bottom: 24px; font-size: 0.95rem; }

/* Chat */
.chat-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}
.chat-messages {
    min-height: 300px;
    max-height: 420px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.msg { max-width: 80%; padding: 10px 14px; border-radius: 16px; font-size: 0.95rem; line-height: 1.45; }
.msg.user { align-self: flex-end; background: #0066cc; color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: #f0f0f0; color: #333; border-bottom-left-radius: 4px; }
.msg.system { align-self: center; background: #fff3cd; color: #856404; font-size: 0.85rem; padding: 6px 12px; border-radius: 8px; }

/* Typing indicator */
.msg.typing { align-self: flex-start; background: #f0f0f0; border-bottom-left-radius: 4px; padding: 12px 16px; }
.typing-dots { display: flex; gap: 5px; align-items: center; height: 16px; }
.typing-dots span {
    display: block; width: 7px; height: 7px;
    background: #999; border-radius: 50%;
    animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%            { transform: translateY(-5px); opacity: 1; }
}

.chat-input { display: flex; border-top: 1px solid #ddd; }
.chat-input textarea {
    flex: 1; border: none; padding: 12px; font-size: 0.95rem;
    resize: none; font-family: inherit; outline: none;
}
.chat-input button {
    padding: 0 20px; background: #0066cc; color: #fff;
    border: none; cursor: pointer; font-size: 0.95rem; font-weight: bold;
}
.chat-input button:hover { background: #0052a3; }
.chat-input button:disabled { background: #aaa; cursor: default; }

/* Progress */
.progress-bar-wrap { background: #e9ecef; border-radius: 4px; height: 8px; margin: 8px 0; }
.progress-bar { height: 8px; background: #0066cc; border-radius: 4px; transition: width 0.3s; }
.progress-text { font-size: 0.85rem; color: #666; margin-bottom: 8px; }

/* Results */
.results-box { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 16px; margin-bottom: 24px; }
.results-box h3 { margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: #343a40; color: #fff; padding: 8px; text-align: left; }
td { padding: 8px; border-bottom: 1px solid #eee; }
tr.best td { background: #d4edda; }
a { color: #0066cc; }

/* Form toggle */
.form-toggle { margin-bottom: 8px; }
.form-toggle button {
    background: none; border: none; color: #0066cc;
    cursor: pointer; font-size: 0.9rem; text-decoration: underline; padding: 0;
}
.form-wrap { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 20px; display: none; }
.form-wrap.open { display: block; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 0.85rem; font-weight: bold; margin-bottom: 4px; color: #555; }
.form-row input, .form-row select, .form-row textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #ccc;
    border-radius: 4px; font-size: 0.95rem; font-family: inherit;
}
.form-row textarea { height: 72px; resize: vertical; }
.form-row .hint { font-size: 0.8rem; color: #888; margin-top: 3px; }
.form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-submit {
    width: 100%; padding: 10px; background: #0066cc; color: #fff;
    border: none; border-radius: 4px; font-size: 1rem;
    font-weight: bold; cursor: pointer;
}
.btn-submit:hover { background: #0052a3; }
.error-msg { color: #dc3545; font-size: 0.9rem; margin-top: 8px; }

/* ══════════════════════════════════════════════════════════
   Chat — naujas dizainas
══════════════════════════════════════════════════════════ */

body.chat-app {
    font-family: 'Inter', sans-serif;
    background: #dde3ec;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
    color: #0f172a;
}
@media (max-width: 1400px) {
    body.chat-app { background: #f8fafc; }
    body.chat-app .app { box-shadow: none; }
}
@media (max-width: 900px) {
    body.chat-app .right-panel { display: none; }
}
@media (max-width: 640px) {
    body.chat-app .sidebar { display: none; }
}

/* Kintamieji */
body.chat-app {
    --sky:     #0ea5e9;
    --sky-l:   #e0f2fe;
    --sky-ll:  #f0f9ff;
    --indigo:  #6366f1;
    --green:   #16a34a;
    --green-l: #dcfce7;
    --amber:   #d97706;
    --amber-l: #fef3c7;
    --bg:      #f8fafc;
    --surface: #ffffff;
    --border:  #e2e8f0;
    --border2: #cbd5e1;
    --text:    #0f172a;
    --text2:   #475569;
    --text3:   #94a3b8;
}

/* ── App shell ─────────────────────────────────────────── */
.app {
    width: 100%;
    max-width: 1400px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
    box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 8px 40px rgba(0,0,0,.12);
}

/* ── Topbar ────────────────────────────────────────────── */
.app .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.app .logo {
    display: flex; align-items: center; gap: 9px;
    font-size: 1rem; font-weight: 700; color: var(--text);
    text-decoration: none;
}
.app .logo-mark {
    width: 32px; height: 32px; border-radius: 9px;
    background: linear-gradient(135deg, var(--sky) 0%, var(--indigo) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; color: #fff;
    box-shadow: 0 2px 8px rgba(14,165,233,.35);
}
.app .topbar-center {
    display: flex; align-items: center; gap: 6px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 20px; padding: 5px 14px;
    font-size: .82rem; color: var(--text2);
}
.app .topbar-center .dim { color: var(--text3); }
.app .topbar-right { display: flex; align-items: center; gap: 10px; }
.app .avatar-btn {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo), var(--sky));
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; color: #fff;
    border: none; cursor: default;
}
.app .plan-tag {
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
    padding: 3px 8px; border-radius: 6px; letter-spacing: .4px;
    background: var(--sky-l); color: var(--sky); border: 1px solid #bae6fd;
}
.app .plan-tag.plan-basic { background: #ede9fe; color: var(--indigo); border-color: #c4b5fd; }
.app .plan-tag.plan-pro   { background: var(--green-l); color: var(--green); border-color: #bbf7d0; }
.app .btn-out {
    font-size: .8rem; color: var(--text3); text-decoration: none;
    padding: 5px 10px; border-radius: 7px; border: 1px solid var(--border);
    transition: all .18s;
}
.app .btn-out:hover { color: var(--text); border-color: var(--border2); background: var(--bg); }

/* ── Layout ────────────────────────────────────────────── */
.app .layout { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar ───────────────────────────────────────────── */
.app .sidebar {
    width: 240px; flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.app .sidebar-top { padding: 12px 10px 8px; }
.app .btn-new {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; padding: 9px;
    background: linear-gradient(135deg, var(--sky), var(--indigo));
    border: none; border-radius: 9px; color: #fff;
    font-size: .84rem; font-weight: 600; cursor: pointer;
    transition: opacity .18s;
    box-shadow: 0 2px 8px rgba(14,165,233,.25);
    font-family: inherit;
}
.app .btn-new:hover { opacity: .88; }
.app .sidebar-label {
    font-size: .68rem; font-weight: 700; color: var(--text3);
    text-transform: uppercase; letter-spacing: .5px;
    padding: 10px 14px 5px;
}
.app .jobs { flex: 1; overflow-y: auto; padding: 0 8px 8px; }
.app .jobs::-webkit-scrollbar { width: 4px; }
.app .jobs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.app .job-card {
    padding: 9px 10px;
    border-radius: 9px; cursor: pointer;
    transition: background .15s; margin-bottom: 2px;
    display: flex; align-items: flex-start; gap: 9px;
}
.app .job-card:hover  { background: var(--bg); }
.app .job-card.active { background: var(--sky-ll); }
.app .job-icon {
    width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: .8rem;
}
.app .job-icon.c-blue  { background: var(--sky-l); }
.app .job-icon.c-green { background: var(--green-l); }
.app .job-icon.c-amber { background: var(--amber-l); }
.app .job-icon.c-gray  { background: #f1f5f9; }
.app .job-info { flex: 1; min-width: 0; }
.app .job-route { font-size: .83rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app .job-date  { font-size: .72rem; color: var(--text3); margin-top: 1px; }
.app .job-badge {
    font-size: .67rem; font-weight: 600; padding: 2px 7px; border-radius: 5px;
    margin-top: 3px; display: inline-block;
}
.app .b-blue  { background: var(--sky-l);   color: var(--sky); }
.app .b-green { background: var(--green-l); color: var(--green); }
.app .b-amber { background: var(--amber-l); color: var(--amber); }
.app .b-gray  { background: #f1f5f9; color: var(--text3); }
.app .jobs-empty {
    padding: 20px 14px; text-align: center;
    font-size: .78rem; color: var(--text3); line-height: 1.5;
}

/* ── Chat area ─────────────────────────────────────────── */
.app .chat-wrap {
    flex: 1; display: flex; flex-direction: column;
    overflow: hidden; background: var(--bg);
    position: relative; min-width: 0;
}
.app .chat-wrap::before {
    content: '';
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(14,165,233,.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99,102,241,.03) 0%, transparent 50%);
}
.app .messages {
    flex: 1; overflow-y: auto; padding: 24px 24px;
    display: flex; flex-direction: column; gap: 16px;
    position: relative; z-index: 1;
}
.app .messages::-webkit-scrollbar { width: 5px; }
.app .messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Žinutės ───────────────────────────────────────────── */
.app .msg-row {
    display: flex; gap: 10px;
    max-width: 580px;
}
.app .msg-row.ai   { align-self: flex-start; }
.app .msg-row.user { align-self: flex-end; flex-direction: row-reverse; }
.app .msg-av {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700; margin-top: 2px;
}
.app .msg-row.ai   .msg-av { background: linear-gradient(135deg, var(--sky), var(--indigo)); color: #fff; box-shadow: 0 2px 6px rgba(14,165,233,.3); }
.app .msg-row.user .msg-av { background: var(--border); color: var(--text2); }
.app .msg-body { display: flex; flex-direction: column; gap: 3px; }
.app .msg-name { font-size: .7rem; color: var(--text3); padding: 0 4px; }
.app .msg-row.user .msg-name { text-align: right; }
.app .bubble {
    padding: 11px 15px;
    border-radius: 16px;
    font-size: .88rem; line-height: 1.65;
    white-space: pre-wrap; word-break: break-word;
}
.app .msg-row.ai .bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top-left-radius: 4px;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.app .msg-row.user .bubble {
    background: linear-gradient(135deg, var(--sky) 0%, #38bdf8 100%);
    border-top-right-radius: 4px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(14,165,233,.3);
}

/* Sisteminė žinutė */
.app .sys-msg {
    align-self: center;
    display: flex; align-items: center; gap: 7px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 5px 14px;
    font-size: .77rem; color: var(--text3);
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.app .sys-msg.ok { background: var(--green-l); border-color: #bbf7d0; color: var(--green); }
.app .sys-msg.err { background: #fee2e2; border-color: #fecaca; color: #dc2626; }

/* Typing */
.app .typing-row { display: flex; gap: 10px; align-self: flex-start; }
.app .typing-bubble {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; border-top-left-radius: 4px;
    padding: 12px 15px; display: flex; align-items: center; gap: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.app .typing-bubble span {
    width: 7px; height: 7px; background: var(--text3); border-radius: 50%;
    animation: tb2 1.2s infinite ease-in-out;
}
.app .typing-bubble span:nth-child(2) { animation-delay: .2s; }
.app .typing-bubble span:nth-child(3) { animation-delay: .4s; }
@keyframes tb2 {
    0%,60%,100% { transform: translateY(0); opacity: .35; }
    30%          { transform: translateY(-5px); opacity: 1; }
}

/* Progreso kortelė čate */
.app .progress-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 16px;
    align-self: flex-start; min-width: 260px; max-width: 360px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.app .progress-card-title {
    font-size: .78rem; font-weight: 600; color: var(--text2);
    margin-bottom: 10px; display: flex; align-items: center; gap: 7px;
}
.app .spinner {
    width: 12px; height: 12px; border: 2px solid var(--border);
    border-top-color: var(--sky); border-radius: 50%;
    animation: spin2 .7s linear infinite; flex-shrink: 0;
}
@keyframes spin2 { to { transform: rotate(360deg); } }
.app .prog-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.app .prog-fill  { height: 4px; background: linear-gradient(90deg, var(--sky), var(--indigo)); border-radius: 2px; transition: width .4s; }

/* Rezultatų kortelės čate */
.app .results-wrap { align-self: flex-start; width: 100%; max-width: 560px; margin-top: 4px; }
.app .results-head {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: var(--text3); margin-bottom: 8px; padding-left: 2px;
}
.app .result-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; margin-bottom: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    display: flex;
}
.app .result-card.best { border-color: #818cf8; box-shadow: 0 0 0 1px #818cf8, 0 2px 8px rgba(99,102,241,.12); }
.app .rc-strip { width: 4px; flex-shrink: 0; }
.app .result-card.best  .rc-strip { background: linear-gradient(180deg, var(--sky), var(--indigo)); }
.app .result-card.r2    .rc-strip { background: var(--green); }
.app .result-card.r-other .rc-strip { background: var(--border2); }
.app .rc-body { flex: 1; padding: 12px 14px; display: flex; align-items: center; gap: 14px; }
.app .rc-source { font-size: .82rem; font-weight: 700; color: var(--text); width: 84px; flex-shrink: 0; }
.app .rc-info { flex: 1; font-size: .78rem; color: var(--text2); line-height: 1.5; }
.app .rc-direct { color: var(--green); font-weight: 500; }
.app .rc-price-col { text-align: right; flex-shrink: 0; }
.app .rc-price { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.app .result-card.best .rc-price { color: var(--indigo); }
.app .rc-book {
    display: inline-block; margin-top: 4px; padding: 3px 10px;
    font-size: .72rem; font-weight: 600; border-radius: 6px;
    text-decoration: none; border: none; cursor: pointer; font-family: inherit;
}
.app .result-card.best .rc-book {
    background: linear-gradient(135deg, var(--sky), var(--indigo));
    color: #fff;
}
.app .rc-book-plain {
    background: var(--bg); border: 1px solid var(--border2); color: var(--text2);
}
.app .best-badge {
    font-size: .63rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
    padding: 1px 6px; border-radius: 4px;
    background: linear-gradient(135deg, var(--sky), var(--indigo));
    color: #fff; margin-bottom: 3px; display: inline-block;
}

/* ── Input zona ────────────────────────────────────────── */
.app .input-zone {
    padding: 10px 24px 18px;
    background: var(--bg);
    position: relative; z-index: 2;
}
.app .form-toggle-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text3); font-size: .77rem; font-family: inherit;
    padding: 5px 12px; border-radius: 8px; cursor: pointer;
    margin-bottom: 8px; transition: all .15s;
}
.app .form-toggle-btn:hover { color: var(--text2); border-color: var(--border2); }
.app .manual-form {
    display: none;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px; margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.app .manual-form.open { display: block; }
.app .form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.app .ff label {
    display: block; font-size: .7rem; font-weight: 600; color: var(--text3);
    margin-bottom: 3px; text-transform: uppercase; letter-spacing: .4px;
}
.app .ff input, .app .ff select {
    width: 100%; background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-size: .83rem; padding: 6px 9px;
    border-radius: 7px; outline: none; font-family: inherit; transition: border-color .15s;
}
.app .ff input:focus, .app .ff select:focus { border-color: var(--sky); background: #fff; }
.app .form-submit {
    width: 100%; padding: 8px;
    background: linear-gradient(135deg, var(--sky), var(--indigo));
    border: none; border-radius: 8px; color: #fff;
    font-size: .86rem; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: opacity .15s;
}
.app .form-submit:hover { opacity: .88; }
.app .form-error { font-size: .78rem; color: #dc2626; margin-top: 6px; }
.app .input-box {
    display: flex; align-items: flex-end; gap: 9px;
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: 16px; padding: 9px 9px 9px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06); transition: border-color .2s;
}
.app .input-box:focus-within { border-color: var(--sky); box-shadow: 0 2px 10px rgba(14,165,233,.15); }
.app .input-box textarea {
    flex: 1; border: none; outline: none; background: none;
    font-family: inherit; font-size: .88rem; color: var(--text);
    resize: none; max-height: 120px; line-height: 1.5;
}
.app .input-box textarea::placeholder { color: var(--text3); }
.app .send-btn {
    width: 36px; height: 36px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--sky), var(--indigo));
    border: none; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #fff; transition: opacity .15s;
    box-shadow: 0 2px 8px rgba(14,165,233,.35);
}
.app .send-btn:hover    { opacity: .85; }
.app .send-btn:disabled { opacity: .4; cursor: default; }
.app .input-hint { font-size: .71rem; color: var(--text3); text-align: center; margin-top: 6px; }

/* ── Right Panel ───────────────────────────────────────── */
.app .right-panel {
    width: 268px; flex-shrink: 0;
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.app .right-panel::-webkit-scrollbar { width: 4px; }
.app .right-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.app .rp-section {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.app .rp-section:last-child { border-bottom: none; }
.app .rp-title {
    font-size: .67rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: var(--text3); margin-bottom: 10px;
}
.app .rp-card {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 10px; padding: 11px;
}
.app .rp-empty {
    font-size: .78rem; color: var(--text3); line-height: 1.5; text-align: center;
    padding: 8px 0;
}
.app .rp-route { font-size: .97rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.app .rp-meta  { font-size: .75rem; color: var(--text2); line-height: 1.7; }
.app .rp-meta span { color: var(--text3); }
.app .rp-status {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .71rem; font-weight: 600; padding: 3px 10px;
    border-radius: 20px; margin-top: 8px;
}
.app .rp-status.running { background: var(--sky-l); color: var(--sky); border: 1px solid #bae6fd; }
.app .rp-status.done    { background: var(--green-l); color: var(--green); border: 1px solid #bbf7d0; }
.app .stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; border-bottom: 1px solid #f1f5f9; font-size: .81rem;
}
.app .stat-row:last-child { border-bottom: none; }
.app .stat-label { color: var(--text2); }
.app .stat-val   { font-weight: 600; color: var(--text); }
.app .stat-val.green { color: var(--green); }
.app .plan-box {
    background: linear-gradient(135deg, var(--sky-ll), #eff6ff);
    border: 1px solid #bae6fd; border-radius: 10px; padding: 12px;
    text-align: center;
}
.app .plan-name  { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--sky); margin-bottom: 5px; }
.app .plan-name.plan-basic { color: var(--indigo); }
.app .plan-name.plan-pro   { color: var(--green); }
.app .plan-limit { font-size: .75rem; color: var(--text2); margin-bottom: 8px; line-height: 1.5; }
.app .plan-usage-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.app .plan-usage-fill { height: 4px; border-radius: 2px; background: var(--sky); }
.app .btn-upgrade {
    display: block; width: 100%; padding: 7px; border: none; border-radius: 7px; cursor: pointer;
    background: linear-gradient(135deg, var(--sky), var(--indigo));
    color: #fff; font-size: .77rem; font-weight: 600; font-family: inherit;
    transition: opacity .15s; box-shadow: 0 2px 6px rgba(14,165,233,.25);
    text-decoration: none;
}
.app .btn-upgrade:hover { opacity: .88; }
.app .btn-noupgrade {
    font-size: .75rem; color: var(--text3); text-align: center; margin-top: 4px; display: block;
}
.app .setting-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0; border-bottom: 1px solid #f1f5f9; font-size: .81rem;
}
.app .setting-row:last-child { border-bottom: none; }
.app .setting-label { color: var(--text2); }
.app .toggle {
    width: 32px; height: 17px; border-radius: 9px; cursor: pointer;
    border: none; position: relative; transition: background .2s; flex-shrink: 0;
}
.app .toggle.on  { background: var(--sky); }
.app .toggle.off { background: var(--border2); }
.app .toggle::after {
    content: ''; position: absolute; top: 2px; width: 13px; height: 13px;
    background: #fff; border-radius: 50%; transition: left .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.app .toggle.on::after  { left: 17px; }
.app .toggle.off::after { left: 2px; }
.app .tip-box {
    background: var(--amber-l); border: 1px solid #fde68a;
    border-radius: 10px; padding: 11px 12px;
    font-size: .77rem; color: #92400e; line-height: 1.55;
}
.app .tip-box strong { display: block; margin-bottom: 2px; font-size: .72rem; text-transform: uppercase; letter-spacing: .4px; }
