:root {
    --ink: #243047;
    --muted: #687386;
    --cream: #fffaf0;
    --white: #ffffff;
    --sky: #dff5ff;
    --violet: #eee8ff;
    --gold: #ffd86f;
    --coral: #ff9d69;
    --mint: #dff8ec;
    --green: #2f9e69;
    --line: rgba(36, 48, 71, 0.12);
    --shadow: 0 28px 80px rgba(53, 61, 95, 0.16);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 8% 5%, var(--sky) 0, transparent 35%),
        radial-gradient(circle at 92% 18%, var(--violet) 0, transparent 34%),
        radial-gradient(circle at 80% 90%, #ffe8d8 0, transparent 30%),
        linear-gradient(135deg, var(--cream), #f9fbff 55%, #fff8f2);
}

a { color: inherit; }
button, input { font: inherit; }

.shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-grid {
    width: min(1050px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    overflow: hidden;
    background: rgba(255,255,255,.88);
    border: 1px solid var(--line);
    border-radius: 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.brand-panel {
    padding: 58px;
    background:
        linear-gradient(150deg, rgba(255,216,111,.80), rgba(255,157,105,.50)),
        linear-gradient(180deg, #fff7d6, #ffe9dc);
}

.form-panel { padding: 58px; background: rgba(255,255,255,.92); }

.logo {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    font-size: 29px;
    font-weight: 950;
    color: #382b10;
    background: linear-gradient(135deg, var(--gold), var(--coral));
    box-shadow: 0 14px 34px rgba(255, 157, 105, .25);
}

.brand-name { margin-top: 24px; font-weight: 900; letter-spacing: -.02em; }
.eyebrow {
    margin-bottom: 12px;
    color: #7555cc;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

h1, h2 { margin: 0; line-height: 1.02; letter-spacing: -.045em; }
h1 { margin-top: 24px; font-size: clamp(42px, 6vw, 72px); }
h2 { font-size: clamp(32px, 4vw, 48px); }
.lead { max-width: 520px; margin: 22px 0 0; color: #4f5b6e; font-size: 18px; line-height: 1.65; }
.small { color: var(--muted); font-size: 14px; line-height: 1.55; }

.promise-list { display: grid; gap: 14px; margin-top: 34px; }
.promise {
    display: flex;
    gap: 12px;
    align-items: center;
    font-weight: 750;
    color: #465166;
}
.promise-mark {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.68);
}

label { display: block; margin-top: 20px; font-size: 14px; font-weight: 800; }
input {
    width: 100%;
    margin-top: 8px;
    padding: 14px 15px;
    color: var(--ink);
    background: #fbfcff;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus { border-color: #9075d8; box-shadow: 0 0 0 4px rgba(144,117,216,.12); }

.button {
    width: 100%;
    margin-top: 24px;
    padding: 14px 18px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    color: #342710;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--coral));
    box-shadow: 0 14px 34px rgba(255,157,105,.22);
}
.button:hover { transform: translateY(-1px); }
.button.secondary { color: var(--ink); background: #f2effc; box-shadow: none; }

.alert {
    margin: 18px 0 0;
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 14px;
    line-height: 1.5;
}
.alert.error { color: #802f31; background: #fff0f0; border: 1px solid #ffd0d0; }
.alert.success { color: #236846; background: var(--mint); border: 1px solid #c2ecd8; }

.security-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 22px 28px;
    background: rgba(255,255,255,.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}
.brand-inline { display: flex; align-items: center; gap: 12px; font-weight: 900; }
.brand-inline .logo { width: 42px; height: 42px; border-radius: 14px; font-size: 20px; }
.logout { text-decoration: none; font-size: 14px; font-weight: 800; color: #6552a5; }

.dashboard-wrap { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 48px 0 80px; }
.dashboard-head { display: flex; justify-content: space-between; gap: 26px; align-items: flex-end; }
.dashboard-head p { max-width: 640px; color: var(--muted); }
.status-pill {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    color: #276345;
    font-size: 13px;
    font-weight: 850;
    background: var(--mint);
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
.card {
    min-height: 168px;
    padding: 22px;
    background: rgba(255,255,255,.88);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 16px 42px rgba(53,61,95,.09);
}
.card b { display: block; margin-top: 18px; font-size: 24px; }
.card span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.card-icon { font-size: 25px; }

.mission {
    margin-top: 18px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(255,255,255,.93), rgba(246,242,255,.94));
    border: 1px solid var(--line);
    border-radius: 24px;
}
.mission h3 { margin: 0; font-size: 24px; }
.mission p { max-width: 760px; color: var(--muted); }
.locked-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 20px; }
.locked-item { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.72); color: #596478; font-size: 14px; }

.setup-card {
    width: min(640px, 100%);
    padding: 42px;
    background: rgba(255,255,255,.93);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

@media (max-width: 900px) {
    .login-grid { grid-template-columns: 1fr; }
    .brand-panel, .form-panel { padding: 38px; }
    .cards { grid-template-columns: 1fr 1fr; }
    .locked-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .shell { padding: 14px; }
    .brand-panel, .form-panel, .setup-card { padding: 28px 22px; }
    .cards { grid-template-columns: 1fr; }
    .dashboard-head { align-items: flex-start; flex-direction: column; }
}

.password-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 12px;
}

.password-tool {
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
    color: #5c4a92;
    font-size: 13px;
    font-weight: 850;
    background: #f5f1ff;
    transition: transform .16s ease, opacity .16s ease, border-color .16s ease;
}

.password-tool:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(117, 85, 204, .35);
}

.password-tool.primary-tool {
    color: #342710;
    border-color: transparent;
    background: linear-gradient(135deg, rgba(255,216,111,.84), rgba(255,157,105,.72));
}

.password-tool:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.password-message {
    min-height: 22px;
    margin-top: 9px;
}

@media (max-width: 560px) {
    .password-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .password-tool {
        width: 100%;
    }
}


/* Active Desk modules */
.brand-inline { text-decoration: none; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.top-actions a { color: #6552a5; font-size: 14px; font-weight: 800; text-decoration: none; }

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card-link:hover {
    transform: translateY(-3px);
    border-color: rgba(117,85,204,.30);
    box-shadow: 0 22px 52px rgba(53,61,95,.14);
}
.card-active {
    background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(223,248,236,.72));
    border-color: rgba(47,158,105,.22);
}
.card-disabled { opacity: .78; }
.active-item { color: #276345; background: var(--mint); font-weight: 800; }

.module-wrap {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 48px 0 80px;
}
.module-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}
.module-head p { max-width: 720px; color: var(--muted); }
.module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 28px;
}
.panel {
    padding: 26px;
    background: rgba(255,255,255,.90);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 16px 42px rgba(53,61,95,.09);
}
.panel h3 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.panel p { color: var(--muted); }
input[type="file"] { padding: 12px; background: #fbfcff; }
.search-form .button-row, .button-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.button.compact {
    width: auto;
    min-width: 118px;
    margin-top: 14px;
    padding: 11px 16px;
    text-decoration: none;
    text-align: center;
}
.transcript-list-panel { margin-top: 18px; }
.list-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.transcript-list { display: grid; gap: 10px; }
.transcript-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(250,251,255,.86);
}
.file-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #5d4a97;
    font-size: 11px;
    font-weight: 900;
    background: #eee8ff;
}
.file-details { min-width: 0; }
.file-details strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-details span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}
.file-actions { display: flex; gap: 10px; }
.file-actions a {
    padding: 8px 11px;
    border-radius: 10px;
    color: #5d4a97;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    background: #f2effc;
}
.empty-state {
    display: grid;
    gap: 7px;
    padding: 30px;
    text-align: center;
    border: 1px dashed rgba(36,48,71,.18);
    border-radius: 16px;
    background: rgba(255,255,255,.56);
}
.empty-state span { color: var(--muted); }
.transcript-view { margin-top: 24px; }
.transcript-view pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #2f3a50;
    font: 15px/1.72 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.header-button {
    width: auto;
    min-width: 150px;
    margin-top: 0;
    text-align: center;
    text-decoration: none;
}

@media (max-width: 760px) {
    .module-head, .list-heading { align-items: flex-start; flex-direction: column; }
    .module-grid { grid-template-columns: 1fr; }
    .transcript-row { grid-template-columns: auto 1fr; }
    .file-actions { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .topbar { padding: 16px 18px; }
    .top-actions { gap: 11px; }
    .top-actions a { font-size: 12px; }
    .module-wrap { width: min(100% - 24px, 1180px); padding-top: 30px; }
    .search-form .button-row { align-items: stretch; flex-direction: column; }
    .button.compact { width: 100%; }
}


.functional-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 20px 0 24px;
    padding: 0;
    list-style: none;
}
.functional-list li {
    position: relative;
    padding: 12px 14px 12px 38px;
    border: 1px solid rgba(36,48,71,.08);
    border-radius: 13px;
    color: #324056;
    background: rgba(255,255,255,.72);
}
.functional-list li::before {
    content: "✓";
    position: absolute;
    left: 14px;
    top: 11px;
    color: #2f9e69;
    font-weight: 900;
}
@media (max-width: 760px) {
    .functional-list { grid-template-columns: 1fr; }
}
