/* ============================================
   Reusable Component Styles
   Buttons, Cards, Inputs, Badges, Tabs, etc.
   ============================================ */

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    white-space: nowrap;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    height: 2.625rem;
    padding: 0.5rem 1.25rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
    outline: none;
    font-family: var(--font-sans);
    text-decoration: none;
    letter-spacing: -0.01em;
}

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

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}
.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.3);
    transform: translateY(-1px);
}

.btn-destructive {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}
.btn-destructive:hover { opacity: 0.9; }

.btn-outline {
    border: 1px solid hsl(var(--input));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
}
.btn-outline:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}
.btn-secondary:hover { opacity: 0.8; }

.btn-ghost {
    background: transparent;
    color: hsl(var(--foreground));
}
.btn-ghost:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-link {
    background: transparent;
    color: hsl(var(--primary));
    text-decoration-offset: 4px;
}
.btn-link:hover { text-decoration: underline; }

.btn-sm {
    height: 2.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    height: 2.75rem;
    padding: 0.5rem 2rem;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

.btn-round {
    border-radius: 9999px;
}

.weather-button {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    background: linear-gradient(to right, var(--blue-600), var(--sky-500));
    color: #fff;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-family: var(--font-sans);
}
.weather-button:hover {
    background: linear-gradient(to right, var(--blue-700), var(--sky-500));
    box-shadow: var(--shadow-lg);
}
.weather-button:active {
    transform: scale(0.95);
}

/* --- Cards --- */
.card {
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border-radius: var(--radius-lg);
    border: 1px solid hsl(var(--border) / 0.6);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.3s var(--ease-out-expo),
                transform 0.3s var(--ease-out-expo),
                border-color 0.3s ease;
}

.card:hover {
    border-color: hsl(var(--border));
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: var(--space-8) var(--space-8) var(--space-4);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.025em;
}

.card-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.card-content {
    padding: var(--space-4) var(--space-8) var(--space-8);
}

.card-footer {
    display: flex;
    align-items: center;
    padding: var(--space-4) var(--space-8) var(--space-8);
}

/* --- Input --- */
.input, input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"] {
    display: flex;
    height: 2.5rem;
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--input));
    background: hsl(var(--background));
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: hsl(var(--foreground));
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus, input:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.input::placeholder, input::placeholder {
    color: hsl(var(--muted-foreground));
}

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

textarea {
    display: flex;
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--input));
    background: hsl(var(--background));
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: hsl(var(--foreground));
    outline: none;
    min-height: 80px;
    resize: vertical;
}

textarea:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

/* --- Badge --- */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.badge-default {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.badge-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.badge-destructive {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.badge-outline {
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
}

.badge-success {
    background: var(--green-500);
    color: #fff;
}

.badge-warning {
    background: var(--yellow-500);
    color: #000;
}

/* --- Tabs --- */
.tabs-list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: hsl(var(--muted));
    padding: 0.375rem;
    color: hsl(var(--muted-foreground));
}

/* Full-width grid tabs replacement for inline-flex + width:100% conflict */
.tabs-list-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    width: 100%;
    border-radius: var(--radius-lg);
    background: hsl(var(--muted));
    padding: 0.375rem;
    color: hsl(var(--muted-foreground));
}

.tab-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: var(--radius-md);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
    font-family: var(--font-sans);
    outline: none;
}

.tab-trigger:hover {
    color: hsl(var(--foreground));
}

