:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fc;
    --bg-card: #ffffff;
    --bg-card-hover: #f7f8fc;
    --bg-elevated: #f0f2f8;
    --bg-dark: #1a1a2e;
    --bg-dark-card: #232340;
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-default: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.16);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #8a8aaa;
    --color-primary: #22c55e;
    --color-primary-hover: #16a34a;
    --color-primary-light: #dcfce7;
    --color-primary-muted: rgba(34, 197, 94, 0.1);
    --color-accent: #10b981;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-elevated: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #141420;
    --bg-card-hover: #1a1a28;
    --bg-elevated: #1e1e2e;
    --bg-dark: #0a0a0f;
    --bg-dark-card: #141420;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.16);
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a88;
    --color-primary-light: rgba(34, 197, 94, 0.12);
    --color-primary-muted: rgba(34, 197, 94, 0.15);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
    --shadow-elevated: 0 4px 16px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.4), 0 4px 8px rgba(0,0,0,0.25);
    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    text-decoration: none;
    transition: top var(--transition-fast);
}
.skip-link:focus {
    top: 0;
    outline: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-primary);
    color: var(--text-secondary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fadeIn { animation: fadeIn 0.4s ease-out both; }
.animate-slideUp { animation: slideUp 0.5s ease-out both; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-scaleIn { animation: scaleIn 0.3s ease-out both; }

.shimmer-loading {
    background: linear-gradient(90deg, #f0f2f8 25%, #e8eaf2 50%, #f0f2f8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-lg);
}
html.dark .shimmer-loading {
    background: linear-gradient(90deg, #1e1e2e 25%, #282838 50%, #1e1e2e 75%);
    background-size: 200% 100%;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}
.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-1px);
}

.glass-card-static {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.glass-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    width: 100%;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    outline: none;
}
.glass-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-muted);
    background: var(--bg-card);
}
.glass-input:hover:not(:focus) {
    border-color: var(--border-hover);
}
.glass-input::placeholder { color: var(--text-muted); }

.glass-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    width: 100%;
    font-size: 0.875rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8aaa' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}
.glass-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-muted);
}
.glass-select:hover:not(:focus) {
    border-color: var(--border-hover);
}
.glass-select option { background: var(--bg-card); color: var(--text-primary); }
html.dark .glass-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236a6a88' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.btn-primary {
    background: linear-gradient(135deg, #22c55e, #10b981);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.btn-primary:hover {
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(34, 197, 94, 0.2); }
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}
.btn-secondary:active { transform: translateY(0); }

.btn-accent {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-accent:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}
.btn-accent:active { transform: translateY(0); }

