@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    line-height: 1.65;
    font-size: 15px;
    font-feature-settings: "liga" 1, "kern" 1;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.09), transparent 28%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.07), transparent 24%),
        #f5f7fb;
    color: #1f2937;
}

.topbar {
    background: linear-gradient(135deg, #0f766e, #115e59);
    color: #fff;
    padding: 18px 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.18);
}

.topbar h1 {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.user-info {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-info a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.container {
    max-width: 1240px;
    margin: 28px auto;
    padding: 0 18px 28px;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(209, 213, 219, 0.7);
    margin-bottom: 20px;
}

h2 {
    margin: 0 0 16px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -0.01em;
    font-weight: 800;
}

.page-header {
    margin-bottom: 18px;
}

.page-header h2 {
    margin-bottom: 6px;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.page-lead {
    margin: 0;
    color: #6b7280;
    max-width: 72ch;
    font-size: 15px;
}

.form-row {
    margin-bottom: 12px;
}

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

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

button {
    background: #0f766e;
    color: #fff;
    cursor: pointer;
    border: none;
    font-weight: 600;
}

button:hover {
    background: #0d5f59;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    padding: 12px 14px;
    font-size: 13.5px;
    vertical-align: top;
    line-height: 1.45;
}

th {
    background: #f8fafc;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

tbody tr:hover {
    background: #f8fbfb;
}

.menu {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.menu a {
    text-decoration: none;
    color: #0f766e;
    border: 1px solid #0f766e;
    border-radius: 999px;
    padding: 9px 14px;
    font-weight: 700;
    font-size: 13.5px;
    background: rgba(15, 118, 110, 0.04);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.menu a:hover {
    background: #0f766e;
    color: #fff;
    transform: translateY(-1px);
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-selesai {
    background: #dcfce7;
    color: #166534;
}

.status-menunggu-invoice {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-menunggu-do {
    background: #fef3c7;
    color: #92400e;
}

.sla-pill {
    display: inline-block;
    min-width: 76px;
    text-align: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.sla-good {
    background: #dcfce7;
    color: #166534;
}

.sla-warn {
    background: #fef3c7;
    color: #92400e;
}

.sla-bad {
    background: #fee2e2;
    color: #991b1b;
}

.sla-na {
    background: #e5e7eb;
    color: #4b5563;
}

.sla-good-card {
    border-left: 6px solid #16a34a;
}

.sla-warn-card {
    border-left: 6px solid #d97706;
}

.sla-bad-card {
    border-left: 6px solid #dc2626;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.filters-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filters-actions button,
.filters-actions .btn-secondary {
    width: auto;
    min-width: 110px;
}

.btn-secondary {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    color: #334155;
    background: #f8fafc;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.inline-form {
    display: inline-block;
    margin: 0;
}

.btn-inline {
    width: auto;
    min-width: 92px;
    padding: 8px 11px;
    font-size: 12px;
    border-radius: 9px;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    margin-right: 6px;
    margin-bottom: 4px;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-ok {
    background: #16a34a;
    color: #fff;
}

.btn-ok:hover {
    background: #15803d;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stats-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    background: #fff;
    border: 1px solid rgba(209, 213, 219, 0.8);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.stat-label {
    margin: 0 0 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
}

.stat-value {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

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

.chart-card canvas {
    margin-top: 6px;
}

.report-card .report-meta {
    margin: -8px 0 14px;
    color: #64748b;
    font-size: 13px;
}

.report-card .table-wrap {
    border-radius: 14px;
    border-color: #dbe3ee;
}

.report-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eef4fb;
}

.report-table tbody tr:nth-child(even) {
    background: #fbfdff;
}

.report-table td,
.report-table th {
    vertical-align: middle;
}

.report-table td:nth-child(2),
.report-table td:nth-child(3),
.report-table td:nth-child(5),
.report-table td:nth-child(6),
.report-table td:nth-child(7),
.report-table td:nth-child(9),
.report-table td:nth-child(10),
.report-table td:nth-child(11),
.report-table td:nth-child(12),
.report-table td:nth-child(13),
.report-table td:nth-child(14),
.report-table td:nth-child(15),
.report-table th:nth-child(2),
.report-table th:nth-child(3),
.report-table th:nth-child(5),
.report-table th:nth-child(6),
.report-table th:nth-child(7),
.report-table th:nth-child(9),
.report-table th:nth-child(10),
.report-table th:nth-child(11),
.report-table th:nth-child(12),
.report-table th:nth-child(13),
.report-table th:nth-child(14),
.report-table th:nth-child(15) {
    text-align: center;
    white-space: nowrap;
}

.report-table td:nth-child(1),
.report-table td:nth-child(4),
.report-table td:nth-child(8) {
    font-weight: 700;
}

@media (max-width: 640px) {
    .topbar {
        padding: 16px 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar h1 {
        font-size: 20px;
    }

    .card {
        padding: 18px;
        border-radius: 14px;
    }

    .page-header h2 {
        font-size: 20px;
    }

    th,
    td {
        padding: 10px 12px;
    }

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

    .filters-actions {
        flex-wrap: wrap;
    }

    .filters-actions button,
    .filters-actions .btn-secondary {
        width: 100%;
    }

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

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

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

    .report-card .report-meta {
        font-size: 12px;
    }
}

@media (min-width: 641px) and (max-width: 960px) {
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stats-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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