/* Zoomin design system.
 *
 * One file, loaded by the marketing site, the app and the auth pages, so a
 * button looks the same wherever someone meets it. Tokens first, then the
 * primitives, then the two shells.
 */

:root {
    --indigo-50:  #eef2ff;
    --indigo-100: #e0e7ff;
    --indigo-200: #c7d2fe;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;

    --ink:        #0f172a;
    --ink-2:      #1e293b;
    --muted:      #64748b;
    --muted-2:    #94a3b8;
    --line:       #e2e8f0;
    --line-soft:  #f1f5f9;
    --surface:    #ffffff;
    --canvas:     #f8fafc;

    --green-bg:   #dcfce7;  --green-ink:  #15803d;  --green-line: #bbf7d0;
    --amber-bg:   #fef3c7;  --amber-ink:  #92400e;  --amber-line: #fde68a;
    --red-bg:     #fee2e2;  --red-ink:    #b91c1c;  --red-line:   #fecaca;
    --blue-bg:    #dbeafe;  --blue-ink:   #1e40af;  --blue-line:  #bfdbfe;

    --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow:    0 4px 14px rgba(15, 23, 42, .07);
    --shadow-lg: 0 18px 45px rgba(15, 23, 42, .13);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
            Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --nav-h: 64px;
    --sidebar-w: 232px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.022em; font-weight: 680; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
p  { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

img, video { max-width: 100%; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; }

.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: .8125em; }
.nowrap { white-space: nowrap; }

/* --------------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: 42px;
    padding: 0 1.15rem;
    border: 1px solid transparent;
    border-radius: var(--r);
    font: inherit;
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, border-color .15s, opacity .15s, transform .06s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--indigo-600); color: #fff; }
.btn-primary:hover { background: var(--indigo-700); }

.btn-secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-secondary:hover { background: var(--line-soft); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-soft); }

.btn-danger { background: var(--red-bg); color: var(--red-ink); border-color: var(--red-line); }
.btn-danger:hover { background: var(--red-line); }

.btn-lg { height: 50px; padding: 0 1.6rem; font-size: 1rem; border-radius: 12px; }
.btn-sm { height: 34px; padding: 0 .8rem; font-size: .8125rem; }
.btn-block { width: 100%; }

/* Data-table action buttons — soft pastel fills, ink from the same hue dark
 * enough to clear 4.5:1. */
.action-btn {
    display: inline-block;
    padding: .25rem .5rem;
    font-size: .75rem;
    font-weight: 500;
    border: 1px solid;
    border-radius: var(--r-sm);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.action-btn-view    { background: var(--line-soft); color: #475569; border-color: var(--line); }
.action-btn-view:hover { background: var(--line); text-decoration: none; }
.action-btn-approve { background: var(--green-bg); color: var(--green-ink); border-color: var(--green-line); }
.action-btn-delete  { background: var(--red-bg); color: var(--red-ink); border-color: var(--red-line); }

/* --------------------------------------------------------------------------
 * Forms
 * ------------------------------------------------------------------------ */

label { display: block; font-size: .8125rem; font-weight: 600; color: var(--ink-2); margin-bottom: .35rem; }

.input, input[type=text], input[type=email], input[type=password],
input[type=number], input[type=search], select, textarea {
    width: 100%;
    height: 44px;
    padding: 0 .75rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
    font: inherit;
    font-size: .9375rem;
    color: var(--ink);
}
textarea { height: auto; padding: .6rem .75rem; line-height: 1.55; resize: vertical; }
.input:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3px var(--indigo-100);
}
.field { margin-bottom: 1rem; }
.hint { font-size: .8125rem; color: var(--muted); margin-top: .35rem; }

.checkline { display: flex; align-items: flex-start; gap: .6rem; }
.checkline input[type=checkbox] { width: auto; height: auto; margin-top: .25rem; }
.checkline label { margin: 0; font-weight: 500; }

/* --------------------------------------------------------------------------
 * Cards, notices, badges
 * ------------------------------------------------------------------------ */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.25rem;
}
.card-pad-lg { padding: 1.75rem; }

.notice {
    padding: .75rem 1rem;
    border: 1px solid;
    border-radius: var(--r);
    font-size: .875rem;
    margin-bottom: 1rem;
}
.notice-error   { background: var(--red-bg);   color: var(--red-ink);   border-color: var(--red-line); }
.notice-ok      { background: var(--green-bg); color: var(--green-ink); border-color: var(--green-line); }
.notice-warn    { background: var(--amber-bg); color: var(--amber-ink); border-color: var(--amber-line); }
.notice-info    { background: var(--blue-bg);  color: var(--blue-ink);  border-color: var(--blue-line); }
.notice a { color: inherit; text-decoration: underline; }

.badge {
    display: inline-block;
    padding: .2rem .5rem;
    border-radius: var(--r-sm);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.badge-pro     { background: var(--indigo-100); color: var(--indigo-700); }
.badge-free    { background: var(--line-soft);  color: var(--muted); }
.badge-ready   { background: var(--green-bg);   color: var(--green-ink); }
.badge-working { background: var(--amber-bg);   color: var(--amber-ink); }
.badge-failed  { background: var(--red-bg);     color: var(--red-ink); }
.badge-public  { background: var(--blue-bg);    color: var(--blue-ink); }

/* --------------------------------------------------------------------------
 * Marketing shell
 * ------------------------------------------------------------------------ */

.site-nav {
    position: sticky; top: 0; z-index: 50;
    height: var(--nav-h);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-nav .wrap { display: flex; align-items: center; gap: 1.5rem; height: 100%; }
.site-nav nav { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.site-nav nav a { color: var(--ink-2); font-size: .9375rem; font-weight: 500; }
.site-nav nav a:hover { color: var(--indigo-600); text-decoration: none; }

.brand {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: 1.2rem; font-weight: 750; letter-spacing: -.035em;
    color: var(--ink); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 26px; height: 26px; border-radius: 8px; flex: none;
    background: linear-gradient(135deg, var(--indigo-500), #a855f7);
    display: grid; place-items: center;
    color: #fff; font-size: 13px; font-weight: 800;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 2.5rem 0;
    margin-top: 4rem;
    font-size: .875rem;
    color: var(--muted);
}
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--indigo-600); }
.site-footer h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
                  color: var(--muted-2); margin-bottom: .6rem; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }

/* --------------------------------------------------------------------------
 * Marketing sections
 * ------------------------------------------------------------------------ */

.hero { padding: 5rem 0 4rem; text-align: center; }
.hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    letter-spacing: -.035em;
    margin-bottom: 1.15rem;
}
.hero .lede {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--muted);
    max-width: 40rem;
    margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.eyebrow {
    display: inline-block; margin-bottom: 1.1rem;
    padding: .3rem .75rem; border-radius: 999px;
    background: var(--indigo-50); color: var(--indigo-700);
    font-size: .8125rem; font-weight: 600;
}

.section { padding: 4rem 0; }
.section-head { text-align: center; max-width: 42rem; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: .75rem; }
.section-head p { color: var(--muted); font-size: 1.0625rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.feature { background: var(--surface); border: 1px solid var(--line);
           border-radius: var(--r-lg); padding: 1.5rem; }
.feature h3 { margin-bottom: .55rem; font-size: 1.0625rem; }
.feature p { color: var(--muted); font-size: .9375rem; margin: 0; }
.feature-icon {
    width: 40px; height: 40px; border-radius: 11px; margin-bottom: 1rem;
    background: var(--indigo-50); color: var(--indigo-600);
    display: grid; place-items: center;
}
.feature-icon svg { width: 20px; height: 20px; }

/* Pricing */
.plans { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
         max-width: 760px; margin: 0 auto; align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--r-xl); padding: 1.85rem; }
.plan-featured { border-color: var(--indigo-500); box-shadow: var(--shadow-lg); position: relative; }
.plan-flag {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--indigo-600); color: #fff; font-size: .6875rem; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px;
}
.plan h3 { font-size: 1.125rem; margin-bottom: .3rem; }
.plan .price { font-size: 2.75rem; font-weight: 750; letter-spacing: -.04em; line-height: 1.1; }
.plan .price small { font-size: .9375rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .blurb { color: var(--muted); font-size: .9375rem; margin: .5rem 0 1.4rem; }
.plan ul { list-style: none; padding: 0; margin: 1.4rem 0 0; font-size: .9375rem; }
.plan li { display: flex; gap: .6rem; align-items: flex-start; padding: .4rem 0; }
.tick { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--indigo-600); }
.tick-off { color: var(--muted-2); }
.li-off { color: var(--muted-2); }

