html {
    scroll-behavior: smooth;
    --sidebar-width: 18rem;
    --page-bg: #f1f5f9;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-soft: rgba(255, 255, 255, 0.8);
    --surface-border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --header-bg: rgba(241, 245, 249, 0.86);
    --header-border: rgba(226, 232, 240, 0.9);
    --header-chip-bg: rgba(255, 255, 255, 0.88);
    --header-chip-border: rgba(226, 232, 240, 0.95);
    --theme-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.35);
}

html[data-sidebar-state="collapsed"] {
    --sidebar-width: 5.5rem;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --page-bg: #020617;
    --surface: #0f172a;
    --surface-muted: #111827;
    --surface-soft: rgba(15, 23, 42, 0.82);
    --surface-border: #1e293b;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --header-bg: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.84));
    --header-border: rgba(30, 41, 59, 0.95);
    --header-chip-bg: rgba(15, 23, 42, 0.94);
    --header-chip-border: rgba(51, 65, 85, 0.95);
    --theme-shadow: 0 24px 56px -34px rgba(2, 6, 23, 0.9);
}

body {
    background-color: var(--page-bg);
    color: var(--text-primary);
    background-image:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.08), transparent 20rem),
        radial-gradient(circle at right 20%, rgba(79, 114, 182, 0.08), transparent 26rem);
}

html[data-theme="dark"] body {
    background-image:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 22rem),
        radial-gradient(circle at right 20%, rgba(14, 165, 233, 0.1), transparent 26rem);
}

body.modal-open {
    overflow: hidden;
}

.app-sidebar {
    width: var(--sidebar-width);
    overflow: hidden;
    transition: width 0.22s ease, transform 0.2s ease;
}

.sidebar-scroll {
    overflow-x: hidden;
}

.sidebar-scroll::-webkit-scrollbar:horizontal {
    display: none;
}

@media (min-width: 1024px) {
    .app-content {
        padding-left: var(--sidebar-width);
        transition: padding-left 0.22s ease;
    }
}

@media (max-width: 1023px) {
    .app-sidebar {
        width: 18rem;
    }
}

.app-header {
    border-bottom: 1px solid var(--header-border);
    background: var(--header-bg);
    backdrop-filter: blur(16px);
}

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

.app-header-title {
    color: var(--text-primary);
}

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

.app-profile-chip {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 16rem;
    border: 1px solid var(--header-chip-border);
    background: var(--header-chip-bg);
}

.app-profile-avatar {
    display: inline-flex;
    height: 2.75rem;
    width: 2.75rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

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

.app-profile-name {
    color: var(--text-primary);
}

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

.direction-form-layout {
    align-items: start;
}

.direction-form-aside,
.direction-form-card,
.direction-form-section,
.direction-form-tip,
.direction-archive-toggle,
.multi-select-shell,
.multi-select-option,
.multi-select-chip,
.multi-select-search {
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.direction-form-aside {
    position: sticky;
    top: 6.5rem;
}

@media (max-width: 1279px) {
    .direction-form-aside {
        position: static;
    }
}

.direction-form-section {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.direction-form-section-meta {
    max-width: 36rem;
}

.direction-archive-toggle input[type="checkbox"] {
    margin-top: 0.1rem;
    accent-color: #0ea5e9;
}

.direction-multi-select select[multiple] {
    min-height: 15rem;
}

.direction-multi-select.is-enhanced > select[multiple] {
    display: none;
}

.multi-select-shell {
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
}

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

.multi-select-summary {
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
}

.multi-select-search {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.875rem;
    outline: none;
    padding: 0.8rem 0.95rem;
}

.multi-select-search::placeholder {
    color: #94a3b8;
}

.multi-select-search:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05);
}

.multi-select-chips {
    display: flex;
    min-height: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.multi-select-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    color: #0369a1;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.45rem 0.7rem;
}

.multi-select-chip-remove {
    display: inline-flex;
    height: 1.25rem;
    width: 1.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.14);
    color: inherit;
    font-size: 0.875rem;
    line-height: 1;
}

