:root {
    --green: #5b6f54;
    --deep: #132018;
    --moss: #30472f;
    --cream: #f1e7d9;
    --paper: #fffaf2;
    --lavender: #b48cff;
    --rose: #c97569;
    --ink: #101610;
    --muted: #586653;
    --line: rgba(16, 22, 16, .16);
    --radius: 24px;
    --radius-lg: 38px;
    --shadow: 0 22px 60px rgba(28, 38, 24, .14);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--cream);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

body :where(header, nav, main, section, article, div, form, a, button, input, textarea, select, img, table, th, td, footer, span, p, label) {
    border-radius: var(--radius);
}

a {
    color: inherit;
}

.admin-shell-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px clamp(18px, 4vw, 42px);
    background: rgba(91, 111, 84, .97);
    box-shadow: 0 12px 34px rgba(28, 38, 24, .14);
    border-radius: 0;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.admin-brand-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    background: rgba(255, 250, 242, .22);
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 800;
}

.admin-brand strong,
.admin-brand small {
    display: block;
}

.admin-brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
}

.admin-brand small {
    max-width: 280px;
    color: rgba(16, 22, 16, .8);
    font-weight: 700;
}

.admin-shell-header nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.admin-shell-header nav a,
.admin-button {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    background: rgba(255, 250, 242, .22);
    color: var(--ink);
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.admin-shell-header nav a:hover,
.admin-shell-header nav a.is-active,
.admin-button.primary {
    background: var(--deep);
    color: #fff;
}

.admin-button.ghost {
    background: rgba(91, 111, 84, .12);
}

.admin-button.danger {
    background: rgba(201, 117, 105, .18);
    color: #7b2b22;
}

.admin-main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 72px;
}

.admin-title {
    margin: 0 0 24px;
}

.admin-title p {
    margin: 0 0 6px;
    color: var(--moss);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-title h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 48px;
    overflow-wrap: anywhere;
    line-height: 1.04;
}

.admin-card,
.admin-panel,
.login-card {
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.admin-card,
.admin-panel {
    padding: 22px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.admin-card {
    text-decoration: none;
}

.admin-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--moss);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.5rem;
    line-height: 1;
}

.admin-panel {
    margin-top: 18px;
}

.admin-panel h2 {
    margin: 0 0 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
}

.admin-form {
    display: grid;
    gap: 14px;
}

