:root {
    --primary: #5f1f2a;
    --secondary: #8f241d;
    --accent: #b85c3f;
    --primary-fg: #fffaf1;
    --body-bg: #f6f3ef;
    --body-fg: #34231d;
    --body-quiet-color: #7b6759;
    --border-color: #e4cfb4;
    --link-fg: #7c2430;
    --link-hover-color: #b54837;
    --default-button-bg: #5f1f2a;
    --default-button-hover-bg: #7c2430;
    --button-bg: #5f1f2a;
    --button-hover-bg: #7c2430;
    --delete-button-bg: #9f1f2f;
    --delete-button-hover-bg: #7c1825;
    --object-tools-bg: #6b7449;
    --object-tools-hover-bg: #566035;
    --body-loud-color: #241714;
    --body-medium-color: #5f4c42;
    --hairline-color: #ecdcc7;
    --darkened-bg: #fff4e4;
    --selected-bg: #f7ead7;
    --selected-row: #fff0da;
    --error-fg: #9f1f2f;
    --message-success-bg: #edf3e5;
    --message-warning-bg: #fff3cd;
    --message-error-bg: #fff1eb;
}

html[data-theme="light"],
html[data-theme="dark"] {
    --primary: #5f1f2a;
    --secondary: #8f241d;
    --accent: #b85c3f;
    --primary-fg: #fffaf1;
    --body-bg: #f6f3ef;
    --body-fg: #34231d;
    --body-quiet-color: #7b6759;
    --border-color: #e4cfb4;
    --link-fg: #7c2430;
    --link-hover-color: #b54837;
    --body-loud-color: #241714;
    --body-medium-color: #5f4c42;
    --hairline-color: #ecdcc7;
    --darkened-bg: #fff4e4;
    --selected-bg: #f7ead7;
    --selected-row: #fff0da;
    --error-fg: #9f1f2f;
    --message-success-bg: #edf3e5;
    --message-warning-bg: #fff3cd;
    --message-error-bg: #fff1eb;
    color-scheme: light;
}

html {
    color-scheme: light;
}

body {
    background:
        linear-gradient(180deg, rgba(255, 250, 241, 0.86), rgba(246, 243, 239, 0.96)),
        radial-gradient(circle at 18% 12%, rgba(181, 72, 55, 0.11), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(107, 116, 73, 0.12), transparent 30%),
        #f6f3ef;
    color: var(--body-fg);
    font-family: Arial, sans-serif;
}

#container,
.main,
#content,
#content-main,
#content-related {
    background: transparent;
    color: var(--body-fg);
}

#content {
    padding: 34px min(5vw, 48px) 64px;
}

.theme-toggle {
    display: none !important;
}

div.breadcrumbs {
    background: #fff4e4;
    color: var(--body-quiet-color);
}

div.breadcrumbs a {
    color: var(--primary);
}

.dashboard #content {
    width: min(1320px, calc(100vw - 80px));
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(760px, 1fr) 340px;
    gap: 32px;
    align-items: start;
}

#content.colMS {
    margin-right: auto;
}

.dashboard #content h1 {
    grid-column: 1 / -1;
    margin: 0 0 26px;
    color: var(--primary);
    font-family: Georgia, serif;
    font-size: 34px;
    font-weight: 500;
}

.dashboard #content-main {
    grid-column: 1;
    width: auto !important;
    min-width: 0;
    float: none !important;
}

.dashboard #content-related {
    grid-column: 2;
    width: auto !important;
    min-width: 0;
    float: none !important;
    margin: 0 !important;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 250, 241, 0.94);
    box-shadow: 0 16px 42px rgba(95, 31, 42, 0.10);
}

.dashboard #content-related h2,
.dashboard #content-related h3,
.dashboard #content-related p {
    color: var(--body-fg);
}

.dashboard #content-related h2 {
    margin-top: 0;
    color: var(--primary);
    font-family: Georgia, serif;
    font-size: 24px;
    font-weight: 500;
}

.module {
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 250, 241, 0.96);
    box-shadow: 0 12px 32px rgba(95, 31, 42, 0.08);
}

.module h2,
.module caption,
.inline-group h2 {
    background: var(--primary);
    color: var(--primary-fg) !important;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.module h2 a,
.module h2 a:link,
.module h2 a:visited,
.module caption a,
.module caption a:link,
.module caption a:visited,
.inline-group h2 a,
.inline-group h2 a:link,
.inline-group h2 a:visited {
    color: var(--primary-fg) !important;
    text-decoration: none;
}

.module h2 a:hover,
.module caption a:hover,
.inline-group h2 a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

.module table,
.module tbody,
.module tr,
.module th,
.module td {
    background: transparent;
    color: var(--body-fg);
}

.module table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.module table th,
.module table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--hairline-color);
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.dashboard .module table th {
    width: auto !important;
    min-width: 320px;
    font-weight: 700;
}

