body {
    margin: 0;
    background: #f7f8fa;
    color: #111827;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    min-height: 100vh;
    padding: 24px 0;
}

.page-narrow,
.page-form {
    box-sizing: border-box;
    width: 100%;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

.page-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.eyebrow {
    color: #6b7280;
    font-size: 12px;
    margin: 0 0 4px;
}

.title {
    margin: 0;
    color: #111827;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.subtitle {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.panel-body {
    padding: 16px;
}

.section {
    padding: 16px 0;
    border-top: 1px solid #eef0f3;
}

.section:first-child {
    border-top: 0;
    padding-top: 0;
}

.section-title {
    margin: 0 0 12px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn:hover {
    background: #f9fafb;
}

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

.btn-primary:hover {
    background: #374151;
}

.btn-danger {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

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

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

.field-full {
    grid-column: 1 / -1;
}

.label {
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
}

.input,
.textarea,
.select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    padding: 8px 10px;
    outline: none;
}

.textarea {
    min-height: 88px;
    resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
    border-color: #111827;
    box-shadow: 0 0 0 2px rgba(17, 24, 39, .08);
}

.detail-grid {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 8px 14px;
    font-size: 14px;
}

.detail-label {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.detail-value {
    color: #111827;
    overflow-wrap: anywhere;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 9px 10px;
    border-bottom: 1px solid #eef0f3;
    text-align: left;
}

.table th {
    color: #4b5563;
    background: #f9fafb;
    font-size: 12px;
}

.simple-list {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.simple-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f3f5;
    font-size: 14px;
}

.simple-item:last-child {
    border-bottom: 0;
}

.simple-main {
    min-width: 0;
}

.simple-title {
    color: #111827;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.simple-meta {
    color: #6b7280;
    font-size: 12px;
    margin-top: 3px;
}

.alert {
    margin-bottom: 12px;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.login-card {
    width: min(100%, 360px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 22px;
}

.muted {
    color: #6b7280;
}

pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
}

@media (max-width: 720px) {
    .page {
        padding: 16px 10px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .field-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        width: 100%;
    }

    .btn {
        flex: 1;
    }
}