.multi-select-empty {
    color: #64748b;
    font-size: 0.875rem;
}

.multi-select-options {
    display: grid;
    gap: 0.6rem;
    max-height: 15rem;
    margin-top: 1rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.multi-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.85rem 1rem;
    text-align: left;
}

.multi-select-option:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.multi-select-option.is-selected {
    border-color: rgba(14, 165, 233, 0.35);
    background: rgba(14, 165, 233, 0.08);
    color: #0c4a6e;
}

.multi-select-option-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select-option-state {
    flex: none;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.55rem;
    text-transform: uppercase;
}

.multi-select-option.is-selected .multi-select-option-state {
    background: rgba(2, 132, 199, 0.14);
    color: #0369a1;
}

.progress-track {
    height: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.3);
}

.progress-fill {
    height: 100%;
    min-width: 0.55rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f172a, #334155);
    transition: width 0.22s ease;
}

.sidebar-brand-main,
.sidebar-wide-only,
.sidebar-label {
    min-width: 0;
}

.sidebar-wide-only,
.sidebar-label {
    transition: opacity 0.18s ease, transform 0.18s ease, width 0.18s ease, margin 0.18s ease;
}

.sidebar-user-card,
.sidebar-item,
.sidebar-item-icon,
.sidebar-avatar,
.sidebar-actions,
.sidebar-brand-logo,
.sidebar-control-button,
.sidebar-footer {
    transition: all 0.18s ease;
}

.sidebar-user-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.sidebar-user-header {
    min-width: 0;
}

.sidebar-item {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.sidebar-label {
    flex: 1 1 auto;
    white-space: nowrap;
}

.sidebar-item-icon {
    position: relative;
}

.sidebar-avatar {
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.sidebar-control-button svg {
    width: 1.1rem;
    height: 1.1rem;
    stroke: currentColor;
}

.sidebar-tooltip-target {
    position: relative;
}

.sidebar-item-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    stroke: currentColor;
    flex: none;
}

html[data-sidebar-state="collapsed"] .sidebar-wide-only,
html[data-sidebar-state="collapsed"] .sidebar-label {
    width: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateX(-0.2rem);
}

html[data-sidebar-state="collapsed"] .sidebar-brand {
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding-inline: 0.75rem;
    padding-block: 1rem 1.15rem;
}

html[data-sidebar-state="collapsed"] .sidebar-brand-main {
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 0;
}

html[data-sidebar-state="collapsed"] .sidebar-actions {
    width: 100%;
    justify-content: center;
}

html[data-sidebar-state="collapsed"] .sidebar-scroll,
html[data-sidebar-state="collapsed"] .sidebar-footer {
    padding-inline: 0.75rem;
}

html[data-sidebar-state="collapsed"] .sidebar-brand-logo,
html[data-sidebar-state="collapsed"] .sidebar-control-button {
    width: 3rem;
    height: 3rem;
    border-radius: 1.25rem;
}

html[data-sidebar-state="collapsed"] .sidebar-user-card {
    width: auto;
    margin-inline: auto;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    align-items: center;
}

html[data-sidebar-state="collapsed"] .sidebar-user-header {
    width: 100%;
    justify-content: center;
    gap: 0;
}

html[data-sidebar-state="collapsed"] .sidebar-avatar {
    width: 3.1rem;
    height: 3.1rem;
    border: 1px solid rgba(51, 65, 85, 0.92);
    border-radius: 1.15rem;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(148, 163, 184, 0.08),
        0 18px 34px -28px rgba(2, 6, 23, 0.96);
}

html[data-sidebar-state="collapsed"] .sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
}

html[data-sidebar-state="collapsed"] .sidebar-item {
    width: 3.25rem;
    margin-inline: auto;
    justify-content: center;
    padding: 0.125rem;
    gap: 0;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 1.25rem;
}

html[data-sidebar-state="collapsed"] .sidebar-item:hover,
html[data-sidebar-state="collapsed"] .sidebar-item:focus-visible {
    background: transparent !important;
}

