:root {
    color-scheme: dark;
    --gold: #d5b478;
    --gold-light: #f2d49c;
    --border: #94703b;
    --text: #f4e7d0;
    --muted: #c4b39c;
    --panel: rgba(30, 21, 14, 0.85);
    --button: rgba(80, 52, 25, 0.5);
    --success: #86c98a;
    --danger: #ef9090;
    --warning: #e8b65b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);
    background:
        radial-gradient(
            ellipse at top,
            #49301e 0%,
            #21160f 45%,
            #100c09 100%
        );
    background-attachment: fixed;
    line-height: 1.6;
}

.container {
    width: min(1200px, 94%);
    margin: 30px auto;
}

.container.narrow {
    max-width: 600px;
}

header {
    text-align: center;
    padding: 24px 16px;
}

.brand {
    color: var(--gold-light);
    font-size: clamp(32px, 6vw, 52px);
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 2px 12px #000;
}

.subtitle {
    color: var(--muted);
    margin-top: 4px;
}

h1, h2, h3 {
    color: var(--gold-light);
    line-height: 1.3;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

label {
    display: block;
    color: var(--gold-light);
    font-weight: bold;
    margin: 16px 0 6px;
}

input:not([type="hidden"]),
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px;
    color: var(--text);
    background: rgba(10, 7, 5, 0.65);
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

select option {
    background: #21160f;
    color: var(--text);
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border: 1px solid var(--gold);
    border-radius: 7px;
    background: var(--button);
    color: var(--gold-light);
    font: inherit;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

button:hover,
.button:hover {
    background: rgba(140, 95, 40, 0.65);
    box-shadow: 0 0 15px rgba(213, 180, 120, 0.35);
}

button:focus-visible,
.button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--gold-light);
    outline-offset: 3px;
}

.button.full,
button.full {
    width: 100%;
    margin-top: 20px;
}

button.danger,
.button.danger {
    color: #ffd0d0;
    border-color: #a84444;
    background: rgba(120, 30, 30, 0.5);
}

a {
    color: var(--gold-light);
}

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

.required {
    color: var(--warning);
}

.alert {
    padding: 14px;
    margin: 16px 0;
    border: 1px solid;
    border-radius: 6px;
}

.alert.error {
    color: var(--danger);
    background: rgba(130, 20, 20, 0.2);
}

.alert.success {
    color: var(--success);
    background: rgba(20, 100, 30, 0.2);
}

.navigation,
.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.navigation form,
.actions form {
    margin: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.stat {
    background: rgba(40, 28, 18, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 30px;
    font-weight: bold;
}

.status-pending {
    color: #e8b65b;
}

.status-approved {
    color: #91bfff;
}

.status-completed {
    color: #86c98a;
}

.status-declined {
    color: #ef9090;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 10px;
    border-bottom: 1px solid rgba(148, 112, 59, 0.4);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    color: var(--gold-light);
}

tr:hover td {
    background: rgba(148, 112, 59, 0.08);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.center {
    text-align: center;
}

footer {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 700px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 16px;
    }

    .navigation .button {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
