:root {
    --green: #4f8f1f;
    --green-dark: #2f5f13;
    --green-light: #eef7e9;
    --bg: #f6f8f3;
    --card: #ffffff;
    --border: #dfe7d7;
    --text: #1f2933;
    --muted: #6b7280;
    --danger: #dc2626;
    --warning: #d97706;
    --success: #15803d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.topbar {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.brand {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
}

.topbar a:hover {
    background: rgba(255,255,255,0.24);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 10px 28px rgba(31, 41, 51, 0.06);
}

.card h1,
.card h2,
.card h3 {
    margin-top: 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 28px rgba(31, 41, 51, 0.06);
}

.stat-card .label {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 34px;
    font-weight: 800;
    color: var(--green-dark);
}

input,
select,
textarea {
    padding: 13px 14px;
    border: 1px solid #cfd8c5;
    border-radius: 12px;
    margin: 8px 0 14px 0;
    width: 100%;
    font-size: 15px;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(79, 143, 31, 0.15);
}

button,
.button {
    background: var(--green);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 700;
    font-size: 15px;
}

button:hover,
.button:hover {
    background: var(--green-dark);
}

.button.secondary {
    background: #e7eee0;
    color: var(--green-dark);
}

.button.danger {
    background: var(--danger);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 14px;
    overflow: hidden;
}

th {
    background: #f1f5ec;
    color: #25311f;
    font-weight: 800;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

tr:hover td {
    background: #fbfdf8;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #e5e7eb;
    color: #374151;
}

.badge.success {
    background: #dcfce7;
    color: var(--success);
}

.badge.warning {
    background: #fef3c7;
    color: var(--warning);
}

.badge.danger {
    background: #fee2e2;
    color: var(--danger);
}

.login-wrap {
    max-width: 560px;
    margin: 60px auto;
}

.login-card {
    background: white;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 18px 45px rgba(31, 41, 51, 0.12);
    padding: 34px;
}

.login-logo {
    text-align: center;
    font-size: 42px;
    margin-bottom: 10px;
}

.login-title {
    text-align: center;
    margin: 0;
    font-size: 30px;
}

.login-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 26px;
}

.notice {
    background: var(--green-light);
    border: 1px solid var(--border);
    color: var(--green-dark);
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
}

.footer {
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 900px) {
    .topbar {
        display: block;
    }

    .topbar nav {
        margin-top: 14px;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .container {
        padding: 16px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 14px;
    }
}