* {
    box-sizing: border-box;
}

:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --navy: #0f172a;
    --navy-soft: #1e293b;
    --text: #172033;
    --muted: #667085;
    --border: #d9e2ef;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.06);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--navy);
    color: #ffffff;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.18);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 28px;
}

.header-inner h1 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0;
}

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

.nav-links a {
    border-radius: 8px;
    color: #e5edf8;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 10px;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover {
    background: var(--navy-soft);
    color: #ffffff;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 34px 28px 48px;
}

.dashboard-hero,
.table-header {
    margin-bottom: 22px;
}

.dashboard-hero h2,
.table-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0;
}

.dashboard-hero p,
.table-header p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.summary-card {
    display: flex;
    min-height: 132px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.summary-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
}

.summary-card p {
    display: inline-flex;
    align-items: center;
    margin: 0;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 800;
    padding: 5px 10px;
}

.table-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    background: var(--blue);
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
}

.btn:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

th,
td {
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    background: #eef3f9;
    color: #1f2937;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

tbody tr {
    transition: background 140ms ease;
}

tbody tr:hover {
    background: var(--surface-soft);
}

tbody tr:last-child td {
    border-bottom: 0;
}

td {
    max-width: 380px;
    color: #273142;
    word-break: break-word;
}

td a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

td a:hover {
    color: var(--blue-dark);
    text-decoration: underline;
}

.empty-state {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    background: var(--surface);
    color: var(--muted);
    box-shadow: var(--shadow-soft);
}

.login-panel {
    max-width: 430px;
    margin: 36px auto 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-panel h2 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 800;
}

.login-panel p {
    margin: 0 0 18px;
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.login-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--text);
    font: inherit;
}

.form-error {
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 800;
}

@media (max-width: 900px) {
    .table-header {
        display: block;
    }

    .page-actions {
        justify-content: flex-start;
        margin-top: 16px;
    }

}

@media (max-width: 640px) {
    .page,
    .header-inner {
        padding-left: 18px;
        padding-right: 18px;
    }

    .page {
        padding-top: 24px;
    }

    .header-inner h1 {
        font-size: 21px;
    }

    .dashboard-hero h2,
    .table-header h2 {
        font-size: 24px;
    }

    .summary-card {
        display: block;
    }

    .summary-card .btn {
        margin-top: 18px;
    }
}