.admin-form.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-split {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.admin-side-list {
    display: grid;
    gap: 10px;
}

.admin-side-list a {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    background: rgba(91, 111, 84, .10);
    border: 1px solid rgba(16, 22, 16, .12);
    text-decoration: none;
}

.admin-side-list a.is-active {
    background: var(--moss);
    color: #fff;
}

.admin-side-list strong,
.admin-side-list small {
    display: block;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .admin-title h1 {
        font-size: 32px;
    }

    .admin-shell-header nav {
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .admin-shell-header nav a {
        flex-shrink: 0;
    }

    .admin-side-list {
        display: flex;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .admin-side-list a {
        flex: 0 0 200px;
        height: 90px;
        grid-template-rows: 1fr auto;
    }

    .admin-side-list strong {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        line-height: 1.3;
    }
}

.admin-side-list small {
    opacity: .75;
}

.admin-field {
    display: grid;
    gap: 7px;
    font-weight: 800;
}

.admin-field.full {
    grid-column: 1 / -1;
}

.admin-field input,
.admin-field textarea,
.admin-field select,
.login-card input {
    width: 100%;
    border: 1px solid rgba(16, 22, 16, .18);
    background: #fffdf8;
    color: var(--ink);
    padding: 12px 14px;
    font: inherit;
    outline: none;
    min-width: 0;
    font-weight: 400;
}

.admin-field textarea {
    min-height: 260px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus,
.login-card input:focus {
    border-color: var(--moss);
    box-shadow: 0 0 0 4px rgba(91, 111, 84, .18);
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-actions.full {
    grid-column: 1 / -1;
}

.admin-image-section {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: rgba(91, 111, 84, .08);
    border: 1px solid rgba(16, 22, 16, .12);
}

.admin-image-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-image-section-heading h3,
.admin-image-section-heading p {
    margin: 0;
}

.admin-image-section-heading h3 {
    margin-bottom: 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
}

.admin-image-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 16px;
    align-items: stretch;
    padding: 14px;
    background: #fffdf8;
    border: 1px solid rgba(16, 22, 16, .12);
}

.admin-image-picker small {
    color: var(--muted);
    font-weight: 400;
    line-height: 1.45;
}

.admin-image-preview {
    min-height: 136px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(91, 111, 84, .10);
    border: 1px solid rgba(16, 22, 16, .12);
    color: var(--muted);
    font-size: .86rem;
    text-align: center;
}

.admin-image-preview img {
    width: 100%;
    height: 136px;
    object-fit: cover;
}

.builder-editor-section {
    padding: 0;
    background: transparent;
    border: 0;
}

.builder-block-list,
.builder-card-list {
    display: grid;
    gap: 14px;
}

.builder-block {
    border: 1px solid rgba(16, 22, 16, .18);
    background: #fffdf8;
}

.builder-block-header,
.builder-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.builder-block-header {
    padding: 13px 15px;
    background: var(--deep);
    color: #fff;
}

.builder-block-header div:first-child {
    display: grid;
    gap: 2px;
}

.builder-block-header small {
    opacity: .7;
}

.builder-block-body {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.builder-icon-actions {
    display: flex;
    gap: 5px;
}

.builder-icon-actions button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .14);
    color: inherit;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
}

.builder-card-item {
    padding: 14px;
    border: 1px solid rgba(16, 22, 16, .14);
    background: rgba(91, 111, 84, .06);
}

.builder-item-header {
    margin-bottom: 12px;
}

.builder-item-header .builder-icon-actions button {
    border-color: rgba(16, 22, 16, .18);
    background: #fffdf8;
    color: var(--ink);
}

.builder-textarea {
    min-height: 150px !important;
    font-family: inherit !important;
}

.builder-textarea.short {
    min-height: 90px !important;
}

.builder-card-preview,
.builder-wide-preview {
    min-height: 120px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(91, 111, 84, .10);
    border: 1px solid rgba(16, 22, 16, .12);
    color: var(--muted);
}

.builder-card-preview.full {
    grid-column: 1 / -1;
}

.builder-card-preview img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.builder-wide-preview img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.builder-add-row {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px dashed rgba(16, 22, 16, .28);
}

.builder-layout-choices {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.builder-layout-choices button {
    min-width: 0;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(16, 22, 16, .16);
    background: #fffdf8;
    color: var(--ink);
    font: inherit;
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
}

.builder-layout-choices button:hover,
.builder-layout-choices button:focus-visible {
    border-color: var(--moss);
    box-shadow: 0 0 0 3px rgba(91, 111, 84, .16);
}

.builder-layout-preview {
    height: 62px;
    display: grid;
    gap: 5px;
    padding: 8px;
    background: rgba(91, 111, 84, .08);
    border: 1px solid rgba(16, 22, 16, .10);
}

.builder-layout-preview i {
    display: block;
    background: rgba(16, 22, 16, .34);
}

.layout-text {
    align-content: center;
}

.layout-heading {
    align-content: center;
}

.layout-heading i {
    width: 76%;
    height: 12px;
    background: var(--deep);
}

.layout-text i {
    height: 5px;
}

.layout-text i:nth-child(2) {
    width: 88%;
}

.layout-text i:nth-child(3) {
    width: 72%;
}

.layout-highlight {
    align-content: center;
}

.layout-highlight i {
    height: 22px;
    background: var(--lavender);
}

.layout-image i,
.layout-video i {
    height: 100%;
    background: var(--moss);
}

.layout-video i {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    position: relative;
}

.layout-cards {
    grid-template-columns: repeat(3, 1fr);
}

.layout-cards i {
    height: 100%;
    background: var(--moss);
}

.strain-editor-section,
.strain-editor-categories {
    display: grid;
    gap: 16px;
}

.strain-editor-category {
    overflow: hidden;
    border: 1px solid rgba(16, 22, 16, .18);
    background: #fffdf8;
}

.strain-editor-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    background: var(--deep);
    color: #fff;
}

.strain-editor-category-header > div:first-child {
    display: grid;
    gap: 2px;
}

.strain-editor-category-header small {
    opacity: .7;
}

.strain-editor-category-fields {
    padding: 16px;
    border-bottom: 1px solid rgba(16, 22, 16, .12);
}

.strain-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
}

.strain-editor-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(16, 22, 16, .14);
    background: rgba(91, 111, 84, .06);
}

.strain-editor-card .builder-item-header {
    margin-bottom: 12px;
}

.strain-editor-card .builder-icon-actions button {
    border-color: rgba(16, 22, 16, .18);
    background: #fffdf8;
    color: var(--ink);
}

.strain-editor-category > .admin-button {
    margin: 0 16px 16px;
}

.strain-editor-image {
    min-height: 86px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(91, 111, 84, .10);
    border: 1px solid rgba(16, 22, 16, .12);
    color: var(--muted);
}

.strain-editor-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fffdf8;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(16, 22, 16, .12);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--moss);
    font-size: .82rem;
    text-transform: uppercase;
}

