
:root {
    --wq-green: #1f6b45;
    --wq-green-dark: #154b31;
    --wq-gold: #b67a14;
    --wq-bg: #f3f6f4;
    --wq-surface: #fff;
    --wq-text: #17211b;
    --wq-muted: #5f6d64;
    --wq-danger: #b42318;
    --wq-border: #d9e2dc;
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: Arial, Helvetica, sans-serif !important;
    background: var(--wq-bg) !important;
    color: var(--wq-text);
    line-height: 1.45;
}

.admin-header {
    background: var(--wq-green-dark) !important;
}

.layout > main {
    width: calc(100% - 240px);
    min-width: 0;
    max-width: 1400px;
}

.admin-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

h1,
h2,
h3 {
    color: var(--wq-text);
    overflow-wrap: anywhere;
}

.card,
.panel {
    max-width: 100%;
    margin-bottom: 18px;
    border: 1px solid var(--wq-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08) !important;
    border-radius: 12px !important;
    background: var(--wq-surface);
}

.button,
.btn,
button[type=submit] {
    background: var(--wq-green) !important;
    color: white !important;
    border: 0;
    padding: 10px 16px;
    border-radius: 7px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

.button:hover,
.btn:hover,
button[type=submit]:hover {
    background: var(--wq-green-dark) !important;
}

button:disabled,
button[type=submit]:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.button.secondary,
.btn-secondary,
.secondary {
    background: #56635a !important;
}

.button.danger,
.btn-danger,
.danger {
    background: var(--wq-danger) !important;
}

.btn-warning {
    background: var(--wq-gold) !important;
    color: #fff !important;
}

.btn-success {
    background: var(--wq-green) !important;
    color: #fff !important;
}

.mb-3 {
    margin-bottom: 1rem;
}

input,
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #b9c6bd;
    border-radius: 7px;
    background: #fff;
    color: #17211b;
    margin-top: 5px;
}

label {
    font-weight: 700;
    color: #33443a;
}

.table-wrap,
.table-wrapper,
.layout > main table {
    max-width: 100%;
    overflow-x: auto;
}

.layout > main table {
    display: block;
    width: 100%;
    background: white;
    border-collapse: collapse;
}

.layout > main thead,
.layout > main tbody {
    width: 100%;
}

th {
    background: #e8f0eb !important;
}

td {
    overflow-wrap: anywhere;
}

tr:hover td {
    background: #f8fbf9;
}

.flash {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.flash.success {
    background: #e9f7ef;
    color: #17633b;
}

.flash.warning {
    background: #fff5d6;
    color: #795a00;
}

.flash.danger,
.flash.error {
    background: #fdecec;
    color: #8f1d17;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: end;
}

@media (max-width: 900px) {
    .layout {
        display: block !important;
    }

    .layout nav {
        width: 100% !important;
        padding-bottom: 8px;
    }

    .layout nav h3 {
        margin: 0;
        padding: 14px 18px 6px;
    }

    .layout nav a {
        display: inline-block !important;
        padding: 10px 14px;
    }

    .layout > main {
        width: 100%;
        max-width: none;
        padding: 18px !important;
    }

    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 560px) {
    .admin-header {
        padding: 14px 16px;
        font-size: 21px;
    }

    .layout nav a {
        display: block !important;
    }

    .layout > main {
        padding: 14px !important;
    }

    .card,
    .panel {
        padding: 15px !important;
    }

    .actions,
    .header-actions,
    .page-header {
        flex-direction: column;
        align-items: stretch !important;
    }
}
