:root {
    --primary: #1a3a5c;
    --primary-light: #2a5580;
    --accent: #d4a017;
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --green: #16a34a;
    --amber: #d97706;
    --red: #dc2626;
    --blue: #2563eb;
    --white: #9ca3af;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.navbar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand a {
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-brand a::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
}
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
}
.nav-links li { position: relative; }
.nav-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a:focus {
    color: #fff;
    background: rgba(255,255,255,0.12);
    outline: none;
}
.nav-links a:active { background: rgba(255,255,255,0.2); }
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

.container {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.card {
    background: var(--card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

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

.stat {
    text-align: center;
    padding: 1rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid var(--border);
}
.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}
.stat-label {
    font-size: 0.85rem;
    color: var(--muted);
    text-transform: uppercase;
}

h1, h2, h3 { margin-top: 0; color: var(--primary); }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.35rem; }

.form-group { margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.92rem; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="email"], input[type="tel"],
select, textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: inherit;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(42,85,128,0.1);
}

.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    background: var(--primary);
    color: #fff;
}
.btn:hover { background: var(--primary-light); }
.btn-secondary { background: #64748b; }
.btn-danger { background: var(--red); }
.btn-success { background: var(--green); }

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}
.badge-green { background: var(--green); }
.badge-amber { background: var(--amber); }
.badge-red { background: var(--red); }
.badge-blue { background: var(--blue); }
.badge-white { background: var(--white); }
.badge-neutral { background: #6b7280; }

.alert { padding: 0.9rem; border-radius: 5px; margin-bottom: 1rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    font-size: 0.93rem;
}
th, td {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}
th { background: #f1f5f9; font-weight: 600; }
tr:nth-child(even) { background: #f8fafc; }

.form-section {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    background: #fafafa;
}
.form-section h3 { margin: 0 0 0.75rem; font-size: 1.1rem; color: var(--primary-light); }

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

.inline-options label { display: inline-block; margin-right: 1rem; font-weight: normal; }
.inline-options input { margin-right: 0.25rem; }

.dynamic-table { width: 100%; margin-top: 0.5rem; }
.dynamic-table th, .dynamic-table td { padding: 0.4rem; }
.dynamic-table input { width: 100%; border: 1px solid var(--border); padding: 0.35rem; }
.small { font-size: 0.85rem; }
.site-footer { text-align: center; color: var(--muted); padding: 1.5rem; font-size: 0.85rem; }

@media (max-width: 720px) {
    .navbar { flex-wrap: wrap; padding: 0.75rem 1rem; }
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0.5rem 0;
        gap: 0.15rem;
    }
    .nav-links.nav-open { display: flex; }
    .nav-links a {
        display: block;
        padding: 0.7rem 0.5rem;
        border-radius: 4px;
    }
    .grid { grid-template-columns: 1fr; }
}
