:root {
    --bg: #f3f5fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #111827;
    --primary-hover: #1f2937;
    --success-bg: #ecfdf5;
    --success-line: #bbf7d0;
    --success-text: #166534;
    --danger-bg: #fef2f2;
    --danger-line: #fecaca;
    --danger-text: #991b1b;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top right, #e9efff 0%, var(--bg) 45%);
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.45;
}

a {
    color: #1d4ed8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 16px;
}

h1, h2, h3 {
    margin-top: 0;
    letter-spacing: -0.02em;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}

button,
.rounded.bg-gray-900,
a.rounded.bg-gray-900 {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform .05s ease, background .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:hover,
.rounded.bg-gray-900:hover,
a.rounded.bg-gray-900:hover {
    background: var(--primary-hover);
    text-decoration: none;
}

button:active {
    transform: translateY(1px);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

thead {
    background: var(--surface-soft);
}

tbody tr:hover {
    background: #fafafa;
}

nav[role="navigation"] {
    margin-top: 16px;
}

nav[role="navigation"] > div:first-child {
    display: none;
}

nav[role="navigation"] span,
nav[role="navigation"] a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    margin-right: 6px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    text-decoration: none;
}

nav[role="navigation"] span[aria-current="page"] {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-6xl {
    max-width: 1100px;
}

.max-w-md {
    max-width: 520px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.inline {
    display: inline;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

.space-y-4 > * + * {
    margin-top: 16px;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.rounded {
    border-radius: var(--radius);
}

.border {
    border: 1px solid var(--line);
}

.overflow-hidden {
    overflow: hidden;
}

.bg-white {
    background: var(--surface);
}

.bg-gray-50 {
    background: var(--bg);
}

.bg-gray-100 {
    background: var(--surface-soft);
}

.bg-green-50 {
    background: var(--success-bg);
}

.border-green-200 {
    border-color: var(--success-line);
}

.text-green-800 {
    color: var(--success-text);
}

.bg-red-50 {
    background: var(--danger-bg);
}

.border-red-200 {
    border-color: var(--danger-line);
}

.text-red-800,
.text-red-600 {
    color: var(--danger-text);
}

.text-white {
    color: #fff;
}

.text-gray-500 {
    color: var(--muted);
}

.text-gray-900 {
    color: var(--text);
}

.text-sm {
    font-size: .9rem;
}

.text-lg {
    font-size: 1.12rem;
}

.text-xl {
    font-size: 1.35rem;
}

.text-2xl {
    font-size: 1.7rem;
}

.font-semibold,
strong {
    font-weight: 600;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.w-full {
    width: 100%;
}

.list-disc {
    list-style: disc;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

.px-3 {
    padding-left: 12px;
    padding-right: 12px;
}

.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.py-1 {
    padding-top: 4px;
    padding-bottom: 4px;
}

.py-2 {
    padding-top: 8px;
    padding-bottom: 8px;
}

.py-4 {
    padding-top: 16px;
    padding-bottom: 16px;
}

.pl-5 {
    padding-left: 20px;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mt-4 {
    margin-top: 16px;
}

.mr-2 {
    margin-right: 8px;
}

.block {
    display: block;
}

.hover\:bg-gray-50:hover {
    background: #f8fafc;
    text-decoration: none;
}

.hover\:underline:hover {
    text-decoration: underline;
}

.underline {
    text-decoration: underline;
}

.rounded.border.bg-white,
.rounded.border.bg-white.p-4,
.rounded.border.bg-white.p-6,
.overflow-hidden.rounded.border.bg-white {
    box-shadow: var(--shadow);
}

.wizard-stepper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    position: sticky;
    top: 72px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    padding-top: 8px;
}

.wizard-step {
    border: 1px solid var(--line);
    border-radius: 9999px;
    background: #fff;
    color: var(--text);
    font-size: .86rem;
    white-space: nowrap;
    padding: 8px 12px;
}

.wizard-step.is-current {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
    font-weight: 600;
}

.wizard-step.is-complete {
    background: var(--success-bg);
    border-color: var(--success-line);
    color: var(--success-text);
}

.wizard-step:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.wizard-error {
    margin: 6px 0 0;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.wizard-actions-left,
.wizard-actions-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wizard-save-indicator {
    color: var(--success-text);
    font-size: .9rem;
    visibility: hidden;
}

button[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

.wizard-loader {
    display: none;
    margin-top: 10px;
}

.wizard-loader.is-active {
    display: block;
}

.wizard-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.wizard-progress-fill {
    width: 100%;
    height: 100%;
    background: #1d4ed8;
    transform-origin: left;
    animation: wizard-progress 1.2s linear infinite;
}

@keyframes wizard-progress {
    0% { transform: scaleX(0.15); }
    50% { transform: scaleX(0.7); }
    100% { transform: scaleX(0.15); }
}
