/* Okyema — premium executive operating system.
   Single-file CSS, same approach as SIKA. Light + dark themes from one token
   set keyed off [data-theme], with a system-theme default. */

:root {
    color-scheme: light;

    /* Okyema brand */
    --green: #43C7A7;
    --green-ink: #1F7A62;
    --obsidian: #0B1020;
    --indigo: #151D3B;
    --cloud: #F5F7FB;

    /* Notion light theme */
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --surface-2: #F1F1EF;
    --stroke: #E9E9E7;
    --text: #37352F;
    --text-muted: #787774;
    --accent: var(--green);
    --accent-2: var(--green);
    --accent-strong: var(--green-ink);
    --accent-fill: var(--green-ink);
    --accent-soft: rgba(67, 199, 167, .14);
    --danger: #EB5757;
    --warn: #F2994A;
    --ok: #219653;
    --radius: 0;
    --radius-sm: 0;
    --shadow: none;
    --nav-height: 68px;
}

[data-theme="dark"] {
    color-scheme: dark;

    /* Notion dark theme */
    --bg: #191919;
    --surface: #202020;
    --surface-2: #252525;
    --stroke: #2F2F2F;
    --text: #D4D4D4;
    --text-muted: #9B9B9B;
    --accent: var(--green);
    --accent-2: var(--green);
    --accent-strong: var(--green);
    --accent-fill: var(--green-ink);
    --accent-soft: rgba(67, 199, 167, .16);
    --danger: #EB5757;
    --warn: #F2994A;
    --ok: #219653;
    --radius: 0;
    --radius-sm: 0;
    --shadow: none;
}

* { box-sizing: border-box; }

/* Squared design: no border radius anywhere */
*, *::before, *::after { border-radius: 0 !important; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    transition: background .2s ease, color .2s ease;
}

[v-cloak] { display: none; }

a { color: var(--accent-strong); }
button { font-family: inherit; }

.muted { color: var(--text-muted); }
.small { font-size: .85rem; }

/* ── Shell ─────────────────────────────────────────────── */
#app {
    min-height: 100dvh;
    background: var(--bg);
}

.appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 30;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--stroke);
}

.appbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.hamburger {
    flex: 0 0 auto;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--stroke); background: var(--surface);
    cursor: pointer;
}
.hamburger__line { display: block; width: 18px; height: 2px; background: var(--text); }
@media (min-width: 1100px) {
    .hamburger { display: none; }
}

.appbar__logo-btn {
    border: 0; background: none; padding: 0; cursor: pointer;
    display: inline-flex; border-radius: 10px;
}
.appbar__logo {
    width: 36px; height: 36px; border-radius: 50%;
    display: block;
}
.appbar__logo--dark { display: none; }
[data-theme="dark"] .appbar__logo--dark { display: block; }
[data-theme="dark"] .appbar__logo--light { display: none; }

.context-chip {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--stroke); background: var(--surface);
    color: var(--text); border-radius: 999px; padding: 6px 12px;
    font-size: .82rem; font-weight: 500; cursor: pointer;
    max-width: min(170px, 42vw); min-width: 0;
}
.context-chip__dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--accent); }
.context-chip__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.appbar__user { display: flex; align-items: center; gap: 8px; }

.avatar {
    width: 34px; height: 34px; border-radius: 50% !important; border: 0; cursor: pointer;
    background: var(--accent-soft); color: var(--accent-strong);
    font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative; flex: 0 0 auto;
}
.avatar img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    border-radius: 50% !important;
}

.user-menu {
    position: absolute; top: 56px; right: 12px; width: 240px;
    background: var(--surface); border: 1px solid var(--stroke);
    border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 8px; z-index: 40;
}
.user-menu__head { padding: 10px 12px; border-bottom: 1px solid var(--stroke); margin-bottom: 6px; }
.user-menu__head strong { display: block; }
.user-menu__item {
    display: block; width: 100%; text-align: left; padding: 10px 12px;
    border: 0; background: none; color: var(--text); border-radius: 8px;
    cursor: pointer; font-size: .92rem;
}
.user-menu__item:hover { background: var(--surface-2); }
.user-menu__item--danger { color: var(--danger); }
.user-menu__item--muted { color: var(--text-muted); }
.user-menu__version { padding: 10px 12px; color: var(--text-muted); font-size: .78rem; margin: 0; }

