@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&display=swap");
@import url("/toast-notifications.css");

:root {
    --color-primary: #b85f3d;
    --color-primary-dark: #91462d;
    --color-charcoal: #211f1d;
    --color-text: #302d2a;
    --color-muted: #746e68;
    --color-sand: #d9c4a7;
    --color-ivory: #fbf8f2;
    --color-surface: #ffffff;
    --color-border: #e8e0d5;
    --color-success: #3d7051;
    --color-danger: #9e4038;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 8px 26px rgb(45 36 29 / 7%);
    --shadow-md: 0 22px 60px rgb(45 36 29 / 12%);
    --transition: 180ms ease;
    color-scheme: light;
    font-family: "Instrument Sans", Arial, sans-serif;
}

body {
    color: var(--color-text);
    background: var(--color-ivory);
    font-family: "Instrument Sans", Arial, sans-serif;
}

.brand-domain {
    display: inline-flex;
    align-items: baseline;
    font-size: 1.45rem;
    letter-spacing: -0.055em;
    line-height: 1;
    white-space: nowrap;
}

.brand-domain b,
.brand-domain em {
    font-style: normal;
    font-weight: 400;
}

.brand-domain b {
    color: var(--color-charcoal);
}

.brand-domain em {
    color: var(--color-primary);
}

button,
input,
select,
textarea {
    font-family: inherit;
}

:where(button),
.secondary,
.primary,
.topbar a,
nav a {
    transition:
        border-color var(--transition),
        background-color var(--transition),
        color var(--transition),
        transform var(--transition);
}

:where(button),
.secondary,
.primary {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

:where(button:hover),
.secondary:hover,
.topbar a:hover,
nav a:hover {
    transform: translateY(-1px);
}

.secondary:hover {
    border-color: #d4c7bb;
    background: #fffaf6;
    color: var(--color-charcoal);
}

.danger {
    border-color: rgb(158 64 56 / 32%);
    color: var(--color-danger);
}

.danger:hover {
    border-color: rgb(158 64 56 / 52%);
    background: rgb(158 64 56 / 8%);
    color: var(--color-danger);
}

:where(button:disabled),
.secondary:disabled,
.primary:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.primary,
button.primary {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
}

.primary:hover,
button.primary:hover {
    border-color: var(--color-primary-dark);
    background: var(--color-primary-dark);
}

button:disabled,
button.primary:disabled,
button.secondary:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled,
[role="button"][aria-disabled="true"] {
    border-color: #d2cfcb !important;
    background: #e5e3e0 !important;
    color: #85817d !important;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
    transform: none;
}

input:disabled:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
select:disabled,
textarea:disabled {
    border-color: #d7d4d0 !important;
    background-color: #efedeb !important;
    color: #85817d !important;
    cursor: not-allowed;
    opacity: 1;
    -webkit-text-fill-color: #85817d;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
    cursor: not-allowed;
    filter: grayscale(1);
    opacity: 0.55;
}

label:has(input:disabled),
label:has(select:disabled),
label:has(textarea:disabled),
fieldset:disabled label {
    color: #85817d;
    cursor: not-allowed;
}

label:has(input:disabled) small,
label:has(select:disabled) small,
label:has(textarea:disabled) small,
fieldset:disabled small {
    color: #9a9691;
}

input,
select,
textarea {
    border-color: var(--color-border);
    color: var(--color-text);
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgb(184 95 61 / 18%);
    border-color: var(--color-primary);
}

.topbar,
body > header,
.sidebar,
body > aside {
    background: var(--color-charcoal);
}

h1,
h2,
.brand strong {
    font-family: "Instrument Sans", Arial, sans-serif;
    letter-spacing: -0.035em;
}

.card,
.metric,
.table-card,
.project-card,
dialog {
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.badge {
    background: #f0e8dd;
    color: #665c53;
}

dialog::backdrop {
    background: rgb(33 31 29 / 58%);
    backdrop-filter: blur(4px);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
