:root {
    --brand: #E5184A;
    --brand-dark: #432D33;
    --brand-light: #FDECEF;
    --navy: #172033;
    --muted: #667085;
    --border: #e4e7ec;
    --background: #f5f7fa;
    --white: #ffffff;
    --red: #b42318;
    --red-light: #fef3f2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: var(--navy);
    background: var(--background);
}

.topbar {
    min-height: 68px;
    padding: 0 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    background: var(--brand-dark);
}

.topbar > div,
.user-menu {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
}

.topbar a {
    color: white;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    padding: 9px 12px;
    border-radius: 7px;
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
    color: white;
    background: rgba(255, 255, 255, .12);
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 38px auto;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.page-heading h1 {
    margin: 0 0 8px;
    font-size: 27px;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.button {
    display: inline-flex;
    min-height: 42px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    color: white;
    background: var(--brand);
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.button:hover {
    background: var(--brand-dark);
}

.button-secondary {
    color: var(--navy);
    background: #eef1f5;
}

.button-secondary:hover {
    background: #e0e5eb;
}

.table-card,
.form-card {
    margin-top: 26px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 3px 12px rgba(16, 24, 40, .05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    background: #fafbfc;
    font-size: 12px;
    text-transform: uppercase;
}

td {
    font-size: 14px;
}

tbody tr:hover td {
    background: #fdf8f9;
}

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

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.badge-active {
    color: #9f1239;
    background: var(--brand-light);
}

.badge-inactive {
    color: #475467;
    background: #f2f4f7;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid #cfd4dc;
    border-radius: 9px;
    color: var(--navy);
    background: white;
    font-family: inherit;
    font-size: 15px;
}

input:focus,
select:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(229, 24, 74, .12);
}

label {
    display: block;
    margin: 18px 0 7px;
    font-size: 14px;
    font-weight: bold;
}

.alert {
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 14px;
}

.alert-error {
    color: var(--red);
    background: var(--red-light);
}

@media (max-width: 720px) {
    .topbar,
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar {
        padding: 18px 22px;
    }

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

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