* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: #f3f4f6;
    color: #111827;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    background: #111827;
    color: #f9fafb;
    padding: 10px 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-title {
    font-weight: 700;
    font-size: 18px;
}

.brand-subtitle {
    font-size: 11px;
    color: #9ca3af;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.nav a {
    color: #e5e7eb;
}

.nav a:hover {
    color: #fff;
    text-decoration: none;
}

.nav-sep {
    color: #4b5563;
}

.page {
    max-width: 1100px;
    margin: 16px auto 40px;
    padding: 0 12px 40px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 14px 14px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
}

.card-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

.btn {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    background: #2563eb;
    color: #fff;
    transition: background .15s ease, transform .05s ease, box-shadow .05s ease;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    white-space: nowrap;
}

.btn:hover {
    background: #1d4ed8;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #d1d5db;
    box-shadow: none;
    transform: none;
}

.btn-danger {
    background: #dc2626;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.35);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th,
.table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.table thead th {
    background: #f3f4f6;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.table tbody tr:hover {
    background: #f9fafb;
}

.muted {
    color: #6b7280;
    font-size: 12px;
}

.micro {
    font-size: 11px;
    color: #9ca3af;
}

.footer {
    padding: 10px 16px 14px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
}

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10px 12px;
    margin-top: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

input[type="text"],
input[type="number"],
input[type="password"],
select {
    border-radius: 999px;
    border: 1px solid #d1d5db;
    padding: 6px 12px;
    font-size: 14px;
    outline: none;
    background: #f9fafb;
    width: 100%;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

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

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    background: #e5e7eb;
    color: #374151;
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.error {
    color: #b91c1c;
    font-size: 13px;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .brand-title {
        font-size: 16px;
    }
    .nav {
        font-size: 12px;
    }
    .grid-2,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page {
        padding: 0 8px 32px;
    }
    .card {
        padding: 14px 10px 10px;
    }
    .card-title {
        font-size: 16px;
    }
    .btn {
        font-size: 13px;
        padding: 6px 12px;
    }
}
