@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
    --paper: #f7f5ef;
    --paper-deep: #efeee7;
    --forest: #173c35;
    --forest-soft: #28584d;
    --ink: #24322c;
    --muted: #68756e;
    --line: #dddcd3;
    --coral: #e77d5c;
    --sage: #5f9e83;
    --gold: #d5a347;
    --white: #fffdf8;
}

html, body, #app {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1, h2 {
    color: var(--forest);
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
}

h1 {
    margin-bottom: 8px;
    font-size: 38px;
    line-height: 1.12;
}

h2 {
    margin-bottom: 0;
    font-size: 24px;
    line-height: 1.2;
}

.workspace-shell {
    display: flex;
    min-height: 100vh;
}

.workspace-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex: 0 0 244px;
    flex-direction: column;
    min-height: 100vh;
    padding: 30px 26px;
    background: var(--forest);
}

.workspace-main {
    min-width: 0;
    flex: 1;
}

.workspace-brand a {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--white);
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 22px;
}

.brand-mark {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 7px;
    background: var(--coral);
    color: var(--forest);
    font-size: 20px;
}

.workspace-nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 38px;
}

.nav-caption, .eyebrow {
    margin: 0;
    color: #a45e46;
    font-size: 10px;
    font-weight: 700;
}

.nav-caption {
    margin: 0 0 4px 12px;
    color: #afc4b9;
}

.workspace-nav-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border-radius: 6px;
    color: #c9d8d0;
    font-size: 14px;
    transition: background-color 140ms ease, color 140ms ease;
}

.workspace-nav-link:hover, .workspace-nav-link.active {
    background: var(--forest-soft);
    color: var(--white);
}

.workspace-nav-link .oi {
    width: 14px;
    color: #afc4b9;
    font-size: 13px;
}

.workspace-nav-link.active .oi {
    color: #f0b77a;
}

.workspace-topbar {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    padding: 0 62px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.workspace-topbar time {
    font-size: 12px;
    font-weight: 500;
}

.workspace-content {
    width: min(100%, 1320px);
    margin: 0 auto;
    padding: 48px 62px 64px;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.page-heading .eyebrow {
    margin-bottom: 8px;
}

.page-description, .section-description {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
}

.primary-action, .secondary-action, .quiet-action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 17px;
    border: 0;
    border-radius: 6px;
    font: 700 13px 'DM Sans', sans-serif;
    cursor: pointer;
    transition: transform 140ms ease, background-color 140ms ease;
}

.primary-action {
    flex: 0 0 auto;
    background: var(--coral);
    color: #fffdf8;
}

.primary-action:hover {
    background: #d86e4f;
    color: #fffdf8;
    transform: translateY(-1px);
}

.secondary-action {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--forest);
}

.secondary-action:hover {
    background: var(--paper-deep);
}

.quiet-action {
    color: var(--muted);
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-bottom: 38px;
    padding: 22px 25px;
    background: var(--paper-deep);
}

.summary-item {
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
}

.summary-item::before {
    grid-row: span 2;
    width: 4px;
    height: 32px;
    border-radius: 2px;
    background: var(--coral);
    content: '';
}

.summary-item:nth-child(2)::before {
    background: var(--sage);
}

.summary-item:nth-child(3)::before {
    background: var(--gold);
}

.summary-value {
    color: var(--forest);
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 30px;
    line-height: 1;
}

.summary-label {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.upcoming-section, .table-section {
    width: 100%;
}

.table-section {
    overflow-x: auto;
}

.section-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title-row .eyebrow {
    margin-bottom: 7px;
}

.text-action {
    border: 0;
    background: transparent;
    color: #a45e46;
    font: 700 11px 'DM Sans', sans-serif;
    cursor: pointer;
}

.text-action:disabled {
    color: #a9aca5;
    cursor: not-allowed;
}

.upcoming-row, .reminder-table-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.35fr) minmax(160px, 1.2fr) minmax(170px, .9fr) 86px;
    align-items: center;
    gap: 18px;
    padding: 17px 0;
    border-top: 1px solid var(--line);
}

.upcoming-row:last-child, .reminder-table-row:last-child {
    border-bottom: 1px solid var(--line);
}

.upcoming-task, .task-cell, .upcoming-run {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.upcoming-task strong, .task-cell strong, .upcoming-run strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upcoming-task span, .task-cell span, .upcoming-run span {
    color: var(--muted);
    font-size: 11px;
}

.upcoming-run span {
    font-size: 9px;
    font-weight: 700;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.event-chip, .status-chip {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 5px 9px;
    border-radius: 4px;
    background: #e4efe8;
    color: #275b48;
    font-size: 10px;
    font-weight: 700;
}

.status-chip.is-paused {
    background: #eeeae0;
    color: #716b5e;
}

.reminder-table-head, .reminder-table-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.2fr) minmax(92px, .75fr) minmax(135px, 1fr) minmax(130px, 1fr) 66px minmax(164px, 1.25fr);
    min-width: 930px;
    align-items: center;
    gap: 16px;
}

.reminder-table-head {
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.reminder-table-row {
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
}

.reminder-table-row:last-child {
    border-bottom: 0;
}

.reminder-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

.row-action {
    display: inline-flex;
    min-width: 32px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 7px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--forest);
    font: 700 10px 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease;
}

.row-action:hover {
    background: var(--paper-deep);
    color: #a45e46;
}

.row-action:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}

.row-action .oi {
    font-size: 12px;
}

.row-action.delete-action {
    color: #a7483a;
}

