:root {
    --primary: #1f5f3b;
    --primary-dark: #17492d;
    --accent: #c9a227;
    --accent-dark: #a88416;
    --bg: #f4f1e8;
    --bg-soft: #eee7d7;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #d9d6c8;
    --danger: #b42318;
    --success: #157347;
    --white: #ffffff;
    --shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #f7f3e8 0%, var(--bg) 100%);
    color: var(--text);
}

body {
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.site-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    padding: 32px 0 48px;
}

.container {
    width: 92%;
    max-width: 1180px;
    margin: 0 auto;
}

/* HEADER */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-bottom: 4px solid var(--accent);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
    flex-wrap: wrap;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--white);
}

.site-logo:hover {
    color: var(--white);
}

.site-logo-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, #e0bf57 100%);
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.site-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.site-logo-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.site-logo-tagline {
    font-size: 13px;
    color: #e8efe8;
    margin-top: 4px;
}

/* NAV */
.top-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 10px;
    color: var(--white);
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    transition: 0.2s ease;
}

.nav-link:hover {
    background: rgba(255,255,255,0.16);
    color: var(--white);
}

.nav-link-accent {
    background: var(--accent);
    color: #1a1a1a;
    border-color: var(--accent-dark);
}

.nav-link-accent:hover {
    background: #d8b53b;
    color: #111;
}

.nav-disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* TYPOGRAPHY */
.page-title {
    margin: 0 0 8px;
    font-size: 34px;
    color: var(--primary-dark);
    line-height: 1.1;
}

.page-subtitle {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 16px;
}

/* CARDS */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}

.card h2,
.card h3,
.card h4 {
    margin-top: 0;
}

/* GRID */
.grid {
    display: grid;
    gap: 20px;
}

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

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

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* DASHBOARD */
.welcome-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8f3e5 100%);
    border: 1px solid var(--border);
}

.stat-card {
    text-align: left;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(201, 162, 39, 0.10);
}

.stat-label {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0 0 14px;
}

.stat-card .btn {
    position: relative;
    z-index: 1;
}

.module-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.module-card p {
    color: var(--muted);
    line-height: 1.5;
}

.module-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* FORMS */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--primary-dark);
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.16);
}

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

/* BUTTONS */
.btn,
a.btn,
button,
button.btn,
input.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--accent);
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--accent) !important;
    text-decoration: none !important;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.14);
}

.btn:hover,
a.btn:hover,
button:hover,
button.btn:hover,
input.btn:hover {
    background: linear-gradient(180deg, #276f46 0%, #1b5635 100%);
    border-color: #ddb73f;
    color: #f3d56b !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.btn:focus,
a.btn:focus,
button:focus,
button.btn:focus,
input.btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary,
.btn-secondary,
.btn-accent {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--accent) !important;
    border-color: var(--accent);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-accent:hover {
    background: linear-gradient(180deg, #276f46 0%, #1b5635 100%);
    color: #f3d56b !important;
}

.btn-danger,
a.btn.btn-danger,
button.btn-danger {
    background: linear-gradient(180deg, #6e2d1a 0%, #552113 100%);
    color: var(--accent) !important;
    border-color: var(--accent);
}

.btn-danger:hover,
a.btn.btn-danger:hover,
button.btn-danger:hover {
    background: linear-gradient(180deg, #824028 0%, #642816 100%);
    color: #f3d56b !important;
}

.actions,
.action-group,
.btn-group,
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.table-actions {
    gap: 8px;
}

.table-actions .btn {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 14px;
}

/* ALERTS */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 600;
}

.alert-error {
    background: #fdecea;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.alert-success {
    background: #e9f7ef;
    color: #0f5132;
    border: 1px solid #badbcc;
}

/* TABLES */
.table-wrap {
    overflow-x: auto;
}

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

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

.table th {
    background: #f8f5eb;
    color: var(--primary-dark);
    font-size: 14px;
}

/* HERO */
.hero {
    padding: 30px 0 12px;
}

.hero-box {
    background: linear-gradient(135deg, #fff 0%, #f8f5eb 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 34px;
    box-shadow: var(--shadow);
}

.hero-box h1 {
    margin-top: 0;
    color: var(--primary-dark);
    font-size: 38px;
    line-height: 1.15;
}

.hero-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.small {
    font-size: 13px;
    color: var(--muted);
}

/* FOOTER */
.site-footer {
    background: #eee5cf;
    border-top: 1px solid var(--border);
    padding: 16px 0;
}

.footer-inner {
    color: var(--muted);
    font-size: 14px;
}

.footer-inner p {
    margin: 0;
}

/* RESPONSIVE */
@media (max-width: 980px) {
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .header-inner {
        align-items: flex-start;
    }

    .site-logo-title {
        font-size: 24px;
    }

    .hero-box h1 {
        font-size: 30px;
    }

    .page-title {
        font-size: 28px;
    }

    .stat-value {
        font-size: 30px;
    }
}

.table td .table-actions {
    justify-content: flex-start;
}

.card .actions {
    margin-top: 20px;
}
