:root {
    --primary-color: #436c59;
    --primary-light: #d4e581;
    --light-green: #e8f5e9;
    --primary-dark: #2f4d40;
    --bg-color: #f8fafb;
    --text-color: #1c2430;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #e8f0a0 100%);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--primary-color);
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
    color: var(--primary-color);
    margin-top: 4px;
}

.company {
    text-align: right;
    font-size: 13px;
    color: var(--primary-color);
}

.page {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--primary-color);
}

.card {
    background: #fff;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 12px;
}

.card h3 {
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--primary-color);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.list {
    display: grid;
    gap: 12px;
}

.item {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fafbfc;
    transition: var(--transition);
}

.item:hover {
    border-color: var(--primary-light);
    background: #f0f4ed;
}

.item-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 15px;
}

.item-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.badge-success {
    background: #d1fae5;
    color: #047857;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.thumbs a {
    display: inline-block;
    padding: 8px 14px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.thumbs a:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.inline-form input[type="text"],
.inline-form input[type="number"],
.inline-form input[type="date"],
.inline-form select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 200px;
    font-size: 14px;
    transition: var(--transition);
}

.inline-form input[type="text"]:focus,
.inline-form input[type="number"]:focus,
.inline-form input[type="date"]:focus,
.inline-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 108, 89, 0.1);
}

.stacked {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stacked input,
.stacked textarea,
.stacked select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.stacked input:focus,
.stacked textarea:focus,
.stacked select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 108, 89, 0.1);
}

label {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

label.inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 0;
}

label.inline input[type="checkbox"] {
    margin: 0;
}

button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

button:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background: var(--border-color);
    color: var(--text-color);
}

button.secondary:hover {
    background: #d1d5db;
}

.alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid;
}

.alert {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: var(--error-color);
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
    border-left-color: var(--success-color);
}

.alert.warning {
    background: #fef3c7;
    color: #92400e;
    border-left-color: var(--warning-color);
}

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

.text-small {
    font-size: 12px;
}

.list-simple {
    padding-left: 20px;
    margin: 0;
}

.list-simple li {
    margin-bottom: 8px;
}

.auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.auth-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    width: min(420px, 90%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-box img {
    display: block;
    margin: 0 auto 24px;
    max-width: 100%;
}

.auth-box h1 {
    margin: 0 0 24px;
    font-size: 24px;
    color: var(--primary-color);
    text-align: center;
}

.auth-box .stacked {
    gap: 14px;
}

.auth-box button {
    width: 100%;
    justify-content: center;
}

.mt {
    margin-top: 16px;
}

.text-center {
    text-align: center;
}

.flex {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-light) 0%, #e8f0a0 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page {
        padding: 16px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }

    .logo {
        font-size: 18px;
    }

    .company {
        text-align: left;
        width: 100%;
    }

    .card {
        padding: 16px;
    }

    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .inline-form input,
    .inline-form button,
    .inline-form select {
        min-width: unset;
        width: 100%;
    }

    .grid,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-title {
        font-size: 22px;
    }

    .card {
        margin-bottom: 16px;
    }

    button {
        padding: 10px 16px;
        font-size: 13px;
    }

    .auth-box {
        padding: 24px;
    }
}