.admin-notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: rgba(91, 111, 84, .16);
    border: 1px solid rgba(91, 111, 84, .24);
    font-weight: 800;
    word-break: break-word;
}

.admin-notice.error {
    background: rgba(201, 117, 105, .16);
    border-color: rgba(201, 117, 105, .34);
}

.admin-notice.warning {
    background: rgba(191, 143, 64, .18);
    border-color: rgba(191, 143, 64, .36);
}

.status-pill {
    display: inline-flex;
    padding: 6px 10px;
    background: rgba(91, 111, 84, .14);
    color: var(--moss);
    font-weight: 900;
    font-size: .82rem;
}

.admin-meta {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    line-height: 1.35;
}

.admin-meta.warning {
    color: #8a5f13;
    font-weight: 800;
}

.admin-actions.compact {
    margin-bottom: 10px;
}

.request-status-form {
    min-width: 190px;
}

.mailbox-app {
    min-height: calc(100vh - 230px);
    display: grid;
    grid-template-columns: 260px minmax(280px, 360px) minmax(0, 1fr);
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.mailbox-app,
.mailbox-app * {
    font-size: .92rem;
}

.mailbox-app .admin-button {
    min-height: 32px;
    padding: 7px 11px;
    font-size: .82rem;
}

.mailbox-sidebar,
.mailbox-list-pane,
.mailbox-reading-pane {
    min-height: 0;
    border-radius: 0;
}

.mailbox-sidebar {
    padding: 14px;
    background: rgba(91, 111, 84, .12);
    border-right: 1px solid rgba(16, 22, 16, .12);
    overflow-y: auto;
}

.mailbox-sidebar h2,
.mailbox-compose h2,
.mailbox-message-open h2 {
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", serif;
}

.mailbox-sidebar a {
    display: grid;
    gap: 4px;
    padding: 10px 11px;
    color: var(--ink);
    text-decoration: none;
}

.mailbox-sidebar a.is-active {
    background: var(--deep);
    color: #fff;
}

.mailbox-sidebar small {
    opacity: .72;
    word-break: break-word;
}

.mailbox-folder-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(16, 22, 16, .16);
}

.mailbox-folder-section h2 {
    margin-bottom: 7px;
}

.mailbox-folder-nav {
    display: grid;
    gap: 3px;
}

.mailbox-folder-nav a {
    min-height: 36px;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid transparent;
}

.mailbox-folder-nav a:not(.is-active):hover {
    border-color: rgba(16, 22, 16, .16);
    background: rgba(255, 253, 248, .58);
}

.mailbox-folder-form {
    display: grid;
    gap: 6px;
    margin-top: 14px;
}

.mailbox-folder-form label {
    font-size: .78rem;
    font-weight: 800;
}

.mailbox-folder-form > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
}

.mailbox-folder-form input,
.mailbox-move-form select {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    background: #fffdf8;
    color: var(--ink);
    font: inherit;
}

.mailbox-folder-manage {
    margin-top: 14px;
    padding-top: 2px;
    border-top: 1px solid rgba(16, 22, 16, .12);
}

.mailbox-folder-manage > form:last-child {
    margin-top: 8px;
}

.mailbox-list-pane {
    border-right: 1px solid rgba(16, 22, 16, .12);
    background: #fffdf8;
}

