/* ISP Ventures Cards - shares the marketing site's palette and typography. */

:root {
    --ink: #071b1f;
    --ink-2: #0b282d;
    --paper: #f3f0e8;
    --white: #ffffff;
    --cyan: #48d7da;
    --acid: #d8f05b;
    --teal: #137f83;
    --teal-deep: #148f93;
    --line-dark: rgba(7, 27, 31, .16);
    --line-light: rgba(255, 255, 255, .16);
    --muted: #52666a;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    background: var(--paper);
    color: var(--ink);
}

a { color: inherit; text-decoration: none; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.brand-mark { font-size: 20px; font-weight: 700; letter-spacing: -1.2px; }
.brand-mark span { color: var(--teal-deep); }
.brand-name { font-size: 13px; font-weight: 700; letter-spacing: .02em; }

.eyebrow {
    display: flex; align-items: center; gap: 10px; margin: 0 0 18px;
    font-family: var(--mono); font-size: 11px; font-weight: 650;
    letter-spacing: .14em; text-transform: uppercase; color: var(--teal-deep);
}
.eyebrow > span { width: 26px; height: 1px; background: currentColor; }

/* ---------------- public card ---------------- */

.card-body { background: var(--paper); }

.vcard { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--paper); }

.vcard-head {
    position: relative; padding: 26px 26px 34px;
    /* --head-* are set inline per card when an accent colour is chosen; the
       fallbacks are the standard ISP Ventures header. */
    background: var(--head-bg, var(--ink)); color: var(--head-fg, var(--white)); text-align: center;
}
.vcard-head::before {
    content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .8) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .8) 1px, transparent 1px);
    background-size: 34px 34px;
}
.vcard-head > * { position: relative; }

.vcard-brand {
    display: flex; align-items: baseline; gap: 8px;
    justify-content: center; margin-bottom: 26px;
}
.vcard-brand .brand-mark span { color: var(--cyan); }

.vcard-avatar {
    width: 132px; height: 132px; margin: 0 auto 20px;
    border-radius: 50%; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .35);
    background: var(--ink-2);
    display: grid; place-items: center;
    box-shadow: 0 0 0 10px rgba(72, 215, 218, .07);
}
.vcard-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard-initials { font-family: var(--mono); font-size: 40px; font-weight: 600; color: var(--head-title, var(--cyan)); }

.vcard-head h1 {
    margin: 0 0 8px; font-size: clamp(28px, 7vw, 36px);
    letter-spacing: -.035em; font-weight: 600; line-height: 1.1;
}
.vcard-title { margin: 0 0 6px; font-size: 15px; color: var(--head-title, var(--cyan)); }
.vcard-org {
    margin: 0 0 26px; font-family: var(--mono); font-size: 10px;
    letter-spacing: .12em; text-transform: uppercase; color: var(--head-muted, #90a2a4);
}
.vcard-tagline {
    margin: -18px 0 24px; font-size: 13px; font-style: italic;
    color: var(--head-muted, #90a2a4);
}
.brand-logo { display: block; max-width: 190px; max-height: 54px; width: auto; height: auto; }

.vcard-save {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    min-height: 54px; padding: 0 30px; width: 100%; max-width: 320px;
    background: var(--save-bg, var(--acid)); color: var(--save-fg, var(--ink));
    font-size: 14px; font-weight: 720;
    transition: transform .18s ease;
}
.vcard-save:hover, .vcard-save:focus-visible { transform: translateY(-2px); }

.vcard-bio {
    margin: 0; padding: 24px 26px 4px;
    font-size: 15px; line-height: 1.6; color: var(--muted); text-align: center;
}

.vcard-rows { padding: 24px 26px 0; }
.vcard-row {
    display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 14px;
    min-height: 66px; padding: 12px 0;
    border-bottom: 1px solid var(--line-dark);
    transition: padding-left .16s ease;
}
.vcard-rows a:first-child { border-top: 1px solid var(--line-dark); }
.vcard-row:hover, .vcard-row:focus-visible { padding-left: 6px; }
.row-key {
    font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--teal-deep);
}
.row-value { font-size: 15px; font-weight: 550; overflow-wrap: anywhere; }
.row-go { color: var(--teal-deep); font-size: 16px; }

.vcard-foot {
    padding: 34px 26px 44px; text-align: center;
}
.vcard-foot a {
    font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--teal-deep);
    border-bottom: 1px solid currentColor; padding-bottom: 3px;
}
.vcard-foot p {
    margin: 20px 0 0; font-family: var(--mono); font-size: 9px;
    letter-spacing: .1em; text-transform: uppercase; color: #8a9a9c;
}
.vcard-foot span { color: var(--teal-deep); margin: 0 4px; }