.btn-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(239, 68, 68, 0.15);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
}
.btn-danger:active { transform: translateY(0); }
html.dark .btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.2);
}
html.dark .btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}
.nav-link:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}
.nav-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary-hover);
    font-weight: 600;
}
html.dark .nav-link.active {
    color: #4ade80;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}
.mobile-nav-link:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.result-card {
    animation: slideUp 0.4s ease-out both;
    opacity: 0;
}
.result-card:nth-child(1) { animation-delay: 0.05s; }
.result-card:nth-child(2) { animation-delay: 0.1s; }
.result-card:nth-child(3) { animation-delay: 0.15s; }
.result-card:nth-child(4) { animation-delay: 0.2s; }
.result-card:nth-child(5) { animation-delay: 0.25s; }

.gradient-text {
    background: linear-gradient(135deg, #22c55e, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    position: relative;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, #22c55e, #10b981);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-base);
}
.gradient-border:hover::before { opacity: 1; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}
.badge-primary { background: var(--color-primary-light); color: var(--color-primary-hover); }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-info { background: #e0e7ff; color: #4f46e5; }
html.dark .badge-primary { color: #4ade80; }
html.dark .badge-success { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
html.dark .badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
html.dark .badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
html.dark .badge-info { background: rgba(99, 102, 241, 0.15); color: #818cf8; }

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
}
.stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.section-header {
    margin-bottom: 1.5rem;
}
.section-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.section-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.tool-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tool-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}
.tool-header p {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 0.125rem;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.data-table {
    width: 100%;
    font-size: 0.8125rem;
    border-collapse: collapse;
}
.data-table thead th {
    padding: 0.75rem;
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-default);
}
.data-table tbody td {
    padding: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}
.data-table tbody tr {
    transition: background var(--transition-fast);
}
.data-table tbody tr:hover {
    background: var(--bg-secondary);
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

[aria-live="polite"] {
    position: relative;
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    z-index: 9999;
    animation: scaleIn 0.25s ease-out;
    transition: opacity var(--transition-base), transform var(--transition-base);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 400px;
}
.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity var(--transition-fast);
    min-width: 1.5rem;
    min-height: 1.5rem;
}
.toast-close:hover { opacity: 1; }
.toast-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.toast-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
html.dark .toast-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.25);
    color: #4ade80;
}
html.dark .toast-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 1.5rem 0;
}

.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
}
.empty-state .icon-wrap {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-xl);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.empty-state p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.alert-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.alert-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}
html.dark .alert-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}
html.dark .alert-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}
html.dark .alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: var(--color-primary-light);
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary-hover);
    transition: all var(--transition-fast);
}
.credit-badge:hover {
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}
html.dark .credit-badge {
    color: #4ade80;
}

.section-light {
    background: var(--bg-primary);
}
.section-gray {
    background: var(--bg-secondary);
}
.section-dark {
    background: #1a1a2e;
    color: #e0e0f0;
}
html.dark .section-dark {
    background: #08080d;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
}
.feature-card:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.icon-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.password-wrapper {
    position: relative;
}
.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
}
.password-toggle:hover {
    color: var(--text-primary);
}

label:has(input[type="radio"]),
label:has(input[type="checkbox"]) {
    transition: all var(--transition-fast);
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    color: var(--text-primary);
}
.prose p, .prose li {
    color: var(--text-secondary);
    line-height: 1.7;
}

::selection {
    background: rgba(34, 197, 94, 0.2);
    color: var(--text-primary);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
html.dark ::-webkit-scrollbar-thumb { background: #333348; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #444460; }

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
.glass-input:focus-visible,
.glass-select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-muted);
}
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-accent:focus-visible,
.btn-danger:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn-primary,
.btn-secondary,
.btn-accent,
.btn-danger,
.nav-link,
.mobile-nav-link {
    min-height: 2.5rem;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}
.form-error {
    font-size: 0.75rem;
    color: var(--color-danger);
    margin-top: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.glass-input:invalid:not(:placeholder-shown) {
    border-color: var(--color-danger);
}
.glass-input:invalid:not(:placeholder-shown):focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.confirm-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease-out;
    backdrop-filter: blur(2px);
}
.confirm-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    max-width: 400px;
    width: calc(100% - 2rem);
    animation: scaleIn 0.2s ease-out;
}
.confirm-dialog h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.confirm-dialog p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .tool-header h1 { font-size: 1.125rem; }
    .section-header h1 { font-size: 1.25rem; }
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }
    .btn-primary,
    .btn-secondary,
    .btn-accent,
    .btn-danger {
        min-height: 2.75rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .glass-input,
    .glass-select {
        min-height: 2.75rem;
        font-size: 1rem;
    }
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - 4rem);
    position: relative;
}

.admin-sidebar-toggle {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 40;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-elevated);
    transition: all var(--transition-fast);
}
.admin-sidebar-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease-out;
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 3.5rem;
    height: calc(100vh - 3.5rem);
    overflow-y: auto;
    z-index: 20;
}
@media (max-width: 1023px) {
    .admin-sidebar {
        position: fixed;
        top: 3.5rem;
        left: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }
    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
}

