/* YT menadžer — jedini CSS. Tamna tema, mobile-first (osnova = telefon, pa 600px i 960px). */

:root {
    --bg: #0b0b10;
    --panel: #15151c;
    --panel-2: #1c1c25;
    --field: #0f0f15;
    --line: #262631;
    --line-2: #34343f;
    --text: #f4f4f7;
    --muted: #9d9dad;
    --faint: #6c6c7c;

    --red: #ff1f4b;
    --red-2: #ff6a3d;
    --green: #2ee59d;
    --amber: #ffb547;
    --violet: #8b6cff;

    --grad-red: linear-gradient(135deg, var(--red), var(--red-2));
    --grad-ai: linear-gradient(120deg, #7c5cff 0%, #ff3d9a 55%, #ffb03b 100%);

    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 50px -20px rgba(0, 0, 0, .8);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font: 15px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(900px 520px at 0% -10%, rgba(255, 31, 75, .16), transparent 60%),
        radial-gradient(800px 480px at 100% 0%, rgba(139, 108, 255, .14), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}

a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
img { display: block; max-width: 100%; }

.icon { width: 1.05em; height: 1.05em; fill: currentColor; flex: none; }
.muted { color: var(--muted); }

/* ---------- Topbar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem 1rem;
    background: rgba(11, 11, 16, .72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 24px;
    border-radius: 8px;
    background: var(--grad-red);
    box-shadow: 0 6px 20px -6px rgba(255, 31, 75, .8);
}
.brand-mark svg { width: 14px; height: 14px; fill: #fff; }
.brand-name { font-weight: 500; letter-spacing: -.01em; }
.brand-name b { font-weight: 800; }

.topbar-user { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.user-chip {
    display: none;
    max-width: 180px;
    padding: .3rem .7rem;
    border-radius: 999px;
    background: var(--panel-2);
    color: var(--muted);
    font-size: .8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page { max-width: 1180px; margin: 0 auto; padding: 1.25rem 1rem 5rem; }

/* ---------- Dugmad ---------- */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 0;
    border-radius: 999px;
    padding: .7rem 1.25rem;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: .4rem .85rem; font-size: .85rem; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--grad-red); color: #fff; box-shadow: 0 10px 30px -10px rgba(255, 31, 75, .9); }
.btn-primary:hover { box-shadow: 0 14px 36px -10px rgba(255, 31, 75, 1); transform: translateY(-1px); }

.btn-ghost { background: var(--panel-2); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: #262632; }

.btn-ai {
    background: var(--grad-ai);
    background-size: 200% 100%;
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(255, 61, 154, .9);
    animation: shimmer 6s ease infinite;
}
.btn-ai::before {
    content: "";
    width: 1em;
    height: 1em;
    background: currentColor;
    clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
.btn-ai:hover { transform: translateY(-1px); }

.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading::before {
    content: "";
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    clip-path: none;
    background: none;
    animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0%, 100% { background-position: 0 50%; } 50% { background-position: 100% 50%; } }

/* ---------- Poruke ---------- */

.flash {
    margin-bottom: 1rem;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-weight: 500;
    animation: drop .35s ease;
}
.flash-success { background: rgba(46, 229, 157, .1); border-color: rgba(46, 229, 157, .35); color: #8ff5c9; }
.flash-error { background: rgba(255, 31, 75, .1); border-color: rgba(255, 31, 75, .4); color: #ff9db1; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

.callout {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    margin: 0 0 1rem;
    padding: .75rem .9rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 181, 71, .08);
    border: 1px solid rgba(255, 181, 71, .25);
    color: #ffd79c;
    font-size: .88rem;
}
.callout .icon { margin-top: .15em; }

/* ---------- Hero ---------- */

.hero {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.hero-id { display: flex; align-items: center; gap: 1rem; }
.eyebrow { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero-title { font-size: 1.7rem; font-weight: 800; line-height: 1.15; }

.avatar { border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.avatar-lg { width: 60px; height: 60px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--red); }
.avatar-xs { width: 26px; height: 26px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.stat {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    text-decoration: none;
    transition: border-color .2s, transform .2s;
}
a.stat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.stat-num { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .82rem; }
.stat-hot {
    background:
        linear-gradient(var(--panel), var(--panel)) padding-box,
        var(--grad-red) border-box;
    border: 1px solid transparent;
}
.stat-hot .stat-num { background: var(--grad-red); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Sekcije ---------- */

.block { margin-bottom: 2.25rem; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.count {
    display: inline-grid;
    place-items: center;
    min-width: 1.7rem;
    height: 1.4rem;
    margin-left: .35rem;
    padding: 0 .45rem;
    border-radius: 999px;
    background: var(--panel-2);
    color: var(--muted);
    font-size: .78rem;
    vertical-align: middle;
}

.legend { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .8rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-left: .4rem; }
.dot-scheduled { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot-proposed { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

.empty {
    padding: 1.75rem 1.25rem;
    border: 1px dashed var(--line-2);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}
.empty-title { color: var(--text); font-weight: 700; margin-bottom: .25rem; }

/* ---------- Plan (timeline) ---------- */

.timeline {
    display: flex;
    gap: .7rem;
    margin: 0 -1rem;
    padding: .25rem 1rem 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
}
.tl-item {
    position: relative;
    flex: none;
    display: flex;
    gap: .6rem;
    align-items: center;
    width: 150px;
    padding: .5rem;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform .2s, border-color .2s;
}
.tl-item:hover { transform: translateY(-2px); }
.tl-item.is-scheduled { border-color: rgba(46, 229, 157, .4); }
.tl-item.is-proposed { border-style: dashed; border-color: rgba(255, 181, 71, .45); }
.tl-item::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.tl-item.is-scheduled::after { background: var(--green); box-shadow: 0 0 8px var(--green); }
.tl-item.is-proposed::after { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.tl-thumb { width: 38px; aspect-ratio: 9 / 16; flex: none; overflow: hidden; border-radius: 8px; background: var(--panel-2); }
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tl-text { display: flex; flex-direction: column; line-height: 1.2; }
.tl-day { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tl-date { font-size: 1.05rem; font-weight: 800; }
.tl-time { font-size: .85rem; font-variant-numeric: tabular-nums; }
.is-scheduled .tl-time { color: var(--green); }
.is-proposed .tl-time { color: var(--amber); }

/* ---------- Kartice klipova ---------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: .9rem;
    align-items: start;
}

.vcard { display: block; text-decoration: none; }
.vcard-long { grid-column: span 2; }

.vcard-media {
    position: relative;
    display: block;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel-2);
    box-shadow: var(--shadow);
    outline: 1px solid rgba(255, 255, 255, .06);
    transition: transform .25s ease, outline-color .25s, box-shadow .25s;
}
.vcard-long .vcard-media { aspect-ratio: 16 / 9; }
.vcard-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.vcard:hover .vcard-media { transform: translateY(-4px); outline-color: rgba(255, 255, 255, .22); }
.vcard:hover .vcard-media img { transform: scale(1.06); }
.tone-proposed:hover .vcard-media { box-shadow: 0 20px 50px -18px rgba(255, 181, 71, .55); }
.tone-scheduled:hover .vcard-media { box-shadow: 0 20px 50px -18px rgba(46, 229, 157, .5); }

.vcard-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, transparent 22%, transparent 45%, rgba(0, 0, 0, .9) 100%);
}
.vcard-top {
    position: absolute;
    top: .55rem;
    left: .55rem;
    right: .55rem;
    display: flex;
    justify-content: space-between;
    gap: .3rem;
}
.pill {
    padding: .12rem .5rem;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.pill-type { background: var(--red); color: #fff; }
.pill-dark { background: rgba(0, 0, 0, .6); color: #fff; font-variant-numeric: tabular-nums; }

.vcard-bottom {
    position: absolute;
    left: .7rem;
    right: .7rem;
    bottom: .7rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.vcard-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}
.vcard-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    align-self: flex-start;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}
.tone-proposed .vcard-chip { color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255, 181, 71, .45); }
.tone-scheduled .vcard-chip { color: var(--green); box-shadow: inset 0 0 0 1px rgba(46, 229, 157, .45); }
.tone-published .vcard-chip { color: #ddd; }

/* ---------- Izmena klipa ---------- */

.back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}
.back:hover { color: var(--text); }

.edit { display: grid; gap: 1.5rem; }
.edit-side { display: flex; flex-direction: column; gap: .9rem; }

.phone {
    position: relative;
    width: 100%;
    max-width: 210px;
    margin: 0 auto;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: 0 0 0 7px #050507, 0 0 0 8px var(--line-2), 0 30px 70px -20px rgba(0, 0, 0, .9), 0 0 80px -20px rgba(255, 31, 75, .35);
}
.phone-wide { max-width: none; aspect-ratio: 16 / 9; border-radius: var(--radius); box-shadow: var(--shadow); }
.phone-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.phone-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
    color: #fff;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform .2s ease, background .2s ease;
}
.phone-play .icon { width: 28px; height: 28px; margin-left: 3px; }
.phone-play:hover { background: var(--red); transform: translate(-50%, -50%) scale(1.08); }

.phone-frame { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border: 0; background: #000; }
.phone.is-playing .phone-play,
.phone.is-playing .phone-shade,
.phone.is-playing .phone-actions,
.phone.is-playing .phone-ui { display: none; }
.phone-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .92)); }
.phone-actions {
    position: absolute;
    right: .6rem;
    bottom: 7.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.phone-actions span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(6px);
}
.phone-actions .icon { width: 18px; height: 18px; }
.phone-ui {
    position: absolute;
    left: .9rem;
    right: 3.6rem;
    bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.phone-wide .phone-ui { right: .9rem; }
.phone-channel { display: flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 700; }
.phone-sub { margin-left: .2rem; padding: .15rem .55rem; border-radius: 999px; background: #fff; color: #000; font-size: .7rem; }
.phone-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.3;
}
.phone-tags { color: #9ec5ff; font-size: .78rem; font-weight: 600; }
.phone-tags:empty { display: none; }
.preview-note { color: var(--faint); font-size: .78rem; text-align: center; }

.facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
    margin: 0;
}
.facts div { padding: .65rem .8rem; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.facts dd { margin: 0; font-weight: 700; }

.status { text-transform: capitalize; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: .4rem; border-radius: 50%; vertical-align: middle; }
.status-private::before { background: var(--amber); }
.status-public::before { background: var(--green); }
.status-unlisted::before { background: var(--violet); }

.edit-form { display: flex; flex-direction: column; gap: 1.1rem; }

.card {
    padding: 1.25rem;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
}
.card-title {
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ai-card {
    position: relative;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background:
        linear-gradient(160deg, #221c38 0%, #1b1625 55%, var(--panel) 100%) padding-box,
        var(--grad-ai) border-box;
    box-shadow: 0 20px 60px -30px rgba(255, 61, 154, .7);
}
.ai-head { display: flex; gap: .85rem; margin-bottom: 1rem; }
.ai-head h2 { margin-bottom: .15rem; }
.ai-head p { color: var(--muted); font-size: .88rem; }
.ai-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    background: var(--grad-ai);
    box-shadow: 0 8px 24px -8px rgba(255, 61, 154, .9);
}
.ai-icon .icon { width: 20px; height: 20px; fill: #fff; }
.dropzone {
    position: relative;
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: .75rem;
    padding: .9rem 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px dashed rgba(139, 108, 255, .5);
    background: rgba(139, 108, 255, .06);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: #b9a8ff; background: rgba(139, 108, 255, .14); }
.dropzone.has-file { border-style: solid; border-color: var(--green); background: rgba(46, 229, 157, .08); }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 12px;
    background: var(--panel-2);
    color: #c9bcff;
}
.has-file .dropzone-icon { color: var(--green); }
.dropzone-text { display: flex; flex-direction: column; min-width: 0; font-size: .85rem; color: var(--muted); }
.dropzone-text b { color: var(--text); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone + ul, .ai-card > ul { margin: -.35rem 0 .75rem; padding: 0; list-style: none; color: #ff9db1; font-size: .85rem; }

.ai-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .85rem; }

.segmented {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: var(--field);
    border: 1px solid var(--line);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
    padding: .45rem 1rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.segmented input:checked + label { background: var(--panel-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
.segmented input:focus-visible + label { outline: 2px solid var(--violet); }

/* ---------- Polja ---------- */

.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.field label { font-size: .88rem; font-weight: 700; }

.input {
    width: 100%;
    padding: .75rem .9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--field);
    color: var(--text);
    font: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--line-2); }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 108, 255, .2); }
.input-lg { font-size: 1.05rem; font-weight: 600; }
textarea.input { resize: vertical; min-height: 5rem; line-height: 1.55; }
input[type="datetime-local"].input { color-scheme: dark; }

.counter { color: var(--faint); font-size: .78rem; font-variant-numeric: tabular-nums; }
.counter.is-warn { color: var(--amber); }
.counter.is-over { color: var(--red); font-weight: 700; }

.help-text { margin-top: .35rem; color: var(--faint); font-size: .8rem; }
.field ul { margin: .4rem 0 0; padding: 0; list-style: none; color: #ff9db1; font-size: .85rem; }
.has-error .input { border-color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.chips:empty { display: none; }
.chip {
    padding: .2rem .6rem;
    border-radius: 999px;
    background: rgba(139, 108, 255, .14);
    border: 1px solid rgba(139, 108, 255, .35);
    color: #c9bcff;
    font-size: .8rem;
    font-weight: 600;
}

.savebar {
    position: sticky;
    bottom: .75rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem .7rem .7rem 1.1rem;
    border-radius: 999px;
    background: rgba(21, 21, 28, .85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow);
}
.savebar-note { display: none; color: var(--muted); font-size: .85rem; }
.savebar .btn { flex: 1; white-space: nowrap; }

.error-card { max-width: 520px; margin: 3rem auto; text-align: center; }
.error-card h1 { margin-bottom: .5rem; }
.error-card p { margin-bottom: 1.25rem; color: var(--muted); }

/* ---------- Prijava ---------- */

.is-login .page { display: grid; place-items: center; min-height: calc(100vh - 60px); padding-bottom: 2rem; }
.login {
    width: 100%;
    max-width: 440px;
    padding: 2.25rem 1.5rem;
    border-radius: 26px;
    background: rgba(21, 21, 28, .8);
    border: 1px solid var(--line);
    box-shadow: var(--shadow), 0 0 120px -40px rgba(255, 31, 75, .5);
    text-align: center;
}
.login-mark {
    display: inline-grid;
    place-items: center;
    width: 68px;
    height: 48px;
    margin-bottom: 1.25rem;
    border-radius: 16px;
    background: var(--grad-red);
    box-shadow: 0 16px 40px -12px rgba(255, 31, 75, .9);
}
.login-mark svg { width: 24px; height: 24px; fill: #fff; }
.login h1 { font-size: 1.9rem; font-weight: 800; line-height: 1.15; margin-bottom: .75rem; }
.grad { background: var(--grad-ai); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login > p { color: var(--muted); margin-bottom: 1.5rem; }
.login-note { margin-top: 1rem; color: var(--faint) !important; font-size: .82rem; margin-bottom: 0 !important; }

/* ---------- Veći ekrani ---------- */

@media (min-width: 600px) {
    .page { padding: 1.75rem 1.5rem 5rem; }
    .user-chip { display: inline-block; }
    .hero-title { font-size: 2.1rem; }
    .stat-num { font-size: 1.9rem; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.1rem; }
    .timeline { margin: 0; padding: .25rem 0 1rem; }
    .card, .ai-card { padding: 1.5rem; }
    .phone { max-width: 260px; }
    .savebar-note { display: inline; }
    .savebar .btn { flex: none; }
}

@media (min-width: 960px) {
    .hero { grid-template-columns: auto 1fr; align-items: center; gap: 2rem; }
    .stats { max-width: 620px; margin-left: auto; }
    .edit { grid-template-columns: 300px 1fr; gap: 2rem; align-items: start; }
    .edit-side { position: sticky; top: 84px; }
    .phone { max-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
