:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --amber-500: #f59e0b;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-w: 280px;
}

[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-muted: #f1f5f9;
    --bg-hover: #e2e8f0;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-muted: #334155;
    --bg-hover: #475569;
    --border: #334155;
    --border-strong: #475569;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}

[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--blue-500); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    z-index: 100;
    transition: width 0.2s var(--ease);
}

.sidebar.collapsed {
    width: 73px;
}

.sidebar-toggle {
    position: absolute;
    top: 18px;
    right: -10px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.15s var(--ease);
}

.sidebar-toggle:hover {
    background: var(--blue-500);
    border-color: var(--blue-500);
    color: white;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px;
    border-bottom: 1px solid var(--border);
}

.brand-logo {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-500);
    border-radius: 6px;
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.brand-text {
    overflow: hidden;
    transition: opacity 0.15s, width 0.2s;
}

.brand-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    white-space: nowrap;
}

.brand-subtitle {
    display: block;
    font-size: 0.625rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.sidebar.collapsed .brand-text {
    opacity: 0;
    width: 0;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 16px 10px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
}

.timeline {
    list-style: none;
    position: relative;
    margin: 0;
    padding: 0;
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding-left: 24px;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: -14px;
    width: 1px;
    background: var(--border);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 2px;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.15s var(--ease);
}

.timeline-marker span {
    display: none;
}

.timeline-content {
    flex: 1;
    padding-top: 0;
    transition: opacity 0.15s;
}

.timeline-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1;
    transition: all 0.15s var(--ease);
}

.timeline-item.active .timeline-marker {
    background: var(--blue-500);
    border-color: var(--blue-500);
    width: 12px;
    height: 12px;
}

.timeline-item.active .timeline-title {
    color: var(--text);
    font-weight: 600;
}

.timeline-item.active::before {
    background: linear-gradient(to bottom, var(--blue-500) 0%, var(--border) 100%);
}

.timeline-item.completed .timeline-marker {
    background: var(--green-500);
    border-color: var(--green-500);
}

.timeline-item.completed::before {
    background: var(--green-500);
}

.timeline-item.completed .timeline-title {
    color: var(--text-secondary);
}

.sidebar.collapsed .sidebar-nav {
    padding: 16px 8px;
}

.sidebar.collapsed .timeline-item {
    padding-left: 0;
    padding-bottom: 16px;
    justify-content: center;
}

.sidebar.collapsed .timeline-item::before {
    left: 50%;
    transform: translateX(-50%);
    top: 14px;
    bottom: -6px;
}

.sidebar.collapsed .timeline-marker {
    position: relative;
    left: auto;
    top: auto;
    width: 24px;
    height: 24px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.sidebar.collapsed .timeline-marker span {
    display: block;
    color: var(--text-muted);
}

.sidebar.collapsed .timeline-item.active .timeline-marker span,
.sidebar.collapsed .timeline-item.completed .timeline-marker span {
    color: white;
}

.sidebar.collapsed .timeline-content {
    display: none;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.sidebar-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.625rem;
    color: var(--text-muted);
}

.status-item i {
    font-size: 0.6875rem;
}

.status-secure {
    color: var(--green-500);
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.1s;
}

.sidebar-link:hover {
    background: var(--bg-muted);
    color: var(--blue-500);
    text-decoration: none;
}

.sidebar-link i {
    font-size: 0.75rem;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-footer {
    padding: 8px;
}

.sidebar.collapsed .sidebar-status {
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.sidebar.collapsed .status-item span {
    display: none;
}

.sidebar.collapsed .sidebar-link span {
    display: none;
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 8px;
}

.sidebar.collapsed .sidebar-link i {
    font-size: 0.875rem;
}

.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s var(--ease);
}

.main.sidebar-collapsed {
    margin-left: 72px;
}

.topbar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    z-index: 50;
}

.topbar-menu {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
}

.topbar-breadcrumb {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.topbar-breadcrumb i {
    font-size: 0.625rem;
}

.topbar-breadcrumb span:last-child {
    color: var(--text);
    font-weight: 500;
}

.topbar-actions {
    display: flex;
    gap: 8px;
}

.topbar-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.topbar-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.topbar-btn--danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--red-500);
    color: var(--red-500);
}

