*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:       #6366f1;
    --primary-h:     #4f46e5;
    --primary-light: rgba(99,102,241,.15);
    --primary-border:rgba(99,102,241,.30);
    --bg:            #0f172a;
    --surface:       #1e293b;
    --surface2:      #263349;
    --border:        #334155;
    --text:          #f1f5f9;
    --text-sec:      #94a3b8;
    --success:       #22c55e;
    --danger:        #ef4444;
    --warning:       #f59e0b;
    --header-h:      56px;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Login split-screen ───────────────────────────────────── */
.lp-split { display: flex; min-height: 100vh; }

.lp-left {
    flex: 0 0 52%;
    background: linear-gradient(150deg, #0b1120 0%, #0d1535 50%, #0a1230 100%);
    padding: 2.75rem 3rem 3rem;
    display: flex; flex-direction: column; overflow-y: auto;
}

.lp-right {
    flex: 0 0 48%;
    background: #f8fafc;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 4.5rem 2.5rem 3rem; color: #1e293b;
    position: relative;
}

.lp-lang { position: absolute; top: .85rem; right: 1rem; display: flex; gap: .3rem; z-index: 20; }
.lp-lang-btn { padding: .28rem .7rem; border-radius: 6px; border: 1.5px solid #e2e8f0; background: #fff; color: #64748b; font-size: .75rem; font-weight: 700; cursor: pointer; font-family: inherit; letter-spacing: .05em; transition: background .15s, color .15s, border-color .15s; }
.lp-lang-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.lp-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; }
.lp-brand-icon { width: 42px; height: 42px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.lp-brand-name { font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.lp-brand-name span { color: var(--primary); }

.lp-headline { font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1.35; margin-bottom: 1.5rem; letter-spacing: -.02em; }

.lp-highlight {
    background: rgba(99,102,241,.12);
    border: 1px solid rgba(99,102,241,.3);
    border-radius: 12px; padding: 1.1rem 1.25rem; margin-bottom: 1.5rem;
}
.lp-highlight-head { font-size: .9rem; font-weight: 700; color: #a5b4fc; margin-bottom: .5rem; }
.lp-highlight p { font-size: .82rem; color: rgba(255,255,255,.65); line-height: 1.55; }

.lp-cards {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: .7rem; margin-bottom: 1.5rem;
}
.lp-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: .9rem 1rem; }
.lp-card-head { display: flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 700; color: rgba(255,255,255,.85); margin-bottom: .35rem; }
.lp-card p { font-size: .74rem; color: rgba(255,255,255,.52); line-height: 1.45; margin: 0; }

.lp-note { border-top: 1px solid rgba(255,255,255,.1); padding-top: .9rem; font-size: .78rem; color: rgba(255,255,255,.5); line-height: 1.5; }
.lp-note strong { color: rgba(255,255,255,.8); }

/* ── Desna stran (forma) ── */
.lp-right-inner { display: flex; flex-direction: column; gap: 1.5rem; width: 100%; max-width: 370px; }
.lp-form-wrap { width: 100%; }

.lp-free { background: linear-gradient(135deg, #eef2ff, #e0e7ff); border: 1.5px solid #a5b4fc; border-radius: 16px; padding: 1.2rem 1.5rem; }
.lp-free-badge { display: inline-block; background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: 1.5px; padding: .2rem .65rem; border-radius: 20px; margin-bottom: .65rem; }
.lp-free-title { font-size: 1.1rem; font-weight: 700; color: var(--primary-h); margin-bottom: .55rem; }
.lp-free-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.lp-free-list li { font-size: .84rem; color: #3730a3; }

.nacin-preklop { display: flex; background: #e2e8f0; border-radius: 10px; padding: .25rem; margin-bottom: 1.75rem; }
.nacin-btn { flex: 1; padding: .52rem; border-radius: 8px; border: none; background: transparent; color: #64748b; font-size: .87rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: background .15s, color .15s; }
.nacin-btn.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,.35); }

.lp-right .form-group { margin-bottom: .9rem; }
.lp-right .form-group label { display: block; font-size: .84rem; font-weight: 500; color: #374151; margin-bottom: .35rem; }
.lp-right .form-group input {
    width: 100%; padding: .55rem .75rem;
    background: #fff; border: 1.5px solid #e2e8f0;
    border-radius: 9px; color: #111827; font-family: inherit; font-size: .875rem; outline: none;
    transition: border-color .15s;
}
.lp-right .form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }

.lp-input-wrap { position: relative; }
.lp-input-wrap input { padding-left: 2.2rem; }
.lp-icon { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; display: flex; }

.lp-check-row { display: flex; align-items: center; justify-content: space-between; margin: .65rem 0 1.1rem; font-size: .82rem; }
.lp-check-row label { display: flex; align-items: center; gap: .4rem; cursor: pointer; color: #475569; }
.lp-check-row input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--primary); }

.btn-login { width: 100%; padding: .7rem; background: var(--primary); color: #fff; border: none; border-radius: 9px; font-size: .95rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: background .15s; }
.btn-login:hover { background: var(--primary-h); }

.lp-signup-row { text-align: center; font-size: .83rem; color: #64748b; margin-top: 1rem; }
.lp-signup-row a { color: var(--primary); font-weight: 600; cursor: pointer; }
.lp-signup-row a:hover { text-decoration: underline; }

.lp-right .alert-error   { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #dc2626; border-radius: 8px; padding: .65rem .9rem; font-size: .88rem; margin-bottom: 1rem; }
.lp-right .alert-success { background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.3); color: #4338ca; border-radius: 8px; padding: .65rem .9rem; font-size: .88rem; margin-bottom: 1rem; }

.field-row { display: flex; gap: .65rem; }
.field-row .form-group { flex: 1; }

/* ── Dashboard header ─────────────────────────────────────── */
#app-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-h); background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
#app-header::-webkit-scrollbar { display: none; }
.header-logo { font-weight: 800; font-size: 1.05rem; color: var(--text); }
.header-logo span { color: var(--primary); }
.header-spacer { flex: 0 0 1rem; }
.token-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3);
    color: #fcd34d; border-radius: 20px; padding: .22rem .75rem; font-size: .82rem; font-weight: 700;
}
.header-user { color: var(--text-sec); font-size: .8rem; white-space: nowrap; }
.header-logout { font-size: .8rem; color: var(--text-sec); text-decoration: none; padding: .3rem .6rem; border-radius: 6px; transition: color .15s; white-space: nowrap; }
.header-logout:hover { color: var(--text); text-decoration: none; }
.nav-lang {
    display: flex; align-items: center; gap: .4rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: .1rem 0;
}
.nav-lang::-webkit-scrollbar { display: none; }
.nav-lang > span { scroll-snap-align: start; flex-shrink: 0; }
#app-header .nav-lang { flex-shrink: 0; overflow-x: visible; max-width: none; }
#app-header .header-logo,
#app-header .token-badge,
#app-header .header-user,
#app-header .header-logout { flex-shrink: 0; }
.na-lang {
    display: flex; align-items: center; gap: .5rem;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: .1rem 0;
}
.na-lang::-webkit-scrollbar { display: none; }
.na-lang > span { scroll-snap-align: start; flex-shrink: 0; }

/* ── Nav tabs ─────────────────────────────────────────────── */
.nav-tabs {
    background: var(--surface); border-bottom: 1px solid var(--border);
    display: flex; padding: 0 1.5rem;
    position: sticky; top: var(--header-h); z-index: 99;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab {
    padding: .85rem 1.25rem; border: none; background: transparent;
    color: var(--text-sec); cursor: pointer; font-size: .875rem; font-weight: 600;
    font-family: inherit; border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s; white-space: nowrap;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Tab panels ─────────────────────────────────────────────── */
#app-main { margin-top: var(--header-h); }
.tab-panel { display: none; padding: 1.5rem; max-width: 920px; margin: 0 auto; }
.tab-panel.active { display: block; }

/* ── Flash / alerts ─────────────────────────────────────────── */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: .875rem; }
.alert-success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); color: #86efac; }
.alert-error   { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.alert-info    { background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.3); color: #a5b4fc; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 7px; border: none; cursor: pointer; font-size: .82rem; font-weight: 600; font-family: inherit; transition: background .15s; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-ghost   { background: var(--surface2); color: var(--text-sec); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: .3rem .65rem; font-size: .78rem; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled, button:disabled { opacity: .45; cursor: default; pointer-events: none; }

/* ── Forms (dashboard) ──────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-sec); margin-bottom: .35rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: .5rem .75rem;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font-family: inherit; font-size: .875rem; outline: none;
    transition: border-color .15s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 75px; }

/* ── App cards (Testiraj) ──────────────────────────────────── */
.section-title { font-size: .95rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.app-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 1.15rem; display: flex; flex-direction: column; gap: .7rem;
    transition: border-color .15s;
}
.app-card:hover { border-color: rgba(99,102,241,.45); }
.app-card-header { display: flex; align-items: center; gap: .7rem; }
.app-icon { width: 46px; height: 46px; border-radius: 10px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; overflow: hidden; }
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-card-name { font-weight: 700; font-size: .92rem; }
.app-card-owner { font-size: .73rem; color: var(--text-sec); margin-top: .1rem; }
.app-card-desc { font-size: .8rem; color: var(--text-sec); line-height: 1.5; }
.progress-label { display: flex; justify-content: space-between; font-size: .73rem; color: var(--text-sec); margin-bottom: .3rem; }
.progress-bar { height: 4px; background: var(--surface2); border-radius: 2px; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width .4s; }
.progress-fill.done { background: var(--success); }
.app-card-action { margin-top: auto; }

/* ── Status badges ──────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 20px; }
.badge-pending   { background: rgba(245,158,11,.12); color: #fcd34d; border: 1px solid rgba(245,158,11,.3); }
.badge-confirmed { background: rgba(99,102,241,.12); color: #a5b4fc; border: 1px solid rgba(99,102,241,.3); }
.badge-completed { background: rgba(34,197,94,.12); color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.badge-failed    { background: rgba(239,68,68,.12); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.badge-rejected  { background: rgba(148,163,184,.1); color: var(--text-sec); border: 1px solid rgba(148,163,184,.2); }

/* ── Testiram — my testing cards ─────────────────────────────── */
.testing-list { display: flex; flex-direction: column; gap: .75rem; }
.testing-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 1rem 1.25rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.testing-info { flex: 1; min-width: 0; }
.testing-app-name { font-weight: 700; font-size: .9rem; }
.testing-meta { font-size: .78rem; color: var(--text-sec); margin-top: .15rem; }
.testing-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.day-pill { font-size: .78rem; font-weight: 700; color: var(--primary); background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.3); border-radius: 20px; padding: .18rem .6rem; }

/* ── Moje aplikacije ─────────────────────────────────────────── */
.my-app-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1.1rem; }
.my-app-header { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.my-app-name { font-weight: 700; flex: 1; }
.my-app-body { padding: .9rem 1.25rem; }
.sub-title { font-size: .78rem; font-weight: 700; color: var(--text-sec); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .6rem; margin-top: .9rem; }
.sub-title:first-child { margin-top: 0; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.table-scroll::-webkit-scrollbar { display: none; }
.tester-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .82rem; }
.tester-table th { color: var(--text-sec); font-weight: 600; text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--border); }
.tester-table td { padding: .45rem .5rem; border-bottom: 1px solid rgba(51,65,85,.5); vertical-align: middle; }
.tester-table tr:last-child td { border-bottom: none; }
.email-pill { font-family: 'Cascadia Code','Consolas',monospace; font-size: .78rem; color: #a5b4fc; }

/* ── Publish form ─────────────────────────────────────────────── */
.publish-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; max-width: 480px; }
.token-info { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25); border-radius: 9px; padding: .8rem 1rem; font-size: .84rem; color: #fcd34d; display: flex; align-items: flex-start; gap: .6rem; margin-bottom: 1.25rem; }
.token-info-locked { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); border-radius: 9px; padding: .8rem 1rem; font-size: .84rem; color: #fca5a5; margin-bottom: 1.25rem; }

/* ── Not-Android stran ───────────────────────────────────────── */
.not-android { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--bg); }
.na-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 2.5rem 2rem; max-width: 460px; width: 100%; text-align: center; }
.na-icon { font-size: 3.5rem; margin-bottom: .75rem; }
.na-title { font-size: 2rem; font-weight: 800; color: var(--text); margin-bottom: .25rem; }
.na-sub { color: var(--text-sec); font-size: .95rem; margin-bottom: 1.75rem; }
.na-warn { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25); border-radius: 10px; padding: 1rem 1.25rem; font-size: .88rem; color: #fca5a5; line-height: 1.6; margin-bottom: 1.75rem; text-align: left; }
.na-warn strong { color: #fca5a5; }
.na-steps { background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1.75rem; text-align: left; }
.na-step-title { font-weight: 600; color: var(--text); font-size: .9rem; margin-bottom: .75rem; }
.na-step { display: flex; align-items: center; gap: .65rem; font-size: .87rem; color: var(--text-sec); margin-bottom: .5rem; }
.na-step:last-child { margin-bottom: 0; }
.na-step-num { flex-shrink: 0; width: 1.5rem; height: 1.5rem; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; }
.na-step strong { color: var(--text); }
.na-qr-hint { font-size: .83rem; color: var(--text-sec); margin-bottom: 1.5rem; }
.na-qr { margin: .75rem auto 0; display: inline-block; background: #fff; padding: .5rem; border-radius: 8px; }
.na-qr img { display: block; border-radius: 4px; }
.na-lang { display: flex; gap: .6rem; justify-content: center; }

/* ── Info zavihek ─────────────────────────────────────────────── */
.info-wrap { max-width: 720px; margin: 0 auto; padding: 1.5rem; }
.info-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: .75rem; }
.info-lead { color: var(--text-sec); font-size: .97rem; line-height: 1.65; margin-bottom: 2rem; }
.info-lead strong { color: var(--text); }

.info-steps { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem; }
.info-step { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.25rem; }
.info-step-num { flex-shrink: 0; width: 2rem; height: 2rem; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.info-step-body { flex: 1; }
.info-step-title { font-weight: 600; color: var(--text); margin-bottom: .4rem; font-size: 1rem; }
.info-step-body p { color: var(--text-sec); font-size: .88rem; line-height: 1.6; }
.info-step-body strong { color: var(--text); }
.info-step-body em { color: #a5b4fc; font-style: normal; }
.info-note { margin-top: .6rem; background: rgba(99,102,241,.1); border-left: 3px solid var(--primary); border-radius: 0 6px 6px 0; padding: .5rem .75rem; font-size: .82rem; color: #a5b4fc; line-height: 1.5; }
.info-warn { margin-top: .6rem; background: rgba(239,68,68,.1); border-left: 3px solid #ef4444; border-radius: 0 6px 6px 0; padding: .5rem .75rem; font-size: .82rem; color: #fca5a5; line-height: 1.5; }
.info-warn strong { color: #fca5a5; }

.info-faq { margin-top: .5rem; }
.info-faq-title { font-weight: 600; color: var(--text); font-size: 1.05rem; margin-bottom: .75rem; }
.info-faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; margin-bottom: .5rem; overflow: hidden; }
.info-faq-item summary { cursor: pointer; padding: .85rem 1.1rem; font-size: .9rem; color: var(--text); font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.info-faq-item summary::after { content: '▸'; color: var(--text-sec); transition: transform .2s; }
.info-faq-item[open] summary::after { transform: rotate(90deg); }
.info-faq-item p { padding: 0 1.1rem .85rem; font-size: .86rem; color: var(--text-sec); line-height: 1.6; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-sec); font-size: .85rem; }
.empty-state .icon { font-size: 2rem; margin-bottom: .5rem; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .lp-split { flex-direction: column-reverse; }
    .lp-left, .lp-right { flex: none; width: 100%; }
    .lp-left { padding: 2rem 1.5rem 2.5rem; }
    .lp-right { padding: 3.5rem 1.5rem 2rem; }
    .lp-cards { grid-template-columns: 1fr; }
    .lp-headline { font-size: 1.25rem; }
}
@media (max-width: 600px) {
    .apps-grid { grid-template-columns: 1fr; }
    .nav-tab { padding: .75rem .75rem; font-size: .78rem; }
    #app-header { padding: 0 1rem; }
    .tab-panel { padding: 1rem; }
}
