/* ============================================================
   Kviki - stylesheet
   Topao, prijateljski dizajn: žuto-narandžasti gradijent hero,
   krem pozadina, tamnoplavi/crni tekst, zaobljene bele kartice.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #14171F;
    --ink-soft: #2B2F3A;
    --muted: #6B7280;
    --faint: #9AA0AC;
    --cream: #FFFCF6;
    --white: #FFFFFF;
    --border: #ECE7DA;
    --sun-yellow: #FFD24C;
    --sun-orange: #FF8A34;
    --accent: #FF7A1A;
    --accent-dark: #E8650A;
    --danger: #B3261E;
    --danger-bg: #FDECEA;
    --success: #1E7A34;
    --success-bg: #E9F7EE;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --max-width: 1120px;
    --shadow-card: 0 1px 2px rgba(20,23,31,.04), 0 8px 24px rgba(20,23,31,.05);
    font-size: 16px;
}

* { box-sizing: border-box; }

/* Dark tema - automatski se uključuje uveče (18-05h), vidi is_evening_now() u functions.php */
body.dark-theme {
    --ink: #F5F3EE;
    --ink-soft: #E2E4EA;
    --muted: #A9AFBC;
    --faint: #6B7280;
    --cream: #14171F;
    --white: #1C2029;
    --border: #2B2F3A;
    --danger: #FF6B60;
    --danger-bg: #3A1F1E;
    --success: #4ADE80;
    --success-bg: #16301F;
    --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink-soft);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

h1, h2, h3 { font-family: 'Plus Jakarta Sans', sans-serif; color: var(--ink); font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 8px; line-height: 1.1; }
h2 { font-size: 1.3rem; margin: 28px 0 14px; }
h3 { font-size: 1.02rem; margin: 0 0 6px; font-weight: 700; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
    background: transparent;
    padding: 22px 0 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo::before {
    content: "☼";
    color: var(--accent);
    font-size: 1.2rem;
}
.main-nav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; font-weight: 600; }
.main-nav a { color: var(--ink-soft); }
.main-nav a:hover { text-decoration: none; color: var(--ink); }
.btn-nav {
    background: var(--ink);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    text-decoration: none !important;
    font-weight: 700;
}
.btn-nav:hover { background: var(--ink-soft); }

/* Individual pages add their own top spacing via .auth-section/.dashboard/etc below */

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 64px;
    border-top: 1px solid var(--border);
    padding: 28px 0 40px;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--faint);
}
.footer-inner a { color: var(--muted); margin-left: 4px; }
.footer-inner p { margin: 0; }

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    font-size: 0.9rem;
}
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert ul { margin: 0; padding-left: 18px; }

/* ---------- Hero ---------- */
.site-header--hero { background: var(--sun-yellow); padding-bottom: 18px; }
.hero-band {
    background: radial-gradient(circle at 78% 30%, #FFE58A 0%, transparent 45%),
                linear-gradient(135deg, var(--sun-yellow) 0%, var(--sun-orange) 100%);
    padding-top: 4px;
    padding-bottom: 64px;
    overflow: hidden;
}
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 32px;
    padding-top: 44px;
}
.hero-copy h1 {
    font-size: 3.1rem;
    line-height: 1.06;
    margin: 0 0 20px;
}
.hero-copy .underline {
    display: block;
    width: 84px;
    height: 5px;
    background: var(--ink);
    border-radius: 3px;
    margin: 18px 0 22px;
}
.hero-desc {
    max-width: 420px;
    color: var(--ink-soft);
    font-size: 1.05rem;
    margin: 0 0 26px;
}
.hero-form {
    display: flex;
    gap: 10px;
    max-width: 460px;
    margin-bottom: 18px;
}
.hero-form input[type="email"] {
    flex: 1;
    border: none;
    border-radius: var(--radius-pill);
    padding: 15px 20px;
    font-size: 0.95rem;
    font-family: inherit;
}
.hero-form button {
    white-space: nowrap;
    border-radius: var(--radius-pill);
    padding: 15px 24px;
}
.hero-trust {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--ink-soft);
    font-weight: 600;
}
.hero-phone {
    position: relative;
    text-align: center;
}
.hero-phone img {
    max-width: 100%;
    width: 380px;
    filter: drop-shadow(0 30px 50px rgba(20,23,31,.25));
}

/* ---------- Features (icon row) ---------- */
.features { padding: 56px 0 8px; text-align: center; }
.features h2 { font-size: 1.7rem; margin-bottom: 6px; }
.features .section-sub { color: var(--muted); margin: 0 0 32px; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 24px;
    margin-top: 8px;
}
.feature {
    background: transparent;
    padding: 0;
    text-align: center;
    font-size: 1.9rem;
}
.feature span { display: block; font-size: 0.85rem; margin-top: 10px; color: var(--ink-soft); font-weight: 600; }