.topbar-btn .icon-light,
.topbar-btn .icon-dark {
    position: absolute;
    transition: all 0.3s var(--ease);
}

[data-theme="light"] .icon-light { opacity: 0; transform: rotate(-90deg); }
[data-theme="light"] .icon-dark { opacity: 1; transform: rotate(0deg); }
[data-theme="dark"] .icon-light { opacity: 1; transform: rotate(0deg); }
[data-theme="dark"] .icon-dark { opacity: 0; transform: rotate(90deg); }

.content {
    flex: 1;
    padding: 32px;
}

.page {
    max-width: 800px;
    margin: 0 auto;
}

.page--home {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
}

.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 40px 20px;
    text-align: center;
}

.landing-header {
    margin-bottom: 48px;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--green-500);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.landing-hero {
    margin-bottom: 40px;
}

.hero-visual {
    margin-bottom: 32px;
}

.hero-shield {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-500);
    border-radius: 20px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.25);
}

.landing-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.landing-subtitle {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--blue-500);
    margin-bottom: 16px;
}

.landing-desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

.landing-cta {
    margin-bottom: 56px;
}

.btn-start {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--blue-500);
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-start:hover {
    background: var(--blue-600);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.btn-start i {
    font-size: 0.875rem;
    transition: transform 0.2s;
}

.btn-start:hover i {
    transform: translateX(4px);
}

.cta-note {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.landing-features {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 24px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 40px;
    max-width: 720px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: 10px;
    font-size: 1.125rem;
    color: var(--blue-500);
    flex-shrink: 0;
}

.feature-text {
    text-align: left;
}

.feature-text h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.feature-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.feature-divider {
    width: 1px;
    height: 48px;
    background: var(--border);
    flex-shrink: 0;
}

.landing-draft {
    width: 100%;
    max-width: 520px;
    margin-bottom: 24px;
}

.draft-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--amber-500);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.draft-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--amber-500);
}

.draft-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.draft-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 10px;
    font-size: 1.125rem;
    color: var(--amber-500);
    flex-shrink: 0;
}

.draft-info {
    text-align: left;
}

.draft-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.draft-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

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

.draft-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.draft-btn--delete {
    background: transparent;
    color: var(--text-muted);
    padding: 8px;
}

.draft-btn--delete:hover {
    background: var(--bg-muted);
    color: var(--red-500);
}

.draft-btn--resume {
    background: var(--amber-500);
    color: white;
}

.draft-btn--resume:hover {
    background: var(--amber-600);
}

.landing-restore {
    margin-bottom: 48px;
}

.restore-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8125rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.restore-link:hover {
    border-color: var(--blue-500);
    color: var(--blue-500);
}

.landing-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.footer-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-badge i {
    color: var(--green-500);
    font-size: 0.6875rem;
}

.footer-company {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.draft-code-box {
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    border-radius: var(--radius-lg);
}

[data-theme="dark"] .draft-code-box {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.draft-code-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.draft-code-inner > i {
    font-size: 1.25rem;
    color: var(--blue-500);
}

.draft-code-text {
    flex: 1;
    text-align: left;
}

.draft-code-text span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.draft-code-text strong {
    font-size: 1.125rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--blue-600);
    letter-spacing: 0.05em;
}

.draft-code-hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: left;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn--primary {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn--primary:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.btn--success {
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

.btn--success:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
    transform: translateY(-1px);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn--ghost:hover:not(:disabled) {
    background: var(--bg-muted);
    color: var(--text);
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn--outline:hover:not(:disabled) {
    background: var(--bg-muted);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn--lg { padding: 12px 24px; font-size: 0.9375rem; }
.btn--xl { padding: 14px 28px; font-size: 1rem; }

.step {
    animation: stepIn 0.3s var(--ease);
}

@keyframes stepIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

.step-header {
    margin-bottom: 32px;
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-header p {
    color: var(--text-secondary);
}

.step-subprogress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.subprogress-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-muted);
    border-radius: 2px;
    overflow: hidden;
}

.subprogress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-600));
    transition: width 0.3s var(--ease);
}

.subprogress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.step-body {
    margin-bottom: 32px;
}

.step-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.category-section {
    margin-bottom: 24px;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-muted);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
}

