:root {
    --bg-main: #09090b;
    --bg-surface: rgba(24, 24, 27, 0.75);
    --bg-surface-strong: rgba(24, 24, 27, 0.9);
    --border-soft: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.2);
    --text-base: #f4f4f5;
    --text-muted: #e4e4e7;
    --text-subtle: #d4d4d8;
    --amber-main: #f59e0b;
    --amber-soft: #fbbf24;
    --focus-ring: rgba(251, 191, 36, 0.7);
    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.25rem;
    --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.35);
}

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

body {
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-base);
}

.page-bg {
    background:
        radial-gradient(1200px 600px at 20% -20%, rgba(245, 158, 11, 0.2), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(251, 191, 36, 0.15), transparent 60%),
        var(--bg-main);
}

.orb {
    position: absolute;
    width: 24rem;
    height: 24rem;
    border-radius: 999px;
    filter: blur(80px);
}

.orb-1 {
    top: -6rem;
    left: -6rem;
    background: rgba(245, 158, 11, 0.2);
}

.orb-2 {
    bottom: -8rem;
    right: -4rem;
    background: rgba(180, 83, 9, 0.25);
}

.card-ui {
    background: linear-gradient(160deg, rgba(39, 39, 42, 0.7), rgba(24, 24, 27, 0.72));
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 1.25rem;
    backdrop-filter: blur(12px);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.text-muted {
    color: var(--text-muted);
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 1rem;
    z-index: 60;
    background: var(--bg-surface-strong);
    color: var(--text-base);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.85rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.btn-primary {
    color: #111827;
    background: linear-gradient(90deg, var(--amber-main), var(--amber-soft));
    border-color: rgba(251, 191, 36, 0.65);
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-secondary {
    color: #f4f4f5;
    background: rgba(39, 39, 42, 0.7);
    border-color: rgba(113, 113, 122, 0.55);
}

.btn-secondary:hover {
    background: rgba(63, 63, 70, 0.7);
}

.btn-danger {
    color: #fef2f2;
    background: rgba(127, 29, 29, 0.65);
    border-color: rgba(220, 38, 38, 0.55);
}

.btn-danger:hover {
    background: rgba(153, 27, 27, 0.75);
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.alert-ui {
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(146, 64, 14, 0.25);
    color: #fef3c7;
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    border: 1px solid transparent;
}

.badge-warning {
    color: #fef3c7;
    background: rgba(180, 83, 9, 0.3);
    border-color: rgba(251, 191, 36, 0.35);
}

.badge-danger {
    color: #fee2e2;
    background: rgba(127, 29, 29, 0.35);
    border-color: rgba(220, 38, 38, 0.45);
}

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

.table-ui th,
.table-ui td {
    padding: 0.85rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table-ui th {
    color: #e4e4e7;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 600;
}

.table-ui td {
    color: var(--text-base);
    font-size: 0.92rem;
}

.table-ui tbody tr:hover td {
    background: rgba(63, 63, 70, 0.28);
}

.table-actions {
    text-align: right;
    white-space: nowrap;
}

.table-actions .btn + .btn {
    margin-left: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(113, 113, 122, 0.65);
    background: rgba(24, 24, 27, 0.85);
    color: var(--text-base);
    padding: 0.6rem 0.75rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 1px;
    border-color: rgba(251, 191, 36, 0.65);
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-subtle);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-help {
    margin-top: 0.35rem;
    color: var(--text-subtle);
    font-size: 0.78rem;
}

.form-error {
    margin-top: 0.35rem;
    color: #fca5a5;
    font-size: 0.82rem;
}

.modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .card-ui {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.3rem;
    }
}