html[data-sidebar-state="collapsed"] .sidebar-item-icon {
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(30, 41, 59, 0.92);
    border-radius: 1.15rem;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
}

html[data-sidebar-state="collapsed"] .sidebar-item-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

html[data-sidebar-state="collapsed"] .sidebar-item.bg-white .sidebar-item-icon {
    border-color: rgba(255, 255, 255, 0.78);
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 18px 34px -26px rgba(255, 255, 255, 0.95);
}

html[data-sidebar-state="collapsed"] .sidebar-item:not(.bg-white):hover .sidebar-item-icon,
html[data-sidebar-state="collapsed"] .sidebar-item:not(.bg-white):focus-visible .sidebar-item-icon,
html[data-sidebar-state="collapsed"] .sidebar-logout-button:hover .sidebar-item-icon,
html[data-sidebar-state="collapsed"] .sidebar-logout-button:focus-visible .sidebar-item-icon {
    border-color: rgba(51, 65, 85, 0.96);
    background: rgba(30, 41, 59, 0.98) !important;
    transform: translateY(-1px);
}

html[data-sidebar-state="collapsed"] .sidebar-collapse-label {
    transform: rotate(180deg);
}

html[data-sidebar-state="collapsed"] .sidebar-item::after,
html[data-sidebar-state="collapsed"] .sidebar-tooltip-target::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 0.9rem);
    top: 50%;
    z-index: 60;
    width: max-content;
    max-width: 12rem;
    transform: translate(-0.35rem, -50%);
    opacity: 0;
    pointer-events: none;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.92);
    padding: 0.45rem 0.8rem;
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

html[data-sidebar-state="collapsed"] .sidebar-scroll,
html[data-sidebar-state="collapsed"] .sidebar-footer,
html[data-sidebar-state="collapsed"] .sidebar-brand {
    overflow-x: clip;
}

html[data-sidebar-state="collapsed"] .sidebar-item:hover::after,
html[data-sidebar-state="collapsed"] .sidebar-item:focus-visible::after,
html[data-sidebar-state="collapsed"] .sidebar-tooltip-target:hover::after,
html[data-sidebar-state="collapsed"] .sidebar-tooltip-target:focus-visible::after {
    transform: translate(0, -50%);
    opacity: 1;
}

.table-shell {
    scrollbar-width: thin;
}

.table-shell::-webkit-scrollbar {
    height: 10px;
}

.table-shell::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

.sticky-head th {
    position: sticky;
    top: 0;
    z-index: 1;
}

[data-wizard-step] {
    display: none;
}

[data-wizard-step].is-active {
    display: block;
}

.wizard-panel {
    min-height: 0;
}

