:root {
    --blue: #0f3d5e;
    --blue-dark: #09283e;
    --bg: #f4f7fa;
    --card: #ffffff;
    --text: #1e2933;
    --muted: #64748b;
    --border: #d8e0e8;
    --green: #15803d;
    --green-bg: #dcfce7;
    --red: #b91c1c;
    --red-bg: #fee2e2;
}

* {
    box-sizing: border-box;
}

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

.wrap {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: white;
    padding: 42px 0;
}

.site-header h1 {
    margin: 4px 0 8px;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.1;
}

.site-header p {
    margin: 0;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.86);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.85;
}

.card,
.notice {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 61, 94, 0.08);
    margin: 28px 0;
    padding: 24px;
}

.notice {
    font-size: 0.95rem;
}

.list-header,
.admin-top,
.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

h2 {
    margin: 0 0 6px;
    font-size: 1.45rem;
}

.muted {
    color: var(--muted);
    margin: 0;
}

.small {
    font-size: 0.9rem;
    margin-top: 14px;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 20px;
}

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

th {
    background: #eef4f8;
    color: #203040;
    text-align: left;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

.company {
    font-weight: 700;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.status.active {
    color: var(--green);
    background: var(--green-bg);
    border: 1px solid #86efac;
}

.status.inactive {
    color: var(--red);
    background: var(--red-bg);
    border: 1px solid #fecaca;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: white;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

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

.button.secondary {
    background: #e7eef4;
    color: var(--blue-dark);
}

.button.secondary:hover {
    background: #d6e2ec;
}

.login-card {
    max-width: 480px;
}

form label {
    display: block;
    font-weight: 700;
    margin: 14px 0;
}

input[type="text"],
input[type="password"],
input[type="date"],
textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: white;
}

textarea {
    resize: vertical;
}

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

.checkbox-row {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
}

.help {
    display: block;
    color: var(--muted);
    font-weight: 400;
    font-size: 0.85rem;
    margin-top: 4px;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin: 18px 0;
    font-weight: 700;
}

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

.alert.success {
    color: var(--green);
    background: var(--green-bg);
}

.empty {
    margin-top: 18px;
    padding: 20px;
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--muted);
}

.actions-col {
    width: 150px;
}

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

.actions form {
    margin: 0;
}

.text-link {
    color: var(--blue);
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.text-link.danger {
    color: var(--red);
}

.footer {
    padding: 10px 0 34px;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 700px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

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