/* ---------- Split / value section ---------- */
.value-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 64px 0;
}
.value-split h2 { font-size: 2rem; margin: 0 0 10px; }
.value-split .underline {
    display: block;
    width: 70px;
    height: 5px;
    background: var(--accent);
    border-radius: 3px;
    margin: 6px 0 18px;
}
.value-split p { color: var(--muted); max-width: 440px; }
.value-art {
    background: linear-gradient(135deg, #FFF3D6, #FFE0B8);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    font-size: 3rem;
}
.value-art .note {
    font-size: 0.95rem;
    color: var(--ink-soft);
    font-weight: 700;
    margin-top: 14px;
}

/* ---------- Email preview mock (used on index) ---------- */
.email-preview { padding: 8px 0 56px; }
.email-preview h2 { text-align: center; }
.email-mock {
    max-width: 480px;
    margin: 16px auto 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-card);
}
.email-mock-header {
    background: var(--ink);
    color: #fff;
    margin: -20px -20px 16px;
    padding: 14px 20px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-weight: 700;
}

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 32px;
    text-align: center;
    margin: 8px 0 56px;
}
.cta-band .cta-icon { font-size: 1.6rem; margin-bottom: 10px; }
.cta-band h2 { margin: 0 0 6px; font-size: 1.5rem; }
.cta-band p.section-sub { color: var(--muted); margin: 0 0 22px; }
.cta-band .hero-form { margin: 0 auto 14px; }
.cta-band .hero-trust { justify-content: center; }

.share-band {
    text-align: center;
    padding: 0 0 56px;
}
.share-band p { color: var(--muted); font-weight: 600; margin: 0 0 16px; }
.share-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.share-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}
.share-btn:hover { background: var(--sun-yellow); text-decoration: none; }

/* ---------- Forms ---------- */
.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin: 16px 0;
    max-width: 560px;
    box-shadow: var(--shadow-card);
}
label {
    display: block;
    margin-bottom: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-soft);
}
input[type="text"], input[type="email"], input[type="password"], select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--cream);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--white); }
input:disabled { background: #f1efe8; color: var(--faint); }

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.checkbox-grid label, .checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 0;
}
.checkbox-line { margin-bottom: 14px; font-size: 0.88rem; }

.btn-primary {
    display: inline-block;
    background: var(--ink);
    color: #fff;
    border: none;
    padding: 13px 22px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.btn-primary:hover { background: var(--ink-soft); text-decoration: none; }
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    box-sizing: border-box;
}
.btn-google:hover { background: var(--cream); text-decoration: none; }
.btn-danger {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: inherit;
}
.btn-small {
    background: var(--cream);
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
}
.danger-zone { border-color: var(--danger-bg); }

/* ---------- Dashboard ---------- */
.dashboard h1 { font-size: 1.9rem; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.info-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-card);
}
.info-card h3 { display: flex; align-items: center; gap: 8px; }
.info-card .big-value { font-size: 1.3rem; font-weight: 800; margin: 6px 0 4px; color: var(--ink); }
.info-card .unavailable { color: var(--faint); font-style: italic; }
.source-line { font-size: 0.75rem; color: var(--faint); margin-top: 12px; }

/* ---------- Legal pages ---------- */
.legal-page { max-width: 720px; margin: 0 auto; padding: 24px 0 48px; }
.legal-page h2 { margin-top: 28px; }

/* ---------- Admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 16px; background: var(--white); border-radius: var(--radius-md); overflow: hidden; }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.badge { padding: 3px 12px; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 700; }
.badge-ok { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--cream); color: var(--faint); }

/* ---------- Auth / profile sections ---------- */
.auth-section, .profile-section, .dashboard { padding: 40px 0 56px; }