.dashboard .module table th a {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
}

.dashboard .module table td {
    width: 112px;
    white-space: nowrap;
}

.module table tr:nth-child(odd),
.module table tr:nth-child(even),
tr:nth-child(odd),
tr:nth-child(even),
.row-form-errors {
    background: #fffaf1;
}

.module table tr:nth-child(even),
tr:nth-child(even) {
    background: #fff4e4;
}

.module table tr:hover {
    background: #f7ead7;
}

a:link,
a:visited,
.module a,
.module a:link,
.module a:visited,
#content-related a,
#content-related a:link,
#content-related a:visited {
    color: var(--link-fg);
}

a:hover,
.module a:hover,
#content-related a:hover {
    color: var(--link-hover-color);
}

.addlink,
.changelink,
.deletelink,
.viewlink {
    color: var(--link-fg) !important;
    font-weight: 700;
}

th,
td,
label,
p,
li,
dt,
dd {
    color: var(--body-fg);
}

input,
select,
textarea,
.vTextField {
    border-color: var(--border-color);
    background: #fffdf8;
    color: var(--body-fg);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(184, 92, 63, 0.16);
    outline: 0;
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
a.button {
    background: var(--button-bg);
    border-radius: 999px;
    color: var(--primary-fg);
    font-weight: 700;
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.submit-row input:hover,
a.button:hover {
    background: var(--button-hover-bg);
}

.importeria-admin-login #header {
    justify-content: center;
    padding: 28px 24px 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.importeria-admin-login #branding {
    display: none;
}

.importeria-admin-login #content {
    width: 100%;
    max-width: none;
    padding: 0 20px 60px;
}

.importeria-admin-login #container {
    width: 100%;
    min-width: 0;
    background: transparent;
}

.importeria-login-shell {
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
}

.importeria-login-card {
    width: min(440px, 100%);
    padding: 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 250, 241, 0.94);
    box-shadow: 0 22px 60px rgba(95, 31, 42, 0.14);
}

.importeria-login-mark img {
    display: block;
    width: 210px;
    max-width: 72vw;
    height: auto;
    margin: 0 0 28px;
    filter: sepia(0.18) saturate(0.9) hue-rotate(-8deg) brightness(0.86);
}

.importeria-login-eyebrow {
    margin: 0 0 8px;
    color: #6b7449;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.importeria-login-card h1 {
    margin: 0 0 10px;
    color: var(--primary);
    font-family: Georgia, serif;
    font-size: 34px;
    font-weight: 500;
    line-height: 1.12;
}

.importeria-login-intro {
    margin: 0 0 26px;
    color: var(--body-quiet-color);
    line-height: 1.6;
}

.importeria-admin-login .form-row {
    padding: 0;
    margin: 0 0 18px;
}

.importeria-admin-login .form-row label {
    display: block;
    margin: 0 0 7px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.importeria-admin-login input[type="text"],
.importeria-admin-login input[type="password"] {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fffdf8;
    color: var(--body-fg);
    font-size: 16px;
}

.importeria-admin-login input[type="text"]:focus,
.importeria-admin-login input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(184, 92, 63, 0.16);
}

.importeria-admin-login .submit-row {
    padding: 4px 0 0;
    margin: 0;
    background: transparent;
    border: 0;
    text-align: left;
}

.importeria-admin-login .submit-row button {
    min-height: 46px;
    padding: 11px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.importeria-admin-login .submit-row button:hover {
    background: var(--secondary);
}

.importeria-admin-login .password-reset-link {
    margin: -4px 0 18px;
}

.importeria-admin-login .password-reset-link a {
    color: var(--body-quiet-color);
    font-size: 13px;
}

.importeria-admin-login .errornote {
    margin: 0 0 18px;
    border: 1px solid #efb3a5;
    border-radius: 8px;
    background: #fff1eb;
    color: #9f1f2f;
}

@media (max-width: 540px) {
    .importeria-login-card {
        padding: 26px;
    }

    .importeria-login-card h1 {
        font-size: 29px;
    }
}

@media (max-width: 1024px) {
    .dashboard #content {
        width: min(100% - 32px, 760px);
        display: block;
        padding-left: 0;
        padding-right: 0;
    }

    .dashboard #content-main,
    .dashboard #content-related {
        width: 100%;
        float: none;
    }

    .dashboard #content-related {
        margin: 24px 0 0;
    }

    .dashboard .module table th {
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .dashboard #content {
        width: calc(100% - 24px);
    }

    .module table th,
    .module table td {
        padding: 11px 12px;
    }

    .dashboard .module table td {
        width: auto;
        white-space: normal;
    }
}