.admin-sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.admin-sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.625rem;
    overflow-y: auto;
}
.admin-sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    min-height: 2.25rem;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.admin-nav-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}
.admin-nav-item.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(249, 115, 22, 0.08));
    color: #d97706;
    font-weight: 600;
}
html.dark .admin-nav-item.active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

.admin-subnav {
    margin: 0.125rem 0 0.25rem 0;
    padding: 0;
    list-style: none;
}
.admin-subnav-item {
    display: block;
    padding: 0.375rem 0.75rem 0.375rem 2.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.admin-subnav-item:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}
.admin-subnav-item.active {
    color: #d97706;
    font-weight: 600;
}
html.dark .admin-subnav-item.active {
    color: #fbbf24;
}

.admin-sidebar-footer {
    padding: 0.75rem 0.625rem;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 1.5rem 3rem;
}
@media (max-width: 640px) {
    .admin-main { padding: 1rem 1rem 3rem; }
}

.admin-breadcrumb {
    margin-bottom: 1.5rem;
}
.admin-breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.admin-breadcrumb li {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
}
.admin-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.admin-breadcrumb a:hover { color: var(--text-primary); }
.admin-breadcrumb span[aria-current] {
    color: var(--text-primary);
    font-weight: 600;
}

.admin-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}
.admin-stat:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-1px);
}
.admin-stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.admin-stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.admin-stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}
.admin-stat-sub {
    font-size: 0.6875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.admin-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}
.admin-activity-item:last-child { border-bottom: none; }
.admin-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.375rem;
}

.admin-health-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    transition: background var(--transition-fast);
}
.admin-health-item:hover {
    background: var(--bg-elevated);
}
.admin-health-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.blog-content { line-height: 1.8; color: var(--text-secondary); font-size: 1rem; }
.blog-content h1 { font-size: 1.75rem; font-weight: 800; color: var(--text-primary); margin: 2rem 0 1rem; }
.blog-content h2 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin: 1.75rem 0 0.75rem; }
.blog-content h3 { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); margin: 1.5rem 0 0.5rem; }
.blog-content p { margin-bottom: 1rem; }
.blog-content a { color: #22c55e; text-decoration: underline; }
.blog-content a:hover { color: #16a34a; }
.blog-content img { border-radius: 0.75rem; max-width: 100%; margin: 1.5rem 0; }
.blog-content blockquote { border-left: 4px solid #22c55e; padding-left: 1rem; margin: 1.5rem 0; color: var(--text-secondary); font-style: italic; }
.blog-content pre { background: var(--bg-secondary); padding: 1rem; border-radius: 0.75rem; overflow-x: auto; font-size: 0.875rem; margin: 1.5rem 0; }
.blog-content code { background: var(--bg-secondary); padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.875rem; color: #16a34a; }
html.dark .blog-content code { color: #4ade80; }
.blog-content pre code { background: none; padding: 0; color: inherit; }
.blog-content ul, .blog-content ol { margin: 1rem 0; padding-left: 1.5rem; }
.blog-content li { margin-bottom: 0.5rem; }
.blog-content hr { border: none; border-top: 1px solid var(--border-default); margin: 2rem 0; }

.blog-nav {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
}
.blog-nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}
.blog-nav-link:hover, .blog-nav-link.active { color: var(--color-primary); background: var(--color-primary-muted); }

.blog-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
}
.blog-post-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-elevated); transform: translateY(-1px); }
.blog-post-card a { text-decoration: none; }

.blog-featured-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    text-decoration: none;
}
.blog-featured-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-elevated); transform: translateY(-2px); }

.blog-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}
.blog-sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.blog-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}
.blog-sidebar-link:hover { background: var(--bg-elevated); color: var(--text-primary); }
.blog-sidebar-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
}

.blog-newsletter-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    border-color: rgba(34, 197, 94, 0.15);
}

.blog-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    background: transparent;
}
.blog-reading-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #22c55e, #10b981);
    transition: width 50ms linear;
    border-radius: 0 2px 2px 0;
}