/* "New workspace" row inside the context menu */
.user-menu__form {
    display: flex; gap: 6px;
    margin-top: 6px; padding: 8px 0 4px;
    border-top: 1px solid var(--stroke);
}
.user-menu__form input {
    flex: 1; min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--stroke); background: var(--surface); color: var(--text);
    font: inherit; font-size: .85rem;
}
.user-menu__form .btn { padding: 8px 12px; font-size: .85rem; }

/* ── Navigation drawer (hamburger) ───────────────────── */
.drawer-backdrop {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(11, 16, 32, .45);
    border: 0; padding: 0; cursor: pointer;
    animation: drawerFade .18s ease;
}
.drawer {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 45;
    width: min(300px, 84vw);
    background: var(--surface);
    border-right: 1px solid var(--stroke);
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 2px;
    animation: drawerIn .2s cubic-bezier(.4, 0, .2, 1);
}
.drawer__head {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 16px; margin-bottom: 8px;
    border-bottom: 1px solid var(--stroke);
}
.drawer__head .appbar__logo { width: 30px; height: 30px; }
.drawer__brand { font-weight: 700; letter-spacing: -.01em; }
.drawer__item {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 12px 10px; text-align: left;
    border: 0; background: none; color: var(--text-muted);
    font-size: .95rem; font-weight: 500; cursor: pointer;
}
.drawer__item:hover { background: var(--surface-2); }
.drawer__item--active { color: var(--accent-strong); background: var(--accent-soft); }
.drawer__icon { width: 24px; text-align: center; font-size: 1.1rem; }

@keyframes drawerIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes drawerFade { from { opacity: 0; } to { opacity: 1; } }

.screen {
    width: 100%;
    min-height: calc(100dvh - var(--nav-height));
    padding: 16px;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
    background: var(--surface); border: 1px solid var(--stroke);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin: 18px 0 8px; }

.event-list { display: grid; gap: 8px; margin-bottom: 16px; }
.event {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--stroke);
    border-radius: var(--radius-sm); padding: 12px 14px;
}
.event--conflict { border-left: 3px solid var(--warn); }
.event__time {
    flex: 0 0 52px; font-weight: 600; font-size: .82rem; color: var(--accent-strong);
    padding-top: 1px;
}
.event__body { display: grid; gap: 2px; min-width: 0; }
.event__title { font-weight: 500; }
.event__sub { color: var(--text-muted); font-size: .84rem; }

/* ── Lists & chips ─────────────────────────────────────── */
.list { display: grid; gap: 8px; margin: 12px 0; }
.list__item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; text-align: left;
    background: var(--surface); border: 1px solid var(--stroke);
    border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer;
    color: var(--text); font: inherit;
}
.list__main { display: grid; gap: 2px; min-width: 0; }
.list__title { font-weight: 500; }
.list__sub { color: var(--text-muted); font-size: .82rem; }
.list__chev { color: var(--text-muted); }
a.list__item { text-decoration: none; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto; border: 1px solid var(--stroke); background: var(--surface);
    color: var(--text-muted); border-radius: 999px; padding: 6px 14px;
    font-size: .8rem; font-weight: 500; cursor: pointer; text-transform: capitalize;
}
.chip--active { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }

.badge { display: inline-block; font-size: .68rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.badge--warn { background: rgba(242, 153, 74, .16); color: var(--warn); }
.badge--ok { background: rgba(33, 150, 83, .16); color: var(--ok); }

.note {
    background: var(--surface-2); border: 1px solid var(--stroke);
    border-radius: var(--radius-sm); padding: 10px 12px; font-size: .9rem; margin: 6px 0;
    white-space: pre-wrap;
}

.inline-form { display: grid; gap: 10px; margin: 12px 0; padding: 14px; background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius-sm); }
.meeting-detail { margin-top: 14px; }
.meeting-detail__title { margin: 10px 0 2px; letter-spacing: -.02em; }

.greet { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 2px; }
.date-line { color: var(--text-muted); margin: 0 0 16px; font-size: .9rem; }

