* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    background: #f5f7fa;
    color: #1f2937;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    min-height: 64px;
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.brand {
    font-size: 20px;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    padding: 5px 10px;
    background: #374151;
    border-radius: 20px;
    font-size: 12px;
}

.layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

.sidebar {
    width: 230px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 20px 12px;
}

.sidebar a {
    display: block;
    padding: 11px 14px;
    border-radius: 6px;
    margin-bottom: 5px;
}

.sidebar a:hover {
    background: #f3f4f6;
}

.content {
    flex: 1;
    padding: 30px;
    min-width: 0;
}

.full-width {
    width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0 0 6px;
}

.muted {
    color: #6b7280;
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 6px;
    padding: 10px 16px;
    background: #e5e7eb;
    color: #111827;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    opacity: .9;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-outline {
    border: 1px solid #6b7280;
    background: transparent;
    color: #fff;
}

.btn-small {
    padding: 7px 11px;
    font-size: 12px;
}

.full {
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.full-span {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f9fafb;
    font-size: 13px;
}

td {
    font-size: 14px;
}

.actions {
    white-space: nowrap;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-in-progress {
    background: #fef3c7;
    color: #92400e;
}

.status-initiate {
    background: #e0e7ff;
    color: #3730a3;
}

.status-not-started {
    background: #f3f4f6;
    color: #4b5563;
}

.alert {
    padding: 13px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 32px;
    box-shadow:
        0 10px 30px
        rgba(0, 0, 0, .08);
}

.login-card h1 {
    margin-top: 0;
}

.login-card label {
    margin-top: 18px;
}

.login-card button {
    margin-top: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 22px;
}

.stat-card span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-card strong {
    display: block;
    font-size: 30px;
}

.action-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.action-card {
    display: block;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    font-weight: 600;
}

.action-card:hover {
    background: #f3f4f6;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: #6b7280;
}

/* Three-column report */

.report-table {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.report-header,
.report-row {
    display: grid;
    grid-template-columns:
        1fr 1.5fr 180px;
}

.report-header {
    font-weight: 700;
    background: #f9fafb;
}

.report-header > div,
.report-row > div {
    padding: 16px;
    border-right: 1px solid #e5e7eb;
}

.report-header > div:last-child,
.report-row > div:last-child {
    border-right: 0;
}

.report-row > div {
    min-height: 70px;
}

/* Dates */

.report-dates,
.report-meta {
    display: flex;
    gap: 50px;
}

.report-dates > div,
.report-meta > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-dates span,
.report-meta span {
    color: #6b7280;
    font-size: 14px;
}

/* Checkbox */

.checkbox-list {
    margin-bottom: 24px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
}

.checkbox-row input {
    width: auto;
}

.checkbox-row span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkbox-row small {
    color: #6b7280;
}

/* Responsive */

@media (max-width: 900px) {

    .sidebar {
        width: 190px;
    }

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 700px) {

    .topbar {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .layout {
        display: block;
    }

    .sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .content {
        padding: 20px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .report-header,
    .report-row {
        grid-template-columns: 1fr;
    }

    .report-header > div,
    .report-row > div {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .report-header > div:last-child,
    .report-row > div:last-child {
        border-bottom: 0;
    }

    .report-dates,
    .report-meta {
        flex-direction: column;
        gap: 20px;
    }

}