.wizard-panel-shell {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.wizard-panel-meta {
    max-width: 32rem;
}

.wizard-modal-shell,
.wizard-close-button,
.wizard-step-card,
.wizard-footer,
.wizard-secondary-button,
.wizard-primary-button,
.wizard-panel-shell,
.wizard-toggle-card {
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.wizard-modal-shell {
    backdrop-filter: blur(18px);
}

[data-wizard-indicator] {
    transition: opacity 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

[data-wizard-indicator].is-active {
    border-color: #0f172a;
    background: #ffffff;
}

.wizard-toggle-card {
    display: inline-flex;
    width: fit-content;
    min-height: 0;
    align-self: start;
    justify-self: start;
}

.wizard-toggle-card input[type="checkbox"] {
    margin-top: 0.1rem;
}

html[data-theme="dark"] .app-profile-avatar {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    box-shadow: inset 0 1px 0 rgba(224, 242, 254, 0.22);
}

html[data-theme="dark"] .direction-form-aside,
html[data-theme="dark"] .direction-form-card {
    border-color: rgba(51, 65, 85, 0.9) !important;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 16rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(9, 15, 29, 0.98));
}

html[data-theme="dark"] .direction-form-section,
html[data-theme="dark"] .direction-form-tip,
html[data-theme="dark"] .direction-archive-toggle,
html[data-theme="dark"] .multi-select-shell {
    border-color: rgba(51, 65, 85, 0.88) !important;
    background: rgba(15, 23, 42, 0.78) !important;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
}

html[data-theme="dark"] .multi-select-summary,
html[data-theme="dark"] .multi-select-empty {
    color: var(--text-muted);
}

html[data-theme="dark"] .multi-select-search {
    border-color: rgba(71, 85, 105, 0.88);
    background: rgba(2, 6, 23, 0.72);
    color: var(--text-primary);
}

html[data-theme="dark"] .multi-select-search::placeholder {
    color: #64748b;
}

html[data-theme="dark"] .multi-select-search:focus {
    border-color: rgba(56, 189, 248, 0.95);
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.16),
        0 0 0 4px rgba(14, 165, 233, 0.12);
}

html[data-theme="dark"] .multi-select-chip {
    border-color: rgba(56, 189, 248, 0.22);
    background: rgba(14, 165, 233, 0.14);
    color: #bae6fd;
}

html[data-theme="dark"] .multi-select-chip-remove {
    background: rgba(14, 165, 233, 0.18);
    color: #e0f2fe;
}

html[data-theme="dark"] .multi-select-option {
    border-color: rgba(51, 65, 85, 0.82);
    background: rgba(2, 6, 23, 0.76);
    color: var(--text-secondary);
}

html[data-theme="dark"] .multi-select-option:hover {
    background: rgba(15, 23, 42, 0.94);
    border-color: rgba(71, 85, 105, 0.92);
}

html[data-theme="dark"] .multi-select-option.is-selected {
    border-color: rgba(56, 189, 248, 0.86);
    background: rgba(14, 165, 233, 0.14);
    color: #e0f2fe;
}

html[data-theme="dark"] .multi-select-option-state {
    background: rgba(51, 65, 85, 0.62);
    color: var(--text-muted);
}

html[data-theme="dark"] .multi-select-option.is-selected .multi-select-option-state {
    background: rgba(14, 165, 233, 0.18);
    color: #bae6fd;
}

html[data-theme="dark"] .wizard-modal-shell {
    border-color: rgba(51, 65, 85, 0.92) !important;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 14rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(9, 15, 29, 0.98));
    box-shadow:
        0 32px 90px -46px rgba(2, 6, 23, 0.96),
        inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .wizard-close-button {
    border-color: rgba(51, 65, 85, 0.92) !important;
    background-color: rgba(15, 23, 42, 0.72);
    color: var(--text-muted) !important;
}

html[data-theme="dark"] .wizard-close-button:hover {
    background-color: rgba(30, 41, 59, 0.92) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .wizard-step-card {
    border-color: rgba(51, 65, 85, 0.86) !important;
    background: rgba(15, 23, 42, 0.7) !important;
}

html[data-theme="dark"] .wizard-step-card .text-slate-900 {
    color: var(--text-secondary) !important;
}

html[data-theme="dark"] [data-wizard-indicator].is-active {
    border-color: #38bdf8;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 15, 28, 1));
    box-shadow:
        inset 0 1px 0 rgba(125, 211, 252, 0.12),
        0 20px 40px -28px rgba(14, 165, 233, 0.6);
}

html[data-theme="dark"] [data-wizard-indicator].is-active .text-slate-900 {
    color: #f8fafc !important;
}

html[data-theme="dark"] .wizard-panel-shell {
    border-color: rgba(51, 65, 85, 0.92) !important;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(8, 15, 28, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(148, 163, 184, 0.06),
        0 24px 56px -40px rgba(2, 6, 23, 0.96);
}

html[data-theme="dark"] .wizard-toggle-card {
    border-color: rgba(51, 65, 85, 0.92) !important;
    background: rgba(11, 18, 32, 0.86) !important;
}

html[data-theme="dark"] .wizard-footer {
    border-top-color: rgba(51, 65, 85, 0.72) !important;
}

html[data-theme="dark"] .wizard-secondary-button {
    border-color: rgba(51, 65, 85, 0.92) !important;
    background-color: rgba(15, 23, 42, 0.72);
    color: var(--text-secondary) !important;
}

html[data-theme="dark"] .wizard-secondary-button:hover {
    background-color: rgba(30, 41, 59, 0.92) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .wizard-primary-button {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    box-shadow: 0 18px 30px -20px rgba(14, 165, 233, 0.62);
}

html[data-theme="dark"] .wizard-primary-button:hover {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
}

html[data-theme="dark"] .wizard-panel-shell input,
html[data-theme="dark"] .wizard-panel-shell textarea,
html[data-theme="dark"] .wizard-panel-shell select {
    background-color: rgba(2, 6, 23, 0.76) !important;
    border-color: rgba(71, 85, 105, 0.92) !important;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.04);
}

html[data-theme="dark"] .wizard-panel-shell input:focus,
html[data-theme="dark"] .wizard-panel-shell textarea:focus,
html[data-theme="dark"] .wizard-panel-shell select:focus {
    border-color: rgba(56, 189, 248, 0.95) !important;
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.16),
        0 0 0 4px rgba(14, 165, 233, 0.12) !important;
}

html[data-theme="dark"] .wizard-panel-shell input:-webkit-autofill,
html[data-theme="dark"] .wizard-panel-shell input:-webkit-autofill:hover,
html[data-theme="dark"] .wizard-panel-shell input:-webkit-autofill:focus,
html[data-theme="dark"] .wizard-panel-shell textarea:-webkit-autofill,
html[data-theme="dark"] .wizard-panel-shell select:-webkit-autofill {
    -webkit-text-fill-color: var(--text-primary);
    caret-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0 1000px rgba(2, 6, 23, 0.76) inset;
    box-shadow: 0 0 0 1000px rgba(2, 6, 23, 0.76) inset;
}

html[data-theme="dark"] .theme-toggle {
    border-color: var(--surface-border);
    background-color: rgba(15, 23, 42, 0.92);
    color: var(--text-primary);
}

html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-white\/70,
html[data-theme="dark"] .bg-white\/80,
html[data-theme="dark"] .bg-white\/90 {
    background-color: var(--surface) !important;
}

html[data-theme="dark"] .bg-slate-50,
html[data-theme="dark"] .bg-slate-100 {
    background-color: var(--surface-muted) !important;
}

html[data-theme="dark"] .border-white,
html[data-theme="dark"] .border-white\/70,
html[data-theme="dark"] .border-white\/80,
html[data-theme="dark"] .border-slate-100,
html[data-theme="dark"] .border-slate-200,
html[data-theme="dark"] .border-slate-300 {
    border-color: var(--surface-border) !important;
}

html[data-theme="dark"] .text-slate-950,
html[data-theme="dark"] .text-slate-900,
html[data-theme="dark"] .text-slate-800,
html[data-theme="dark"] .text-slate-700 {
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .text-slate-600,
html[data-theme="dark"] .text-slate-500,
html[data-theme="dark"] .text-slate-400 {
    color: var(--text-muted) !important;
}

html[data-theme="dark"] .bg-slate-200 {
    background-color: #334155 !important;
}

html[data-theme="dark"] .shadow-soft {
    box-shadow: var(--theme-shadow) !important;
}

html[data-theme="dark"] .hover\:bg-slate-50:hover,
html[data-theme="dark"] .hover\:bg-slate-800:hover,
html[data-theme="dark"] .hover\:bg-slate-900:hover {
    background-color: #1e293b !important;
}

html[data-theme="dark"] main .bg-slate-950 {
    background-color: #0ea5e9 !important;
}

html[data-theme="dark"] main .hover\:bg-slate-800:hover {
    background-color: #0284c7 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background-color: #0b1220 !important;
    border-color: #1e293b !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #64748b !important;
}

html[data-theme="dark"] .progress-track {
    background: rgba(71, 85, 105, 0.82);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
}

html[data-theme="dark"] .progress-fill {
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
    box-shadow: 0 0 18px -8px rgba(56, 189, 248, 0.9);
}

.marketplace-body {
    background:
        radial-gradient(circle at top left, rgba(125, 211, 252, 0.22), transparent 22rem),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 26rem),
        linear-gradient(180deg, #eef4fb 0%, #f8fbff 42%, #eef3f9 100%);
}

.marketplace-backdrop {
    background:
        radial-gradient(circle at 8% 18%, rgba(14, 165, 233, 0.18), transparent 18rem),
        radial-gradient(circle at 92% 12%, rgba(99, 102, 241, 0.12), transparent 24rem),
        radial-gradient(circle at 50% 88%, rgba(15, 23, 42, 0.04), transparent 26rem);
}

.marketplace-page iframe {
    display: block;
    width: 100%;
    min-height: min(56vw, 32rem);
    border: 0;
}

.marketplace-page .prose p {
    margin-top: 0;
    margin-bottom: 0;
}

.solution-detail-lead {
    color: #52637a;
}

.solution-detail-description,
.solution-detail-description p {
    color: #43546b;
}

.marketplace-page input[type="checkbox"] {
    accent-color: #0f766e;
}

html[data-theme="dark"] .marketplace-body {
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 20rem),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 24rem),
        linear-gradient(180deg, #020617 0%, #071121 40%, #020617 100%);
}

html[data-theme="dark"] .marketplace-backdrop {
    background:
        radial-gradient(circle at 8% 18%, rgba(56, 189, 248, 0.12), transparent 18rem),
        radial-gradient(circle at 92% 12%, rgba(14, 165, 233, 0.08), transparent 22rem),
        radial-gradient(circle at 50% 88%, rgba(59, 130, 246, 0.05), transparent 24rem);
}

html[data-theme="dark"] .solution-detail-lead {
    color: #c7d5e6;
}

html[data-theme="dark"] .solution-detail-description,
html[data-theme="dark"] .solution-detail-description p {
    color: #d8e4f2;
}

.login-showcase-card {
    position: relative;
    overflow: hidden;
}

html[data-theme="dark"] .login-showcase-card {
    border-color: rgba(56, 189, 248, 0.24) !important;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 14rem),
        linear-gradient(135deg, rgba(8, 47, 73, 0.84), rgba(15, 23, 42, 0.96)) !important;
    box-shadow: 0 24px 54px -36px rgba(2, 6, 23, 0.92);
}

html[data-theme="dark"] .login-showcase-card .text-sky-700,
html[data-theme="dark"] .marketplace-page .text-sky-700 {
    color: #7dd3fc !important;
}

html[data-theme="dark"] .marketplace-page .bg-white\/60,
html[data-theme="dark"] .marketplace-page .bg-white\/75,
html[data-theme="dark"] .marketplace-page .bg-white\/85 {
    background-color: rgba(15, 23, 42, 0.82) !important;
}

html[data-theme="dark"] .marketplace-page .border-white\/50,
html[data-theme="dark"] .marketplace-page .border-white\/60 {
    border-color: rgba(71, 85, 105, 0.62) !important;
}

html[data-theme="dark"] .marketplace-page .bg-sky-50,
html[data-theme="dark"] .login-showcase-card .bg-sky-50 {
    background-color: rgba(14, 165, 233, 0.14) !important;
}

html[data-theme="dark"] .marketplace-page .border-sky-100,
html[data-theme="dark"] .marketplace-page .border-sky-200,
html[data-theme="dark"] .marketplace-page .border-sky-300,
html[data-theme="dark"] .login-showcase-card .border-sky-100,
html[data-theme="dark"] .login-showcase-card .border-sky-200,
html[data-theme="dark"] .login-showcase-card .border-sky-300 {
    border-color: rgba(56, 189, 248, 0.26) !important;
}

html[data-theme="dark"] .marketplace-page .hover\:border-sky-200:hover,
html[data-theme="dark"] .marketplace-page .hover\:border-sky-300:hover,
html[data-theme="dark"] .login-showcase-card .hover\:border-sky-200:hover,
html[data-theme="dark"] .login-showcase-card .hover\:border-sky-300:hover {
    border-color: rgba(125, 211, 252, 0.42) !important;
}

html[data-theme="dark"] .marketplace-page .hover\:bg-sky-50:hover,
html[data-theme="dark"] .login-showcase-card .hover\:bg-sky-50:hover {
    background-color: rgba(14, 165, 233, 0.2) !important;
}

html[data-theme="dark"] .marketplace-page .bg-sky-100 {
    background-color: rgba(14, 165, 233, 0.18) !important;
}

html[data-theme="dark"] .marketplace-page .text-sky-100 {
    color: #dbeafe !important;
}

html[data-theme="dark"] .marketplace-page .text-sky-200 {
    color: #bfdbfe !important;
}

html[data-theme="dark"] .marketplace-page .border-t.border-slate-100 {
    border-color: rgba(51, 65, 85, 0.8) !important;
}

html[data-theme="dark"] .marketplace-admin-table-head {
    background:
        linear-gradient(180deg, rgba(18, 28, 48, 0.96), rgba(15, 23, 42, 0.92)) !important;
    box-shadow: inset 0 -1px 0 rgba(71, 85, 105, 0.42);
}

html[data-theme="dark"] .marketplace-admin-table-head th {
    color: rgba(148, 163, 184, 0.9) !important;
}

html[data-theme="dark"] .marketplace-admin-table-body > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(71, 85, 105, 0.34) !important;
}