.section-head > i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-50);
    border-radius: var(--radius);
    color: var(--blue-600);
    font-size: 1rem;
}

[data-theme="dark"] .section-head > i {
    background: rgba(59, 130, 246, 0.15);
}

.section-head > div {
    flex: 1;
}

.section-head h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.section-head span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.section-counter {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 10px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.category-grid {
    display: grid;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
}

.cat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.cat-item:hover {
    background: var(--bg-muted);
}

.cat-item.selected {
    background: var(--blue-50);
}

[data-theme="dark"] .cat-item.selected {
    background: rgba(59, 130, 246, 0.1);
}

.cat-item input { display: none; }

.cat-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: all 0.15s var(--ease);
}

.cat-item.selected .cat-icon {
    background: var(--blue-500);
    color: white;
}

.cat-text {
    flex: 1;
}

.cat-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
}

.cat-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cat-check {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    font-size: 0.625rem;
    color: transparent;
    transition: all 0.15s var(--ease);
}

.cat-item.selected .cat-check {
    background: var(--green-500);
    border-color: var(--green-500);
    color: white;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.required { color: var(--red-500); }

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all 0.15s var(--ease);
}

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

.form-control:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control--error {
    border-color: var(--red-500);
}

.form-control--error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.field-error {
    font-size: 0.75rem;
    color: var(--red-500);
    margin-top: 4px;
    min-height: 18px;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.checkbox input { display: none; }

.checkbox-mark {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    color: transparent;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.15s var(--ease);
}

.checkbox input:checked + .checkbox-mark {
    background: var(--blue-500);
    border-color: var(--blue-500);
    color: white;
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.risk-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.risk-card {
    cursor: pointer;
}

.risk-card input { display: none; }

.risk-card-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.2s var(--ease);
}

.risk-card:hover .risk-card-inner {
    border-color: var(--border-strong);
}

.risk-card input:checked + .risk-card-inner {
    background: var(--blue-50);
    border-color: var(--blue-500);
}

[data-theme="dark"] .risk-card input:checked + .risk-card-inner {
    background: rgba(59, 130, 246, 0.1);
}

.risk-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 1.125rem;
    flex-shrink: 0;
    transition: all 0.2s var(--ease);
}

.risk-card input:checked + .risk-card-inner .risk-icon {
    background: var(--blue-500);
    color: white;
}

.risk-text {
    flex: 1;
}

.risk-text strong {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.risk-text span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.risk-check {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    color: transparent;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all 0.2s var(--ease);
}

.risk-card input:checked + .risk-card-inner .risk-check {
    background: var(--green-500);
    border-color: var(--green-500);
    color: white;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-muted);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 20px;
}

.info-box i {
    color: var(--blue-500);
}

.detail-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    overflow: hidden;
    animation: panelIn 0.3s var(--ease);
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.detail-panel:last-child { margin-bottom: 0; }

.panel-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border);
}

.panel-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-500);
    border-radius: var(--radius);
    color: white;
    font-size: 1rem;
}

.panel-info { flex: 1; }
.panel-info h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 2px; }
.panel-info span { font-size: 0.75rem; color: var(--text-muted); }

.skip-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    cursor: pointer;
}

.skip-toggle input { display: none; }