.blog-toc {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}
.blog-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.blog-toc-list li { margin-bottom: 0.25rem; }
.blog-toc-link {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-left: 2px solid transparent;
    text-decoration: none;
    transition: all var(--transition-fast);
    line-height: 1.4;
}
.blog-toc-link:hover { color: var(--text-primary); border-left-color: var(--border-hover); }
.blog-toc-link.active { color: var(--color-primary); border-left-color: var(--color-primary); font-weight: 600; }

.blog-share-bar { }
.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}
.blog-share-btn:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-card-hover); }

.blog-author-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    box-shadow: var(--shadow-card);
}

.blog-nav-card {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-card);
}
.blog-nav-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-elevated); }

html.dark .blog-newsletter-card { border-color: rgba(34, 197, 94, 0.1); }

/* Notification System */
.notif-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}
.notif-action-btn:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-elevated); }
.notif-action-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.notif-action-btn.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }

.notif-filter-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-default);
    color: var(--text-muted);
    background: var(--bg-card);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}
.notif-filter-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.notif-filter-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.notif-filter-btn.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-card);
}
.notif-item:hover { border-color: var(--border-hover); box-shadow: var(--shadow-elevated); }
.notif-item:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.notif-item.unread { border-left: 3px solid var(--color-primary); }
.notif-item.read { opacity: 0.65; }
.notif-item.read:hover { opacity: 0.85; }