/* ============================================================
   App shell (ulogovane stranice: dashboard i sl.) - sidebar layout
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
}
.app-sidebar .logo { margin-bottom: 28px; }
.app-nav { display: flex; flex-direction: column; gap: 4px; }
.app-nav a, .app-nav span.soon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ink-soft);
    text-decoration: none;
}
.app-nav a:hover { background: var(--cream); text-decoration: none; }
.app-nav a.active { background: var(--sun-yellow); color: var(--ink); }
.app-nav span.soon { color: var(--faint); cursor: default; }
.app-sidebar-footer {
    margin-top: auto;
    font-family: 'Plus Jakarta Sans', cursive;
    font-style: italic;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 0 14px;
}
.app-sidebar-footer .underline {
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 8px;
}
.mobile-menu-toggle {
    display: none;
    margin-left: auto;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
}
.empty-state {
    text-align: center;
    padding: 60px 24px;
    max-width: 420px;
    margin: 40px auto 0;
}
.empty-state-icon { font-size: 2.6rem; margin-bottom: 12px; }
.empty-state h2 { margin: 0 0 8px; font-size: 1.2rem; }
.empty-state p { color: var(--muted); font-size: 0.95rem; line-height: 1.5; margin: 0;
}

.app-main { flex: 1; min-width: 0; padding: 28px 32px 48px; }
.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.app-date { color: var(--muted); font-size: 0.88rem; margin: 0; }
.app-topbar-right { display: flex; align-items: center; gap: 14px; }
.location-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ink-soft);
}
.avatar-circle {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--sun-yellow);
    color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.app-greeting-band {
    position: relative;
    background: radial-gradient(circle at 90% 10%, #FFE58A 0%, transparent 55%), var(--cream);
    border-radius: var(--radius-lg);
    padding: 18px 24px 26px;
    margin: 14px 0 22px;
    overflow: hidden;
}
.app-greeting-band h1 { font-size: 1.7rem; margin: 0 0 2px; }
.app-greeting-band p { margin: 0; color: var(--ink-soft); }

.row-card-list { display: flex; flex-direction: column; gap: 12px; }
.row-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
}
.row-card-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--cream);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.row-card-body { flex: 1; min-width: 0; }
.row-card-body h3 { margin: 0 0 2px; font-size: 1rem; }
.row-card-body .row-main { font-weight: 800; color: var(--ink); font-size: 1.05rem; margin: 2px 0; }
.row-card-body .row-sub-status { font-weight: 600; color: var(--ink-soft); font-size: 0.92rem; margin: 2px 0; }
.row-card-body p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.row-card-status {
    text-align: right;
    flex-shrink: 0;
    max-width: 220px;
    font-size: 0.85rem;
}
.row-card-status .status-line { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-weight: 700; color: var(--ink); }
.row-card-status .status-sub { color: var(--muted); margin-top: 2px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.ok { background: var(--success); }
.status-dot.warn { background: #E0A100; }
.status-dot.bad { background: var(--danger); }
.row-card-chevron { color: var(--faint); font-size: 1.1rem; flex-shrink: 0; margin-left: 4px; }
.row-card a.maps-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.78rem; font-weight: 700; color: var(--accent-dark);
    margin-top: 4px;
}
.card-reorder { display: flex; flex-direction: column; gap: 4px; margin-left: 10px; flex-shrink: 0; }
.card-reorder form { margin: 0; }
.reorder-btn {
    display: block;
    width: 24px; height: 20px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 9px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
}
.reorder-btn:hover:not(:disabled) { background: var(--sun-yellow); color: var(--ink); }
.reorder-btn:disabled { opacity: .3; cursor: default; }

.reminder-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: linear-gradient(135deg, #FFF3D6, #FFE9C2);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.reminder-banner .reminder-text { display: flex; align-items: center; gap: 12px; }
.reminder-banner .reminder-icon { font-size: 1.4rem; }
.reminder-banner strong { display: block; color: var(--ink); }
.reminder-banner p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }
.refer-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.refer-banner .reminder-text { display: flex; align-items: center; gap: 12px; }
.refer-banner .reminder-icon { font-size: 1.4rem; }
.refer-banner strong { display: block; color: var(--ink); }
.refer-banner p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }
.refer-banner button.btn-primary { border: none; font-family: inherit; }

@media (max-width: 860px) {
    .app-shell { flex-direction: column; }
    .app-sidebar { width: 100%; flex-wrap: wrap; align-items: center; padding: 14px 16px; }
    .app-sidebar .logo { margin: 0; }
    .app-sidebar-footer { display: none; }
    .mobile-menu-toggle { display: flex; }
    .app-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        margin-top: 14px;
        gap: 4px;
    }
    .app-sidebar.menu-open .app-nav { display: flex; }
    .app-main { padding: 20px 16px 40px; }
    .row-card { flex-wrap: wrap; }
    .row-card-status { text-align: left; max-width: none; }
}
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; }
    .hero-phone { order: -1; max-width: 280px; margin: 0 auto; }
    .hero-phone img { width: 100%; }
    .hero-copy h1 { font-size: 2.4rem; }
    .value-split { grid-template-columns: 1fr; }
    .value-art { order: -1; }
}
@media (max-width: 600px) {
    .hero-copy h1 { font-size: 2.1rem; }
    .header-inner { flex-wrap: wrap; gap: 10px; }
    .main-nav { flex-wrap: wrap; justify-content: center; gap: 12px; }
    .hero-form { flex-direction: column; }
    .cta-band { padding: 32px 20px; }
}

.consent-banner {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 500;
    max-width: 640px;
    margin: 0 auto;
    background: var(--ink);
    color: var(--cream);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.consent-banner p { margin: 0; font-size: 0.85rem; line-height: 1.4; flex: 1; min-width: 220px; }
.consent-banner a { color: var(--sun-yellow); }
.consent-banner .btn-small-pad { padding: 9px 18px; font-size: 0.85rem; }
.consent-banner[hidden] { display: none; }