/* ---------------- app chrome ---------------- */

.app-shell { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }

.app-nav { background: var(--ink); color: var(--white); }
.app-nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.app-brand { display: inline-flex; align-items: baseline; gap: 8px; }
.app-brand .brand-mark span { color: var(--cyan); }
.app-nav-links { display: flex; align-items: center; gap: 22px; font-size: 13px; flex-wrap: wrap; }
.app-nav-links a { color: #c4d0d1; }
.app-nav-links a:hover { color: var(--white); }
.app-signout { color: #7d9294 !important; }

.app-main { padding: 42px 0 80px; }

.app-foot { border-top: 1px solid var(--line-dark); padding: 26px 0 40px; }
.app-foot p { margin: 0; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #6d8184; }
.app-foot a { border-bottom: 1px solid var(--line-dark); }

.dash-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; flex-wrap: wrap; margin-bottom: 34px;
}
.dash-head h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.04em; font-weight: 590; }

.panel {
    background: var(--white); border: 1px solid var(--line-dark);
    padding: 30px; margin-bottom: 26px;
}
.panel-narrow { max-width: 470px; margin-inline: auto; margin-top: 40px; }
.panel h1 { margin: 0 0 14px; font-size: clamp(27px, 4vw, 36px); letter-spacing: -.035em; font-weight: 590; }
.panel h2 { margin: 0 0 18px; font-size: 15px; font-family: var(--mono); font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-deep); }
.lede { margin: 0 0 24px; color: var(--muted); line-height: 1.62; font-size: 15px; }
.lede code { font-family: var(--mono); font-size: 13px; background: var(--paper); padding: 2px 6px; overflow-wrap: anywhere; }
.hint { margin: 14px 0 0; font-size: 13px; color: #6b7f83; line-height: 1.55; }

/* stats */
.stat-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line-dark); border-left: 1px solid var(--line-dark);
    margin-bottom: 26px; background: var(--white);
}
.stat {
    padding: 22px; min-height: 128px; display: flex; flex-direction: column; gap: 6px;
    border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark);
}
.stat-key { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); }
.stat strong { font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1; margin-top: auto; }
.stat small { font-size: 11px; color: #6b7f83; }

.sparkline { width: 100%; height: 92px; display: block; }

/* qr */
.qr-panel { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start; }
.qr-preview {
    padding: 14px; border: 1px solid var(--line-dark); background: var(--white);
    box-shadow: 12px 12px 0 #d9e3d2;
}
.qr-preview img { display: block; width: 200px; height: 200px; }

.copy-row { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.copy-row input {
    flex: 1 1 240px; min-height: 46px; padding: 0 14px;
    border: 1px solid var(--line-dark); background: var(--paper);
    font-family: var(--mono); font-size: 13px; color: var(--ink);
}

/* forms */
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack h2 { margin-top: 12px; }
label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 620; }
label > span small { font-weight: 400; color: #7b8d90; margin-left: 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
    min-height: 48px; padding: 12px 14px;
    border: 1px solid var(--line-dark); background: var(--white);
    font-family: var(--sans); font-size: 15px; color: var(--ink);
    border-radius: 0; -webkit-appearance: none; appearance: none;
}
textarea { min-height: auto; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal-deep); outline-offset: 1px; border-color: transparent; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.link-row { gap: 12px; }

.slug-field { display: flex; align-items: stretch; border: 1px solid var(--line-dark); background: var(--white); }
.slug-prefix {
    display: flex; align-items: center; padding: 0 10px; background: var(--paper);
    font-family: var(--mono); font-size: 12px; color: #6b7f83; white-space: nowrap;
    border-right: 1px solid var(--line-dark);
}
.slug-field input { border: 0; flex: 1; min-width: 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    min-height: 50px; padding: 0 24px; border: 0; cursor: pointer;
    font-family: var(--sans); font-size: 13px; font-weight: 720;
    transition: transform .18s ease;
    align-self: flex-start;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }

.link-btn {
    background: none; border: 0; padding: 0; cursor: pointer;
    font: inherit; font-size: 12px; color: var(--teal-deep);
    border-bottom: 1px solid currentColor;
}
.inline-form { display: inline; }

.photo-form { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.photo-current {
    width: 84px; height: 84px; flex: none; overflow: hidden; border-radius: 50%;
    border: 1px solid var(--line-dark); background: var(--paper);
    display: grid; place-items: center;
}
.photo-current img { width: 100%; height: 100%; object-fit: cover; }
.photo-empty { color: #9aa9ab; }
.photo-form input[type=file] { display: block; margin-bottom: 14px; font-size: 13px; }

.invite-form { display: grid; grid-template-columns: 2fr 1fr auto; gap: 16px; align-items: end; }
.invite-result { border-color: var(--teal-deep); }

/* tables */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line-dark); vertical-align: top; }
.data-table th {
    font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--teal-deep); font-weight: 650; white-space: nowrap;
}
.data-table th small { display: block; color: #8a9a9c; font-size: 8px; margin-top: 2px; }
.data-table td small { display: block; color: #7b8d90; font-size: 12px; margin-top: 2px; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table a { border-bottom: 1px solid var(--line-dark); font-family: var(--mono); font-size: 12px; }

/* flash */
.flash {
    padding: 14px 18px; margin-bottom: 20px; font-size: 14px; line-height: 1.5;
    border-left: 3px solid var(--teal-deep); background: var(--white);
}
.flash-error { border-left-color: #b23c3c; }
.flash-success { border-left-color: var(--teal-deep); }
.flash-warning { border-left-color: #c58a1e; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 3px; }

@media (max-width: 860px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .qr-panel { grid-template-columns: 1fr; }
    .qr-preview { justify-self: start; }
    .invite-form { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .app-shell { width: calc(100% - 28px); }
    .panel { padding: 22px; }
    .field-row { grid-template-columns: 1fr; }
    .stat { min-height: 110px; padding: 18px; }
    .stat strong { font-size: 28px; }
    .vcard-rows { padding-inline: 20px; }
    .vcard-head { padding-inline: 20px; }
    .vcard-row { grid-template-columns: 66px 1fr auto; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition-duration: .01ms !important; }
}

.field-note { font-weight: 400; font-size: 12px; color: #6b7f83; line-height: 1.5; }
.brand-guest {
    font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--cyan); font-weight: 600;
}

/* editor: images, colour picker, admin chrome */
.image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.image-slot { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.slot-key { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); }
.image-slot input[type=file] { font-size: 13px; max-width: 100%; }
.logo-current {
    min-width: 150px; min-height: 66px; padding: 10px 14px;
    display: grid; place-items: center;
    border: 1px solid var(--line-dark); background: var(--ink);
}
.logo-current img { max-width: 150px; max-height: 46px; width: auto; height: auto; display: block; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 12px; }

.colour-field { display: flex; align-items: center; gap: 10px; }
.colour-field input[type=color] {
    width: 48px; height: 48px; padding: 2px; flex: none; cursor: pointer;
    border: 1px solid var(--line-dark); background: var(--white);
}
.colour-field input[type=text] { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; }

.crumb { margin: 0 0 18px; font-size: 13px; }
.crumb a { color: var(--teal-deep); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.dash-sub { margin: 10px 0 0; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #6b7f83; }
.status-active { color: var(--teal-deep); }
.status-disabled { color: #b23c3c; }
.row-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

@media (max-width: 700px) {
    .image-grid { grid-template-columns: 1fr; gap: 26px; }
}