.mailbox-toolbar,
.mailbox-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.mailbox-toolbar {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px;
    background: rgba(255, 253, 248, .96);
    border-bottom: 1px solid rgba(16, 22, 16, .10);
}

.mailbox-folder-title {
    flex: 1 0 100%;
    overflow: hidden;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mailbox-rows {
    max-height: calc(100vh - 280px);
    overflow: auto;
    border-radius: 0;
}

.mailbox-row {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    color: var(--ink);
    border-bottom: 1px solid rgba(16, 22, 16, .10);
    text-decoration: none;
}

.mailbox-row.is-selected {
    background: rgba(91, 111, 84, .16);
}

.mailbox-row.is-unread strong {
    font-weight: 900;
}

.mailbox-row span,
.mailbox-row small,
.mailbox-row p {
    color: var(--muted);
}

.mailbox-row strong,
.mailbox-row span,
.mailbox-row small,
.mailbox-row p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mailbox-row p {
    margin: 0;
}

.mailbox-reading-pane {
    max-height: calc(100vh - 230px);
    overflow: auto;
    padding: 16px;
}

.mailbox-empty {
    margin: 14px;
    color: var(--muted);
}

.mailbox-message-open {
    display: grid;
    gap: 14px;
}

.mailbox-message-open .mailbox-actions form {
    display: inline-flex;
}

.mailbox-move-form {
    display: inline-grid !important;
    grid-template-columns: minmax(140px, 190px) auto;
    gap: 6px;
}

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

.mailbox-message-open h2 {
    font-size: 1.7rem;
    word-break: break-word;
}

.mailbox-headers {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid rgba(16, 22, 16, .10);
    border-bottom: 1px solid rgba(16, 22, 16, .10);
}

.mailbox-headers div {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
}

.mailbox-headers dt {
    color: var(--muted);
    font-weight: 800;
}

.mailbox-headers dd {
    margin: 0;
    word-break: break-word;
}

.mailbox-body {
    margin: 0;
    padding: 14px 0;
    white-space: pre-wrap;
    word-break: break-word;
    font: 400 .92rem/1.55 Arial, Helvetica, sans-serif;
}

.mailbox-compose form {
    display: grid;
    gap: 10px;
}

.mailbox-compose textarea {
    min-height: 300px;
    font-family: Arial, Helvetica, sans-serif;
}

.role-ladder {
    display: grid;
    gap: 10px;
}

.role-step {
    display: grid;
    grid-template-columns: minmax(170px, .8fr) 110px minmax(0, 2fr);
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: rgba(91, 111, 84, .10);
    border: 1px solid rgba(16, 22, 16, .12);
}

.role-step strong {
    color: var(--moss);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
}

.role-step span {
    display: inline-flex;
    justify-content: center;
    padding: 7px 10px;
    background: var(--deep);
    color: #fff;
    font-weight: 900;
}

.role-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.account-row-form {
    min-width: 420px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.account-row-form .admin-field {
    margin: 0;
}

.account-row-form .admin-field input,
.account-row-form .admin-field select {
    min-height: 40px;
    padding: 9px 11px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.media-item {
    overflow: hidden;
    background: #fffdf8;
    border: 1px solid rgba(16, 22, 16, .12);
}

.media-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0;
}

.media-item div {
    padding: 12px;
}

.media-item strong,
.media-item small {
    display: block;
    word-break: break-word;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(460px, 100%);
    padding: clamp(24px, 5vw, 44px);
}

.login-card h1 {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.6rem;
    line-height: 1.05;
}

.login-card p {
    color: var(--muted);
    line-height: 1.55;
}

.login-card form {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

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

@media (max-width: 980px) {
    .admin-shell-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-shell-header nav {
        justify-content: flex-start;
    }

    .admin-grid,
    .admin-form.two,
    .admin-split,
    .admin-image-picker,
    .role-step,
    .account-row-form,
    .media-grid,
    .mailbox-app,
    .mailbox-headers div {
        grid-template-columns: 1fr;
    }

    .admin-image-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .builder-add-row {
        grid-template-columns: 1fr;
    }

    .builder-layout-choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .strain-editor-grid {
        grid-template-columns: 1fr;
    }

    .mailbox-rows,
    .mailbox-reading-pane {
        max-height: none;
    }

    .mailbox-sidebar {
        overflow-y: visible;
    }
}
