:root {
    color-scheme: light;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #f4f6f8;
    color: #1c2430;
    line-height: 1.5;
}

main {
    max-width: 40rem;
    margin: 3rem auto;
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 0.75rem;
}

h2 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.75rem;
}

p {
    margin: 0 0 1rem;
}

dl {
    display: grid;
    grid-template-columns: 8rem 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
}

dt {
    color: #5c6b7a;
}

dd {
    margin: 0;
}

main.narrow {
    max-width: 28rem;
}

.field {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.35rem;
}

input,
select,
textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 0.7rem 0.75rem;
    font: inherit;
    font-size: 1rem;
    border: 1px solid #c5ced6;
    border-radius: 8px;
    background: #fff;
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

button {
    font: inherit;
    font-size: 1rem;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 8px;
    background: #1c4e80;
    color: #fff;
    cursor: pointer;
}

button.full {
    width: 100%;
}

button.secondary {
    background: #e8eef4;
    color: #1c2430;
}

.site-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-list li {
    padding: 0.85rem 0;
    border-top: 1px solid #e6ebf0;
}

.site-list form {
    margin-top: 0.5rem;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.row-actions form {
    margin: 0;
}

.row-actions input {
    width: auto;
    flex: 1 1 10rem;
}

.row-actions input[type="date"] {
    width: 9.2rem;
    flex: 0 0 9.2rem;
}

pre.audit {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0 0 1rem;
    padding: 0.75rem;
    background: #f4f6f8;
    border-radius: 8px;
}

.choice {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0;
}

.choice input {
    width: auto;
}

.pager {
    display: flex;
    gap: 1rem;
}

.counters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.counters div {
    background: #f4f6f8;
    border-radius: 8px;
    padding: 0.75rem;
}

.counters strong {
    display: block;
    font-size: 1.25rem;
}

.announce {
    border-left: 4px solid transparent;
    padding-left: 0.65rem;
}

.announce.important {
    border-left-color: #9a6700;
}

.announce.urgent {
    border-left-color: #8d2432;
}

.unread {
    font-weight: 700;
}

select.multi {
    min-height: 7rem;
}

fieldset {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem 0.25rem;
    border: 1px solid #e6ebf0;
    border-radius: 8px;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 2px solid #1c4e80;
    outline-offset: 2px;
}

.errors {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
    color: #8d2432;
}

.hint,
.meta {
    color: #5c6b7a;
    font-size: 0.95rem;
}

form {
    margin-top: 1.25rem;
}

@media (max-width: 640px) {
    main {
        margin: 1rem;
    }

    dl {
        grid-template-columns: 1fr;
    }
}

.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;
}

body.auth-body {
    min-height: 100dvh;
    background: #fff;
    color: #243140;
}

body.auth-body,
body.auth-body *,
body.auth-body *::before,
body.auth-body *::after {
    box-sizing: border-box;
}

.auth-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(18rem, 1.08fr);
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    overflow: auto;
}

body.auth-body .auth-panel {
    max-width: none;
    margin: 0;
    background: transparent;
    border-radius: 0;
}

.auth-card {
    width: min(100%, 24.5rem);
}

.auth-card h1 {
    margin: 0 0 1.35rem;
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.auth-card form {
    margin-top: 0;
}

.auth-card .errors {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem 0.75rem 1.8rem;
    list-style: disc;
    color: #8d2432;
    background: #fdf2f3;
    border-radius: 8px;
}

.auth-notice {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    color: #1d5c3b;
    background: #eef6f1;
    border-radius: 8px;
}

.auth-input {
    position: relative;
    margin-bottom: 0.85rem;
}

.auth-input input {
    min-height: 3rem;
    padding: 0.75rem 0.9rem 0.75rem 2.7rem;
    border: 1px solid #d5dee6;
    border-radius: 8px;
    background: #fff;
    color: #243140;
}

.auth-input input::placeholder {
    color: #8b9aab;
}

.auth-input.has-action input {
    padding-right: 3rem;
}

body.auth-body .auth-input input:focus {
    outline: none;
    border-color: #1f7ea8;
    box-shadow: 0 0 0 3px rgba(31, 126, 168, 0.16);
}

.auth-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    width: 1.15rem;
    height: 1.15rem;
    transform: translateY(-50%);
    color: #8b9aab;
    pointer-events: none;
}

.auth-reveal {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6d7d8d;
    cursor: pointer;
}

body.auth-body .auth-reveal:focus {
    outline: 2px solid #1f7ea8;
    outline-offset: 1px;
}

.auth-reveal svg {
    width: 1.2rem;
    height: 1.2rem;
}

.auth-reveal .eye-off {
    display: none;
}

.auth-reveal[aria-pressed="true"] .eye-on {
    display: none;
}

.auth-reveal[aria-pressed="true"] .eye-off {
    display: block;
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    margin: 0.15rem 0 1.15rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.75rem;
    margin: 0;
    color: #3d4d5e;
    font-size: 0.95rem;
    cursor: pointer;
}

.auth-check input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: #1f7ea8;
}

.auth-links a,
.auth-back {
    color: #1f7ea8;
    font-size: 0.95rem;
    text-decoration: none;
}

.auth-links a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
}

.auth-links a:hover,
.auth-back:hover {
    text-decoration: underline;
}

.auth-submit {
    min-height: 2.85rem;
    width: auto;
    min-width: 9.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: 8px;
    background: #3aa4cf;
    color: #fff;
    font-weight: 600;
}

.auth-submit:hover {
    background: #2d93bd;
}

.auth-extra {
    margin: 1.25rem 0 0;
    color: #5c6b7a;
    font-size: 0.95rem;
}

.auth-extra a,
.auth-back {
    color: #1f7ea8;
}

.auth-hint {
    margin: -0.35rem 0 0.85rem;
    color: #6d7d8d;
    font-size: 0.9rem;
}

.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100dvh;
    min-height: 0;
    padding: 2.4rem 2.6rem 0;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(180deg, #49b7e2 0%, #2f98c8 58%, #67b7d4 100%);
}

.auth-mark {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-mark svg {
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
}

.auth-hero p {
    max-width: 16rem;
    margin: 0.8rem 0 0;
    font-size: 1.2rem;
    line-height: 1.35;
}

.auth-skyline {
    position: absolute;
    left: 0;
    bottom: 0;
    display: block;
    width: 100%;
    height: 46%;
    pointer-events: none;
}

@media (min-width: 861px) {
    body.auth-body {
        height: 100dvh;
        overflow: hidden;
    }

    .auth-shell,
    .auth-hero,
    .auth-panel {
        height: 100%;
        min-height: 0;
    }
}

@media (max-width: 860px) {
    .auth-shell {
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
    }

    .auth-hero {
        order: -1;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 1.15rem 1.25rem 1rem;
    }

    .auth-hero p {
        margin-top: 0.35rem;
        font-size: 0.98rem;
    }

    .auth-mark {
        font-size: 1.35rem;
    }

    .auth-skyline {
        display: none;
    }

    .auth-panel {
        display: block;
        padding: 1.35rem 1.15rem calc(1.5rem + env(safe-area-inset-bottom));
    }

    .auth-card {
        width: min(100%, 28rem);
        margin: 0 auto;
    }

    .auth-card h1 {
        font-size: 1.45rem;
    }

    .auth-submit {
        width: 100%;
    }
}
