:root {
    --ink: #102c30;
    --blue: #11605b;
    --muted: #456060;
    --line: #cad8d2;
    --wash: #eaf2ed;
    font: 16px/1.6 system-ui, sans-serif;
    color: var(--ink);
    background: #faf8f2;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--blue); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #b35c29; outline-offset: 4px; }
h1, h2, p, figure { margin: 0; }
h1, h2 { font-family: Georgia, serif; font-weight: 400; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5vw, 4.4rem); overflow-wrap: anywhere; }
h2 { font-size: 1.65rem; }

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 82px;
    padding: 1rem max(1.25rem, calc((100vw - 1240px) / 2));
    background: white;
    border-bottom: 1px solid var(--line);
}
.portal-brand { color: var(--ink); font-weight: 750; text-decoration: none; }
.portal-brand img { display: block; width: 146px; max-width: 100%; height: auto; }
.portal-header > a:last-child, .text-button { font-size: .92rem; font-weight: 650; }
.text-button { color: var(--blue); background: none; border: 0; cursor: pointer; padding: .5rem 0; }
.auth, .dashboard { width: min(1240px, calc(100% - 2.5rem)); margin: clamp(1.5rem, 5vw, 4rem) auto 0; }
.auth { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); background: white; border: 1px solid var(--line); }
.auth-content { padding: clamp(1.4rem, 5vw, 4.25rem); }
.eyebrow { margin-bottom: .85rem; color: var(--blue); font-size: .78rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.auth-content h1 { margin-bottom: 1.5rem; }
.auth-form { display: grid; gap: 1rem; }
.auth-form label { display: grid; gap: .35rem; font-size: .92rem; font-weight: 650; }
.auth-form label:not(.remember) :is(input, select, textarea) { width: 100%; min-height: 48px; padding: .65rem .8rem; border: 1px solid #82909b; border-radius: 2px; }
.auth-form textarea { resize: vertical; }
.auth-form .remember { display: flex; align-items: center; gap: .55rem; min-height: 30px; }
.remember input { margin: 0; width: 1.1rem; height: 1.1rem; accent-color: var(--blue); }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .65rem 1.1rem;
    color: white;
    background: var(--blue);
    border: 0;
    border-radius: 2px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: #0b4945; }
.auth-links, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.3rem; }
.auth-links { margin-top: 1.5rem; font-size: .92rem; }
.message { background: var(--wash); border-inline-start: 3px solid var(--blue); margin: 0 0 1rem; padding: .75rem 1rem; }
ul.message { padding-inline-start: 2rem; }
.error { background: #fff2ee; border-color: #a7462a; }
.auth-photo { position: relative; overflow: hidden; min-height: 34rem; background: var(--blue); }
.auth-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.auth-photo figcaption { position: absolute; bottom: 1rem; right: 1rem; color: white; background: var(--ink); padding: .25rem .65rem; font-size: .8rem; }
.dashboard-intro { padding: clamp(1.5rem, 5vw, 3.75rem); margin-bottom: 1.5rem; background: var(--wash); border-top: 4px solid var(--blue); }
.dashboard-intro h1 { margin-bottom: .7rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.5rem; }
.panel { background: white; border: 1px solid var(--line); padding: clamp(1.25rem, 4vw, 2rem); }
.panel h2, .panel p { margin-bottom: .75rem; }
.panel p, .account dt, .portal-footer { color: var(--muted); }
.account dl { margin-bottom: 0; }
.account dd { margin: 0 0 .75rem; overflow-wrap: anywhere; white-space: pre-line; }
.company-logo { display: block; max-width: 140px; max-height: 100px; object-fit: contain; }
.portal-footer { width: min(1240px, calc(100% - 2.5rem)); margin: 1.5rem auto; font-size: .85rem; }

@media (max-width: 760px) {
    .auth, .dashboard-grid { grid-template-columns: 1fr; }
    .auth-photo { min-height: 13rem; }
}

body:has(> .dashboard) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

body:has(> .dashboard) > .portal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .5rem 1rem;
    margin-top: auto;
    margin-bottom: 0;
    padding: 1.15rem 0;
    border-top: 1px solid var(--line);
}

body:has(> .dashboard) > .portal-footer .dmc-developer-credit {
    padding: 0;
    background: transparent;
    text-align: start;
}