html[data-theme="dark"] .marketplace-page .ring-white\/70,
html[data-theme="dark"] .marketplace-page .ring-white\/80 {
    --tw-ring-color: rgba(148, 163, 184, 0.34) !important;
}

html[data-theme="dark"] .marketplace-page .hover\:shadow-\[0_28px_70px_-36px_rgba\(15\,23\,42\,0\.45\)\]:hover {
    box-shadow: 0 28px 70px -36px rgba(2, 6, 23, 0.9) !important;
}

html[data-theme="dark"] .marketplace-page footer,
html[data-theme="dark"] .marketplace-page header > div {
    box-shadow: 0 24px 56px -36px rgba(2, 6, 23, 0.88);
}

html[data-theme="dark"] .login-showcase-button {
    color: #7dd3fc !important;
}

.gallery-lightbox-shell {
    position: relative;
    padding: 2rem 5rem 0;
}

.gallery-lightbox-stage {
    position: relative;
}

.gallery-lightbox-frame {
    display: flex;
    min-height: min(84vh, 64rem);
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(2, 6, 23, 0.92);
    box-shadow: 0 36px 120px -48px rgba(2, 6, 23, 0.98);
}

.gallery-lightbox-image {
    display: block;
    width: 100%;
    max-height: 84vh;
    object-fit: contain;
}

