* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f4f6f8;
    color: #17202a;
}

a {
    color: inherit;
}

.topbar {
    min-height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;
}

.topbar-user {
    margin-left: 16px;
    color: #667085;
    font-size: 14px;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto;
}

.auth-wrapper {
    min-height: calc(100vh - 130px);

    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: min(430px, 100%);
}

.card {
    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    padding: 24px;

    box-shadow:
        0 1px 3px
        rgba(0, 0, 0, 0.04);
}

.card-header {
    margin-bottom: 24px;
}

.card-header h1,
.page-header h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.card-header p,
.page-header p {
    margin: 0;
    color: #667085;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;

    margin-bottom: 6px;

    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;

    border: 1px solid #d0d5dd;
    border-radius: 8px;

    padding: 11px 12px;

    font-size: 15px;

    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus {
    outline: 2px solid #cbd5e1;
    border-color: #64748b;
}

.form-group small {
    display: block;

    margin-top: 6px;

    color: #667085;
}

.button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 40px;

    border: 0;
    border-radius: 8px;

    padding: 9px 16px;

    font-weight: 600;
    font-size: 14px;

    text-decoration: none;

    cursor: pointer;
}

.button-primary {
    background: #1f2937;
    color: #ffffff;
}

.button-primary:hover {
    background: #111827;
}

.button-secondary {
    background: #eef2f6;
    color: #344054;
}

.button-full {
    width: 100%;
}

.page-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 24px;
}

.grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(240px, 1fr)
        );

    gap: 18px;

    margin-bottom: 24px;
}

.dashboard-grid {
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(200px, 1fr)
        );
}

.metric-card {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.metric-label {
    color: #667085;
    font-size: 14px;
}

.metric-value {
    font-size: 28px;
}

.alert {
    margin-bottom: 20px;

    border-radius: 8px;

    padding: 14px 16px;
}

.alert-success {
    background: #ecfdf3;
    border: 1px solid #abefc6;
}

.alert-error {
    background: #fef3f2;
    border: 1px solid #fecdca;
}

.alert ul {
    margin-bottom: 0;
}

.muted {
    color: #667085;
}

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

.badge {
    display: inline-flex;

    padding: 5px 9px;

    border-radius: 999px;

    background: #eef2f6;

    font-size: 13px;
    font-weight: 600;
}

.badge-inactive {
    background: #fef3f2;
}

.company-row {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 15px 0;

    border-bottom: 1px solid #eaecf0;
}

.company-row:last-child {
    border-bottom: 0;
}

@media (max-width: 640px) {
    .container {
        width: min(
            100% - 20px,
            1200px
        );

        margin-top: 20px;
    }

    .topbar {
        padding: 0 14px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .company-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