.hero {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--stroke);
    border-radius: var(--radius); padding: 22px;
    position: relative; overflow: hidden; cursor: pointer; margin-bottom: 16px;
}
.hero__label { display: block; font-size: .8rem; opacity: .8; text-transform: uppercase; letter-spacing: .08em; }
.hero__title { display: block; font-size: 1.5rem; font-weight: 700; margin: 4px 0; }
.hero__sub { display: block; font-size: .88rem; opacity: .8; }

.placeholder {
    display: grid; gap: 8px; place-items: start;
    color: var(--text-muted);
}
.placeholder__title { color: var(--text); font-weight: 600; margin: 0; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 12px; padding: 12px 16px; font-weight: 500; font-size: .95rem;
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn--primary { background: var(--accent-fill); color: #fff; }
.btn--primary:hover { filter: brightness(1.05); }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; border-color: var(--stroke); color: var(--text); }

/* ── Navigation ─────────────────────────────────────────
   Narrow screens (<1100px): primary navigation lives in the hamburger
   drawer; the quick-capture button stays on screen as a floating action
   button. Wide screens keep the persistent sidebar. */
.nav {
    position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 56px; height: 56px;
    z-index: 35;
    pointer-events: none;
}
.nav__list { display: none; }
.nav__capture {
    pointer-events: auto;
    display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px;
    border: 0;
    background: var(--accent-fill);
    color: #fff; font-size: 1.5rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 8px 24px rgba(11, 16, 32, .30);
}

/* Tablet and up: a little more breathing room in the header. */
@media (min-width: 768px) {
    .appbar { padding: 12px 20px; }
}

/* Desktop: persistent sidebar */
@media (min-width: 1100px) {
    .nav {
        top: var(--nav-height); bottom: 0; left: 0; right: auto;
        width: 240px;
        pointer-events: auto;
        display: flex; flex-direction: column; justify-content: flex-start; gap: 4px;
        background: color-mix(in srgb, var(--surface) 92%, transparent);
        backdrop-filter: blur(12px);
        border-right: 1px solid var(--stroke);
        padding: 12px 0 0;
    }
    .nav__list { display: flex; flex-direction: column; align-items: stretch; width: 100%; }
    .nav__item {
        display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px;
        padding: 12px 20px; font-size: .9rem; font-weight: 500;
        color: var(--text-muted); border: 0; background: none; cursor: pointer;
    }
    .nav__item--active { color: var(--accent-strong); }
    .nav__icon { font-size: 1.15rem; width: 22px; text-align: center; line-height: 1; }
    .nav__capture {
        flex: 0 0 auto; width: auto; height: auto; margin: 8px 16px; padding: 12px;
        font-size: .9rem; gap: 8px; box-shadow: none;
    }
    .screen { padding-left: 280px; padding-bottom: 24px; }
}

/* ── Auth screens ─────────────────────────────────────── */
.auth-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100dvh; padding: 20px;
    background-color: var(--bg);
    background-image: url('../assets/backgrounds/mobile-light.svg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
[data-theme="dark"] .auth-body { background-image: url('../assets/backgrounds/mobile-dark.svg'); }
@media (min-width: 768px) {
    .auth-body { background-image: url('../assets/backgrounds/tablet-light.svg'); }
    [data-theme="dark"] .auth-body { background-image: url('../assets/backgrounds/tablet-dark.svg'); }
}
@media (min-width: 1100px) {
    .auth-body { background-image: url('../assets/backgrounds/desktop-light.svg'); }
    [data-theme="dark"] .auth-body { background-image: url('../assets/backgrounds/desktop-dark.svg'); }
}
.auth-card {
    width: 100%; max-width: 400px; background: var(--surface);
    border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 32px 24px;
}
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-logo {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
    display: block;
}
.auth-title { font-size: 1.6rem; margin: 0 0 2px; letter-spacing: -.02em; }
.auth-tagline { color: var(--text-muted); margin: 0 0 8px; }
.auth-version { color: var(--text-muted); font-size: .75rem; opacity: .7; margin: 0 0 8px; }
.auth-alert { background: rgba(235, 87, 87, .12); color: var(--danger); border-radius: 0; padding: 10px 12px; font-size: .9rem; margin-bottom: 16px; }
.auth-form { display: grid; gap: 14px; }
.auth-divider { text-align: center; color: var(--text-muted); margin: 4px 0; font-size: .85rem; }
.auth-switch { text-align: center; color: var(--text-muted); margin: 18px 0 0; font-size: .9rem; }
.auth-credit { text-align: center; color: var(--text-muted); font-size: .8rem; margin: 16px 0 0; }
.auth-credit img { height: 14px; vertical-align: middle; }
.regnoai-logo { height: 14px; vertical-align: middle; }
.regnoai-logo--dark { display: none; }
[data-theme="dark"] .regnoai-logo--dark { display: inline; }
[data-theme="dark"] .regnoai-logo--light { display: none; }

.field { display: grid; gap: 6px; }
.field span { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.field input, .field textarea, .field select {
    width: 100%; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--stroke); background: var(--surface); color: var(--text);
    font-size: 1rem; font-family: inherit;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── First-use tour ──────────────────────────────────────
   A spotlight over the live UI: one element with a 9999px box-shadow makes
   the shade, and the card floats next to the highlighted element. */
.tour { position: fixed; inset: 0; z-index: 90; }

.tour__shade { position: absolute; inset: 0; background: rgba(11, 16, 32, .62); backdrop-filter: blur(2px); }

.tour__spot {
    position: fixed;
    border-radius: var(--radius);
    box-shadow: 0 0 0 9999px rgba(11, 16, 32, .62), 0 0 0 2px rgba(255, 255, 255, .8) inset;
    pointer-events: none;
    transition: top .28s cubic-bezier(.4, 0, .2, 1), left .28s cubic-bezier(.4, 0, .2, 1), width .28s ease, height .28s ease;
}
.tour__spot::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid var(--accent);
    animation: tourPulse 1.9s ease-in-out infinite;
}

.tour__card {
    position: fixed;
    background: var(--surface);
    border: 1px solid var(--stroke);
    box-shadow: 0 18px 44px rgba(11, 16, 32, .34);
    padding: 16px 16px 12px;
}
.tour__card--center {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(340px, calc(100vw - 32px));
}

.tour__head { display: flex; align-items: center; justify-content: space-between; }
.tour__badge {
    background: var(--accent-soft); color: var(--accent-strong);
    font-size: .7rem; font-weight: 700; letter-spacing: .04em; padding: 3px 9px;
}
.tour__close { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 0 2px; }
.tour__close:hover { color: var(--text); }

.tour__title { margin: 10px 0 4px; font-size: 1.05rem; letter-spacing: -.01em; }
.tour__body { margin: 0; font-size: .88rem; color: var(--text-muted); line-height: 1.45; }

.tour__dots { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0 0; }
.tour__dot { width: 6px; height: 6px; background: var(--stroke); transition: background .2s ease, width .2s ease; }
.tour__dot--done { background: var(--accent-soft); }
.tour__dot--on { width: 18px; background: var(--accent); }

.tour__actions { display: flex; gap: 8px; margin-top: 14px; }
.tour__actions .btn { flex: 1; }
.tour__next { flex: 2 !important; }

.tour__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.tour__link { background: none; border: 0; padding: 0; font: inherit; font-size: .76rem; font-weight: 600; color: var(--accent-strong); cursor: pointer; text-decoration: underline; }
.tour__link--dim { color: var(--text-muted); font-weight: 500; text-decoration: none; }
.tour__link:disabled { opacity: .5; cursor: default; }

@keyframes tourPulse {
    0%, 100% { opacity: .55; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.015); }
}

/* ── Misc ─────────────────────────────────────────────── */
.hidden { display: none; }

/* Inline status line: nothing that fails should fail silently */
.app-notice {
    position: fixed; z-index: 60; top: 68px; left: 50%; transform: translateX(-50%);
    max-width: min(560px, calc(100vw - 32px));
    background: var(--surface); color: var(--text);
    border: 1px solid var(--danger); border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: .86rem; cursor: pointer;
    box-shadow: 0 10px 30px rgba(11, 16, 32, .28);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.nav__item:focus-visible, .chip:focus-visible, .avatar:focus-visible,
.appbar__logo-btn:focus-visible, .list__item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