.skip-slider {
    width: 40px;
    height: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 11px;
    position: relative;
    transition: all 0.2s var(--ease);
}

.skip-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s var(--ease);
}

.skip-toggle input:checked + .skip-slider {
    background: var(--amber-500);
    border-color: var(--amber-500);
}

.skip-toggle input:checked + .skip-slider::after {
    left: 20px;
    background: white;
}

.panel-body {
    padding: 20px;
}

.panel-skip-msg {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.panel-skip-msg i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
    color: var(--amber-500);
}

.freq-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.freq-option {
    cursor: pointer;
}

.freq-option input { display: none; }

.freq-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s var(--ease);
}

.freq-option:hover .freq-btn {
    border-color: var(--border-strong);
}

.freq-option input:checked + .freq-btn {
    background: var(--blue-500);
    border-color: var(--blue-500);
    color: white;
}

.witness-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.witness-row {
    display: flex;
    gap: 10px;
    animation: witnessIn 0.2s var(--ease);
}

@keyframes witnessIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.witness-row .form-control { flex: 1; }

.witness-remove {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.witness-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--red-500);
    color: var(--red-500);
}

.upload-area {
    padding: 48px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--blue-500);
    background: var(--blue-50);
}

[data-theme="dark"] .upload-area:hover,
[data-theme="dark"] .upload-area.dragover {
    background: rgba(59, 130, 246, 0.1);
}

.upload-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-50);
    border-radius: var(--radius-lg);
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: var(--blue-500);
}

[data-theme="dark"] .upload-icon {
    background: rgba(59, 130, 246, 0.15);
}

.upload-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.upload-text span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.file-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    animation: fileIn 0.2s var(--ease);
}

@keyframes fileIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: var(--radius);
    color: var(--blue-500);
}

.file-info { flex: 1; }
.file-name { display: block; font-size: 0.875rem; font-weight: 500; }
.file-size { display: block; font-size: 0.75rem; color: var(--text-muted); }

.file-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.file-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-500);
}

.identity-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.identity-toggle.locked {
    opacity: 0.6;
    pointer-events: none;
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toggle-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-500);
    border-radius: var(--radius);
    color: white;
    font-size: 1.25rem;
}

.toggle-text strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 2px;
}

.toggle-text span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.switch {
    position: relative;
    cursor: pointer;
}

.switch input { display: none; }

.switch-track {
    display: block;
    width: 48px;
    height: 26px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 13px;
    position: relative;
    transition: all 0.2s var(--ease);
}

.switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s var(--ease);
}

.switch input:checked + .switch-track {
    background: var(--green-500);
    border-color: var(--green-500);
}

.switch input:checked + .switch-track::after {
    left: 24px;
    background: white;
}

.identity-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--blue-500);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--blue-500);
    margin-bottom: 20px;
}

.identity-fields {
    padding: 24px;
    background: var(--bg-muted);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    animation: fieldsIn 0.3s var(--ease);
}

@keyframes fieldsIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.summary-section {
    border-bottom: 1px solid var(--border);
}

.summary-section:last-child { border-bottom: none; }

.summary-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-muted);
    font-size: 0.8125rem;
    font-weight: 600;
}

.summary-head i { color: var(--blue-500); }

.summary-body { padding: 16px 20px; }

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-child { border-bottom: none; }

.summary-label { font-size: 0.8125rem; color: var(--text-muted); }
.summary-value { font-size: 0.8125rem; font-weight: 500; text-align: right; }
.summary-value em { color: var(--text-muted); font-style: normal; }

.captcha-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.captcha-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.captcha-head i {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-50);
    border-radius: var(--radius);
    color: var(--blue-500);
    font-size: 1.25rem;
}

[data-theme="dark"] .captcha-head i {
    background: rgba(59, 130, 246, 0.15);
}

.captcha-head strong { display: block; font-size: 0.9375rem; margin-bottom: 2px; }
.captcha-head span { font-size: 0.75rem; color: var(--text-muted); }