.tab-trigger.active {
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.tab-content {
    margin-top: var(--space-2);
}

.tab-content[hidden] {
    display: none;
}

/* --- Separator --- */
.separator {
    height: 1px;
    width: 100%;
    background: hsl(var(--border));
    margin: var(--space-4) 0;
}

/* --- Skeleton / Loading --- */
.skeleton {
    background: linear-gradient(90deg, hsl(var(--muted)) 0%, hsl(var(--muted) / 0.5) 50%, hsl(var(--muted)) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: calc(var(--radius) - 2px);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Switch / Toggle --- */
.switch {
    position: relative;
    display: inline-flex;
    width: 2.75rem;
    height: 1.5rem;
    cursor: pointer;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    inset: 0;
    background: hsl(var(--input));
    border-radius: 9999px;
    transition: background-color var(--transition-fast);
}

.switch-slider::before {
    content: '';
    position: absolute;
    height: 1.25rem;
    width: 1.25rem;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 9999px;
    transition: transform var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.switch input:checked + .switch-slider {
    background: hsl(var(--primary));
}

.switch input:checked + .switch-slider::before {
    transform: translateX(1.25rem);
}

/* --- Progress Bar --- */
.progress {
    height: 0.5rem;
    width: 100%;
    background: hsl(var(--secondary));
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: hsl(var(--primary));
    border-radius: 9999px;
    transition: width var(--transition);
}

/* --- Tooltip --- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background: var(--slate-900);
    color: #fff;
    font-size: 0.75rem;
    border-radius: calc(var(--radius) - 4px);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    margin-bottom: 4px;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* --- Header Styles --- */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid hsl(var(--border) / 0.4);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background-color var(--transition), border-color var(--transition);
}

.header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-6);
    max-width: 1400px;
    margin: 0 auto;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.header-logo-icon {
    width: 28px;
    height: 28px;
    color: hsl(var(--primary));
}

.header-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Search */
.header-search {
    position: relative;
    width: 100%;
    max-width: 28rem;
}

.search-input-group {
    display: flex;
}

.search-input {
    border-radius: 9999px 0 0 9999px !important;
    flex: 1;
}

.search-location-btn {
    border-radius: 0 9999px 9999px 0 !important;
    border: 1px solid hsl(var(--input));
    border-left: none;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
}
.search-location-btn:hover {
    background: hsl(var(--accent));
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    font-size: 0.875rem;
}

.search-result-item:hover {
    background: hsl(var(--accent));
}

.search-result-item svg {
    color: var(--gray-400);
    margin-right: var(--space-2);
    flex-shrink: 0;
}

.search-section-label {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    border-bottom: 1px solid hsl(var(--border));
}

.search-loading, .search-empty {
    padding: var(--space-4);
    text-align: center;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

/* Temperature Unit Switch */
.temp-unit-switch {
    display: flex;
    border-radius: calc(var(--radius) - 2px);
    overflow: hidden;
    border: 1px solid hsl(var(--input));
}

.temp-unit-btn {
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    background: transparent;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.temp-unit-btn.active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

/* Alert Controls */
.header-alerts {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.alerts-btn {
    position: relative;
    background: transparent;
    border: none;
    color: hsl(var(--foreground));
}

.alerts-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.625rem;
    font-weight: 600;
    background: var(--red-500);
    color: #fff;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-alert-options {
    position: relative;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-1);
    min-width: 12rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    padding: var(--space-2);
    overflow: hidden;
}

.dropdown-header {
    padding: var(--space-1) var(--space-2);
    font-size: 0.875rem;
    font-weight: 500;
}

.dropdown-divider {
    height: 1px;
    background: hsl(var(--border));
    margin: var(--space-1) 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2);
    font-size: 0.875rem;
    border-radius: calc(var(--radius) - 4px);
    color: hsl(var(--foreground));
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border: none;
    background: transparent;
    text-align: left;
    font-family: var(--font-sans);
}

.dropdown-item:hover {
    background: hsl(var(--accent));
}

/* Theme Toggle */
.theme-icon {
    color: var(--blue-600);
}

/* Alerts Panel */
.alerts-panel {
    position: absolute;
    top: 100%;
    right: var(--space-2);
    width: min(320px, calc(100vw - 2rem));
    max-height: 400px;
    overflow-y: auto;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    z-index: 50;
    padding: var(--space-4);
}

/* Location Tooltip */
.location-tooltip {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--space-4);
    padding-top: 6rem;
}

.location-tooltip-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}

.location-tooltip-content {
    position: relative;
    background: hsl(var(--card));
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    padding: var(--space-8);
    max-width: 24rem;
    text-align: center;
}

.location-tooltip-icon {
    margin-bottom: var(--space-4);
    color: hsl(var(--primary));
}

.location-tooltip-content h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-2);
}

.location-tooltip-content p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: var(--space-6);
}

.location-tooltip-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

/* --- Footer Styles --- */
.footer {
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border) / 0.5);
    padding: var(--space-10) 0 var(--space-8);
    margin-top: var(--space-16);
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: hsl(var(--foreground));
}

.footer-logo-icon {
    color: hsl(var(--primary));
}

.footer-logo-text {
    font-size: 1.125rem;
    font-weight: 700;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4) var(--space-6);
}

.footer-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: hsl(var(--primary));
}

.footer-bottom {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid hsl(var(--border) / 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.footer-social {
    display: flex;
    gap: var(--space-4);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    color: hsl(var(--muted-foreground));
    transition: color var(--transition-fast);
    border-radius: var(--radius-md);
}

.social-link:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--accent));
}

/* --- Toast Notification --- */
.toast-container {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-width: 24rem;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: toast-slide-in 0.3s ease-out;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-leaving {
    opacity: 0;
    transform: translateX(100%);
}

.toast-destructive {
    border-color: var(--red-500);
    background: #fef2f2;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.toast-description {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.125rem;
}

.toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    padding: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Dialog / Modal --- */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    animation: fade-in 0.15s ease-out;
}

.dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    z-index: 101;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: dialog-in 0.2s ease-out;
    padding: var(--space-6);
    min-width: 20rem;
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.dialog-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.dialog-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-top: var(--space-1);
}

.dialog-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    padding: 0.25rem;
    border-radius: calc(var(--radius) - 4px);
    transition: background-color var(--transition-fast);
}

.dialog-close:hover {
    background: hsl(var(--accent));
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-6);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes dialog-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* --- Popover --- */
.popover {
    position: absolute;
    z-index: 50;
    background: hsl(var(--popover));
    color: hsl(var(--popover-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
    min-width: 12rem;
    animation: fade-in 0.15s ease-out;
}

/* --- Tab Panel --- */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fade-in 0.2s ease-out;
}

/* --- Dialog Content (used in weather.php) --- */
.dialog-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    z-index: 101;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    animation: dialog-in 0.2s ease-out;
    padding: var(--space-6);
    min-width: 20rem;
}

.dialog-content.sm-max-w-425 {
    max-width: min(425px, 90vw);
}

.dialog-content.sm-max-w-md {
    max-width: min(28rem, 90vw);
}

.dialog-body {
    padding-top: var(--space-2);
}

/* --- Section Titles --- */
.section-title-sm {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: var(--space-1);
}

.section-subtitle {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: var(--space-3);
}

/* --- Detail Stat Cards (dialogs) --- */
.detail-stat-card {
    background: hsl(var(--muted));
    border-radius: calc(var(--radius) - 2px);
    padding: var(--space-3);
    text-align: center;
}

.detail-stat-label {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

/* --- Form Groups --- */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: var(--space-2);
}

.form-input {
    display: flex;
    height: 2.5rem;
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--input));
    background: hsl(var(--background));
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: hsl(var(--foreground));
    outline: none;
}

.form-input:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

/* --- Badge Variants --- */
.badge-info {
    background: var(--blue-100);
    color: var(--blue-800);
}

/* --- Checkbox styling --- */
input[type="checkbox"], input[type="radio"] {
    width: auto;
    height: auto;
    display: inline;
    accent-color: hsl(var(--primary));
}

/* --- Card info badge variants (used in alerts page) --- */
.badge-info { background: var(--blue-100); color: var(--blue-700); }

/* ============================================
   ENHANCED COMPONENTS - Premium Visual Polish
   ============================================ */