.notif-item-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notif-icon-green { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.notif-icon-blue { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.notif-icon-amber { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.notif-icon-red { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.notif-icon-violet { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }
.notif-icon-cyan { background: rgba(6, 182, 212, 0.1); color: #0891b2; }
.notif-icon-gray { background: rgba(107, 114, 128, 0.1); color: #6b7280; }
html.dark .notif-icon-green { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
html.dark .notif-icon-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
html.dark .notif-icon-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
html.dark .notif-icon-red { background: rgba(239, 68, 68, 0.15); color: #f87171; }
html.dark .notif-icon-violet { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
html.dark .notif-icon-cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
html.dark .notif-icon-gray { background: rgba(107, 114, 128, 0.15); color: #9ca3af; }

.notif-item-actions {
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.notif-item:hover .notif-item-actions,
.notif-item:focus-within .notif-item-actions { opacity: 1; }

.notif-item-btn {
    padding: 0.375rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.notif-item-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.notif-item-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.notif-item-btn-danger:hover { color: #dc2626; background: rgba(239, 68, 68, 0.1); }

.notif-category-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: var(--bg-elevated);
    color: var(--text-muted);
}

.notif-unread-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}

.notif-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.notif-empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto;
    border-radius: 1rem;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}
.notif-empty-state-sm {
    text-align: center;
    padding: 2rem 1rem;
}

.notif-skeleton { display: flex; flex-direction: column; gap: 0.5rem; }
.notif-skeleton-item {
    height: 5rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: notifShimmer 1.5s ease-in-out infinite;
}
@keyframes notifShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.notif-item { transition: all 0.3s ease; }
.notif-item.notif-slide-out { opacity: 0; transform: translateX(20px); max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; overflow: hidden; }

.notif-pref-toggle {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-default);
    cursor: pointer;
    accent-color: #22c55e;
}
.notif-pref-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

.dark-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.dark-toggle:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-hover);
}
.dark-toggle .icon-sun,
.dark-toggle .icon-moon { display: none; }
html:not(.dark) .dark-toggle .icon-moon { display: block; }
html.dark .dark-toggle .icon-sun { display: block; }

html.dark .bg-white { background-color: var(--bg-primary) !important; }
html.dark .bg-\[\#f7f8fc\] { background-color: var(--bg-secondary) !important; }
html.dark .bg-\[\#f0f2f8\] { background-color: var(--bg-elevated) !important; }
html.dark .bg-gray-50 { background-color: var(--bg-secondary) !important; }
html.dark .bg-gray-100 { background-color: var(--bg-elevated) !important; }

html.dark .text-\[\#1a1a2e\] { color: var(--text-primary) !important; }
html.dark .text-\[\#4a4a68\] { color: var(--text-secondary) !important; }
html.dark .text-\[\#8a8aaa\] { color: var(--text-muted) !important; }
html.dark .text-gray-900 { color: var(--text-primary) !important; }
html.dark .text-gray-800 { color: var(--text-primary) !important; }
html.dark .text-gray-700 { color: var(--text-secondary) !important; }
html.dark .text-gray-600 { color: var(--text-secondary) !important; }
html.dark .text-gray-500 { color: var(--text-muted) !important; }
html.dark .text-gray-400 { color: var(--text-muted) !important; }

html.dark .border-gray-100 { border-color: var(--border-subtle) !important; }
html.dark .border-gray-200 { border-color: var(--border-default) !important; }
html.dark .border-gray-300 { border-color: var(--border-hover) !important; }

html.dark .bg-white\/95 { background-color: rgba(10, 10, 15, 0.95) !important; }
html.dark .bg-white\/98 { background-color: rgba(10, 10, 15, 0.98) !important; }
html.dark .bg-white\/80 { background-color: rgba(10, 10, 15, 0.8) !important; }

html.dark .shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.3) !important; }

html.dark .bg-green-50 { background-color: rgba(34, 197, 94, 0.1) !important; }
html.dark .bg-green-100 { background-color: rgba(34, 197, 94, 0.12) !important; }
html.dark .border-green-200 { border-color: rgba(34, 197, 94, 0.2) !important; }
html.dark .border-green-100 { border-color: rgba(34, 197, 94, 0.15) !important; }
html.dark .text-green-700 { color: #4ade80 !important; }
html.dark .text-green-600 { color: #4ade80 !important; }
html.dark .text-green-500 { color: #4ade80 !important; }

html.dark .bg-emerald-50 { background-color: rgba(16, 185, 129, 0.1) !important; }
html.dark .border-emerald-200 { border-color: rgba(16, 185, 129, 0.2) !important; }
html.dark .text-emerald-700 { color: #34d399 !important; }
html.dark .text-emerald-600 { color: #34d399 !important; }

html.dark .bg-red-50 { background-color: rgba(239, 68, 68, 0.1) !important; }
html.dark .border-red-200 { border-color: rgba(239, 68, 68, 0.2) !important; }
html.dark .text-red-500 { color: #f87171 !important; }
html.dark .text-red-600 { color: #f87171 !important; }
html.dark .text-red-700 { color: #f87171 !important; }

html.dark .bg-amber-50 { background-color: rgba(245, 158, 11, 0.1) !important; }
html.dark .border-amber-200 { border-color: rgba(245, 158, 11, 0.2) !important; }
html.dark .text-amber-600 { color: #fbbf24 !important; }
html.dark .text-amber-700 { color: #fbbf24 !important; }

html.dark .bg-blue-50 { background-color: rgba(59, 130, 246, 0.1) !important; }
html.dark .border-blue-200 { border-color: rgba(59, 130, 246, 0.2) !important; }
html.dark .text-blue-600 { color: #60a5fa !important; }
html.dark .text-blue-700 { color: #60a5fa !important; }

html.dark .bg-purple-50 { background-color: rgba(139, 92, 246, 0.1) !important; }
html.dark .border-purple-200 { border-color: rgba(139, 92, 246, 0.2) !important; }
html.dark .text-purple-600 { color: #a78bfa !important; }
html.dark .text-purple-700 { color: #a78bfa !important; }

html.dark .bg-indigo-50 { background-color: rgba(99, 102, 241, 0.1) !important; }
html.dark .border-indigo-200 { border-color: rgba(99, 102, 241, 0.2) !important; }
html.dark .text-indigo-600 { color: #818cf8 !important; }

html.dark .bg-violet-50 { background-color: rgba(139, 92, 246, 0.1) !important; }
html.dark .text-violet-600 { color: #a78bfa !important; }

html.dark .bg-pink-50 { background-color: rgba(236, 72, 153, 0.1) !important; }
html.dark .text-pink-600 { color: #f472b6 !important; }

html.dark .bg-cyan-50 { background-color: rgba(6, 182, 212, 0.1) !important; }
html.dark .text-cyan-600 { color: #22d3ee !important; }

html.dark .bg-teal-50 { background-color: rgba(20, 184, 166, 0.1) !important; }
html.dark .text-teal-600 { color: #2dd4bf !important; }

html.dark .bg-orange-50 { background-color: rgba(249, 115, 22, 0.1) !important; }
html.dark .text-orange-600 { color: #fb923c !important; }

html.dark .bg-sky-50 { background-color: rgba(14, 165, 233, 0.1) !important; }
html.dark .text-sky-600 { color: #38bdf8 !important; }

html.dark .bg-yellow-50 { background-color: rgba(234, 179, 8, 0.1) !important; }
html.dark .text-yellow-600 { color: #facc15 !important; }

html.dark .text-gray-200 { color: #d1d5db !important; }
html.dark .text-gray-300 { color: #9ca3af !important; }
html.dark .border-green-400 { border-color: rgba(34, 197, 94, 0.5) !important; }
html.dark .hover\:border-green-200:hover { border-color: rgba(34, 197, 94, 0.3) !important; }

html.dark .divide-gray-100 > * + * { border-color: var(--border-subtle) !important; }
html.dark .divide-gray-200 > * + * { border-color: var(--border-default) !important; }

html.dark .ring-green-500\/20 { --tw-ring-color: rgba(34, 197, 94, 0.2) !important; }

html.dark .hover\:bg-gray-50:hover { background-color: var(--bg-secondary) !important; }
html.dark .hover\:bg-gray-100:hover { background-color: var(--bg-elevated) !important; }
html.dark .hover\:bg-white:hover { background-color: var(--bg-card) !important; }

html.dark .shadow-green-500\/20 { box-shadow: 0 4px 14px rgba(34, 197, 94, 0.15) !important; }
html.dark .shadow-lg { box-shadow: 0 10px 30px rgba(0,0,0,0.4) !important; }

html.dark .from-green-400\/10 { --tw-gradient-from: rgba(34, 197, 94, 0.06) !important; }
html.dark .to-emerald-500\/10 { --tw-gradient-to: rgba(16, 185, 129, 0.06) !important; }

html.dark textarea { background: var(--bg-secondary); color: var(--text-primary); border-color: var(--border-default); }
html.dark textarea:focus { background: var(--bg-card); border-color: var(--color-primary); }
html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="password"],
html.dark input[type="number"],
html.dark input[type="url"],
html.dark input[type="search"],
html.dark input[type="date"],
html.dark input[type="datetime-local"] {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-default);
}
html.dark input[type="text"]:focus,
html.dark input[type="email"]:focus,
html.dark input[type="password"]:focus,
html.dark input[type="number"]:focus,
html.dark input[type="url"]:focus,
html.dark input[type="search"]:focus,
html.dark input[type="date"]:focus,
html.dark input[type="datetime-local"]:focus {
    background: var(--bg-card);
    border-color: var(--color-primary);
}
html.dark select {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-default);
}

html.dark .ql-toolbar.ql-snow { background: var(--bg-elevated); border-color: var(--border-default) !important; }
html.dark .ql-container.ql-snow { border-color: var(--border-default) !important; }
html.dark .ql-editor { background: var(--bg-card); color: var(--text-primary); }
html.dark .ql-snow .ql-stroke { stroke: var(--text-muted) !important; }
html.dark .ql-snow .ql-fill { fill: var(--text-muted) !important; }
html.dark .ql-snow .ql-picker { color: var(--text-secondary) !important; }
html.dark .ql-snow .ql-picker-options { background: var(--bg-card) !important; border-color: var(--border-default) !important; }
html.dark .ql-editor.ql-blank::before { color: var(--text-muted) !important; }