.captcha-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.captcha-q {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.captcha-eq {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.captcha-input {
    width: 80px;
    padding: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
    text-align: center;
    background: var(--bg-muted);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all 0.15s var(--ease);
}

.captcha-input:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.captcha-input::-webkit-outer-spin-button,
.captcha-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.page--done {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 150px);
    text-align: center;
}

.done-container { max-width: 480px; }

.done-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 32px;
}

.done-icon svg {
    width: 100%;
    height: 100%;
}

.done-circle {
    fill: none;
    stroke: var(--green-500);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    animation: doneCircle 0.8s ease-out 0.2s forwards;
    transform-origin: center;
}

@keyframes doneCircle {
    to { stroke-dashoffset: 0; }
}

.done-check {
    fill: none;
    stroke: var(--green-500);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: doneCheck 0.4s ease-out 0.8s forwards;
}

@keyframes doneCheck {
    to { stroke-dashoffset: 0; }
}

.done-container h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.done-container > p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.done-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.done-detail {
    display: flex;
    justify-content: space-between;
}

.detail-label { font-size: 0.875rem; color: var(--text-muted); }
.detail-value { font-size: 0.875rem; font-weight: 600; }

.done-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: var(--bg-muted);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.done-info i { color: var(--blue-500); }

.overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease);
}

.overlay:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
}

.loader {
    text-align: center;
    padding: 48px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.loader-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--border);
    border-top-color: var(--blue-500);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.loader span { font-size: 0.875rem; color: var(--text-muted); }

.modal {
    width: 90%;
    max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.2s var(--ease);
}

.overlay:not([hidden]) .modal {
    transform: scale(1);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 0;
}

.modal-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-50);
    border-radius: var(--radius);
    font-size: 1.25rem;
    color: var(--blue-500);
}

[data-theme="dark"] .modal-icon {
    background: rgba(59, 130, 246, 0.15);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.modal-body {
    padding: 20px;
}

.modal-body h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.modal-body p { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.6; }

.modal-foot {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px;
}

.modal-foot .btn { flex: 1; }

.toasts {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1100;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    transform: translateX(120%);
    transition: transform 0.3s var(--ease);
}

.toast.show { transform: translateX(0); }

.toast-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.toast--info .toast-icon { background: rgba(59, 130, 246, 0.15); color: var(--blue-500); }
.toast--success .toast-icon { background: rgba(34, 197, 94, 0.15); color: var(--green-500); }
.toast--warning .toast-icon { background: rgba(245, 158, 11, 0.15); color: var(--amber-500); }
.toast--error .toast-icon { background: rgba(239, 68, 68, 0.15); color: var(--red-500); }

.toast-text { flex: 1; font-size: 0.875rem; font-weight: 500; }

.toast-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s var(--ease);
}

.toast-close:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.lang-dropdown {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px !important;
    width: auto !important;
}