/* Gradient Buttons */
.btn-gradient {
  background: var(--primary-gradient, linear-gradient(135deg, #2563eb, #0ea5e9));
  color: #fff;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: calc(var(--radius) - 2px);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37,99,235,0.25);
  position: relative;
  overflow: hidden;
}
.btn-gradient:hover {
  box-shadow: 0 8px 20px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}
.btn-gradient:active {
  transform: scale(0.97);
}
/* Shimmer effect on gradient buttons */
.btn-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Enhanced Card Styles */
.card-interactive {
  transition: all 0.3s ease;
  cursor: pointer;
}
.card-interactive:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}
.dark .card-interactive:hover {
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}

.card-gradient-border {
  position: relative;
  overflow: hidden;
}
.card-gradient-border::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary-gradient, linear-gradient(to right, #2563eb, #0ea5e9));
}

/* Icon Circles with Gradient */
.icon-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-gradient, linear-gradient(135deg, #2563eb, #0ea5e9));
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}
.icon-circle-sm { width: 40px; height: 40px; }
.icon-circle-lg { width: 72px; height: 72px; }

/* Custom Checkboxes */
.custom-checkbox {
  display: flex; align-items: center; gap: 0.75rem;
  cursor: pointer; padding: 0.5rem 0;
  font-size: 0.875rem;
}
.custom-checkbox input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 2px solid hsl(var(--border));
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.custom-checkbox input[type="checkbox"]:checked {
  background: var(--primary-gradient, linear-gradient(135deg, #2563eb, #0ea5e9));
  border-color: transparent;
}
.custom-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 2px;
  width: 6px; height: 10px;
  border: solid white; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.custom-checkbox input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

/* Custom Radio Buttons */
.custom-radio {
  display: flex; align-items: center; gap: 0.75rem;
  cursor: pointer; padding: 0.5rem 0;
  font-size: 0.875rem;
}
.custom-radio input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 2px solid hsl(var(--border));
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.custom-radio input[type="radio"]:checked {
  border-color: hsl(var(--primary));
}
.custom-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary-gradient, linear-gradient(135deg, #2563eb, #0ea5e9));
}

/* Custom Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px; height: 24px;
  display: inline-block;
}
.toggle-switch input {
  opacity: 0; width: 0; height: 0;
}
.toggle-switch .toggle-slider {
  position: absolute; inset: 0;
  background: hsl(var(--muted));
  border-radius: 24px;
  cursor: pointer;
  transition: 0.3s;
}
.toggle-switch .toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary-gradient, linear-gradient(135deg, #2563eb, #0ea5e9));
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Enhanced Tab Styling */
.tabs-enhanced .tab-trigger {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  border: none;
  color: hsl(var(--muted-foreground));
  position: relative;
}
.tabs-enhanced .tab-trigger:hover {
  background: hsl(var(--accent));
  color: hsl(var(--foreground));
}
.tabs-enhanced .tab-trigger.active {
  color: hsl(var(--primary));
  background: hsl(var(--accent));
}
.tabs-enhanced .tab-trigger.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 25%; right: 25%;
  height: 2px;
  background: var(--primary-gradient, linear-gradient(to right, #2563eb, #0ea5e9));
  border-radius: 2px;
}

/* Code Blocks */
.code-block {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  overflow-x: auto;
  border: 1px solid #334155;
  position: relative;
}
.code-block .code-keyword { color: #c084fc; }
.code-block .code-string { color: #86efac; }
.code-block .code-comment { color: #64748b; font-style: italic; }
.code-block .code-number { color: #fbbf24; }
.code-block .code-url { color: #38bdf8; }
.code-block .code-method { color: #34d399; font-weight: 600; }

/* Pricing Card Enhanced */
.pricing-card {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}
.pricing-card-featured {
  border-color: transparent;
  background: var(--primary-gradient, linear-gradient(135deg, #2563eb, #0ea5e9));
  padding: 2px;
}
.pricing-card-featured > .pricing-card-inner {
  background: hsl(var(--card));
  border-radius: calc(var(--radius) - 2px);
}
.pricing-card-header {
  padding: 1.5rem;
  text-align: center;
}
.pricing-card-featured .pricing-card-header {
  background: var(--primary-gradient, linear-gradient(135deg, #2563eb, #0ea5e9));
  color: white;
}

/* Enhanced Accordion */
.accordion-item {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.5rem;
  transition: all 0.3s;
}
.accordion-item.open {
  border-color: hsl(var(--primary) / 0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9375rem;
  text-align: left;
  gap: 0.75rem;
  transition: background 0.2s;
  color: hsl(var(--foreground));
}
.accordion-trigger:hover {
  background: hsl(var(--accent));
}
.accordion-trigger .accordion-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: hsl(var(--muted-foreground));
}
.accordion-item.open .accordion-trigger .accordion-icon {
  transform: rotate(180deg);
  color: hsl(var(--primary));
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.25rem;
}
.accordion-item.open .accordion-content {
  max-height: 500px;
  padding: 0 1.25rem 1.25rem;
}
.accordion-item.open {
  border-left: 3px solid hsl(var(--primary));
}

/* Section Number Badge */
.section-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
  background: var(--primary-gradient, linear-gradient(135deg, #2563eb, #0ea5e9));
  flex-shrink: 0;
}

/* Theme Picker Dropdown */
.theme-picker-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 0.75rem;
  z-index: 50;
  min-width: 280px;
  max-height: 420px;
  overflow-y: auto;
  animation: fade-in 0.15s ease-out;
}
.dark .theme-picker-dropdown {
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}
.theme-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0.375rem;
  border-radius: calc(var(--radius) - 2px);
  transition: background 0.2s;
  border: none;
  background: transparent;
}
.theme-picker-item:hover {
  background: hsl(var(--accent));
}
.theme-picker-item span {
  font-size: 0.625rem;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}

/* Enhanced Form Inputs */
.input-enhanced {
  display: flex;
  height: 2.75rem;
  width: 100%;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: hsl(var(--foreground));
  outline: none;
  transition: all 0.2s ease;
}
.input-enhanced:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
}
.input-enhanced::placeholder {
  color: hsl(var(--muted-foreground));
}

/* --- Prose / Content Typography --- */
.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
    color: hsl(var(--foreground));
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
    color: hsl(var(--foreground));
}

.prose p {
    margin-bottom: var(--space-4);
    line-height: 1.8;
    color: hsl(var(--muted-foreground));
}

.prose ul, .prose ol {
    list-style-position: outside;
    margin-left: 1.5rem;
    margin-bottom: var(--space-4);
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose ul li, .prose ol li {
    padding: var(--space-1) 0;
    line-height: 1.7;
    color: hsl(var(--muted-foreground));
}

.prose strong {
    font-weight: 600;
    color: hsl(var(--foreground));
}

.prose a {
    color: hsl(var(--primary));
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    opacity: 0.8;
}
