/* Account menu prototype. Self-contained: published by the site build through
 * its existing css project, so there is no import to wire.
 *
 * Only the tokens, the shell and the menu are here. The journey furniture --
 * panels, fields, the rail -- belongs to the screen prototypes beside this one
 * and is not repeated, because this page argues the navigation and nothing
 * else. The tokens are the application's own, copied from
 * projects/ores.web/packages/web/src/styles.css, so the shell reads in the
 * colours the real one uses. */

:root {
    --bg: #121214;
    --panel: #1a1a1e;
    --panel-2: #26262b;
    --line: #30363d;
    --line-soft: #21262d;
    --ink: #e3e3e6;
    --ink-dim: #a1a1aa;
    --ink-faint: #71717a;
    --accent: #58a6ff;
    --accent-bright: #8ab4f8;
    --accent-dim: #21262d;
    --ok: #3fb950;
    --warn: #d29922;
    --bad: #f85149;
    --radius: 0.5rem;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* The prototype's own chrome, deliberately unlike the design on trial. */
.proto-note {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding: 6px 14px;
    background: repeating-linear-gradient(45deg, #2a2113, #2a2113 10px, #241d11 10px, #241d11 20px);
    border-bottom: 1px solid #4a3a17;
    color: var(--warn);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.proto-bar {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 5px 7px;
    background: #0b0e13;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    font-size: 12px;
    max-width: 95vw;
    flex-wrap: wrap;
    justify-content: center;
}

.proto-bar button {
    background: none;
    border: none;
    color: var(--ink-dim);
    font-size: 13px;
    line-height: 1;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 999px;
}

.proto-bar button:hover { background: var(--panel-2); color: var(--ink); }
.proto-bar button.on { background: var(--accent-dim); color: var(--ink); }
.proto-bar .label { padding: 0 8px; color: var(--ink); white-space: nowrap; }
.proto-bar .label b { color: var(--accent); }
.proto-bar .sep { color: var(--line); padding: 0 2px; }

/* ------------------------------------------------------------------ */
/* The shell, which is the subject: the application's own header.      */
/* ------------------------------------------------------------------ */

.shell { padding-top: 28px; min-height: 100vh; display: flex; flex-direction: column; }

.appheader {
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 20;
    background: var(--bg);
}
.appheader-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    max-width: 1180px;
    margin: 0 auto;
    min-width: 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: linear-gradient(140deg, var(--accent), #2f6fbf);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #06121f;
}
.brand .name { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }

/* The tenant's own surfaces, when a variant gives them a home in the header.
   The bar scrolls rather than squeezing the account chip off the edge, which
   is what eight groups do to a laptop. */
.appnav { display: flex; align-items: center; gap: 2px; margin-left: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.appnav::-webkit-scrollbar { display: none; }
.appnav a {
    color: var(--ink-dim);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: var(--radius);
    white-space: nowrap;
}
.appnav a:hover { background: var(--panel-2); color: var(--ink); }
.appnav a.here { background: var(--panel-2); color: var(--ink); }

.accounts { margin-left: auto; position: relative; flex: 0 0 auto; }

/* The trigger: this is the part that must show the person's own name and
   photo, so it is drawn at the size the real one would be. */
.trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    background: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 4px 10px 4px 4px;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}
.trigger:hover, .trigger.open { background: var(--panel-2); border-color: var(--line); }
.trigger .face { width: 28px; height: 28px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); flex: 0 0 28px; }
.trigger .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trigger .face.pending { display: grid; place-items: center; background: var(--panel-2); color: var(--ink-faint); font-size: 11px; }
.trigger .who { font-size: 13px; line-height: 1.2; text-align: left; display: flex; flex-direction: column; }
.trigger .who .nm { line-height: 1.25; }
.trigger .who .sub { color: var(--ink-faint); font-size: 11px; line-height: 1.2; }
.trigger .caret { color: var(--ink-faint); font-size: 10px; }

/* The menu itself. */
.menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 264px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    padding: 6px;
    z-index: 30;
}
.menu .head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 10px; align-items: center; }
.menu .head .face { width: 34px; height: 34px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); flex: 0 0 34px; }
.menu .head .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu .head .face.pending { display: grid; place-items: center; background: var(--panel-2); color: var(--ink-faint); font-size: 12px; }
.menu .head .nm { font-size: 13px; font-weight: 600; }
.menu .head .sub { font-size: 11px; color: var(--ink-faint); }
.menu .group { padding: 6px 0 2px; }
.menu .group + .group { border-top: 1px solid var(--line-soft); }
.menu .groupname {
    padding: 6px 10px 2px;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.menu a, .menu button.item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: none;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
}
.menu a:hover, .menu button.item:hover { background: var(--panel-2); }
.menu a.here { background: var(--accent-dim); }
.menu .heretag { margin-left: auto; font-size: 10px; color: var(--accent-bright); }
.menu .soon { margin-left: auto; font-size: 10px; color: var(--warn); }
.menu .none { padding: 8px 10px 8px; font-size: 12px; color: var(--ink-faint); }
.menu .out { color: var(--ink-dim); }

