* {
    box-sizing: border-box;
}


body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #f4f6f9;
    font-size: 13px;
    color: #2d3748;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* ================= SIDEBAR ================= */

.sidebar {
    width: 220px;
    background: #111827;
    color: #fff;
    padding: 20px 0;
}

.sidebar h2 {
    font-size: 15px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.sidebar a {
    display: block;
    padding: 10px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
}

.sidebar a:hover {
    background: #1f2937;
    color: #fff;
}

.sidebar-logo {
    text-align: center;
    padding: 10px 15px 20px 15px;
}

.sidebar-logo img {
    width: 140px;
    max-width: 100%;
    margin-bottom: 8px;
}

.sidebar-title {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.5px;
}

.sidebar-links a {
    display: block;
    padding: 10px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
}

.sidebar-links a:hover {
    background: #1f2937;
    color: #fff;
}


/* ================= MAIN ================= */

.main {
    flex: 1;
    padding: 30px;
}

.main-inner {
    width: 1100px;
    max-width: 100%;
    margin: 0 auto 0 0;
}


.page-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ================= TABLE ================= */

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12px;
    text-align: left;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
}

/* ================= BUTTONS ================= */

.btn {
    padding: 6px 10px;
    border-radius: 4px;
    border: none;
    font-size: 12px;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-muted {
    background: #e5e7eb;
}

.btn-success {
    background: #16a34a;
    color: #fff;
}

/* ================= FORMS ================= */

input[type="text"],
select {
    padding: 6px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

/* ================= SAVE OVERLAY ================= */

#savingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #eee;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
