/* Office Sim — site chrome (everything outside the simulator itself). */

:root {
    --word-blue:      #2b579a;
    --word-blue-dark: #1e3f70;
    --word-blue-soft: #eaf0f9;
    --ink:            #1b1b1f;
    --ink-soft:       #5b5f66;
    --ink-faint:      #8b9098;
    --line:           #d9dce1;
    --line-soft:      #ecedf0;
    --surface:        #ffffff;
    --canvas:         #f4f5f7;
    --green:          #107c41;
    --green-soft:     #e6f4ec;
    --amber:          #9a6700;
    --amber-soft:     #fff4d6;
    --red:            #b42318;
    --red-soft:       #fdeceb;
    --radius:         8px;
    --shadow:         0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

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

body {
    background: var(--canvas);
    color: var(--ink);
    font: 15px/1.55 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--word-blue); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 600; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }

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

.site-header {
    background: var(--word-blue);
    color: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}

.site-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.02rem;
    white-space: nowrap;
}

.brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background: #fff;
    color: var(--word-blue);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    font-family: Georgia, "Times New Roman", serif;
}

.site-nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
    align-items: center;
}

.site-nav a,
.site-nav button {
    color: #fff;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 6px;
    font: inherit;
    font-size: .92rem;
    background: none;
    border: 0;
    cursor: pointer;
}

.site-nav a:hover,
.site-nav button:hover { background: rgba(255, 255, 255, .16); }

.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, .22); }

.site-nav .who {
    font-size: .86rem;
    opacity: .85;
    padding-right: 6px;
    border-right: 1px solid rgba(255, 255, 255, .3);
    margin-right: 6px;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px 64px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.page-head p { margin: 0; color: var(--ink-soft); }

/* ------------------------------------------------------------------ cards */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-pad { padding: 20px; }

.grid {
    display: grid;
    gap: 16px;
}

.grid-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-lessons { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
}

.stat-value { font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.stat-label { color: var(--ink-soft); font-size: .86rem; margin-top: 2px; }

/* --------------------------------------------------------------- lessons */

.lesson-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow);
}

.lesson-card h3 { margin: 0; }

.lesson-card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .92rem;
    flex: 1;
}

.lesson-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--ink-faint);
}

.tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .02em;
    background: var(--line-soft);
    color: var(--ink-soft);
}

.tag-guided   { background: var(--word-blue-soft); color: var(--word-blue-dark); }
.tag-practice { background: var(--amber-soft);     color: var(--amber); }
.tag-done     { background: var(--green-soft);     color: var(--green); }
.tag-progress { background: var(--word-blue-soft); color: var(--word-blue-dark); }

.bar {
    height: 6px;
    border-radius: 999px;
    background: var(--line-soft);
    overflow: hidden;
}

.bar > span {
    display: block;
    height: 100%;
    background: var(--word-blue);
    border-radius: 999px;
    transition: width .3s ease;
}

.bar.is-done > span { background: var(--green); }

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 6px;
    border: 1px solid var(--word-blue);
    background: var(--word-blue);
    color: #fff;
    font: inherit;
    font-size: .93rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { background: var(--word-blue-dark); border-color: var(--word-blue-dark); }

.btn-ghost {
    background: var(--surface);
    color: var(--word-blue);
}

.btn-ghost:hover { background: var(--word-blue-soft); }

.btn-quiet {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

.btn-quiet:hover { background: var(--canvas); border-color: var(--ink-faint); }

.btn-danger { background: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #8f1c14; border-color: #8f1c14; }

.btn-sm { padding: 5px 11px; font-size: .84rem; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- tables */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

table.data th,
table.data td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}

table.data th {
    background: #fafbfc;
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--ink-soft);
}

table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fafbfc; }
table.data td.wrap-cell { white-space: normal; min-width: 220px; }

.empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--ink-soft);
}

/* ----------------------------------------------------------------- forms */

.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-size: .86rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--ink);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="search"],
.field select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}

.field input:focus,
.field select:focus {
    outline: 2px solid var(--word-blue);
    outline-offset: -1px;
    border-color: var(--word-blue);
}

.field .hint { font-size: .8rem; color: var(--ink-faint); margin-top: 4px; }

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    cursor: pointer;
}

.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 180px; }

/* ----------------------------------------------------------------- login */

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
    background:
        radial-gradient(1100px 500px at 15% -10%, #34619f 0%, transparent 60%),
        linear-gradient(160deg, #1e3f70 0%, #16305a 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 24px 60px rgba(10, 20, 40, .35);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-brand .brand-mark {
    background: var(--word-blue);
    color: #fff;
    width: 34px;
    height: 34px;
    font-size: 19px;
}

.auth-brand strong { font-size: 1.06rem; }
.auth-card h1 { font-size: 1.3rem; margin-bottom: 4px; }
.auth-card .sub { color: var(--ink-soft); font-size: .92rem; margin: 0 0 20px; }

.auth-foot {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
    font-size: .9rem;
    color: var(--ink-soft);
    text-align: center;
}

/* --------------------------------------------------------------- flashes */

.flash {
    padding: 11px 15px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: .92rem;
    border: 1px solid transparent;
}

.flash-error   { background: var(--red-soft);   color: var(--red);   border-color: #f6c9c5; }
.flash-success { background: var(--green-soft); color: var(--green); border-color: #bfe3ce; }
.flash-warning { background: var(--amber-soft); color: var(--amber); border-color: #f2dfae; }
.flash-info    { background: var(--word-blue-soft); color: var(--word-blue-dark); border-color: #c9d9f0; }

/* ------------------------------------------------------------ misc bits */

.muted { color: var(--ink-soft); }
.small { font-size: .86rem; }
.right { text-align: right; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inline-form { display: inline; }

.pill-score {
    display: inline-block;
    min-width: 52px;
    text-align: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .82rem;
    background: var(--line-soft);
    color: var(--ink-soft);
}

.pill-score.good { background: var(--green-soft); color: var(--green); }
.pill-score.mid  { background: var(--amber-soft); color: var(--amber); }
.pill-score.low  { background: var(--red-soft);   color: var(--red); }

@media (max-width: 640px) {
    .site-header-inner { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
    .site-nav { margin-left: 0; width: 100%; flex-wrap: wrap; }
    .wrap { padding: 20px 16px 48px; }
}