/* The page behind the menu. Only enough to place the shell in context: the
   subject is the navigation, not the screen it opens. */
main { flex: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: 28px 20px 96px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.01em; }
.card .lead { color: var(--ink-dim); margin: 0 0 18px; max-width: 62ch; }
.crumb { font-size: 12px; color: var(--ink-faint); margin-bottom: 10px; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 820px) { .panels { grid-template-columns: 1fr; } }
.mini { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 16px; }
.mini h2 { font-size: 13px; margin: 0 0 10px; }
.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.kv td { padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.kv tr:last-child td { border-bottom: none; }
.kv td:first-child { color: var(--ink-faint); width: 42%; }

/* Narrow: the session text drops, the navigations go, and the menu becomes a
   sheet. What each model does with a small screen is part of the comparison. */
.shell.narrow .appheader-inner { padding: 12px 14px; }
.shell.narrow .appnav { display: none; }
.shell.narrow .trigger .who { display: none; }
.shell.narrow .menu { position: fixed; left: 12px; right: 12px; top: 96px; min-width: 0; }

/* ------------------------------------------------------------------ */
/* The five models, each rendered inside the one shell.                */
/* ------------------------------------------------------------------ */

.mlauto { margin-left: auto; }

/* An area, on the landing: its name, then its cards. */
.area { margin-top: 22px; }
.areaname {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.emptyarea { color: var(--ink-faint); font-size: 13px; margin: 0; }
.runline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-faint); font-size: 12px; padding: 6px 0; }
.btn.small { padding: 4px 10px; font-size: 12px; }

/* The mode the session is in. The header answers to it, so it is named there. */
.modechip {
    font-size: 11px;
    letter-spacing: 0.04em;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 10px;
    color: var(--ink-dim);
    white-space: nowrap;
}

/* Navbar: the groups across the header, with their counts. */
.appnav .count {
    margin-left: 7px;
    font-size: 10px;
    color: var(--ink-faint);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 6px;
}
.appnav a.here .count { color: var(--accent-bright); border-color: var(--accent); }

/* Index: every journey on the landing page, grouped by topic. */
.groupgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.groupcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.groupcard h2 { font-size: 13px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.groupcard ul { list-style: none; margin: 0; padding: 0; }
.groupcard li { margin: 0; }
.groupcard a {
    display: block;
    padding: 6px 0;
    color: var(--ink-dim);
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid var(--line-soft);
}
.groupcard li:last-child a { border-bottom: none; }
.groupcard a:hover { color: var(--accent-bright); }
.tag { font-size: 10px; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); color: var(--ink-faint); font-weight: 400; }
.tag.soon { border-color: #4a3a17; color: var(--warn); }

/* Data only: nothing but the rows that lead somewhere. */
.rowlink {
    display: block;
    padding: 9px 0;
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid var(--line-soft);
}
.mini a.rowlink:last-child { border-bottom: none; }
.rowlink:hover { color: var(--accent-bright); }

/* The full-screen journey: a rail of its own, and no shell around it. Only
   what that screen needs, because its shape is the setup journeys' and not
   this page's subject. */
.journey { display: grid; grid-template-columns: 14rem 1fr; gap: 2rem; align-items: start; }
@media (max-width: 820px) { .journey { grid-template-columns: 1fr; } }
.railnav ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.railentry { display: flex; align-items: center; gap: 0.75rem; border-radius: 0.375rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; }
.railentry.done { color: var(--ink-dim); }
.railentry.current { background: var(--panel-2); color: var(--ink); font-weight: 500; }
.railentry.ahead { color: var(--ink-faint); }
.railmark { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; flex: 0 0 1.5rem; border-radius: 999px; border: 1px solid var(--line); font-size: 0.75rem; }
.railmark.done { border-color: var(--ok); color: var(--ok); }
.railmark.current { border-color: var(--accent); color: var(--accent-bright); }
.railmark.ahead { border-color: var(--line); color: var(--ink-faint); }

.btn {
    display: inline-block;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--ink);
    border-radius: var(--radius);
    padding: 9px 16px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06121f; font-weight: 600; }
.btn.ghost { background: none; border-color: transparent; color: var(--ink-dim); }
.stepfoot {
    margin-top: 1.5rem;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.mlauto { margin-left: auto; }
