* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #f3f6fb;
    color: #1f2937;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
    color: #1d4ed8;
}

.container {
    width: min(1180px, 92%);
    margin: 24px auto;
}

.narrow {
    width: min(640px, 92%);
}

.site-header {
    background: #0b2f7c;
    border-bottom: 1px solid #0a2a6d;
    color: #fff;
}

.site-header-inner {
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.site-brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.site-nav a {
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 14px;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.22);
}

.site-footer {
    margin-top: 26px;
    border-top: 1px solid #d8e1ef;
    background: #ffffff;
    text-align: center;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 12px 0;
}

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

.auth-card form {
    text-align: left;
}

.auth-card label {
    text-align: left;
}

.auth-card input {
    text-align: left;
}

.card {
    background: #ffffff;
    border: 1px solid #d8e1ef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.inline-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-link,
.btn-inline {
    text-decoration: none;
    display: inline-block;
    background: #1d4ed8;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.muted-btn {
    background: #64748b;
}

.danger-btn {
    background: #b91c1c;
}

.add-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
}

.add-user-btn svg,
.btn-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

h1,
h2,
h3 {
    margin-top: 0;
}

.logo-auth {
    width: 84px;
    height: 84px;
    border-radius: 14px;
    margin-bottom: 10px;
}

label {
    font-weight: 600;
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
}

input,
select,
textarea,
button {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c9d4e5;
    border-radius: 8px;
    font-size: 14px;
}

textarea {
    min-height: 86px;
    resize: vertical;
}

input[type="file"] {
    background: #fff;
    padding: 8px;
}

button {
    cursor: pointer;
    background: #1d4ed8;
    color: #fff;
    border: none;
    margin-top: 14px;
}

button.danger {
    background: #b91c1c;
}

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

.inline-form button,
.inline-form .btn-inline {
    margin-top: 0;
    width: auto;
}

.table-wrap {
    overflow-x: auto;
}

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

th,
td {
    text-align: left;
    border-bottom: 1px solid #e5eaf3;
    padding: 10px 8px;
    vertical-align: top;
}

.flash {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid transparent;
}

.flash.success {
    background: #ecfdf3;
    color: #166534;
    border-color: #86efac;
}

.flash.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}

.flash.info {
    background: #eff6ff;
    color: #1e3a8a;
    border-color: #93c5fd;
}

.muted {
    color: #64748b;
}

.small {
    font-size: 12px;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.badge.pending {
    background: #fef9c3;
    color: #854d0e;
}

.badge.approved,
.badge.paid {
    background: #dcfce7;
    color: #166534;
}

.badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.stat {
    text-align: center;
}

.stat strong {
    font-size: 24px;
    display: block;
    margin-bottom: 4px;
}

.profile-preview-wrap {
    margin: 10px 0 14px;
}

.profile-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #d8e1ef;
}

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

.pill {
    display: inline-block;
    border-radius: 999px;
    background: #e0ebff;
    color: #1e40af;
    font-size: 12px;
    padding: 4px 8px;
}

.notif-item {
    border: 1px solid #dbe7fa;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8fbff;
}

.notif-item.unread {
    border-color: #93c5fd;
    background: #eef6ff;
}

@media (max-width: 860px) {
    .header-row {
        flex-direction: column;
        align-items: flex-start;
    }

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