.lang-code {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.lang-arrow {
    font-size: 0.625rem;
    color: var(--text-muted);
    transition: transform 0.2s var(--ease);
}

.lang-dropdown.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.lang-flag--pl {
    background: linear-gradient(180deg, #fff 50%, #dc143c 50%);
}

.lang-flag--en {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><clipPath id="t"><path d="M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z"/></clipPath><path d="M0,0 v30 h60 v-30 z" fill="%23012169"/><path d="M0,0 L60,30 M60,0 L0,30" stroke="%23fff" stroke-width="6"/><path d="M0,0 L60,30 M60,0 L0,30" clip-path="url(%23t)" stroke="%23C8102E" stroke-width="4"/><path d="M30,0 v30 M0,15 h60" stroke="%23fff" stroke-width="10"/><path d="M30,0 v30 M0,15 h60" stroke="%23C8102E" stroke-width="6"/></svg>');
}

.lang-flag--uk {
    background: linear-gradient(180deg, #005bbb 50%, #ffd500 50%);
}

.lang-flag--be {
    background: linear-gradient(180deg, #c8313e 33.33%, #fff 33.33%, #fff 66.66%, #4aa657 66.66%);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s var(--ease);
    z-index: 1000;
    overflow: hidden;
}

.lang-dropdown.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.lang-option:hover {
    background: var(--bg-muted);
}

.lang-option .lang-name {
    flex: 1;
    text-align: left;
}

.lang-option .lang-check {
    font-size: 0.75rem;
    color: var(--green-500);
    opacity: 0;
    transition: opacity 0.15s var(--ease);
}

.lang-option.active {
    background: var(--blue-50);
}

[data-theme="dark"] .lang-option.active {
    background: rgba(59, 130, 246, 0.15);
}

.lang-option.active .lang-check {
    opacity: 1;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 16px 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s var(--ease);
}

[data-theme="dark"] .cookie-banner {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cookie-banner-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-banner-text p:first-child {
    color: var(--text);
    margin-bottom: 2px;
}

.cookie-banner-text a {
    color: var(--blue-500);
    text-decoration: none;
}

.cookie-banner-text a:hover {
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.cookie-btn--accept {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.cookie-btn--accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 16px;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cookie-banner-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .cookie-banner-text p {
        font-size: 0.8125rem;
    }
    
    .cookie-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: none;
    }

    .main {
        margin-left: 0;
    }

    .main.sidebar-collapsed {
        margin-left: 0;
    }

    .topbar-menu {
        display: flex;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 24px 16px;
        padding-bottom: 100px;
    }

    .landing {
        min-height: auto;
        padding: 32px 16px;
    }

    .landing-header {
        margin-bottom: 32px;
    }

    .landing-badge {
        font-size: 0.75rem;
        padding: 8px 14px;
    }

    .hero-shield {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
        border-radius: 16px;
    }

    .landing-title {
        font-size: 2rem;
    }

    .landing-subtitle {
        font-size: 1rem;
    }

    .landing-desc {
        font-size: 0.9375rem;
    }

    .landing-cta {
        margin-bottom: 40px;
    }

    .btn-start {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    .landing-features {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }

    .feature {
        padding: 0;
        width: 100%;
    }

    .feature-divider {
        width: 100%;
        height: 1px;
    }

    .draft-card {
        flex-direction: column;
        gap: 12px;
    }

    .draft-content {
        width: 100%;
    }

    .draft-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .footer-badges {
        gap: 16px;
        flex-wrap: wrap;
    }

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

    .risk-list {
        grid-template-columns: 1fr;
    }

    .freq-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .step-footer {
        display: none;
    }

    .identity-toggle {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .toggle-info {
        flex-direction: column;
    }

    .toasts {
        left: 16px;
        right: 16px;
        bottom: 90px;
    }

    .toast {
        min-width: 0;
        max-width: none;
    }

    .page--done .btn {
        width: 100%;
    }
}

.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        gap: 12px;
        z-index: 200;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 14px 20px;
        font-family: inherit;
        font-size: 0.9375rem;
        font-weight: 600;
        border: none;
        border-radius: var(--radius-lg);
        cursor: pointer;
        transition: all 0.2s var(--ease);
    }

    .mobile-nav-btn--prev {
        background: var(--bg-muted);
        color: var(--text-secondary);
        border: 1px solid var(--border);
    }

    .mobile-nav-btn--prev:hover {
        background: var(--bg-hover);
        color: var(--text);
    }

    .mobile-nav-btn--prev:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    .mobile-nav-btn--next {
        background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
        color: white;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }

    .mobile-nav-btn--next:hover {
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
        transform: translateY(-1px);
    }

    .mobile-nav-btn--next.btn--success {
        background: linear-gradient(135deg, var(--green-500), var(--green-600));
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    }

    .mobile-nav-btn--next.btn--success:hover {
        box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
    }
}


/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}