.row-action.delete-action:hover {
    background: #f7e7e2;
}

.schedule-cell, .run-cell {
    color: var(--muted);
    font-size: 12px;
}

.reminder-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
    align-items: start;
    gap: 52px;
}

.form-section {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 18px;
}

.section-heading {
    margin-bottom: 4px;
}

.section-heading .eyebrow {
    margin-bottom: 6px;
}

.section-heading h2 {
    margin-bottom: 5px;
    font-size: 22px;
}

.form-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.form-field label {
    color: #435149;
    font-size: 11px;
    font-weight: 700;
}

.field-control {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid #d8d9cf;
    border-radius: 5px;
    outline: 0;
    background: var(--white);
    color: var(--ink);
    font: 400 13px 'DM Sans', sans-serif;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field-control:focus {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgb(95 158 131 / 16%);
}

.field-control::placeholder {
    color: #9a9e97;
}

.device-token-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-token-input .field-control {
    min-width: 0;
    flex: 1;
}

.field-textarea {
    min-height: 106px;
    resize: vertical;
}

.delivery-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 0 19px;
    border-bottom: 1px solid var(--line);
}

.delivery-row-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.active-setting {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    cursor: pointer;
}

.active-setting > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.active-setting strong {
    font-size: 12px;
}

.active-setting small {
    color: var(--muted);
    font-size: 10px;
}

.toggle-input {
    position: absolute;
    width: 40px;
    height: 24px;
    margin: 0;
    opacity: 0;
}

.toggle-track {
    position: relative;
    width: 40px;
    height: 23px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: #a7aea8;
    transition: background-color 140ms ease;
}

.toggle-track::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    content: '';
    transition: transform 140ms ease;
}

.toggle-input:checked + .toggle-track {
    background: var(--sage);
}

.toggle-input:checked + .toggle-track::after {
    transform: translateX(17px);
}

.toggle-input:focus-visible + .toggle-track {
    outline: 3px solid rgb(95 158 131 / 25%);
    outline-offset: 2px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.empty-state {
    padding: 24px 0;
    border-top: 1px solid var(--line);
}

.empty-state h2, .empty-state h3 {
    margin-bottom: 6px;
    color: var(--forest);
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 22px;
    font-weight: 400;
}

.empty-state p {
    margin-bottom: 16px;
    color: var(--muted);
}

.validation-summary {
    margin-bottom: 18px;
    color: #9d4335;
}

.blazor-error-boundary {
    margin: 16px;
    padding: 1rem 1rem 1rem 3.7rem;
    border-radius: 4px;
    background: #9d4335;
    color: white;
}

#blazor-error-ui {
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    padding: 0.6rem 1.25rem 0.7rem;
    background: #fff6c7;
    box-shadow: 0 -1px 2px rgb(0 0 0 / 20%);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    cursor: pointer;
}

@media (max-width: 960px) {
    .workspace-sidebar {
        flex-basis: 210px;
        padding-right: 18px;
        padding-left: 18px;
    }

    .workspace-content, .workspace-topbar {
        padding-right: 32px;
        padding-left: 32px;
    }

    .reminder-form-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }
}

@media (max-width: 680px) {
    .workspace-shell {
        display: block;
    }

    .workspace-sidebar {
        position: static;
        min-height: 0;
        padding: 14px 18px 12px;
    }

    .workspace-brand a {
        font-size: 20px;
    }

    .workspace-brand .brand-mark {
        width: 28px;
        height: 28px;
    }

    .workspace-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
        margin-top: 14px;
    }

    .nav-caption {
        display: none;
    }

    .workspace-nav-link {
        min-height: 36px;
        gap: 7px;
        padding: 0 9px;
        font-size: 12px;
    }

    .workspace-nav-link .oi {
        width: auto;
    }

    .workspace-topbar {
        min-height: 46px;
        padding: 0 20px;
        font-size: 9px;
    }

    .workspace-content {
        padding: 32px 20px 44px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        margin-bottom: 26px;
    }

    h1 {
        font-size: 32px;
    }

    .summary-strip {
        grid-template-columns: 1fr;
        gap: 17px;
        margin-bottom: 30px;
        padding: 18px;
    }

    .summary-item {
        grid-template-columns: 4px 82px minmax(0, 1fr);
    }

    .summary-item::before {
        grid-row: auto;
    }

    .summary-value {
        font-size: 26px;
    }

    .summary-label {
        margin-top: 0;
    }

    .upcoming-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px 12px;
    }

    .upcoming-row .event-tags {
        grid-column: 1;
    }

    .upcoming-run {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
    }

    .upcoming-row .status-chip {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }

    .reminder-table-head {
        display: none;
    }

    .table-section {
        overflow: visible;
    }

    .reminder-table-row {
        grid-template-columns: minmax(0, 1fr) auto;
        min-width: 0;
        gap: 10px 12px;
        padding: 16px 0;
    }

    .task-cell {
        grid-column: 1;
    }

    .schedule-cell {
        grid-column: 1;
    }

    .event-tags {
        grid-column: 1;
    }

    .run-cell {
        grid-column: 1;
    }

    .reminder-table-row .status-cell {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .reminder-row-actions {
        grid-column: 1 / -1;
        grid-row: 5;
        justify-content: flex-start;
        padding-top: 3px;
    }

    .form-actions {
        position: sticky;
        bottom: 0;
        margin-right: -20px;
        margin-left: -20px;
        padding: 12px 20px;
        background: var(--paper);
    }

    .device-token-input {
        align-items: stretch;
        flex-direction: column;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGx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QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