.compare-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.compare-table th, .compare-table td {
    padding: .8rem 1rem; border-bottom: 1px solid var(--line); text-align: left;
}
.compare-table thead th {
    font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--line);
}
.compare-table td.col-val { text-align: center; width: 130px; }
.compare-table tbody tr:hover { background: var(--line-soft); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line);
                border-radius: var(--r-lg); background: var(--surface); }

.faq-item { border-bottom: 1px solid var(--line); padding: 1.15rem 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { font-size: 1rem; margin-bottom: .45rem; }
.faq-item p { color: var(--muted); font-size: .9375rem; margin: 0; }

.cta-band {
    background: linear-gradient(135deg, var(--indigo-600), #7c3aed);
    color: #fff; border-radius: var(--r-xl); padding: 3rem 2rem; text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: .75rem; }
.cta-band p { color: rgba(255, 255, 255, .85); max-width: 34rem; margin: 0 auto 1.75rem; }
.cta-band .btn-primary { background: #fff; color: var(--indigo-700); }
.cta-band .btn-primary:hover { background: var(--indigo-50); }

/* --------------------------------------------------------------------------
 * Auth pages
 * ------------------------------------------------------------------------ */

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2.5rem 1.25rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .card { padding: 1.85rem; box-shadow: var(--shadow); }
.auth-head { text-align: center; margin-bottom: 1.6rem; }
.auth-head h1 { font-size: 1.5rem; margin: 1.1rem 0 .35rem; }
.auth-head p { color: var(--muted); font-size: .9375rem; margin: 0; }
.auth-alt { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--muted); }

/* --------------------------------------------------------------------------
 * App shell
 * ------------------------------------------------------------------------ */

.app { display: flex; min-height: 100vh; }

.app-side {
    width: var(--sidebar-w); flex: none;
    background: var(--surface); border-right: 1px solid var(--line);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.app-side .brand { padding: 1.15rem 1.25rem; }
.app-side nav { padding: .5rem .75rem; flex: 1; overflow-y: auto; }
.side-link {
    display: flex; align-items: center; gap: .7rem;
    padding: .55rem .7rem; margin-bottom: 2px;
    border-radius: var(--r-sm);
    color: var(--ink-2); font-size: .9375rem; font-weight: 500;
}
.side-link:hover { background: var(--line-soft); text-decoration: none; }
.side-link.active { background: var(--indigo-50); color: var(--indigo-700); font-weight: 600; }
.side-link svg { width: 18px; height: 18px; flex: none; opacity: .75; }
.side-link.active svg { opacity: 1; }
.side-foot { padding: .9rem 1rem; border-top: 1px solid var(--line); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-body { flex: 1; padding: 1.75rem 2rem 3rem; max-width: 1180px; width: 100%; }

.page-header {
    display: flex; align-items: flex-start; gap: 1rem;
    flex-wrap: wrap; margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.5rem; }
.page-header .sub { color: var(--muted); font-size: .9375rem; margin-top: .25rem; }
.page-actions { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.page-actions .btn { height: 38px; }

.upsell {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    background: linear-gradient(135deg, var(--indigo-50), #f5f3ff);
    border: 1px solid var(--indigo-200);
    border-radius: var(--r-lg); padding: 1rem 1.25rem; margin-bottom: 1.5rem;
}
.upsell p { margin: 0; font-size: .9375rem; color: var(--indigo-700); }
.upsell .btn { margin-left: auto; }

.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            margin-bottom: 1.75rem; }
.stat { background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--r-lg); padding: 1.1rem 1.25rem; }
.stat .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
           color: var(--muted); font-weight: 700; }
.stat .v { font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; margin-top: .2rem; }
.stat .sub { font-size: .8125rem; color: var(--muted); }

.meter { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: .6rem; }
.meter > i { display: block; height: 100%; background: var(--indigo-500); border-radius: 999px; }
.meter.warn > i { background: #f59e0b; }
.meter.full > i { background: #dc2626; }

.empty { text-align: center; padding: 3.5rem 1.5rem; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: .5rem; }

/* Video grid */
.vid-grid { display: grid; gap: 1.25rem;
            grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.vid-card { background: var(--surface); border: 1px solid var(--line);
            border-radius: var(--r-lg); overflow: hidden; display: block; color: inherit; }
.vid-card:hover { text-decoration: none; box-shadow: var(--shadow); border-color: var(--indigo-200); }
.vid-thumb { aspect-ratio: 16 / 9; background: #0f172a; position: relative;
             display: grid; place-items: center; }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-thumb .ph { color: #475569; font-size: 2rem; }
.vid-dur {
    position: absolute; right: 8px; bottom: 8px;
    background: rgba(15, 23, 42, .85); color: #fff;
    font-size: .6875rem; font-weight: 600; padding: .15rem .4rem; border-radius: 4px;
}
.vid-meta { padding: .85rem 1rem 1rem; }
.vid-meta h3 { font-size: .9375rem; font-weight: 600; line-height: 1.35; margin-bottom: .35rem;
               display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
               overflow: hidden; }
.vid-meta .row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
                 font-size: .75rem; color: var(--muted); }

/* --------------------------------------------------------------------------
 * Modal — the app's own, no framework
 * ------------------------------------------------------------------------ */

.zm-modal {
    display: none; position: fixed; inset: 0; z-index: 900;
    background: rgba(15, 23, 42, .55);
    padding: 1.5rem;
    overflow-y: auto;
}
.zm-modal.show { display: flex; align-items: flex-start; justify-content: center; }
.zm-modal-content {
    background: var(--surface); border-radius: var(--r-lg);
    width: 100%; max-width: 520px; margin: auto;
    box-shadow: var(--shadow-lg);
}
.zm-modal-header {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line);
}
.zm-modal-title { font-size: 1.0625rem; font-weight: 650; margin: 0; }
.zm-modal-close {
    margin-left: auto; background: none; border: 0; cursor: pointer;
    font-size: 1.5rem; line-height: 1; color: var(--muted); padding: 0 .25rem;
}
.zm-modal-close:hover { color: var(--ink); }
.zm-modal-body { padding: 1.35rem; }
.zm-modal-footer {
    display: flex; justify-content: flex-end; gap: .6rem;
    padding: 1rem 1.35rem; border-top: 1px solid var(--line);
}
.zm-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
          height: 38px; padding: 0 1rem; border: 1px solid transparent;
          border-radius: var(--r); font: inherit; font-size: .875rem; font-weight: 600;
          cursor: pointer; }
.zm-btn-primary { background: var(--indigo-600); color: #fff; }
.zm-btn-primary:hover { background: var(--indigo-700); }
.zm-btn-secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.zm-btn-secondary:hover { background: var(--line-soft); }
.zm-btn-danger { background: #dc2626; color: #fff; }
.zm-btn-danger:hover { background: #b91c1c; }

/* --------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------ */

@media (max-width: 860px) {
    .app { flex-direction: column; }
    .app-side {
        width: 100%; height: auto; position: static;
        border-right: 0; border-bottom: 1px solid var(--line);
        flex-direction: row; align-items: center; gap: .5rem; overflow-x: auto;
    }
    .app-side .brand { padding: .8rem 1rem; }
    .app-side nav { display: flex; padding: .5rem; gap: .25rem; flex: 1; }
    .app-side .side-link { white-space: nowrap; margin: 0; }
    .app-side .side-foot { border-top: 0; border-left: 1px solid var(--line); }
    .app-body { padding: 1.25rem 1rem 2.5rem; }
    .site-nav nav { gap: .9rem; }
    .site-nav nav .hide-sm { display: none; }
    .hero { padding: 3.25rem 0 2.5rem; }
    .section { padding: 2.75rem 0; }
}