.gallery-lightbox-close,
.gallery-lightbox-control {
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.gallery-lightbox-close,
.gallery-lightbox-control {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
    backdrop-filter: blur(12px);
}

.gallery-lightbox-close:hover,
.gallery-lightbox-control:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.45);
    background: rgba(15, 23, 42, 0.86);
}

.gallery-lightbox-close {
    top: 0;
    right: 1.5rem;
    height: 3rem;
    width: 3rem;
    font-size: 1.7rem;
    line-height: 1;
}

.gallery-lightbox-control {
    top: 50%;
    height: 3.75rem;
    width: 3.75rem;
    font-size: 2.4rem;
    line-height: 1;
    transform: translateY(-50%);
}

.gallery-lightbox-control-prev {
    left: 0.25rem;
}

.gallery-lightbox-control-next {
    right: 0.25rem;
}

@media (max-width: 640px) {
    .gallery-lightbox-shell {
        padding: 3.5rem 0 0;
    }

    .gallery-lightbox-frame {
        min-height: 64vh;
    }

    .gallery-lightbox-image {
        max-height: 64vh;
    }

    .gallery-lightbox-close {
        top: 0.25rem;
        right: 0.75rem;
        height: 2.75rem;
        width: 2.75rem;
    }

    .gallery-lightbox-control {
        height: 2.75rem;
        width: 2.75rem;
        font-size: 1.75rem;
    }

    .gallery-lightbox-control-prev {
        left: 0.5rem;
    }

    .gallery-lightbox-control-next {
        right: 0.5rem;
    }
}
