* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6f8;
    color: #1d2733;
}

.container {
    width: calc(100% - 40px);
    max-width: 1400px;
    margin: 0 auto;
}

.main-header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

.main-content {
    padding: 40px 0;
}

.card {
    margin-top: 30px;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 35px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
}

.login-logo {
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
}

.login-card h1 {
    margin-top: 0;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ccd1d7;
    border-radius: 6px;
    font-size: 15px;
}

.form-group input:focus {
    border-color: #111;
    outline: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
}

.btn-primary {
    background: #111827;
    color: #fff;
}

.login-card .btn {
    width: 100%;
}

.alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 6px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 30px;
}

.brand {
    color: #111827;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

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

.main-nav a {
    color: #4b5563;
    text-decoration: none;
}

.main-nav a:hover {
    color: #111827;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-link {
    padding: 0;
    border: 0;
    background: none;
    color: #4b5563;
    cursor: pointer;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

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

.page-header p {
    margin: 0;
    color: #6b7280;
}

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

.form-group-full {
    grid-column: 1 / -1;
}

.form-group textarea,
.form-group select {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid #ccd1d7;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
}

.form-actions {
    margin-top: 25px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.table th {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
}

.status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

@media (max-width: 768px) {

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group-full {
        grid-column: auto;
    }

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

    .header-inner {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
    }
}

.organization-select-card {
    width: 100%;
    max-width: 520px;
    padding: 35px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
}

.organization-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.organization-option {
    margin: 0;
}

.organization-button {
    width: 100%;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

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

    background: #fff;
    cursor: pointer;

    text-align: left;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.organization-button:hover {
    border-color: #111827;
    background: #f9fafb;
}

.organization-button strong {
    font-size: 16px;
}

.organization-button span {
    font-size: 13px;
    color: #6b7280;
}

.organization-switcher {
    margin-left: auto;
}

.organization-switcher select {
    height: 36px;
    padding: 0 32px 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
}

.table-link {
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}

.table-link:hover {
    text-decoration: underline;
}

.muted {
    color: #9ca3af;
}

.field-help {
    display: block;
    margin-top: 7px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

.user-summary {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-summary strong {
    font-size: 18px;
}

.user-summary span {
    color: #6b7280;
}