:root {
    color-scheme: light;
    --font-en: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-bn: 'Hind Siliguri', 'Bangla MN', 'SolaimanLipi', sans-serif;
    --bg: #f5f4f0;
    --bg-rgb: 245, 244, 240;
    --surface: #ffffff;
    --surface-rgb: 255, 255, 255;
    --surface-soft: #f1f2f4;
    --surface-elevated: #ffffff;
    --border: #d9dde2;
    --border-subtle: #e8ebef;
    --primary: #0f766e;
    --primary-rgb: 15, 118, 110;
    --primary-soft: rgba(15, 118, 110, 0.12);
    --primary-strong: #0b5f58;
    --primary-glow: rgba(15, 118, 110, 0.24);
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.12);
    --secondary: #1e293b;
    --text: #121826;
    --text-soft: #556070;
    --text-muted: #8a94a6;
    --text-on-primary: #ffffff;
    --danger: #dc2626;
    --warning: #f59e0b;
    --success: #16a34a;
    --info: #0284c7;
    --dock-scale: 1;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.08);
    --shadow: 0 10px 32px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.16);
    --ui-scale: 1;
}

html[data-theme="midnight-purple"] {
    --bg: #0f0720;
    --bg-rgb: 15, 7, 32;
    /* Deep purple almost black */
    --surface: #1a0b2e;
    --surface-rgb: 26, 11, 46;
    /* Rich dark purple */
    --surface-soft: #2d1b4e;
    --border: rgba(139, 92, 246, 0.2);
    --border-subtle: rgba(139, 92, 246, 0.1);
    --text: #e9d5ff;
    --text-soft: #c4b5fd;
    --text-muted: #8b5cf6;
    --primary: #9333ea;
    --primary-rgb: 147, 51, 234;
    --primary-soft: rgba(147, 51, 234, 0.15);
    --primary-strong: #7e22ce;
    --accent: #d946ef;
    /* Fuchsia accent */
    --accent-soft: rgba(217, 70, 239, 0.15);
    --danger: #ef4444;
    --success: #22c55e;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
}

html[data-theme="sunset-orange"] {
    --bg: #1c1917;
    --bg-rgb: 28, 25, 23;
    /* Warm black */
    --surface: #292524;
    --surface-rgb: 41, 37, 36;
    --surface-soft: #44403c;
    --border: rgba(249, 115, 22, 0.2);
    --border-subtle: rgba(249, 115, 22, 0.1);
    --text: #fed7aa;
    --text-soft: #fdba74;
    --text-muted: #ea580c;
    --primary: #f97316;
    /* Bright Orange */
    --primary-rgb: 249, 115, 22;
    --primary-soft: rgba(249, 115, 22, 0.15);
    --primary-strong: #ea580c;
    --accent: #f43f5e;
    /* Rose accent */
    --accent-soft: rgba(244, 63, 94, 0.15);
    --danger: #ef4444;
    --success: #22c55e;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
}

/* ==========================================
   SUPER FAST ANIMATIONS SYSTEM
   ==========================================
   These animations make the entire app feel
   lightning fast and responsive
   ========================================== */

/* Core Animation Keyframes */
@keyframes fastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fastSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fastSlideInRight {
    from {
        opacity: 0;
        transform: translateX(12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fastFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fastScaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fastSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fastPop {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }

    60% {
        transform: scale(1.03);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fastBounce {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    50% {
        transform: translateY(3px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

    100% {
        background-position: 200% 0;
    }
}

@keyframes fastGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }

    50% {
        box-shadow: 0 0 12px 2px rgba(34, 197, 94, 0.3);
    }
}

@keyframes fastRipple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes fastShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    75% {
        transform: translateX(3px);
    }
}

@keyframes fastPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.03);
        opacity: 0.9;
    }
}

@keyframes fastSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply fast animations globally */
.panel.active {
    animation: fastSlideIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.customer-card,
.note-card,
.todo-category-card,
.bill-card-enhanced {
    animation: fastScaleIn 0.12s cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
}

/* Staggered card animations */
.customer-card:nth-child(1),
.note-card:nth-child(1),
.bill-card-enhanced:nth-child(1) {
    animation-delay: 0ms;
}

.customer-card:nth-child(2),
.note-card:nth-child(2),
.bill-card-enhanced:nth-child(2) {
    animation-delay: 25ms;
}

.customer-card:nth-child(3),
.note-card:nth-child(3),
.bill-card-enhanced:nth-child(3) {
    animation-delay: 50ms;
}

.customer-card:nth-child(4),
.note-card:nth-child(4),
.bill-card-enhanced:nth-child(4) {
    animation-delay: 75ms;
}

.customer-card:nth-child(5),
.note-card:nth-child(5),
.bill-card-enhanced:nth-child(5) {
    animation-delay: 100ms;
}

.customer-card:nth-child(n+6),
.note-card:nth-child(n+6),
.bill-card-enhanced:nth-child(n+6) {
    animation-delay: 120ms;
}

.modal {
    animation: fastFadeIn 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-form {
    animation: fastPop 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.settings-card {
    animation: fastSlideUp 0.15s cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
}

/* Staggered settings cards */
.settings-card:nth-child(1) {
    animation-delay: 0ms;
}

.settings-card:nth-child(2) {
    animation-delay: 30ms;
}

.settings-card:nth-child(3) {
    animation-delay: 60ms;
}

.settings-card:nth-child(4) {
    animation-delay: 90ms;
}

.settings-card:nth-child(5) {
    animation-delay: 120ms;
}

.settings-card:nth-child(n+6) {
    animation-delay: 140ms;
}

.dock-item {
    animation: fastBounce 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
}

/* Staggered dock items */
.dock-item:nth-child(1) {
    animation-delay: 0ms;
}

.dock-item:nth-child(2) {
    animation-delay: 30ms;
}

.dock-item:nth-child(3) {
    animation-delay: 60ms;
}

.dock-item:nth-child(4) {
    animation-delay: 90ms;
}

.dock-item:nth-child(5) {
    animation-delay: 120ms;
}

/* Super Fast Global Transitions */
* {
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}

button,
a,
input,
select,
textarea {
    transition: all 0.1s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

button:hover,
a:hover {
    transition: all 0.06s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.card,
.customer-card,
.note-card {
    transition: all 0.12s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Interactive hover animations */
.customer-card:hover,
.note-card:hover,
.bill-card-enhanced:hover,
.debt-card:hover,
.todo-category-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transition: all 0.15s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.customer-card:active,
.note-card:active,
.bill-card-enhanced:active,
.debt-card:active,
.todo-category-card:active {
    transform: translateY(-1px) scale(0.99);
    transition: all 0.05s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Button click animations */
.primary-btn:active,
.secondary-btn:active,
.filter-btn:active,
.tab-btn:active {
    transform: scale(0.96);
    transition: transform 0.05s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Search bar focus animation */
input[type="search"]:focus,
.search-bar input:focus {
    animation: fastGlow 0.4s ease-out;
}

/* Filter button animations */
.filter-btn {
    transition: all 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

.filter-btn.active {
    animation: fastPop 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Tab switching animation */
.tab-btn.active,
.customers-tabs .tab-btn.active,
.ai-tab-btn.active {
    animation: fastPop 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Panel content fade */
.ai-tool-panel.active {
    animation: fastFadeIn 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Floating action button animation */
.floating-add-btn {
    animation: fastPop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    transition: all 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.floating-add-btn:hover {
    transform: scale(1.1) rotate(90deg);
}

.floating-add-btn:active {
    transform: scale(0.95) rotate(90deg);
}

/* Stats card animations */
.debt-stat-card,
.bill-stat-card,
.monthly-wrap-card-stat {
    animation: fastSlideUp 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
}

.debt-stat-card:nth-child(1),
.bill-stat-card:nth-child(1) {
    animation-delay: 0ms;
}

.debt-stat-card:nth-child(2),
.bill-stat-card:nth-child(2) {
    animation-delay: 40ms;
}

.debt-stat-card:nth-child(3),
.bill-stat-card:nth-child(3) {
    animation-delay: 80ms;
}

.debt-stat-card:nth-child(4),
.bill-stat-card:nth-child(4) {
    animation-delay: 120ms;
}

/* Theme tile animations */
.theme-appearance-tile {
    transition: all 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-appearance-tile:hover {
    transform: translateY(-4px) scale(1.02);
}

.theme-appearance-tile[aria-checked="true"] {
    animation: fastPop 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Loading shimmer effect */
.loading-shimmer {
    background: linear-gradient(90deg, var(--surface-soft) 25%, var(--surface) 50%, var(--surface-soft) 75%);
    background-size: 200% 100%;
    animation: fastShimmer 1.2s ease-in-out infinite;
}

/* Success/error state animations */
.success-flash {
    animation: fastGlow 0.4s ease-out;
}

.error-shake {
    animation: fastShake 0.3s ease-out;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Panel transition for smoother navigation */
.panel {
    will-change: opacity, transform;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Theme: Light (Default - White & Green) */
html,
html[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --bg-rgb: 255, 255, 255;
    --surface: #ffffff;
    --surface-rgb: 255, 255, 255;
    --surface-soft: #f8f9fa;
    --border: #e5e7eb;
    --primary: #22c55e;
    --primary-soft: rgba(34, 197, 94, 0.15);
    --primary-strong: #16a34a;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-soft: #6b7280;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

/* Theme: Dark (Night Mode) */
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111827;
    --bg-rgb: 17, 24, 39;
    --surface: #1f2937;
    --surface-rgb: 31, 41, 55;
    --surface-soft: #374151;
    --border: #4b5563;
    --primary: #34d399;
    --primary-soft: rgba(52, 211, 153, 0.2);
    --primary-strong: #10b981;
    --accent: #fbbf24;
    --text: #f9fafb;
    --text-soft: #9ca3af;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

/* Theme: Ocean (Blue) */
html[data-theme="ocean"] {
    color-scheme: light;
    --bg: #f0f9ff;
    --bg-rgb: 240, 249, 255;
    --surface: #ffffff;
    --surface-rgb: 255, 255, 255;
    --surface-soft: #e0f2fe;
    --border: #bae6fd;
    --primary: #0284c7;
    --primary-soft: rgba(2, 132, 199, 0.15);
    --primary-strong: #0369a1;
    --accent: #f59e0b;
    --text: #0c4a6e;
    --text-soft: #64748b;
    --shadow: 0 8px 28px rgba(2, 132, 199, 0.12);
}

/* Theme: Rose (Pink) */
html[data-theme="rose"] {
    color-scheme: light;
    --bg: #fff1f2;
    --bg-rgb: 255, 241, 242;
    --surface: #ffffff;
    --surface-rgb: 255, 255, 255;
    --surface-soft: #ffe4e6;
    --border: #fecdd3;
    --primary: #e11d48;
    --primary-soft: rgba(225, 29, 72, 0.15);
    --primary-strong: #be123c;
    --accent: #8b5cf6;
    --text: #881337;
    --text-soft: #6b7280;
    --shadow: 0 8px 28px rgba(225, 29, 72, 0.1);
}

* {
    box-sizing: border-box;
}

/* Ensure the HTML `hidden` attribute always wins over component display rules. */
[hidden] {
    display: none !important;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-en);
    font-size: 16px;
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    display: flex;
    justify-content: center;
}

body.locked .app {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 34, 40, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    z-index: 30;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(15, 60, 50, 0.3);
    width: min(520px, 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-card__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.auth-app-name {
    margin: 0;
    letter-spacing: 0.1em;
    color: var(--primary-strong);
    font-weight: 700;
}

.auth-card h1 {
    margin: 4px 0 6px;
    font-size: 1.4rem;
}

.auth-subtitle {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-toggle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.auth-tab {
    border: 1px solid var(--border);
    background: var(--surface-soft);
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.auth-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.auth-forms {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-form.hidden {
    display: none;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-soft);
    font-size: 1rem;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-row input {
    flex: 1;
}

.icon-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
}

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

.auth-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.auth-preview__item {
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    text-align: center;
    background: var(--surface-soft);
}

.auth-preview__item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.auth-hint {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.auth-error {
    color: var(--danger);
    font-weight: 700;
    min-height: 20px;
    margin: 0;
}

.auth-close {
    align-self: flex-start;
}

/* Skip auth */
.auth-skip {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.ghost-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    font-family: inherit;
    transition: color 0.2s ease;
}

.ghost-btn:hover {
    color: var(--primary-strong);
}

.auth-skip-hint {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 0.85rem;
}

/* Profile upload in auth */
.profile-upload-area {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

.profile-upload-btn {
    cursor: pointer;
}

.profile-upload-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--surface-soft);
    border: 3px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-soft);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.profile-upload-preview:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.profile-upload-preview.has-image {
    border-style: solid;
    border-color: var(--primary);
}

.profile-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-upload-icon {
    font-size: 2rem;
}

/* Advanced security section */
.auth-advanced {
    background: var(--surface-soft);
    border-radius: var(--radius-md);
    padding: 0;
    margin: 12px 0;
}

.auth-advanced summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-soft);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-advanced summary::-webkit-details-marker {
    display: none;
}

.auth-advanced summary::after {
    content: '▸';
    margin-left: auto;
    transition: transform 0.2s ease;
}

.auth-advanced[open] summary::after {
    transform: rotate(90deg);
}

.auth-advanced-content {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app {
    width: clamp(360px, 100vw, 1100px);
    min-height: 100vh;
    background: rgba(var(--surface-rgb, 255, 255, 255), 0.7);
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    zoom: var(--ui-scale, 1);
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .app {
    background: rgba(var(--surface-rgb, 17, 24, 39), 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.app-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 20px 14px;
    background: linear-gradient(180deg, rgba(28, 139, 115, 0.16) 0%, rgba(28, 139, 115, 0) 85%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

.language-toggle-settings {
    padding: 12px 24px;
    font-size: 1rem;
    width: 100%;
    max-width: 200px;
}

.app-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-title .title-en {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.app-title .title-bn {
    font-family: var(--font-bn);
    font-size: 1.2rem;
    color: var(--text-soft);
}

.app-actions {
    display: flex;
    gap: 10px;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
}

.language-toggle,
.notification-toggle,
.nav-btn,
.primary-btn,
.secondary-btn {
    font-family: inherit;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.language-toggle,
.notification-toggle {
    background: var(--surface);
    color: var(--primary-strong);
    padding: 10px 14px;
    box-shadow: 0 6px 14px rgba(28, 139, 115, 0.12);
}

.language-toggle:active,
.notification-toggle:active,
.nav-btn:active,
.primary-btn:active,
.secondary-btn:active {
    transform: scale(0.97);
}

.language-toggle:focus-visible,
.notification-toggle:focus-visible,
.nav-btn:focus-visible,
.primary-btn:focus-visible,
.secondary-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SWEET ANIMATIONS - Cute & Smooth UI Animations
   ═══════════════════════════════════════════════════════════════════════════ */

/* Keyframes for sweet animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes pulse-soft {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-2deg);
    }

    75% {
        transform: rotate(2deg);
    }
}

@keyframes bounce-in {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slide-up-bounce {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }

    60% {
        transform: translateY(-5px);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

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

    100% {
        background-position: 200% 0;
    }
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.1);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.1);
    }

    70% {
        transform: scale(1);
    }
}

@keyframes pop-in {
    0% {
        transform: scale(0.8) translateY(10px);
        opacity: 0;
    }

    50% {
        transform: scale(1.03) translateY(-2px);
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(34, 197, 94, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.6), 0 0 40px rgba(34, 197, 94, 0.3);
    }
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100px) rotate(720deg);
        opacity: 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes icon-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-4px);
    }

    50% {
        transform: translateY(0);
    }

    70% {
        transform: translateY(-2px);
    }
}

@keyframes dock-entrance {
    0% {
        transform: translateX(-50%) translateY(100px) scale(0.8);
        opacity: 0;
    }

    60% {
        transform: translateX(-50%) translateY(-10px) scale(1.02);
    }

    100% {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPLETELY NEW DOCK DESIGN - Modern Icons with Text Labels
   ═══════════════════════════════════════════════════════════════════════════ */

/* Floating Dock - Premium Design */
.dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

.dock.dock-animated {
    animation: dock-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dock-entrance {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.dock-inner {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: saturate(200%) blur(30px) brightness(1.05);
    -webkit-backdrop-filter: saturate(200%) blur(30px) brightness(1.05);
    border-radius: 24px;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    pointer-events: auto;
    position: relative;
    transform: scale(calc(var(--dock-scale, 1) * var(--ui-scale, 1)));
    transform-origin: bottom center;
    transition: transform 0.2s ease;
}

.dock-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.6) 0%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.6) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.dock-glass {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.95) 100%);
}

html[data-theme="dark"] .dock-inner {
    background: linear-gradient(135deg,
            rgba(31, 41, 55, 0.95) 0%,
            rgba(31, 41, 55, 0.85) 100%);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .dock-item {
    color: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .dock-item.active {
    color: #fff;
}

html[data-theme="dark"] .dock-label {
    color: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .dock-item.active .dock-label {
    color: #fff;
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-soft);
    font-family: inherit;
    position: relative;
    min-width: 56px;
    overflow: visible;
}

.dock-item-animated {
    animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(var(--item-index, 0) * 0.08s);
}

.dock-item:nth-child(1) {
    --item-index: 0;
}

.dock-item:nth-child(2) {
    --item-index: 1;
}

.dock-item:nth-child(3) {
    --item-index: 2;
}

.dock-item:nth-child(4) {
    --item-index: 3;
}

.dock-item:nth-child(5) {
    --item-index: 4;
}

.dock-icon-wrapper {
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.dock-item .dock-icon {
    color: currentColor;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Dock: icons only (labels hidden) */
/* Labels visible in dock-v2, dock-v3, dock-v4; only hide in legacy dock */
.dock:not(.dock-v2):not(.dock-v3):not(.dock-v4) .dock-label {
    display: none !important;
}

/* Always visible label - Enhanced (kept for tooltips/accessibility when enabled) */
.dock-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-soft);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-transform: capitalize;
    white-space: nowrap;
    opacity: 0.9;
    display: block !important;
    margin-top: 4px;
}

.dock-label-bilingual .label-bn {
    font-family: var(--font-bn);
    display: none;
}

html[lang="bn"] .dock-label-bilingual .label-en {
    display: none;
}

html[lang="bn"] .dock-label-bilingual .label-bn {
    display: inline;
}

/* Hide old helper class */
.dock-helper {
    display: none;
}

/* Active indicator dot */
.dock-indicator {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 6px var(--primary);
}

.dock-item:hover {
    transform: translateY(-4px) scale(1.05);
    background: linear-gradient(135deg,
            var(--primary-soft) 0%,
            color-mix(in srgb, var(--primary-soft) 80%, transparent) 100%);
    color: var(--primary-strong);
    box-shadow:
        0 6px 20px rgba(28, 139, 115, 0.2),
        0 2px 8px rgba(28, 139, 115, 0.15);
    transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

.dock-item:hover .dock-icon-wrapper {
    animation: icon-bounce 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.12);
}

.dock-item:hover .dock-label {
    color: var(--primary-strong);
    opacity: 1;
    transform: translateY(-1px);
}

@keyframes icon-bounce {

    0%,
    100% {
        transform: scale(1) translateY(0);
    }

    50% {
        transform: scale(1.2) translateY(-3px);
    }
}

.dock-item:active {
    transform: translateY(-2px) scale(1.02);
}

.dock-item.active {
    background: linear-gradient(135deg,
            var(--primary) 0%,
            var(--primary-strong) 100%);
    color: #fff;
    box-shadow:
        0 10px 32px rgba(28, 139, 115, 0.4),
        0 4px 12px rgba(28, 139, 115, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-4px) scale(1.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dock-item.active .dock-icon {
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
}

.dock-item.active .dock-label {
    color: #fff;
}

.dock-item.active .dock-indicator {
    transform: translateX(-50%) scale(1);
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.dock-icon {
    width: 22px;
    height: 22px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    stroke-width: 2.2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dock-item:hover .dock-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(28, 139, 115, 0.3));
}

.dock-item.active .dock-icon {
    stroke-width: 2.8;
    filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.4));
}

/* Hide old nav styles (keeping for fallback) */
.app-nav {
    display: none;
}

.nav-btn {
    display: none;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    min-height: 0;
    /* allow inner panels to scroll within flex */
}

.panel {
    flex: 1;
    display: none;
    flex-direction: column;
    height: 100%;
    padding: 0 20px 140px;
    /* Extra space for floating dock */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    max-width: 100%;
    min-height: 0;
    /* prevent flex overflow locking scroll */
}

@media (max-width: 480px) {
    .app {
        width: 100vw;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }

    .panel {
        padding: 0 12px 120px;
    }

    .panel-header {
        flex-wrap: wrap;
    }
}

.panel.active {
    display: flex;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin: 10px 0 18px;
}

.panel-header h1 {
    font-size: 1.4rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.panel-subtitle {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    color: #fff;
    padding: 12px 24px;
    box-shadow:
        0 4px 16px rgba(28, 139, 115, 0.3),
        0 2px 8px rgba(28, 139, 115, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.primary-btn:hover {
    background: linear-gradient(135deg, var(--primary-strong) 0%, var(--primary) 100%);
    box-shadow:
        0 8px 24px rgba(28, 139, 115, 0.4),
        0 4px 12px rgba(28, 139, 115, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.02);
}

.primary-btn:active {
    transform: translateY(0) scale(0.98);
}

.secondary-btn {
    background: linear-gradient(135deg, var(--primary-soft) 0%, color-mix(in srgb, var(--primary-soft) 90%, transparent) 100%);
    color: var(--primary-strong);
    padding: 10px 20px;
    font-weight: 600;
    border: 1.5px solid var(--primary);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    color: #fff;
    border-color: var(--primary-strong);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 6px 20px rgba(28, 139, 115, 0.3),
        0 2px 8px rgba(28, 139, 115, 0.2);
}

.secondary-btn:active {
    transform: translateY(0) scale(0.98);
}

.danger-btn {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.05));
    color: var(--danger);
    border: 2px solid var(--danger);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.danger-btn::before {
    content: '';
    position: absolute;/* ==========================================
   PHASE 4: DOCK V4 & AI AGENT BUTTON
   ========================================== */

/* Hide old dock */
.dock-v2,
.dock-v3 {
    display: none !important;
}

/* New Dock V4 */
.dock-v4 {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) scale(calc(var(--dock-scale, 1) * var(--ui-scale, 1)));
    transform-origin: center bottom;
    z-index: 1000;
    width: auto;
    max-width: 95%;
    pointer-events: none;
}

.dock-container {
    background: rgba(var(--surface-rgb, 255, 255, 255), 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
    pointer-events: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-container {
    background: rgba(var(--surface-rgb, 17, 24, 39), 0.82);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 22px 46px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 10px 12px;
    min-width: 74px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: var(--text-soft);
    position: relative;
    overflow: hidden;
}

.dock-item:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    transform: translateY(-4px);
}

.dock-item.active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.dock-icon-wrapper {
    position: relative;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-item.active .dock-icon-wrapper {
    transform: scale(1.15) translateY(-2px);
}

.dock-item.active .dock-icon {
    stroke-width: 2.2;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.dock-label {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.dock-item.active .dock-label {
    opacity: 1;
    transform: translateY(-1px);
}

/* Agent Button - The Centerpiece */
.dock-item-agent {
    padding: 0;
    margin: 0 12px;
}

.dock-agent-bubble {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5, #3b82f6);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 12px 24px rgba(124, 58, 237, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 5px solid var(--surface);
    margin-top: -32px;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

html[data-theme="dark"] .dock-agent-bubble {
    border-color: #1f2937;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.5);
}

.dock-item-agent:hover .dock-agent-bubble {
    transform: scale(1.1) translateY(-8px) rotate(5deg);
    box-shadow: 0 16px 32px rgba(124, 58, 237, 0.4);
}

.dock-item-agent.active .dock-agent-bubble {
    background: linear-gradient(135deg, #6d28d9, #4338ca);
    transform: scale(1.05) translateY(-4px);
    border-radius: 20px;
}

.dock-icon-agent {
    width: 32px;
    height: 32px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.dock-label-agent {
    font-size: 0.7rem;
    font-weight: 800;
    color: #7c3aed;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html[data-theme="dark"] .dock-label-agent {
    color: #a78bfa;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .dock-v4 {
        bottom: 20px;
        width: 100%;
        max-width: 100%;
        padding: 0 8px;
    }

    .dock-container {
        border-radius: 24px;
        padding: 8px 8px;
        gap: 4px;
        justify-content: space-between;
        width: 100%;
        overflow: hidden;
    }

    .dock-item {
        min-width: 0;
        flex: 1 1 0;
        padding: 8px 6px;
        border-radius: 16px;
    }

    .dock-label {
        font-size: 0.6rem;
    }

    .dock-icon {
        width: 20px;
        height: 20px;
    }

    .dock-item-agent {
        margin: 0 6px;
    }

    .dock-agent-bubble {
        width: 56px;
        height: 56px;
        margin-top: -24px;
        border-width: 4px;
    }

    .dock-icon-agent {
        width: 26px;
        height: 26px;
    }
}
/* ==========================================
   PHASE 4: DOCK V4 & AI AGENT BUTTON
   ========================================== */

/* Hide old dock */
.dock-v2,
.dock-v3 {
    display: none !important;
}

/* New Dock V4 */
.dock-v4 {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) scale(calc(var(--dock-scale, 1) * var(--ui-scale, 1)));
    transform-origin: center bottom;
    z-index: 1000;
    width: auto;
    max-width: 95%;
    pointer-events: none;
}

.dock-container {
    background: rgba(var(--surface-rgb, 255, 255, 255), 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
    pointer-events: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] .dock-container {
    background: rgba(17, 24, 39, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 10px;
    min-width: 68px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: var(--text-soft);
    position: relative;
    overflow: hidden;
}

.dock-item:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    transform: translateY(-4px);
}

.dock-item.active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.dock-icon-wrapper {
    position: relative;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-item.active .dock-icon-wrapper {
    transform: scale(1.15) translateY(-2px);
}

.dock-item.active .dock-icon {
    stroke-width: 2.2;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.dock-label {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.dock-item.active .dock-label {
    opacity: 1;
    transform: translateY(-1px);
}

/* Agent Button - The Centerpiece */
.dock-item-agent {
    padding: 0;
    margin: 0 12px;
}

.dock-agent-bubble {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5, #3b82f6);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 12px 24px rgba(124, 58, 237, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 5px solid var(--surface);
    margin-top: -32px;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

html[data-theme="dark"] .dock-agent-bubble {
    border-color: #1f2937;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.5);
}

.dock-item-agent:hover .dock-agent-bubble {
    transform: scale(1.1) translateY(-8px) rotate(5deg);
    box-shadow: 0 16px 32px rgba(124, 58, 237, 0.4);
}

.dock-item-agent.active .dock-agent-bubble {
    background: linear-gradient(135deg, #6d28d9, #4338ca);
    transform: scale(1.05) translateY(-4px);
    border-radius: 20px;
}

.dock-icon-agent {
    width: 32px;
    height: 32px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.dock-label-agent {
    font-size: 0.7rem;
    font-weight: 800;
    color: #7c3aed;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html[data-theme="dark"] .dock-label-agent {
    color: #a78bfa;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .dock-v4 {
        bottom: 20px;
        width: 100%;
        max-width: 100%;
        padding: 0 8px;
    }

    .dock-container {
        border-radius: 24px;
        padding: 8px 8px;
        gap: 4px;
        justify-content: space-between;
        width: 100%;
        overflow: hidden;
    }

    .dock-item {
        min-width: 0;
        flex: 1 1 0;
        padding: 8px 6px;
        border-radius: 16px;
    }

    .dock-label {
        font-size: 0.6rem;
    }

    .dock-icon {
        width: 20px;
        height: 20px;
    }

    .dock-item-agent {
        margin: 0 6px;
    }

    .dock-agent-bubble {
        width: 56px;
        height: 56px;
        margin-top: -24px;
        border-width: 4px;
    }

    .dock-icon-agent {
        width: 26px;
        height: 26px;
    }
}

    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--danger);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 0;
}

.danger-btn:hover {
    color: #fff;
    border-color: var(--danger);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 24px rgba(220, 38, 38, 0.4),
        0 4px 12px rgba(220, 38, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.danger-btn:hover::before {
    width: 300px;
    height: 300px;
}

.danger-btn span,
.danger-btn {
    position: relative;
    z-index: 1;
}

.danger-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow:
        0 4px 12px rgba(220, 38, 38, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, var(--surface) 70%, rgba(255, 255, 255, 0));
    padding-bottom: 10px;
}

.search-bar input {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    font-size: 1rem;
    background: var(--surface-soft);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow:
        0 0 0 4px var(--primary-soft),
        0 4px 12px rgba(28, 139, 115, 0.15);
    transform: translateY(-1px);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 80px;
}

.note-controls-enhanced {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 20px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-soft);
    pointer-events: none;
}

.search-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background: var(--surface-soft);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 16px;
    border: 2px solid var(--border);
    background: var(--surface-soft);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
}

.filter-btn:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.color-filter-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-filter-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-filter-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.color-filter-btn.active {
    border-color: var(--text);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

@media (max-width: 480px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.tasks-header-enhanced {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.calendar-hint-enhanced {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    color: var(--primary-strong);
    font-size: 0.95rem;
}

.calendar-hint-enhanced svg {
    flex-shrink: 0;
}

.task-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.task-stat-item {
    padding: 8px 14px;
    background: var(--surface-soft);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    border: 1px solid var(--border);
}

.calendar-enhanced {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.calendar-enhanced .calendar-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.calendar-enhanced .calendar-header strong {
    font-size: 1.1rem;
    color: var(--text);
}

.calendar-enhanced button {
    width: 100%;
    aspect-ratio: 1;
    min-width: 32px;
    max-width: 40px;
    height: auto;
    border: none;
    background: var(--surface-soft);
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 500;
}

@media (min-width: 480px) {
    .calendar-enhanced button {
        font-size: 1rem;
        max-width: 40px;
    }
}

.calendar-enhanced button:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.calendar-enhanced button.today {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb, 74, 144, 226), 0.3);
}

.calendar-enhanced button.selected {
    background: var(--accent, var(--primary));
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb, 74, 144, 226), 0.4);
}

.calendar-enhanced button.has-items {
    position: relative;
}

.calendar-enhanced button.has-items::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--warning, #f59e0b);
}

.calendar-enhanced button.today.has-items::after,
.calendar-enhanced button.selected.has-items::after {
    background: #fff;
}

.calendar-hint-enhanced {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface-soft);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.calendar-hint-enhanced svg {
    color: var(--primary);
    flex-shrink: 0;
}

.calendar-hint-enhanced p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.tasks-list-enhanced {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.customer-card,
.note-card,
.task-card {
    background: linear-gradient(145deg,
            color-mix(in srgb, var(--surface) 88%, transparent),
            color-mix(in srgb, var(--surface-soft) 85%, transparent));
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.2s ease;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.customer-card:hover,
.note-card:hover,
.task-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: var(--primary);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.customer-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.customer-card__header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.customer-card__header p {
    margin: 4px 0 0;
    color: var(--text-soft);
}

.customer-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-pill {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
}

.customer-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.meta-grid span {
    font-size: 0.9rem;
    color: var(--text-soft);
}

.meta-grid p {
    margin: 4px 0 0;
    font-size: 1rem;
    font-weight: 600;
}

.customer-note {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.customer-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.customer-history {
    background: rgba(247, 249, 250, 0.7);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px dashed var(--border);
}

.customer-history h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.history-list {
    margin: 0;
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-soft);
}

.customers-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 18px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}

.customers-view,
.debts-view {
    animation: fadeIn 0.3s ease;
}

.debts-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.ai-calendar-card {
    margin: 12px 0 18px;
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.ai-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ai-calendar-header h2 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

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

.ai-calendar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-calendar-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.ai-calendar-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-calendar-date {
    font-weight: 700;
    font-size: 0.95rem;
}

.ai-calendar-customer {
    color: var(--text-soft);
    font-size: 0.85rem;
}

.ai-calendar-right {
    text-align: right;
}

.ai-calendar-amount {
    font-weight: 700;
}

.ai-calendar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ai-calendar-badge.overdue {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
}

.ai-calendar-badge.dueSoon {
    background: rgba(245, 158, 11, 0.18);
    color: var(--accent);
}

.ai-calendar-badge.onTrack {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.ai-calendar-empty {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.tasks-calendar-card {
    margin: 16px 0 24px;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    background: linear-gradient(135deg, var(--surface), var(--surface-soft));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.tasks-calendar-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.calendar-header-section {
    margin-bottom: 20px;
    text-align: center;
}

.calendar-header-section h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calendar-header-section .settings-muted {
    font-size: 0.9rem;
    color: var(--text-soft);
}

.tasks-calendar-card .calendar-enhanced {
    margin-bottom: 0;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
}

/* Dock preset buttons removed - using custom slider only */

/* Dock Custom Control - Enhanced Slider */
.dock-size-control {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.dock-size-control input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-soft), var(--primary));
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.dock-size-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.3);
    transition: all 0.15s ease;
}

.dock-size-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.4);
}

.dock-size-control input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    cursor: pointer;
    border: none;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.3);
}

.dock-size-value {
    font-weight: 700;
    color: var(--primary-strong);
    min-width: 52px;
    text-align: right;
    font-size: 1.1rem;
    background: var(--primary-soft);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.dock-size-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 4px;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.dock-size-preview {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-soft), rgba(28, 139, 115, 0.05));
    border-radius: var(--radius-md);
    border: 2px solid var(--primary);
    animation: fastPop 0.2s ease;
}

.dock-size-preview-label {
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--primary-strong);
    font-size: 0.95rem;
}

.dock-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border);
    min-height: 80px;
}

.dock-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--surface), var(--surface-soft));
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform-origin: center;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.dock-preview-item svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.dock-preview-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.coupon-hint {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.subscription-plan.is-active {
    animation: subscription-pop 0.5s ease;
    border-color: var(--primary);
    box-shadow: 0 18px 40px rgba(34, 197, 94, 0.2);
}

.subscription-status.flash {
    animation: subscription-flash 0.6s ease;
}

@keyframes subscription-pop {
    0% {
        transform: scale(0.98);
    }

    60% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes subscription-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: none;
    }
}

.debt-stat-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: var(--shadow);
}

.debt-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 1.1rem;
}

.debt-stat-value {
    font-weight: 700;
    font-size: 1.05rem;
}

.debt-stat-label {
    font-size: 0.85rem;
    color: var(--text-soft);
}

.debt-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.debt-card {
    gap: 14px;
}

.debt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.debt-customer {
    display: flex;
    gap: 12px;
    align-items: center;
}

.debt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}

.debt-customer-name {
    margin: 0;
    font-size: 1.1rem;
}

.debt-customer-phone {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.debt-status {
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
}

.debt-status--overdue {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
}

.debt-status--dueSoon {
    background: rgba(245, 158, 11, 0.18);
    color: var(--accent);
}

.debt-status--settled {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.debt-status--onTrack {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.debt-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.debt-pay-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--debt-reminder-bg, rgba(2, 132, 199, 0.08));
    border-radius: var(--radius-md);
    border-left: 3px solid var(--debt-reminder, #0284c7);
}

.debt-pay-date-row span {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.debt-pay-date-row strong {
    font-size: 1.1rem;
    color: var(--text);
}

.debt-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.debt-amount span {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.debt-amount strong {
    font-size: 1.2rem;
}

.debt-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.debt-meta-item span {
    display: block;
    color: var(--text-soft);
    font-size: 0.85rem;
}

.debt-meta-item strong {
    font-size: 1rem;
}

.debt-note {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.debt-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Enhanced Note Cards */
.enhanced-note-card {
    position: relative;
    overflow: visible;
}

.note-card-inner {
    position: relative;
    height: 100%;
}

.note-card-header {
    margin-bottom: 12px;
}

.note-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.note-color-indicator {
    width: 6px;
    min-height: 60px;
    border-radius: 999px;
    flex-shrink: 0;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: 20px 0;
}

.note-card[data-color="yellow"] .note-color-indicator,
.note-color.yellow {
    background: linear-gradient(180deg, #f8e99f, #f5d97b);
}

.note-card[data-color="green"] .note-color-indicator,
.note-color.green {
    background: linear-gradient(180deg, #c7f0c2, #a8e6a0);
}

.note-card[data-color="blue"] .note-color-indicator,
.note-color.blue {
    background: linear-gradient(180deg, #c7defa, #a3c9f5);
}

.note-card[data-color="pink"] .note-color-indicator,
.note-color.pink {
    background: linear-gradient(180deg, #f9c2d6, #f5a7c0);
}

.note-card[data-color="gray"] .note-color-indicator,
.note-color.gray {
    background: linear-gradient(180deg, #e0e6eb, #cbd5dc);
}

.note-header-content {
    flex: 1;
    padding-left: 16px;
}

.note-pin-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: var(--text-soft);
    opacity: 0.5;
}

.note-pin-btn:hover {
    background: var(--primary-soft);
    color: var(--primary-strong);
    opacity: 1;
}

.note-card.pinned .note-pin-btn {
    color: var(--primary-strong);
    opacity: 1;
    background: var(--primary-soft);
}

.note-card.pinned .note-pin-btn svg {
    animation: pinBounce 0.5s ease;
}

@keyframes pinBounce {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg);
    }

    75% {
        transform: rotate(15deg);
    }
}

.note-title,
.task-name {
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.note-date,
.task-type {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 500;
}

.note-body-container {
    padding-left: 16px;
    margin: 12px 0;
}

.note-body,
.task-note {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
}

.note-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.note-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.note-tag {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.note-actions {
    display: flex;
    gap: 6px;
}

.icon-action-btn {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-action-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
    transform: translateY(-2px);
}

/* Enhanced Delete Button Styling */
.icon-action-btn.delete-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.05));
    border: 1.5px solid rgba(239, 68, 68, 0.2);
    color: #b91c1c;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-action-btn.delete-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    border-radius: 50%;
    z-index: 0;
}

.icon-action-btn.delete-btn:hover::before {
    width: 150%;
    height: 150%;
}

.icon-action-btn.delete-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
    border-color: #ef4444;
    color: #dc2626;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25), 0 2px 8px rgba(239, 68, 68, 0.15);
}

.icon-action-btn.delete-btn:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.icon-action-btn.delete-btn svg {
    position: relative;
    z-index: 1;
    transition: transform 0.15s ease;
}

.icon-action-btn.delete-btn:hover svg {
    transform: scale(1.1);
}

/* Delete button pulse animation on focus */
@keyframes deletePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.icon-action-btn.delete-btn:focus {
    animation: deletePulse 0.6s ease-out;
    outline: none;
}

.icon-action-btn:active {
    transform: translateY(0) scale(0.95);
}

.note-card header,
.task-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.task-type {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.inline-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text);
    padding: 12px 16px;
    background: var(--surface-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.inline-checkbox:hover {
    background: var(--surface);
    border-color: var(--primary);
}

.inline-checkbox input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.inline-checkbox span {
    flex: 1;
    min-width: 0;
}

.task-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    color: var(--text-soft);
}

.task-status input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.task-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card.debt-reminder {
    border-left: 6px solid var(--accent);
    background: rgba(242, 160, 61, 0.16);
}

.task-card.debt-reminder .task-type {
    color: var(--accent);
}

.task-card.debt-reminder footer button[data-action="delete"] {
    display: none;
}

.task-due span {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.task-due time {
    display: block;
    font-weight: 600;
    margin-top: 4px;
}

.task-header-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.task-priority {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-priority.priority-low {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.task-priority.priority-medium {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.task-priority.priority-high {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.task-priority.priority-urgent {
    background: rgba(220, 38, 127, 0.15);
    color: #dc267f;
    animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.task-card.priority-urgent {
    border-left: 4px solid #dc267f;
    box-shadow: 0 4px 12px rgba(220, 38, 127, 0.2);
}

.task-card.priority-high {
    border-left: 4px solid #ef4444;
}

.task-card.priority-medium {
    border-left: 4px solid #eab308;
}

.task-card.priority-low {
    border-left: 4px solid #22c55e;
}

.task-recurring-badge {
    font-size: 0.9rem;
    margin-left: auto;
    opacity: 0.7;
}

.task-card footer {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.calendar-hint {
    background: var(--primary-soft);
    color: var(--primary-strong);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 6px 0 22px;
}

.calendar button {
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 0;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text-soft);
}

.calendar button.today {
    border: 1px solid var(--primary);
}

.calendar button.has-items {
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-weight: 600;
}

.calendar button.selected {
    background: var(--primary);
    color: #fff;
}

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

.demand-actions a {
    text-decoration: none;
    text-align: center;
}

.demand-preview {
    margin-top: 12px;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    text-align: center;
}

.demand-preview img {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.settings-card {
    background: linear-gradient(145deg,
            color-mix(in srgb, var(--surface) 98%, transparent),
            color-mix(in srgb, var(--surface-soft) 95%, transparent));
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    margin-bottom: 28px;
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 2px solid var(--border);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.settings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.settings-card:hover {
    box-shadow:
        0 16px 48px rgba(28, 139, 115, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform: translateY(-6px) scale(1.02);
    border-color: var(--primary);
}

.settings-card:hover::before {
    opacity: 1;
}

.settings-card h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text), var(--primary-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-card h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary), var(--primary-strong));
    border-radius: 999px;
}

.settings-muted {
    margin: 0 0 16px;
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.5;
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, var(--surface-soft), var(--surface));
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    overflow: hidden;
    box-shadow:
        0 4px 12px rgba(28, 139, 115, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    border: 3px solid var(--surface);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-meta strong {
    font-size: 1.1rem;
    color: var(--text);
}

.profile-meta small {
    color: var(--text-soft);
    font-size: 0.9rem;
}

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

.theme-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--border);
    background: linear-gradient(145deg, var(--surface), var(--surface-soft));
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--primary-soft), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-tile:hover {
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.theme-tile:hover::before {
    opacity: 1;
}

.theme-tile[aria-checked="true"] {
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px var(--primary-soft),
        0 8px 24px rgba(28, 139, 115, 0.25);
    background: linear-gradient(145deg, var(--primary-soft), rgba(28, 139, 115, 0.08));
    transform: scale(1.05);
}

.theme-tile[aria-checked="true"]::before {
    opacity: 1;
}

.theme-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.theme-mint {
    background: #1c8b73;
}

.theme-midnight {
    background: #4cc9a5;
}

.theme-sunset {
    background: #d95b39;
}

.theme-rose {
    background: #d43a74;
}

.theme-slate {
    background: #3a6ea5;
}

.theme-ocean {
    background: #0b7ea8;
}

.theme-forest {
    background: #4caf50;
}

.theme-neon {
    background: #7c4dff;
}

.theme-graphite {
    background: #8ca3af;
}

.ai-box {
    border: 2px solid var(--border);
    background: linear-gradient(145deg,
            color-mix(in srgb, var(--surface) 75%, transparent),
            color-mix(in srgb, var(--surface-soft) 70%, transparent));
    border-radius: var(--radius-lg);
    padding: 16px;
    min-height: 100px;
    color: var(--text);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    line-height: 1.6;
}

.ai-box p {
    margin: 0;
}

.modal {
    border: none;
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 420px;
    width: calc(100vw - 40px);
    box-shadow: var(--shadow);
    transform: scale(var(--ui-scale, 1));
    transform-origin: center top;
}

.modal::backdrop {
    background: rgba(15, 34, 40, 0.45);
}

.modal-form {
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-form h2 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-form label {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.95rem;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
    font-family: inherit;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background: var(--surface-soft);
    padding: 14px 16px;
    font-size: 1rem;
    transition: all 0.2s ease;
    color: var(--text);
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.modal-form textarea {
    resize: vertical;
}

.modal-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.data-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-soft);
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.data-empty .empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.app-footer {
    padding: 18px;
    text-align: center;
    background: var(--surface);
    border-top: 1px solid rgba(216, 224, 229, 0.7);
    font-size: 0.95rem;
    color: var(--text-soft);
}

.app-footer p {
    margin: 0;
}

@media (min-width: 560px) {
    body {
        background: linear-gradient(135deg, rgba(16, 101, 82, 0.15), rgba(242, 160, 61, 0.12));
    }

    .app {
        margin: 20px 0;
        border-radius: 28px;
        box-shadow: 0 24px 60px rgba(15, 60, 50, 0.16);
        overflow: hidden;
    }

    .panel {
        padding-bottom: 110px;
    }
}

html[lang="bn"] body {
    font-family: var(--font-bn);
}

html[lang="bn"] .nav-btn,
html[lang="bn"] .primary-btn,
html[lang="bn"] .secondary-btn,
html[lang="bn"] .language-toggle,
html[lang="bn"] .notification-toggle {
    font-family: var(--font-bn);
}

@keyframes pulse-reminder {
    0% {
        box-shadow: 0 0 0 0 rgba(242, 160, 61, 0.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(242, 160, 61, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(242, 160, 61, 0);
    }
}

.reminder-active {
    animation: pulse-reminder 2s infinite;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-warning {
    background: rgba(242, 160, 61, 0.18);
    color: var(--accent);
}

.badge-danger {
    background: rgba(204, 59, 59, 0.16);
    color: var(--danger);
}

.badge-success {
    background: rgba(28, 139, 115, 0.18);
    color: var(--success);
}

/* Import/Export Data */
.data-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.import-label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.import-label input[type="file"] {
    display: none;
}

.data-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 20px;
    transition: all 0.3s ease;
}

.data-status:empty {
    padding: 0;
    margin: 0;
}

.data-status--success {
    background: rgba(28, 139, 115, 0.15);
    color: var(--success);
}

.data-status--error {
    background: rgba(204, 59, 59, 0.15);
    color: var(--danger);
}

/* AI Chat Interface - Ultra Only Message */
.subscription-required-message {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(168, 85, 247, 0.08));
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 16px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    animation: fastPop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.subscription-required-message .ultra-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    animation: fastPulse 2s ease-in-out infinite;
}

.subscription-required-message .ultra-icon {
    font-size: 1rem;
}

.subscription-required-message .subscription-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
}

.subscription-required-message .subscription-desc {
    margin: 0 0 20px;
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.6;
}

.subscription-required-message .ultra-price-tag {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.subscription-required-message .ultra-subscribe-btn {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border: none;
    color: white;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.subscription-required-message .ultra-subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.subscription-required-message .ultra-subscribe-btn:active {
    transform: translateY(0);
}

.subscription-required-message .coupon-hint-text {
    margin: 16px 0 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.subscription-required-message .coupon-hint-text strong {
    color: #8b5cf6;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.subscription-required-message p {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 1rem;
}

.ai-agent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255, 248, 235, 0.9), rgba(232, 245, 241, 0.9));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    margin-bottom: 16px;
}

.ai-agent-intro h3 {
    margin: 6px 0 6px;
    font-size: 1.1rem;
    color: var(--text);
}

.ai-agent-intro p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.ai-agent-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-strong);
    font-weight: 600;
    font-size: 0.8rem;
}

.ai-usage-card {
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    text-align: right;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
    .ai-agent-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ai-usage-card {
        width: 100%;
        text-align: left;
    }

    .ai-limit-message {
        flex-direction: column;
        align-items: flex-start;
    }

    .ai-limit-cta {
        width: 100%;
        text-align: center;
    }
}

.ai-usage-plan {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-usage-count {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 4px 0;
}

.ai-usage-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.ai-limit-message {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: rgba(255, 244, 232, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.ai-limit-message h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--text);
}

.ai-limit-message p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.ai-limit-icon {
    font-size: 1.4rem;
}

.ai-limit-cta {
    margin-left: auto;
}

.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: min(560px, 70vh);
    max-height: 700px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
}

.ai-message {
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

.ai-message-assistant {
    align-self: flex-start;
}

.ai-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.ai-message-user .ai-avatar {
    background: var(--accent);
}

/* AI Shortcuts */
.ai-shortcuts {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: var(--surface);
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.ai-shortcut-btn {
    padding: 10px 16px;
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-shortcut-btn:hover {
    background: var(--primary-soft);
    color: var(--primary-strong);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.2);
}

.ai-shortcut-btn:active {
    transform: translateY(0);
}

.ai-content {
    background: var(--surface);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    max-width: 80%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.ai-content p {
    margin: 0;
    line-height: 1.6;
}

.ai-message-user .ai-content {
    background: var(--primary);
    color: #fff;
}

.ai-input-container {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.ai-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-soft);
    font-size: 1rem;
}

.ai-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-send-btn {
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-send-btn:disabled,
.ai-voice-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-send-btn:hover {
    background: var(--primary-strong);
    transform: translateY(-1px);
}

.ai-send-btn:active {
    transform: scale(0.95);
}

/* Bills Interface */
.bill-modal-enhanced {
    max-width: 540px;
}

.modal-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.modal-header-enhanced h2 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.modal-close-btn {
    font-size: 1.4rem;
    padding: 8px 12px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.modal-close-btn:hover {
    opacity: 1;
}

.enhanced-label {
    margin-bottom: 20px;
}

.products-section {
    background: var(--surface-soft);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 20px 0;
    border: 1px solid var(--border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
}

.add-product-btn-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: inherit;
}

.add-product-btn-inline:hover {
    background: var(--primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.3);
}

.add-product-btn-inline svg {
    width: 18px;
    height: 18px;
}

.bill-products-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bill-product-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.7fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.bill-product-row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bill-product-row input {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-soft);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.bill-product-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.bill-product-row input[name="productName[]"] {
    font-weight: 500;
}

.remove-product-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--danger);
    color: #fff;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-product-btn:hover {
    background: #b32929;
    transform: scale(1.1);
}

.remove-product-btn:active {
    transform: scale(0.95);
}

.bill-total-enhanced {
    background: linear-gradient(135deg, var(--primary-soft), rgba(28, 139, 115, 0.08));
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.15);
}

.total-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.total-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-strong);
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.bill-generate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
}

.bill-generate-btn svg {
    width: 20px;
    height: 20px;
}

.payment-methods-section {
    margin: 16px 0;
    padding: 12px;
    background: var(--surface-soft);
    border-radius: var(--radius-md);
}

.payment-methods-section h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}

/* Text Size Options */
.text-size-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.text-size-btn {
    padding: 14px 20px;
    border: 2px solid var(--border);
    background: linear-gradient(145deg, var(--surface), var(--surface-soft));
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 800;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.text-size-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--primary-soft), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.text-size-btn:hover::before {
    opacity: 1;
}

.text-size-btn[data-size="1"] {
    font-size: 0.85rem;
}

.text-size-btn[data-size="2"] {
    font-size: 1.05rem;
}

.text-size-btn[data-size="3"] {
    font-size: 1.25rem;
}

.text-size-btn[data-size="4"] {
    font-size: 1.45rem;
}

.text-size-btn[data-size="5"] {
    font-size: 1.7rem;
}

.text-size-btn.active {
    background: linear-gradient(145deg, var(--primary), var(--primary-strong));
    color: #fff;
    border-color: var(--primary-strong);
    box-shadow:
        0 6px 20px rgba(28, 139, 115, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.text-size-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: var(--primary);
}

/* Text Size Classes */
html[data-text-size="1"] body {
    font-size: 10px;
}

html[data-text-size="2"] body {
    font-size: 12px;
}

html[data-text-size="3"] body {
    font-size: 16px;
}

html[data-text-size="4"] body {
    font-size: 20px;
}

html[data-text-size="5"] body {
    font-size: 24px;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.customer-card,
.note-card,
.task-card {
    animation: scaleIn 0.3s ease-out;
}

/* Enhanced Hover Effects */
.dock-item {
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-item:hover {
    transform: translateY(-4px) scale(1.08);
}

.dock-item:active {
    transform: translateY(0) scale(0.95);
}

/* Trust Ratio Badge */
.customer-trust-ratio {
    font-weight: 700;
    color: var(--primary);
}

/* Monthly Wrap */
.monthly-wrap-card {
    background: var(--surface-soft);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.monthly-wrap-card h3 {
    margin: 0 0 12px;
    color: var(--primary);
}

.monthly-wrap-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.monthly-wrap-stat {
    text-align: center;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius-md);
}

.monthly-wrap-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.monthly-wrap-stat-label {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin-top: 4px;
}

/* Calculator Styles */
.calculator-container {
    background: linear-gradient(145deg, var(--surface-soft), var(--surface));
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
}

.calculator-container h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-display {
    background: linear-gradient(180deg, var(--bg), var(--surface));
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    margin: 16px 0 20px;
    text-align: right;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 2px solid var(--border);
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.05);
}

.calculator-expression {
    font-size: 1rem;
    color: var(--text-soft);
    min-height: 24px;
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.calculator-result {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary-strong);
    word-break: break-all;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 100%;
}

.calc-btn {
    padding: 20px;
    border: 2px solid var(--border);
    background: linear-gradient(145deg, var(--surface), var(--surface-soft));
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.calc-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(28, 139, 115, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.calc-btn:hover {
    background: linear-gradient(145deg, var(--surface-soft), var(--surface));
    transform: translateY(-3px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.calc-btn:hover::before {
    width: 120%;
    height: 120%;
}

.calc-btn:active {
    transform: translateY(0) scale(0.96);
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calc-btn-operator {
    background: linear-gradient(145deg, var(--primary-soft), rgba(28, 139, 115, 0.15));
    color: var(--primary-strong);
    border-color: var(--primary);
    font-weight: 800;
}

.calc-btn-operator:hover {
    background: linear-gradient(145deg, var(--primary), var(--primary-strong));
    color: #fff;
}

.calc-btn-clear {
    background: linear-gradient(145deg, rgba(204, 59, 59, 0.12), rgba(204, 59, 59, 0.08));
    color: var(--danger);
    border-color: rgba(204, 59, 59, 0.3);
    font-weight: 800;
}

.calc-btn-clear:hover {
    background: linear-gradient(145deg, var(--danger), #b83232);
    color: #fff;
}

.calc-btn-equals {
    background: linear-gradient(145deg, var(--primary), var(--primary-strong));
    color: #fff;
    grid-column: span 2;
    border-color: var(--primary-strong);
    font-size: 1.4rem;
    box-shadow:
        0 4px 12px rgba(28, 139, 115, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.calc-btn-equals:hover {
    box-shadow:
        0 6px 20px rgba(28, 139, 115, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.calc-btn-zero {
    grid-column: span 2;
}

/* Notes & Tasks Combined */
.notes-tasks-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    color: var(--text-soft);
    transition: all 0.2s ease;
    font-family: inherit;
}

.tab-btn.active {
    color: var(--primary-strong);
    background: var(--primary-soft);
}

.notes-section,
.tasks-section {
    animation: fadeIn 0.3s ease;
}

/* Subscription Styles */
.subscription-status {
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-soft), rgba(28, 139, 115, 0.08));
    border-radius: var(--radius-md);
    border: 1px solid var(--primary);
    box-shadow: 0 2px 8px rgba(28, 139, 115, 0.1);
}

.subscription-current {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.subscription-current strong {
    color: var(--primary-strong);
    font-size: 1.1em;
}

.subscription-expiry {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.subscription-intro {
    position: relative;
}

.read-more-btn {
    background: linear-gradient(135deg, var(--primary-soft) 0%, color-mix(in srgb, var(--primary-soft) 90%, transparent) 100%);
    color: var(--primary-strong);
    border: 1.5px solid var(--primary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 8px;
    display: inline-block;
    width: 100%;
    text-align: center;
}

@media (min-width: 480px) {
    .read-more-btn {
        width: auto;
        display: inline-block;
    }
}

.read-more-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.3);
}

.read-more-btn:active {
    transform: translateY(0);
}

.subscription-details {
    margin-top: 16px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(28, 139, 115, 0.05) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--primary);
    animation: fadeIn 0.3s ease;
}

.subscription-details p {
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.subscription-details p:last-child {
    margin-bottom: 0;
}

.subscription-details strong {
    color: var(--primary-strong);
    font-weight: 700;
}

.subscription-plans {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
}

.subscription-plan {
    background: linear-gradient(145deg, var(--surface), var(--surface-soft));
    border: 3px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.buy-coupon-btn {
    margin-top: 16px;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* New Settings UI Styles */
.settings-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 16px;
}

.info-item label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item label span {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.info-item input,
.info-item select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.info-item input:focus,
.info-item select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.photo-upload-area {
    margin-top: 8px;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    border: 2px dashed var(--border);
    background: var(--surface-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.photo-preview:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 0.9rem;
    color: var(--text-soft);
    text-align: center;
    padding: 8px;
}

/* Monthly Wrap Preview */
.monthly-wrap-preview {
    margin-top: 16px;
}

.monthly-wrap-preview-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.monthly-wrap-preview-stat {
    background: linear-gradient(135deg, var(--surface-soft), var(--surface));
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.monthly-wrap-preview-stat:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.15);
}

.preview-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.preview-stat-label {
    font-size: 0.85rem;
    color: var(--text-soft);
}

/* Enhanced Subscription Styles */
.subscription-card-enhanced {
    padding: 28px;
}

.subscription-status-enhanced {
    margin-bottom: 24px;
}

.subscription-status-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-soft), rgba(28, 139, 115, 0.08));
    border-radius: var(--radius-md);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.15);
}

.subscription-badge-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Subscription Chat */
.subscription-chat-container {
    background: var(--surface-soft);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    overflow: hidden;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    max-height: 400px;
}

.subscription-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
}

.subscription-chat-message {
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

.subscription-chat-assistant {
    align-self: flex-start;
}

.subscription-chat-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.subscription-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(28, 139, 115, 0.2);
}

.subscription-chat-user .subscription-chat-avatar {
    background: var(--accent);
}

.subscription-chat-content {
    background: var(--surface);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    max-width: 75%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.subscription-chat-content p {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
    font-size: 0.95rem;
}

.subscription-chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: var(--surface);
    border-top: 2px solid var(--border);
}

.subscription-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.subscription-chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.subscription-chat-send-btn {
    padding: 12px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.subscription-chat-send-btn:hover {
    background: var(--primary-strong);
    transform: scale(1.05);
}

.subscription-chat-send-btn:active {
    transform: scale(0.95);
}

/* Enhanced Subscription Plans */
.subscription-plans-enhanced {
    margin-top: 24px;
}

.subscription-plan-enhanced {
    position: relative;
}

.plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.plan-badge {
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-badge-best {
    background: linear-gradient(135deg, var(--accent), #e6891f);
}

.plan-badge-premium {
    background: linear-gradient(135deg, #6c5ce7, #5a4fcf);
}

.plan-activate-btn {
    width: 100%;
    margin-top: 16px;
}

.subscription-buy-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
    text-align: center;
}

.subscription-plan::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 200% 0;
    }

    50% {
        background-position: -200% 0;
    }
}

.subscription-plan:hover {
    border-color: var(--primary);
    box-shadow:
        0 12px 32px rgba(28, 139, 115, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(-4px) scale(1.02);
}

.subscription-plan:hover::before {
    opacity: 1;
}

.subscription-plan h3 {
    margin: 0 0 12px;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-price {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-strong), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 24px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.plan-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.plan-benefits li {
    padding: 10px 0 10px 32px;
    position: relative;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.plan-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    font-weight: 900;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(28, 139, 115, 0.3);
}

.coupon-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .coupon-input-wrapper {
        flex-direction: column;
    }

    .coupon-redeem-btn {
        width: 100%;
    }
}

.coupon-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--surface-soft);
    transition: all 0.2s ease;
    font-weight: 500;
}

.coupon-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.coupon-redeem-btn {
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
}

@media (min-width: 480px) {
    .coupon-redeem-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
}

.coupon-redeem-btn:hover {
    background: var(--primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.3);
}

.coupon-redeem-btn:active {
    transform: translateY(0);
}

.coupon-redeem-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Trial Popup Styles */
.trial-popup-header {
    text-align: center;
    margin-bottom: 20px;
}

.trial-popup-header h2 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--primary-strong);
}

.trial-popup-content {
    margin: 20px 0;
}

.trial-popup-message {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 20px;
    text-align: center;
}

.trial-benefits {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.trial-benefits li {
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.trial-benefits li:last-child {
    border-bottom: none;
}

/* Bills Page Customization */
.bills-page-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: var(--surface-soft);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.bills-page-settings h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: var(--text);
}

.bills-color-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.bills-color-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bills-color-control label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.bills-color-control input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.bills-text-zoom-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bills-text-zoom-control label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    min-width: 100px;
}

.bills-text-zoom-control input[type="range"] {
    flex: 1;
}

.bills-text-zoom-value {
    min-width: 50px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
}

/* Voice Input Buttons */
.ai-voice-btn,
.voice-input-btn {
    padding: 10px;
    background: var(--primary-soft);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-voice-btn:hover,
.voice-input-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.05);
}

.ai-voice-btn.recording,
.voice-input-btn.recording {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
    animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Apply bills page customization */
#panel-bills {
    background-color: var(--bills-page-bg, var(--background));
    color: var(--bills-page-text, var(--text));
}

#panel-bills * {
    font-size: calc(1rem * var(--bills-text-zoom, 1));
}

/* Shop Logos */
.logo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.logo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.logo-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.logo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-item-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Settings Credits */
.settings-credits {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.9rem;
    margin: 0;
    padding: 12px;
}

.settings-credits strong {
    color: var(--primary-strong);
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* AI Tools Tabs */
.ai-tools-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}

.ai-tab-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-soft);
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative;
}

.ai-tab-btn.active {
    color: var(--primary-strong);
    background: var(--primary-soft);
}

.ai-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

.ai-tab-btn:hover:not(.active) {
    background: var(--surface-soft);
}

.ai-tool-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.ai-tool-panel.active {
    display: block;
}

/* Card Generator */
.card-generator-container {
    position: relative;
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.06), transparent 40%), var(--surface);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-generator-container::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.card-generator-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.card-generator-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-generator-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card-generator-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.generator-pill {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 600;
}

.premium-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.premium-badge {
    display: none;
    /* Removed from UI */
}

@keyframes premiumPulse {

    0%,
    100% {
        box-shadow:
            0 4px 12px rgba(255, 215, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }

    50% {
        box-shadow:
            0 6px 20px rgba(255, 215, 0, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

.card-generator-container h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    color: var(--text);
}

.card-generator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 22px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.card-gen-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card-gen-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}

.card-gen-section {
    border-radius: 18px;
    padding: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.card-gen-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-soft);
    margin-bottom: 12px;
    font-weight: 700;
}

.card-gen-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.card-gen-grid .span-2 {
    grid-column: 1 / -1;
}

.card-gen-actions {
    display: flex;
    justify-content: flex-end;
}

.card-gen-form input,
.card-gen-form select,
.card-gen-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background: var(--surface);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    color: var(--text);
}

.card-gen-form input:focus,
.card-gen-form select:focus,
.card-gen-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Card Style Picker */
.card-style-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.card-style-picker input[type="radio"] {
    display: none;
}

.card-style-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 2px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-style-option .style-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.card-style-option .style-sub {
    font-size: 0.7rem;
    color: var(--text-soft);
}

.card-style-picker input[type="radio"]:checked+.card-style-option {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 8px 16px rgba(34, 197, 94, 0.18);
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.color-picker input[type="radio"] {
    display: none;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-picker input[type="radio"]:checked+.color-option {
    border-color: var(--text);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.color-option:hover {
    transform: scale(1.1);
}

/* Message presets */
.message-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.message-preset-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.message-preset-btn:hover {
    border-color: var(--primary);
    color: var(--primary-strong);
    box-shadow: 0 8px 16px rgba(34, 197, 94, 0.14);
}

/* Card Preview */
.card-preview {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(145deg,
            color-mix(in srgb, var(--surface) 92%, transparent),
            color-mix(in srgb, var(--surface-soft) 88%, transparent));
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.card-preview-pro {
    position: sticky;
    top: 18px;
    margin-top: 0;
    border-style: solid;
    border-color: rgba(34, 197, 94, 0.15);
}

.card-preview h3 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    color: var(--text-soft);
}

.generated-debt-card {
    --card-accent: #ff6b6b;
    --card-accent-strong: #ee5a6f;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    animation: card-pop 0.35s ease;
    border: 1px solid transparent;
}

@keyframes card-pop {
    0% {
        transform: scale(0.98);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.generated-debt-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.generated-debt-card[data-style="modern"]::before {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
}

.generated-debt-card[data-style="minimal"] {
    color: #0f172a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    border-color: var(--card-accent);
}

.generated-debt-card[data-style="minimal"]::before {
    background: radial-gradient(circle, rgba(15, 23, 42, 0.06) 0%, transparent 70%);
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    position: relative;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.generated-debt-card[data-style="minimal"] .card-badge {
    background: var(--card-accent);
    color: #fff;
}

.card-due-pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
}

.card-due-pill.due-soon {
    background: rgba(250, 204, 21, 0.35);
    color: #92400e;
}

.card-due-pill.due-today {
    background: rgba(59, 130, 246, 0.3);
    color: #1e3a8a;
}

.card-due-pill.overdue {
    background: rgba(248, 113, 113, 0.35);
    color: #7f1d1d;
}

.generated-debt-card[data-style="minimal"] .card-due-pill {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.generated-debt-card[data-style="minimal"] .card-due-pill.due-soon {
    background: rgba(250, 204, 21, 0.22);
    color: #92400e;
}

.generated-debt-card[data-style="minimal"] .card-due-pill.due-today {
    background: rgba(59, 130, 246, 0.2);
    color: #1e3a8a;
}

.generated-debt-card[data-style="minimal"] .card-due-pill.overdue {
    background: rgba(248, 113, 113, 0.24);
    color: #991b1b;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.card-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-shop-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.card-tagline {
    font-size: 0.8rem;
    opacity: 0.85;
    margin: 0;
}

.card-logo {
    font-size: 2rem;
}

.card-body {
    position: relative;
}

.card-customer-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.card-customer-name span {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.9;
    margin-right: 6px;
}

.generated-debt-card[data-style="minimal"] .card-customer-name span {
    color: #475569;
}

.card-debt-amount {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 8px 0 16px;
    color: #fff;
}

.generated-debt-card[data-style="minimal"] .card-debt-amount {
    color: var(--card-accent-strong);
}

.card-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    font-size: 0.9rem;
    opacity: 0.95;
}

.card-detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-detail-row span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.card-detail-row strong {
    font-size: 0.95rem;
    font-weight: 700;
}

.generated-debt-card[data-style="minimal"] .card-detail-row strong {
    color: #0f172a;
}

.generated-debt-card[data-style="minimal"] .card-detail-row span {
    color: #64748b;
    opacity: 1;
}

.card-message {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.9;
}

.generated-debt-card[data-style="minimal"] .card-message {
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    color: #475569;
}

.card-detail-row strong {
    word-break: break-word;
}

.card-footer {
    margin: 14px 0 0;
    font-size: 0.75rem;
    opacity: 0.8;
}

.card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .card-generator-grid {
        grid-template-columns: 1fr;
    }

    .card-preview-pro {
        position: static;
    }
}

@media (max-width: 600px) {
    .card-generator-header {
        flex-direction: column;
    }

    .card-generator-pills {
        width: 100%;
    }

    .card-gen-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .card-details {
        grid-template-columns: 1fr;
    }
}

/* Modern Settings UI Styles */
.settings-header-minimal {
    padding: 24px 20px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    background: linear-gradient(180deg, rgba(28, 139, 115, 0.08) 0%, rgba(28, 139, 115, 0) 100%);
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px;
    padding-bottom: 160px;
    max-width: 900px;
    margin: 0 auto;
}

.language-options {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.language-option-btn {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    background: var(--surface-soft);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
    font-size: 1rem;
}

.language-option-btn:hover {
    border-color: var(--primary);
    background: var(--surface);
    transform: translateY(-2px);
}

.language-option-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.25);
}

.settings-app-name {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.settings-app-name .title-en {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--primary-strong);
}

.settings-app-name .title-bn {
    font-family: var(--font-bn);
    font-size: 1.3rem;
    color: var(--text-soft);
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.settings-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.settings-card h2 {
    margin: 0;
}

/* Shop Profile Section */
.shop-profile-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 16px;
}

.shop-profile-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: linear-gradient(135deg, var(--surface-soft) 0%, var(--surface) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

@media (min-width: 480px) {
    .shop-profile-main {
        flex-direction: row;
        gap: 24px;
        padding: 20px;
    }
}

.shop-logo-upload {
    flex-shrink: 0;
}

.shop-logo-preview {
    position: relative;
    width: 80px;
    height: 80px;
}

@media (min-width: 480px) {
    .shop-logo-preview {
        width: 100px;
        height: 100px;
    }
}

.shop-logo-preview .profile-avatar {
    width: 80px;
    height: 80px;
}

@media (min-width: 480px) {
    .shop-logo-preview .profile-avatar {
        width: 100px;
        height: 100px;
    }
}

.upload-overlay-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(28, 139, 115, 0.3);
}

.upload-overlay-btn:hover {
    background: var(--primary-strong);
    transform: scale(1.1);
}

.shop-profile-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    width: 100%;
}

@media (min-width: 480px) {
    .shop-profile-details {
        width: auto;
    }
}

.shop-name-label,
.shop-owner-label,
.contact-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shop-name-label span,
.shop-owner-label span,
.contact-label span {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: block;
}

@media (min-width: 480px) {

    .shop-name-label span,
    .shop-owner-label span,
    .contact-label span {
        font-size: 0.95rem;
    }
}

.shop-name-label input,
.shop-owner-label input,
.contact-label input {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 480px) {

    .shop-name-label input,
    .shop-owner-label input,
    .contact-label input {
        padding: 14px 18px;
        font-size: 1rem;
    }
}

.shop-name-label input:hover,
.shop-owner-label input:hover,
.contact-label input:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.1);
}

.shop-name-label input:focus,
.shop-owner-label input:focus,
.contact-label input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px var(--primary-soft),
        0 4px 16px rgba(28, 139, 115, 0.15);
    transform: translateY(-1px);
}

.shop-contact-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, var(--surface-soft) 0%, var(--surface) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

@media (min-width: 480px) {
    .shop-contact-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 20px;
    }
}

.owner-photo-section {
    margin-top: 8px;
    padding: 20px;
    background: linear-gradient(135deg, var(--surface-soft) 0%, var(--surface) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.owner-photo-section label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.owner-photo-section label span {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

/* Payment Toggles */
.payment-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.payment-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--surface-soft);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-toggle-item:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.toggle-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-method-name {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

.payment-method-desc {
    font-size: 0.85rem;
    color: var(--text-soft);
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    border-radius: 28px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

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

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

/* Theme & Appearance */
.theme-appearance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 480px) {
    .theme-appearance-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.theme-appearance-tile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 2px solid var(--border);
    background: var(--surface-soft);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-appearance-tile:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.15);
}

.theme-appearance-tile[aria-checked="true"] {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
    background: var(--primary-soft);
}

.theme-preview {
    width: 100%;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.theme-preview-header {
    height: 20px;
    background: var(--primary);
}

.theme-preview-content {
    height: 60px;
    padding: 8px;
    display: flex;
    gap: 6px;
    background: var(--bg);
}

.theme-preview-card {
    flex: 1;
    background: var(--surface);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.theme-preview-light {
    --preview-bg: #f4f6f7;
    --preview-surface: #ffffff;
    --preview-primary: #1c8b73;
}

.theme-preview-light .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-light .theme-preview-content {
    background: var(--preview-bg);
}

.theme-preview-light .theme-preview-card {
    background: var(--preview-surface);
}

.theme-preview-dark {
    --preview-bg: #0b1220;
    --preview-surface: #0f1a2e;
    --preview-primary: #4cc9a5;
}

.theme-preview-dark .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-dark .theme-preview-content {
    background: var(--preview-bg);
}

.theme-preview-dark .theme-preview-card {
    background: var(--preview-surface);
}

.theme-preview-custom {
    --preview-bg: #fff4ee;
    --preview-surface: #ffffff;
    --preview-primary: #d95b39;
}

.theme-preview-custom .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-custom .theme-preview-content {
    background: var(--preview-bg);
}

.theme-preview-cozy {
    --preview-bg: #fff1f6;
    --preview-surface: #ffffff;
    --preview-primary: #d43a74;
}

.theme-preview-cozy .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-cozy .theme-preview-content {
    background: var(--preview-bg);
}

.theme-preview-default {
    --preview-bg: #ffffff;
    --preview-surface: #ffffff;
    --preview-primary: #22c55e;
}

.theme-preview-default .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-default .theme-preview-content {
    background: var(--preview-bg);
}

.theme-preview-lavender {
    --preview-bg: #faf5ff;
    --preview-surface: #ffffff;
    --preview-primary: #9333ea;
}

.theme-preview-lavender .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-lavender .theme-preview-content {
    background: var(--preview-bg);
}

.theme-preview-amber {
    --preview-bg: #fffbeb;
    --preview-surface: #ffffff;
    --preview-primary: #f59e0b;
}

.theme-preview-amber .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-amber .theme-preview-content {
    background: var(--preview-bg);
}

.theme-preview-emerald {
    --preview-bg: #ecfdf5;
    --preview-surface: #ffffff;
    --preview-primary: #10b981;
}

.theme-preview-emerald .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-emerald .theme-preview-content {
    background: var(--preview-bg);
}

.theme-preview-sapphire {
    --preview-bg: #0f172a;
    --preview-surface: #1e293b;
    --preview-primary: #3b82f6;
}

.theme-preview-sapphire .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-sapphire .theme-preview-content {
    background: var(--preview-bg);
}

.theme-preview-coral {
    --preview-bg: #fff5f5;
    --preview-surface: #ffffff;
    --preview-primary: #f43f5e;
}

.theme-preview-coral .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-coral .theme-preview-content {
    background: var(--preview-bg);
}

.theme-preview-teal {
    --preview-bg: #f0fdfa;
    --preview-surface: #ffffff;
    --preview-primary: #14b8a6;
}

.theme-preview-teal .theme-preview-header {
    background: var(--preview-primary);
}

.theme-preview-teal .theme-preview-content {
    background: var(--preview-bg);
}

.theme-appearance-name {
    font-weight: 600;
    color: var(--text);
    text-align: center;
    font-size: 0.95rem;
}

.theme-advanced-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

/* Monthly Wrapped */
.monthly-wrap-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 16px;
}

@media (min-width: 480px) {
    .monthly-wrap-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.monthly-wrap-card-stat {
    background: linear-gradient(135deg, var(--surface-soft), var(--surface));
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    min-width: 0;
}

@media (min-width: 480px) {
    .monthly-wrap-card-stat {
        padding: 16px;
        gap: 12px;
    }
}

.monthly-wrap-card-stat:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 139, 115, 0.15);
}

.wrap-stat-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .wrap-stat-icon {
        font-size: 2rem;
    }
}

.wrap-stat-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.wrap-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-strong);
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 480px) {
    .wrap-stat-value {
        font-size: 1.4rem;
    }
}

.wrap-stat-label {
    font-size: 0.75rem;
    color: var(--text-soft);
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 480px) {
    .wrap-stat-label {
        font-size: 0.85rem;
    }
}

.monthly-wrap-view-btn {
    width: 100%;
    margin-top: 16px;
}

/* ==========================================
   SUBSCRIPTION SECTION - NEW MODERN DESIGN
   ========================================== */

.subscription-section-new {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Subscription Header */
.subscription-header-new {
    text-align: center;
    padding: 32px 20px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(34, 197, 94, 0.02));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.subscription-header-content {
    max-width: 600px;
    margin: 0 auto;
}

.subscription-header-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.subscription-title-new {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--text);
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subscription-subtitle-new {
    font-size: 1rem;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.6;
}

/* Subscription Status */
.subscription-status-new {
    background: linear-gradient(135deg, var(--surface), var(--surface-soft));
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 32px;
    border: 2px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.subscription-status-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.status-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.status-info {
    flex: 1;
    min-width: 0;
}

.status-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-soft);
    margin-bottom: 4px;
    font-weight: 500;
}

.status-plan-name {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-expiry {
    font-size: 0.875rem;
    color: var(--text-soft);
    padding: 8px 12px;
    background: var(--surface-soft);
    border-radius: var(--radius-md);
}

/* Subscription Plans Grid */
.subscription-plans-grid-new {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 0;
}

@media (min-width: 768px) {
    .subscription-plans-grid-new {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .subscription-plans-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Plan Cards */
.plan-card-new {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.plan-card-new.is-active {
    border-color: var(--primary);
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.18);
}

.plan-card-new.is-active::before {
    content: '✓ Active';
    position: absolute;
    top: 14px;
    right: 16px;
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

html[lang="bn"] .plan-card-new.is-active::before {
    content: '✓ সক্রিয়';
}

.plan-card-new:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.plan-card-inner {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Plan Icons */
.plan-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: all 0.3s ease;
}

.plan-icon-pro {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #f59e0b;
}

.plan-icon-max {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #3b82f6;
}

.plan-icon-ultra {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #8b5cf6;
}

.plan-card-new:hover .plan-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

/* Plan Header */
.plan-header-new {
    text-align: center;
    margin-bottom: 24px;
}

.plan-name-new {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 16px;
    color: var(--text);
}

.plan-price-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.plan-price-new {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.plan-currency {
    font-size: 1.5rem;
    font-weight: 600;
}

.plan-duration-new {
    font-size: 1rem;
    color: var(--text-soft);
    font-weight: 500;
}

.plan-savings-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-savings-ultra {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

/* Plan Features */
.plan-features-new {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex: 1;
}

.plan-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.plan-feature-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.feature-icon {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 2px;
}

.plan-feature-exclusive {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
    padding: 12px;
    border-radius: var(--radius-md);
    margin: 4px -12px;
}

.plan-feature-exclusive .feature-icon {
    color: #8b5cf6;
}

/* Plan Badges */
.plan-featured-badge,
.plan-premium-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.plan-premium-badge {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Featured Plan */
.plan-card-featured {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--surface), rgba(34, 197, 94, 0.03));
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.15);
    transform: scale(1.02);
}

@media (max-width: 767px) {
    .plan-card-featured {
        transform: scale(1);
    }
}

.plan-card-featured:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 48px rgba(34, 197, 94, 0.2);
}

/* Ultra Plan */
.plan-card-ultra {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, var(--surface), rgba(139, 92, 246, 0.03));
}

.plan-card-ultra:hover {
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

/* CTA Buttons */
.plan-cta-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.plan-cta-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.plan-cta-btn:hover::before {
    width: 300px;
    height: 300px;
}

.plan-cta-pro {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.plan-cta-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
}

.plan-cta-max {
    background: linear-gradient(135deg, var(--primary), #16a34a);
    color: white;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.plan-cta-max:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
}

.plan-cta-ultra {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.plan-cta-ultra:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.plan-cta-btn:active {
    transform: translateY(0);
}

/* Active Plan State */
.plan-card-new.is-active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), var(--surface-soft));
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.25);
}

.plan-card-new.is-active::before {
    content: '✓ Active';
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.plan-card-new.is-active .plan-cta-btn {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    cursor: default;
    opacity: 0.8;
}

.plan-card-new.is-active .plan-cta-btn:hover {
    transform: none;
}

/* Old subscription section styles for backward compatibility */
.subscription-section {
    background: linear-gradient(135deg, var(--surface), var(--surface-soft));
}

.subscription-status {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, var(--surface-soft), var(--surface));
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.current-plan-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.current-plan-badge strong {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.plan-expiry {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-soft);
}

/* Subscription Plans Grid */
.subscription-plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 24px 0;
}

@media (min-width: 768px) {
    .subscription-plans-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .subscription-plans-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Individual Plan Card */
.subscription-plan {
    background: linear-gradient(145deg, var(--surface), var(--surface-soft));
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
}

.subscription-plan:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.subscription-plan.is-active {
    border-color: var(--primary);
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.08), var(--surface-soft));
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.2);
}

.subscription-plan.is-active::after {
    content: '✓ Active';
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.subscription-plan.is-active .plan-subscribe-btn {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    cursor: default !important;
}

/* Featured Plan (Max) */
.subscription-plan-featured {
    border-color: var(--primary);
    background: linear-gradient(145deg, var(--surface), rgba(34, 197, 94, 0.05));
}

/* Ultra Plan */
.subscription-plan-ultra {
    border-color: #8b5cf6;
    background: linear-gradient(145deg, var(--surface), rgba(139, 92, 246, 0.05));
}

/* Plan Badge */
.plan-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge-ultra {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

/* Plan Header */
.plan-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.plan-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--text);
}

.plan-header-pro h3 {
    color: var(--primary-strong);
}

.plan-header-max h3 {
    color: var(--primary);
}

.plan-header-ultra h3 {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.plan-duration {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--text-soft);
    font-weight: 500;
}

/* Plan Benefits List */
.plan-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.plan-benefits li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text);
    border-bottom: 1px dashed var(--border);
}

.plan-benefits li:last-child {
    border-bottom: none;
}

.benefit-highlight {
    font-weight: 700;
    color: #8b5cf6 !important;
}

/* Plan Coupon Input */
.plan-coupon {
    margin-bottom: 12px;
}

.coupon-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.coupon-input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-soft);
}

.coupon-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Subscribe Button */
.plan-subscribe-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.plan-subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.plan-subscribe-btn:active {
    transform: translateY(0);
}

.plan-subscribe-btn-featured {
    background: linear-gradient(135deg, var(--primary), #16a34a);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.plan-subscribe-btn-ultra {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.plan-subscribe-btn-ultra:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Coupon Ready State */
.plan-subscribe-btn.coupon-ready {
    animation: pulse-glow 2s infinite;
}

/* Subscription Hint */
.subscription-hint {
    text-align: center;
    padding: 16px;
    background: var(--surface-soft);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-soft);
    margin: 0;
}

/* Plan Coupon Hint */
.plan-coupon-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-soft);
    margin: 12px 0 0;
    padding: 0;
}

.plan-coupon-hint code {
    background: var(--surface-soft);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-strong);
    letter-spacing: 0.5px;
}

/* Coupon Feedback Updates */
.coupon-feedback {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 20px;
    transition: all 0.3s ease;
    text-align: center;
}

.coupon-section {
    margin: 16px 0;
}

.coupon-feedback {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    min-height: 20px;
    transition: all 0.3s ease;
}

.coupon-feedback:empty {
    display: none;
}

.coupon-feedback.success {
    background: rgba(28, 139, 115, 0.15);
    color: var(--success);
}

.coupon-feedback.error {
    background: rgba(204, 59, 59, 0.15);
    color: var(--danger);
}

.plan-subscribe-btn {
    width: 100%;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.plan-subscribe-btn.coupon-ready {
    background: linear-gradient(135deg, var(--success), var(--primary));
    box-shadow: 0 8px 24px rgba(28, 139, 115, 0.4);
    animation: pulse-glow 2s infinite;
}

.plan-subscribe-btn.coupon-ready:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px rgba(28, 139, 115, 0.5);
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 8px 24px rgba(28, 139, 115, 0.4);
    }

    50% {
        box-shadow: 0 8px 32px rgba(28, 139, 115, 0.6);
    }
}

.plan-activate-btn {
    width: 100%;
    margin-top: 8px;
}

.security-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.toggle-settings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* Footer Section Styles */
.app-footer-section {
    margin-top: 40px;
    padding-bottom: 40px;
}

.footer-info-card {
    background: linear-gradient(135deg, rgba(28, 139, 115, 0.08), rgba(28, 139, 115, 0.03));
    border: 2px solid var(--primary);
}

.footer-title {
    margin: 0 0 16px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-strong);
    text-align: center;
}

.footer-content {
    line-height: 1.8;
}

.footer-content a {
    transition: all 0.2s ease;
}

.footer-content a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.footer-credit {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}

.footer-credit strong {
    font-weight: 700;
}

/* Responsive improvements */
@media (max-width: 480px) {
    .dock-inner {
        padding: 10px 12px;
        gap: 4px;
    }

    .dock-item {
        padding: 6px 8px;
        min-width: 60px;
    }

    .dock-icon {
        width: 24px;
        height: 24px;
    }

    .dock-label {
        font-size: 0.65rem;
    }

    .calculator-buttons {
        gap: 8px;
    }

    .calc-btn {
        padding: 14px;
        font-size: 1.1rem;
    }

    .subscription-plans {
        grid-template-columns: 1fr;
    }

    .ai-tools-tabs {
        gap: 4px;
    }

    .ai-tab-btn {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .generated-debt-card {
        padding: 20px;
    }

    .card-debt-amount {
        font-size: 1.8rem;
    }

    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .theme-dot {
        width: 28px;
        height: 28px;
    }

    .text-size-options {
        gap: 8px;
    }

    .text-size-btn {
        min-width: 52px;
        height: 50px;
        padding: 12px 16px;
    }

    .settings-card {
        padding: 20px;
    }

    .settings-card h2 {
        font-size: 1.2rem;
    }

    .profile-row {
        padding: 14px;
    }

    .profile-avatar {
        width: 56px;
        height: 56px;
    }

    .bill-product-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bill-product-row input {
        width: 100%;
    }
}

/* Enhanced Billing System Styles */
.bill-filters {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.bill-filters .filter-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bill-filters .filter-btn:hover {
    background: var(--surface-soft);
    border-color: var(--primary);
}

.bill-filters .filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.bill-card {
    position: relative;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-paid {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.status-badge.status-pending {
    background: rgba(251, 191, 36, 0.15);
    color: #d97706;
}

.status-badge.status-partial {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.status-badge.status-overdue {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.bill-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.bill-meta span {
    padding: 4px 8px;
    background: var(--surface-soft);
    border-radius: var(--radius-sm);
}

.bill-notes {
    margin-top: 12px;
    padding: 12px;
    background: var(--surface-soft);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.bill-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.bill-calculations {
    background: var(--surface-soft);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 16px 0;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

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

.inline-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-label input {
    width: 80px;
    padding: 4px 8px;
}

.bill-product-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr 0.8fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    background: var(--surface-soft);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.bill-customize-form {
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.customize-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 24px 0;
}

.customize-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.customize-section {
    padding: 16px;
    background: var(--surface-soft);
    border-radius: var(--radius-md);
}

.customize-section h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text);
}

.theme-options {
    display: flex;
    gap: 8px;
}

.theme-option {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.theme-option:hover {
    border-color: var(--primary);
}

.theme-option.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.color-picker-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-picker-grid input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.bill-card-preview-container {
    position: sticky;
    top: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.bill-preview-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow);
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.customize-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 20px 0;
}

.customize-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 8px;
}

.customize-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customize-section h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.customize-preview {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.customize-preview h3 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.theme-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.theme-option {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.theme-option:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.theme-option.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.color-picker-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
}

.color-picker-grid input[type="color"] {
    width: 100%;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.section-order-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--surface-soft);
    border-radius: var(--radius-sm);
}

.preview-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

#customize-notes {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

#customize-font-size {
    width: 100%;
}

#spacing-value,
#font-size-value {
    display: inline-block;
    margin-left: 8px;
    font-weight: 600;
    color: var(--primary);
    min-width: 50px;
}

@media (max-width: 768px) {
    .customize-layout {
        grid-template-columns: 1fr;
    }

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

    .bill-product-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bill-product-row input {
        width: 100%;
        margin-bottom: 8px;
    }

    .bill-product-row .remove-product-btn {
        width: 100%;
        margin-top: 8px;
    }

    .bill-modal-enhanced {
        max-width: 95vw;
        max-height: 95vh;
        margin: 2.5vh auto;
    }

    .bill-modal-enhanced .modal-form {
        padding: 16px;
    }

    .bill-calculations {
        padding: 12px;
    }

    .calc-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .inline-label {
        width: 100%;
        justify-content: space-between;
    }

    .bill-total-enhanced {
        padding: 16px;
        margin: 16px 0;
    }

    .bill-filters {
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SWEET ANIMATIONS FOR UI ELEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Animated Buttons */
.animated-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animated-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.animated-btn:hover::before {
    width: 300%;
    height: 300%;
}

.animated-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(34, 197, 94, 0.3),
        0 4px 12px rgba(34, 197, 94, 0.2);
}

.animated-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-sparkle {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.btn-sparkle::before,
.btn-sparkle::after {
    content: '✨';
    position: absolute;
    font-size: 12px;
    animation: sparkle 2s infinite;
}

.btn-sparkle::after {
    animation-delay: 1s;
    left: 10px;
}

/* Animated Badges */
.animated-badge {
    animation: pulse-soft 2s infinite;
}

/* Subscribe buttons special styling */
.subscribe-facebook-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    border: none;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.subscribe-facebook-btn:hover {
    background: linear-gradient(135deg, var(--primary-strong) 0%, var(--primary) 100%);
    animation: glow-pulse 1.5s infinite;
}

/* Subscription Plan Cards Animation */
.subscription-plan-animated {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.subscription-plan-animated:hover {
    transform: translateY(-8px) scale(1.02);
}

.subscription-plan-premium {
    border: 2px solid transparent;
    background: linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(135deg, var(--primary), var(--accent)) border-box;
    animation: shimmer-sweet 3s infinite linear;
    background-size: 200% 100%;
}

/* Panel Transitions */
.panel {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.panel.active {
    opacity: 1;
    transform: translateY(0);
    animation: slide-up-bounce 0.5s ease forwards;
}

/* Customer Cards Animation */
.customer-card,
.note-card,
.task-card,
.bill-card {
    animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.customer-card:hover,
.note-card:hover,
.task-card:hover,
.bill-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Staggered card entrance */
.cards>*:nth-child(1) {
    animation-delay: 0s;
}

.cards>*:nth-child(2) {
    animation-delay: 0.05s;
}

.cards>*:nth-child(3) {
    animation-delay: 0.1s;
}

.cards>*:nth-child(4) {
    animation-delay: 0.15s;
}

.cards>*:nth-child(5) {
    animation-delay: 0.2s;
}

.cards>*:nth-child(6) {
    animation-delay: 0.25s;
}

.cards>*:nth-child(7) {
    animation-delay: 0.3s;
}

.cards>*:nth-child(8) {
    animation-delay: 0.35s;
}

.cards>*:nth-child(9) {
    animation-delay: 0.4s;
}

.cards>*:nth-child(10) {
    animation-delay: 0.45s;
}

/* Primary Button Animations */
.primary-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 25px rgba(34, 197, 94, 0.35),
        0 4px 12px rgba(34, 197, 94, 0.2);
}

.primary-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Secondary Button Animations */
.secondary-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Filter Button Animations */
.filter-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-btn:hover {
    transform: translateY(-2px) scale(1.05);
}

.filter-btn.active {
    animation: bounce-in 0.4s ease forwards;
}

/* Input Focus Animations */
.search-bar input,
.modal-form input,
.modal-form textarea,
.modal-form select {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-bar input:focus,
.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    transform: scale(1.01);
    box-shadow:
        0 0 0 4px var(--primary-soft),
        0 4px 12px rgba(34, 197, 94, 0.15);
}

/* Modal Animations */
.modal {
    animation: bounce-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal::backdrop {
    animation: fadeIn 0.3s ease;
}

/* Settings Card Animations */
.settings-card {
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Theme Tile Animations */
.theme-appearance-tile {
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-appearance-tile:hover {
    transform: translateY(-4px) scale(1.03);
}

.theme-appearance-tile[aria-checked="true"] {
    animation: bounce-in 0.4s ease forwards;
}

/* AI Tab Animations */
.ai-tab-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-tab-btn:hover {
    transform: translateY(-2px);
}

.ai-tab-btn.active {
    animation: pop-in 0.4s ease forwards;
}

/* AI Tool Panel Animations */
.ai-tool-panel {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ai-tool-panel.active {
    opacity: 1;
    transform: translateY(0);
    animation: slide-up-bounce 0.4s ease forwards;
}

/* Calculator Button Animations */
.calc-btn {
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.calc-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.calc-btn:active {
    transform: translateY(0) scale(0.95);
    animation: wiggle 0.2s ease;
}

/* Notes Tab Animations */
.tab-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-btn:hover {
    transform: scale(1.05);
}

.tab-btn.active {
    animation: pop-in 0.4s ease forwards;
}

/* Color Filter Button Animation */
.color-filter-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.color-filter-btn:hover {
    transform: scale(1.2) rotate(10deg);
}

.color-filter-btn.active {
    animation: heartbeat 1s ease infinite;
}

/* Note Pin Animation */
.note-pin-btn:hover {
    animation: wiggle 0.3s ease;
}

.note-card.pinned {
    animation: glow-pulse 2s infinite;
}

/* AI Message Animation */
.ai-message {
    animation: slide-up-bounce 0.4s ease forwards;
}

.ai-message-assistant .ai-content {
    animation: pop-in 0.3s ease forwards;
}

/* AI Shortcut Button Animation */
.ai-shortcut-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-shortcut-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.2);
}

/* Monthly Wrap Card Animation */
.monthly-wrap-card-stat {
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.monthly-wrap-card-stat:hover {
    transform: translateY(-4px) scale(1.02);
}

.monthly-wrap-card-stat .wrap-stat-icon {
    animation: float 3s ease-in-out infinite;
}

/* Payment Toggle Animation */
.payment-toggle-item {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.payment-toggle-item:hover {
    transform: translateX(4px);
}

/* Toggle Switch Animation */
.toggle-slider {
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-switch input:checked+.toggle-slider {
    animation: bounce-in 0.4s ease forwards;
}

/* Language Button Animation */
.language-option-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.language-option-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.language-option-btn.active {
    animation: pop-in 0.4s ease forwards;
}

/* App Header Animation */
.app-header {
    animation: slide-up-bounce 0.5s ease forwards;
}

.app-title {
    animation: pop-in 0.6s ease forwards;
    animation-delay: 0.2s;
}

/* Footer Fade In */
.app-footer {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.5s;
}

/* Auth Overlay Animations */
.auth-overlay {
    animation: fadeIn 0.4s ease;
}

.auth-card {
    animation: bounce-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-tab {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-tab:hover {
    transform: translateY(-2px);
}

.auth-tab.active {
    animation: pop-in 0.3s ease forwards;
}

/* Card Generator Preview Animation */
.card-preview {
    animation: pop-in 0.4s ease forwards;
}

.generated-debt-card {
    animation: bounce-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: all 0.35s ease;
}

.generated-debt-card:hover {
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Color Picker Animation */
.color-option {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.color-option:hover {
    transform: scale(1.2);
}

.color-picker input[type="radio"]:checked+.color-option {
    animation: heartbeat 1.5s ease infinite;
}

/* Empty State Animation */
.data-empty {
    animation: fadeIn 0.5s ease forwards;
}

.empty-state-icon {
    animation: float 3s ease-in-out infinite;
}

/* Smooth scrollbar */
.panel::-webkit-scrollbar {
    width: 6px;
}

.panel::-webkit-scrollbar-track {
    background: transparent;
}

.panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.panel::-webkit-scrollbar-thumb:hover {
    background: var(--primary-soft);
}

/* Responsive dock adjustments */
@media (max-width: 480px) {
    .dock-inner {
        padding: 6px 8px;
        gap: 2px;
        border-radius: 16px;
    }

    .dock-item {
        padding: 6px 10px;
        min-width: 44px;
        gap: 2px;
    }

    .dock-icon {
        width: 18px;
        height: 18px;
    }

    .dock-label {
        font-size: 0.55rem;
    }
}

/* Reduce animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading shimmer for cards */
.card-loading {
    background: linear-gradient(90deg,
            var(--surface-soft) 25%,
            var(--surface) 50%,
            var(--surface-soft) 75%);
    background-size: 200% 100%;
    animation: shimmer-sweet 1.5s infinite;
}

/* Success animation */
.success-animation {
    animation: bounce-in 0.5s ease, glow-pulse 1s ease 0.5s;
}

/* Error shake animation */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.error-shake {
    animation: shake 0.4s ease;
}

/* DebtX logo 'x' – plan-based colors: free=black, pro/max=red, ultra=purple */
.logo-x {
    font-weight: 700;
    transition: color 0.25s ease;
}

body[data-debtx-plan="free"] .logo-x {
    color: #1a1a1a;
}

body[data-debtx-plan="pro"] .logo-x,
body[data-debtx-plan="max"] .logo-x {
    color: #c62828;
}

body[data-debtx-plan="ultra"] .logo-x,
body[data-debtx-plan="online"] .logo-x {
    color: #6a1b9a;
}

/* fallback when no plan set */
body:not([data-debtx-plan]) .logo-x {
    color: #1a1a1a;
}

/* Modal header with close button */
.modal-header-with-close {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.modal-header-with-close h2 {
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ENHANCED BILLS UI - Business Billing Interface
   ═══════════════════════════════════════════════════════════════════════════ */

/* Bills Stats Container */
.bills-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.bill-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.bill-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

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

.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-soft);
    font-weight: 500;
}

/* Enhanced Bill Cards */
.bill-card-enhanced {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--surface);
}

.bill-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.bill-card-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(135deg, var(--surface-soft) 0%, var(--surface) 100%);
    border-bottom: 1px solid var(--border);
}

.bill-customer-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.bill-customer-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.bill-customer-details {
    flex: 1;
    min-width: 0;
}

.bill-customer-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
    word-wrap: break-word;
}

.bill-invoice-info {
    font-size: 0.875rem;
    color: var(--text-soft);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge-enhanced {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.status-badge-enhanced.status-paid {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.status-badge-enhanced.status-pending {
    background: rgba(251, 191, 36, 0.15);
    color: #d97706;
}

.status-badge-enhanced.status-partial {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.status-badge-enhanced.status-overdue {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.bill-card-body-enhanced {
    padding: 20px;
}

.bill-amount-section {
    margin-bottom: 20px;
}

.bill-amount-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.bill-amount-label {
    font-size: 0.875rem;
    color: var(--text-soft);
    font-weight: 500;
}

.bill-amount-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.bill-due-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-soft);
    padding: 8px 12px;
    background: var(--surface-soft);
    border-radius: var(--radius-sm);
}

.bill-due-info.overdue {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

.bill-due-info svg {
    flex-shrink: 0;
}

.bill-meta-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.bill-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--surface-soft);
    border-radius: var(--radius-sm);
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-soft);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.meta-value.discount {
    color: #16a34a;
}

.bill-notes-enhanced {
    margin-top: 16px;
    padding: 12px;
    background: var(--surface-soft);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.6;
    border-left: 3px solid var(--primary);
}

.bill-card-footer-enhanced {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px;
    background: var(--surface-soft);
    border-top: 1px solid var(--border);
}

.bill-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    flex: 1 1 auto;
    min-width: fit-content;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bill-action-btn.secondary:hover {
    background: var(--surface-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.bill-action-btn.primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.bill-action-btn.primary:hover {
    background: var(--primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.bill-action-btn svg {
    flex-shrink: 0;
}

.bill-action-btn span {
    white-space: nowrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.125rem;
    color: var(--text-soft);
    margin-bottom: 24px;
}

.empty-state .primary-btn {
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .bills-stats-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
        gap: 10px;
    }

    .bill-stat-card {
        padding: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .bill-card-header-enhanced {
        padding: 16px;
    }

    .bill-customer-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .bill-amount-value {
        font-size: 1.5rem;
    }

    .bill-card-footer-enhanced {
        flex-wrap: wrap;
        gap: 6px;
    }

    .bill-action-btn span {
        display: none;
    }

    .bill-action-btn {
        padding: 10px 12px;
        flex: 0 1 auto;
        min-width: 44px;
    }
}

@media (max-width: 480px) {
    .bills-stats-container {
        grid-template-columns: 1fr;
    }

    .bill-meta-enhanced {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODERN BILLS UI - Financial Report Style (Legacy - can be removed)
   ═══════════════════════════════════════════════════════════════════════════ */

.bills-modern-header {
    padding: 16px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .bills-modern-header {
    background: rgba(31, 41, 55, 0.9);
}

.bills-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bills-modern-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    flex: 1;
    text-align: center;
}

.back-btn,
.menu-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s ease;
}

.back-btn:hover,
.menu-btn:hover {
    background: var(--surface-soft);
}

/* Financial Summary Card */
.bills-summary-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px;
    padding: 32px 24px;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.bills-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.summary-donut-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 32px;
}

.summary-donut-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-ring {
    stroke: rgba(255, 255, 255, 0.1);
}

.donut-segment {
    transition: stroke-dasharray 0.6s ease;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.donut-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 8px;
    font-weight: 500;
}

.donut-amount {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.summary-legend {
    display: flex;
    justify-content: space-around;
    gap: 24px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legend-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.legend-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

/* Transaction History Section */
.bills-history-section {
    padding: 0 20px 100px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.history-filter-select {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.bills-transaction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.transaction-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.transaction-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: white;
    flex-shrink: 0;
}

.transaction-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.transaction-date {
    font-size: 0.875rem;
    color: var(--text-soft);
}

.transaction-amount {
    font-size: 1.125rem;
    font-weight: 700;
    flex-shrink: 0;
}

.amount-positive {
    color: #10B981;
}

.amount-negative {
    color: #FF6B35;
}

/* Floating Action Button */
.fab-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.fab-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(34, 197, 94, 0.5);
}

.fab-btn:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 480px) {
    .bills-summary-card {
        margin: 16px;
        padding: 24px 20px;
    }

    .summary-donut-container {
        width: 160px;
        height: 160px;
        margin-bottom: 24px;
    }

    .donut-amount {
        font-size: 1.5rem;
    }

    .summary-legend {
        flex-direction: column;
        gap: 16px;
    }

    .bills-history-section {
        padding: 0 16px 100px;
    }

    .fab-btn {
        bottom: 90px;
        right: 16px;
    }
}

.modal-close-x {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--surface-soft);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.modal-close-x:hover {
    background: var(--danger);
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

/* Ripple effect for buttons */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.ripple-effect:active::after {
    animation: ripple 0.6s ease-out;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONGRATULATIONS MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.congratulations-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.congratulations-modal.show {
    opacity: 1;
}

.congratulations-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(calc(0.9 * var(--ui-scale, 1))) translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
}

.congratulations-modal.show .congratulations-content {
    transform: scale(calc(1 * var(--ui-scale, 1))) translateY(0);
}

.congratulations-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.congratulations-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 16px 0;
}

.congratulations-message {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.congratulations-submessage {
    font-size: 0.9375rem;
    color: var(--text-soft);
    margin: 0 0 24px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW SETTINGS UI - Profile Header & Menu Cards
   ═══════════════════════════════════════════════════════════════════════════ */

.settings-profile-header {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
}

.settings-profile-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    opacity: 0.95;
}

.settings-profile-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 20px;
    height: 100%;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin-bottom: 16px;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.settings-profile-quote {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.98);
    margin: 0;
    text-align: center;
    max-width: 300px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}

.settings-menu-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.settings-menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
    cursor: pointer;
}

.settings-menu-item:last-child {
    border-bottom: none;
}

.settings-menu-item:hover {
    background: var(--surface-soft);
}

.settings-menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 16px;
    color: var(--text-soft);
    flex-shrink: 0;
}

.settings-menu-text {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
}

.settings-menu-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-soft);
    flex-shrink: 0;
}

.settings-detailed-content {
    margin-top: 20px;
    animation: fadeInUp 0.3s ease;
    padding-bottom: 40px;
}

.settings-detailed-content .settings-card {
    margin-bottom: 24px;
}

.settings-detailed-content .settings-card:last-child {
    margin-bottom: 0;
}

.settings-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.settings-back-btn:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-2px);
}

.settings-back-btn svg {
    flex-shrink: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TODO LIST UI - Category Cards & Detail View
   ═══════════════════════════════════════════════════════════════════════════ */

#todo-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

@media (max-width: 480px) {
    #todo-categories-grid {
        grid-template-columns: 1fr;
    }
}

.todo-categories-view {
    padding: 0;
}

.todo-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

@media (max-width: 480px) {
    .todo-categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
}

.todo-category-card {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.todo-category-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.todo-category-card.active {
    border-color: var(--primary);
    box-shadow: 0 4px 16px var(--primary-soft);
}

.todo-category-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.todo-category-count {
    font-size: 0.875rem;
    color: var(--text-soft);
    margin: 0;
}

.todo-category-tasks-preview {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--text-soft);
}

.todo-detail-view {
    padding: 0;
}

.todo-detail-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-btn {
    background: none;
    border: none;
    padding: 8px;
    margin-right: 12px;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.back-btn:hover {
    background: var(--surface-soft);
}

.todo-detail-title-section {
    flex: 1;
}

.todo-detail-title-section h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text);
}

.todo-category-count {
    font-size: 0.875rem;
    color: var(--text-soft);
    margin: 0;
}

.todo-tasks-list {
    padding: 20px;
}

.todo-task-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.todo-task-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.todo-task-checkbox {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.todo-task-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.todo-task-text {
    flex: 1;
    font-size: 1rem;
    color: var(--text);
}

.todo-task-item.completed .todo-task-text {
    text-decoration: line-through;
    color: var(--text-soft);
}

.floating-add-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5);
}

.floating-add-btn:active {
    transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .panel {
        padding: 0 16px 120px;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .panel-header h1 {
        font-size: 1.25rem;
    }

    .panel-subtitle {
        font-size: 0.875rem;
    }

    .primary-btn {
        font-size: 0.875rem;
        padding: 10px 16px;
    }

    .settings-profile-header {
        height: 240px;
    }

    .profile-avatar-large {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .settings-profile-name {
        font-size: 1.25rem;
    }

    .settings-profile-quote {
        font-size: 0.8125rem;
        max-width: 280px;
    }

    .settings-detailed-content {
        margin-top: 16px;
    }

    .settings-back-btn {
        padding: 10px 14px;
        font-size: 0.875rem;
        margin-bottom: 16px;
    }

    .settings-menu-card {
        margin-bottom: 12px;
    }

    .todo-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
        padding: 16px;
    }

    .todo-category-card {
        min-height: 120px;
        padding: 16px;
    }

    .floating-add-btn {
        bottom: 80px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .dock {
        bottom: 12px;
    }

    .dock-inner {
        padding: 10px 14px;
    }

    .dock-item {
        min-width: 56px;
        padding: 8px 12px;
    }

    .dock-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .panel {
        padding: 0 12px 110px;
    }

    .todo-categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .settings-menu-item {
        padding: 14px 16px;
    }

    .settings-menu-text {
        font-size: 0.9375rem;
    }
}

.congratulations-close-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.congratulations-close-btn:hover {
    background: var(--primary-strong);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.congratulations-close-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .congratulations-content {
        padding: 32px 24px;
    }

    .congratulations-icon {
        font-size: 3rem;
    }

    .congratulations-title {
        font-size: 1.5rem;
    }

    .congratulations-message {
        font-size: 1rem;
    }
}

.liquid-glass {
    background: linear-gradient(145deg,
            color-mix(in srgb, var(--surface) 88%, transparent),
            color-mix(in srgb, var(--surface-soft) 85%, transparent));
    backdrop-filter: blur(20px) saturate(170%);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.subscription-showcase {
    color: var(--text);
}

.subscription-showcase .subscription-wrap {
    display: grid;
    gap: 20px;
    padding: 12px 8px 8px;
}

.subscription-showcase .subscription-header {
    display: grid;
    gap: 10px;
}

.subscription-showcase .subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.subscription-showcase .subscription-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #fff, var(--primary) 45%, transparent 70%);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 20%, transparent);
}

.subscription-showcase .subscription-title {
    margin: 0;
    font-size: clamp(20px, 3.4vw, 32px);
}

.subscription-showcase .subscription-subtitle {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.subscription-showcase .subscription-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.subscription-showcase .subscription-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.subscription-showcase .subscription-card-inner {
    padding: 16px 16px 14px;
    display: grid;
    gap: 12px;
}

.subscription-showcase .subscription-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.subscription-showcase .subscription-plan h3 {
    margin: 0 0 6px;
    letter-spacing: 0.08em;
}

.subscription-showcase .subscription-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-soft);
    background: color-mix(in srgb, var(--surface-soft) 80%, transparent);
}

.subscription-showcase .subscription-price {
    text-align: right;
    min-width: 140px;
}

.subscription-showcase .subscription-price strong {
    display: block;
    font-size: 1.2rem;
}

.subscription-showcase .subscription-price span {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.subscription-showcase .subscription-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--border) 70%, transparent), transparent);
}

.subscription-showcase ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-soft);
    line-height: 1.7;
}

.subscription-showcase li strong {
    color: var(--text);
}

.subscription-showcase .subscription-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.subscription-showcase .subscription-btn {
    border: none;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.subscription-showcase .subscription-note {
    color: var(--text-soft);
    font-size: 0.85rem;
}

.subscription-showcase .subscription-featured {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.subscription-showcase .subscription-ribbon {
    position: absolute;
    top: 14px;
    right: -44px;
    width: 160px;
    transform: rotate(35deg);
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    padding: 6px 0;
    color: #1a1210;
    background: linear-gradient(90deg, #ffd29c, #f6b26b);
}

.subscription-showcase .subscription-bottom {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    background: color-mix(in srgb, var(--surface-soft) 85%, transparent);
}

.subscription-showcase .subscription-bottom p {
    margin: 0 0 8px;
    color: var(--text-soft);
}

.subscription-showcase .subscription-tiny {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.subscription-showcase .subscription-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    color: var(--text-soft);
    font-size: 0.85rem;
}

@media (min-width: 900px) {
    .subscription-showcase .subscription-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Subscription Status Box */
.subscription-status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, var(--surface)), var(--surface));
    border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border));
    border-radius: 14px;
    margin-bottom: 20px;
}

.status-icon-box {
    font-size: 1.5rem;
}

.status-info-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-label-box {
    font-size: 0.85rem;
    color: var(--text-soft);
}

.status-plan-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.status-expiry-box {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-soft);
    background: var(--surface-soft);
    padding: 6px 12px;
    border-radius: 8px;
}

/* Subscription Coupon Area */
.subscription-coupon-area {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.subscription-coupon-input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.subscription-coupon-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.subscription-coupon-input::placeholder {
    color: var(--text-soft);
    opacity: 0.7;
}

.subscription-coupon-input:disabled {
    background: var(--surface-soft);
    opacity: 0.6;
    cursor: not-allowed;
}

.subscription-coupon-msg {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    min-height: 20px;
}

.subscription-coupon-msg.success {
    background: color-mix(in srgb, #22c55e 15%, var(--surface));
    color: #22c55e;
    border: 1px solid color-mix(in srgb, #22c55e 30%, var(--border));
}

.subscription-coupon-msg.error {
    background: color-mix(in srgb, #ef4444 15%, var(--surface));
    color: #ef4444;
    border: 1px solid color-mix(in srgb, #ef4444 30%, var(--border));
}

/* Premium Tag */
.subscription-premium-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #1a1210;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 1;
}

/* Active Plan State */
.subscription-card.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent), 0 12px 30px rgba(15, 23, 42, 0.15);
}

.subscription-card.is-active::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.subscription-btn.active-plan {
    background: var(--primary) !important;
    color: white !important;
    opacity: 0.8;
    cursor: default !important;
}

/* Buy Coupon Section */
.subscription-buy-coupon {
    margin-top: 24px;
    background: linear-gradient(135deg,
            color-mix(in srgb, #1877f2 8%, var(--surface)),
            color-mix(in srgb, #1877f2 4%, var(--surface-soft)));
    border: 1px solid color-mix(in srgb, #1877f2 25%, var(--border));
    border-radius: 18px;
    padding: 20px;
}

.buy-coupon-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.buy-coupon-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.buy-coupon-text {
    flex: 1;
    min-width: 200px;
}

.buy-coupon-text h4 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.buy-coupon-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.buy-coupon-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1877f2, #0d65d9);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3);
}

.buy-coupon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(24, 119, 242, 0.4);
}

.buy-coupon-btn:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .buy-coupon-content {
        flex-direction: column;
        text-align: center;
    }

    .buy-coupon-btn {
        width: 100%;
        justify-content: center;
    }

    .subscription-coupon-area {
        flex-direction: column;
    }

    .subscription-coupon-input {
        width: 100%;
    }
}

/* ===== Premium Panel Styles ===== */
#panel-premium {
    background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
}

.premium-panel-content {
    padding: 0 16px 100px;
    max-width: 900px;
    margin: 0 auto;
}

.premium-header {
    position: relative;
    text-align: center;
    padding: 40px 20px 30px;
    margin: 0 -16px 24px;
    overflow: hidden;
}

.premium-header-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            color-mix(in srgb, #ffd700 15%, var(--surface)),
            color-mix(in srgb, #ff6b35 10%, var(--surface)),
            var(--surface));
    opacity: 0.8;
}

.premium-header-content {
    position: relative;
    z-index: 1;
}

.premium-icon-large {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.4));
    animation: premiumGlow 2s ease-in-out infinite;
}

@keyframes premiumGlow {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.premium-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premium-subtitle {
    font-size: 1rem;
    color: var(--text-soft);
    margin: 0;
}

/* Premium Status Card */
.premium-status-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.premium-status-icon {
    font-size: 1.8rem;
}

.premium-status-info {
    flex: 1;
}

.premium-status-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-bottom: 2px;
}

.premium-plan-name {
    font-size: 1.2rem;
    color: var(--primary);
}

.premium-expiry {
    font-size: 0.85rem;
    color: var(--text-soft);
    background: var(--surface-soft);
    padding: 6px 12px;
    border-radius: 8px;
}

/* Limit Notice */
.premium-limit-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: color-mix(in srgb, #f59e0b 12%, var(--surface));
    border: 1px solid color-mix(in srgb, #f59e0b 30%, var(--border));
    border-radius: 14px;
    margin-bottom: 24px;
}

.limit-notice-icon {
    font-size: 1.5rem;
}

.limit-notice-text {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

/* Premium Plans Grid */
.premium-plans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .premium-plans-grid {
        grid-template-columns: 1fr;
    }
}

.premium-plan-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.premium-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.premium-plan-featured {
    border-color: color-mix(in srgb, #ffd700 50%, var(--border));
    background: linear-gradient(135deg,
            color-mix(in srgb, #ffd700 8%, var(--surface)),
            var(--surface));
}

.premium-plan-ultra {
    border-color: color-mix(in srgb, #8b5cf6 50%, var(--border));
    background: linear-gradient(135deg,
            color-mix(in srgb, #8b5cf6 8%, var(--surface)),
            var(--surface));
}

.premium-plan-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    color: #1a1210;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.premium-plan-ultra .premium-plan-badge {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
}

.premium-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.premium-plan-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.premium-plan-price {
    text-align: right;
}

.premium-plan-price strong {
    font-size: 1.4rem;
    color: var(--primary);
}

.premium-plan-price span {
    font-size: 0.85rem;
    color: var(--text-soft);
}

.premium-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.premium-plan-features li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.premium-plan-features li:last-child {
    border-bottom: none;
}

/* Premium Coupon Box */
.premium-coupon-box {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.premium-coupon-input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.premium-coupon-input:focus {
    border-color: var(--primary);
}

.premium-coupon-input::placeholder {
    color: var(--text-soft);
}

.premium-activate-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 80%, #000));
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.premium-activate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.3);
}

.premium-activate-btn:active {
    transform: translateY(0);
}

.premium-activate-btn.active {
    background: var(--primary);
    opacity: 0.7;
    cursor: default;
}

.premium-coupon-feedback {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    min-height: 20px;
}

.premium-coupon-feedback.success {
    background: color-mix(in srgb, #22c55e 15%, var(--surface));
    color: #22c55e;
}

.premium-coupon-feedback.error {
    background: color-mix(in srgb, #ef4444 15%, var(--surface));
    color: #ef4444;
}

/* Premium Plan Active State */
.premium-plan-card.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent);
}

.premium-plan-card.is-active::after {
    content: '✓ Active';
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Premium Buy Coupon */
.premium-buy-coupon {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg,
            color-mix(in srgb, #1877f2 10%, var(--surface)),
            var(--surface));
    border: 1px solid color-mix(in srgb, #1877f2 30%, var(--border));
    border-radius: 18px;
    margin-bottom: 20px;
}

.premium-buy-icon {
    font-size: 2rem;
}

.premium-buy-text {
    flex: 1;
}

.premium-buy-text h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: var(--text);
}

.premium-buy-text p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.premium-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #1877f2, #0d65d9);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.premium-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.35);
}

/* Premium Hide Option */
.premium-hide-option {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.premium-hide-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.premium-hide-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.premium-hide-text {
    font-size: 0.95rem;
    color: var(--text);
}

/* Premium Dock Item Styling */
.dock-item-premium {
    position: relative;
}

.dock-item-premium .dock-icon-wrapper {
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dock-item-premium .dock-icon {
    stroke: url(#premiumGradient);
}

.dock-item-premium::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 107, 53, 0.3));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dock-item-premium:hover::before {
    opacity: 1;
}

/* Hide premium dock when user chooses */
.dock-item-premium.hidden-by-user {
    display: none !important;
}

.premium-corner-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1200;
    padding: 10px 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #1f172a;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.35);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.premium-corner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(249, 115, 22, 0.45);
}

.premium-corner-btn:active {
    transform: translateY(0);
}

.premium-corner-btn .title-bn {
    display: none;
}

html[lang="bn"] .premium-corner-btn .title-en {
    display: none;
}

html[lang="bn"] .premium-corner-btn .title-bn {
    display: inline;
}

@media (max-width: 640px) {
    .premium-corner-btn {
        top: 12px;
        right: 12px;
        padding: 9px 12px;
    }
}

@media (max-width: 600px) {
    .premium-buy-coupon {
        flex-direction: column;
        text-align: center;
    }

    .premium-buy-btn {
        width: 100%;
        justify-content: center;
    }

    .premium-coupon-box {
        flex-direction: column;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW MODERN SETTINGS UI - Clean & Beautiful Design
   ═══════════════════════════════════════════════════════════════════════════ */

.settings-new {
    padding: clamp(14px, 4vw, 24px);
    padding-bottom: 140px;
    max-width: 1040px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    background:
        radial-gradient(circle at 15% 20%, rgba(15, 118, 110, 0.08), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(99, 102, 241, 0.1), transparent 26%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 255, 0.9));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
    width: 100%;
    overflow-x: hidden;
    animation: fastFadeIn 0.45s ease both;
}

.settings-header-new {
    text-align: center;
    margin-bottom: 32px;
    padding: 26px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.95), rgba(15, 118, 110, 0.75));
    border-radius: var(--radius-xl);
    color: white;
    box-shadow: 0 16px 36px rgba(var(--primary-rgb), 0.28);
    animation: fastSlideIn 0.45s ease both;
}

.settings-header-new h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.settings-beta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.settings-subtitle {
    opacity: 0.9;
    font-size: 0.95rem;
}

.settings-grid-new {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Settings Section Card */
.settings-section-new {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    animation: fastSlideUp 0.3s ease both;
}

.settings-section-new:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.support-btn-new.policy {
    width: 100%;
}

.policy-content {
    max-height: 56vh;
    overflow: auto;
    padding-right: 4px;
}

.policy-content h3 {
    margin: 18px 0 8px;
    font-size: 1rem;
    color: var(--text);
}

.policy-content p {
    margin: 0 0 12px;
    color: var(--text-soft);
    line-height: 1.55;
}

.premium-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 520px) {
    .premium-metrics-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

.premium-limits-box {
    margin-top: 14px;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.premium-limits-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.premium-limits-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.premium-limits-list strong {
    color: var(--text);
}

.ai-insights-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.ai-insights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 720px) {
    .ai-insights-grid {
        grid-template-columns: 1fr;
    }
}

.ai-insight-box {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
}

.ai-insight-title {
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.ai-insight-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.ai-prediction-list,
.ai-weekly-list {
    display: grid;
    gap: 10px;
}

.ai-prediction-item,
.ai-weekly-item {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 12px;
}

.ai-prediction-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-prediction-name {
    font-weight: 800;
    color: var(--text);
}

.ai-prediction-meta {
    color: var(--text-soft);
    font-size: 0.92rem;
    margin-top: 6px;
    line-height: 1.35;
}

.ai-prediction-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.ai-mini-btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    padding: 8px 10px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ai-mini-btn.primary {
    border-color: rgba(var(--primary-rgb), 0.5);
    background: rgba(var(--primary-rgb), 0.12);
}

.ai-mini-btn:hover {
    border-color: var(--primary);
}

.ai-weekly-summary {
    color: var(--text);
    font-weight: 700;
    margin-bottom: 10px;
}

.ai-risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    white-space: nowrap;
}

.ai-risk-badge.high {
    border-color: rgba(220, 38, 38, 0.35);
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
}

.ai-risk-badge.medium {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.section-header-new {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-icon-new {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-title-new h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text);
}

.section-title-new p {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin: 0;
}

/* DebtX Plan section in Settings – plan-based colors */
.settings-plan-debtx .section-plan-header {
    border-bottom: none;
}

.settings-plan-debtx .section-title-new {
    flex: 1;
}

.debtx-brand {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
}

.settings-plan-badge {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    margin: 4px 0 8px !important;
    transition: color 0.25s ease;
}

.settings-plan-offline {
    font-size: 0.8rem !important;
    color: var(--text-soft) !important;
    opacity: 0.9;
}

.settings-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    padding: 0 16px 16px;
}

.settings-plan-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 255, 0.94));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 14px 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.settings-plan-card.featured {
    background: radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.25), transparent 60%),
        linear-gradient(180deg, #fffdf5, #fff7e1);
    border-color: rgba(245, 158, 11, 0.32);
}

.settings-plan-card.contrast {
    background: radial-gradient(circle at 15% 15%, rgba(124, 58, 237, 0.25), transparent 55%),
        linear-gradient(180deg, #120f1f, #0d0b15);
    color: #ede9fe;
    border-color: rgba(124, 58, 237, 0.35);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.settings-plan-card.contrast .plan-price span,
.settings-plan-card.contrast .plan-feature-list li {
    color: #c7d2fe;
}

.plan-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 700;
    font-size: 0.8rem;
    width: fit-content;
}

.plan-chip.accent {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
}

.plan-name {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
}

.plan-price {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 900;
}

.plan-price span {
    font-size: 0.9rem;
    color: var(--text-soft);
    font-weight: 600;
}

.plan-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.92rem;
}

.plan-feature-list li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.plan-feature-list .included::before,
.plan-feature-list .excluded::before {
    content: '•';
    width: 10px;
    display: inline-block;
}

.plan-feature-list .included::before {
    color: #10b981;
}

.plan-feature-list .excluded {
    color: var(--text-muted);
}

.plan-cta {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #0f766e, #0ea5e9);
    color: white;
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.2);
}

.settings-plan-card.contrast .plan-cta {
    background: linear-gradient(135deg, #ede9fe, #c4b5fd);
    color: #4c1d95;
}

.settings-plan-card.is-active {
    outline: 3px solid rgba(15, 118, 110, 0.22);
}

#settings-plan-section.plan-free .debtx-brand,
#settings-plan-section.plan-free .settings-plan-badge,
#settings-plan-section.plan-free .debtx-plan-icon {
    color: #1a1a1a;
}

#settings-plan-section.plan-free .debtx-plan-icon {
    background: rgba(26, 26, 26, 0.12) !important;
}

#settings-plan-section.plan-nano .debtx-brand,
#settings-plan-section.plan-nano .settings-plan-badge,
#settings-plan-section.plan-nano .debtx-plan-icon {
    color: #0f766e;
}

#settings-plan-section.plan-nano .debtx-plan-icon {
    background: rgba(15, 118, 110, 0.15) !important;
}

#settings-plan-section.plan-pro .debtx-brand,
#settings-plan-section.plan-pro .settings-plan-badge,
#settings-plan-section.plan-pro .debtx-plan-icon {
    color: #c62828;
}

#settings-plan-section.plan-pro .debtx-plan-icon {
    background: rgba(198, 40, 40, 0.15) !important;
}

#settings-plan-section.plan-max .debtx-brand,
#settings-plan-section.plan-max .settings-plan-badge,
#settings-plan-section.plan-max .debtx-plan-icon {
    color: #c62828;
}

#settings-plan-section.plan-max .debtx-plan-icon {
    background: rgba(198, 40, 40, 0.15) !important;
}

#settings-plan-section.plan-ultra .debtx-brand,
#settings-plan-section.plan-ultra .settings-plan-badge,
#settings-plan-section.plan-ultra .debtx-plan-icon {
    color: #6a1b9a;
}

#settings-plan-section.plan-ultra .debtx-plan-icon {
    background: rgba(106, 27, 154, 0.15) !important;
}

#settings-plan-section.plan-online .debtx-brand,
#settings-plan-section.plan-online .settings-plan-badge,
#settings-plan-section.plan-online .debtx-plan-icon {
    color: #6a1b9a;
}

#settings-plan-section.plan-online .debtx-plan-icon {
    background: rgba(106, 27, 154, 0.15) !important;
}

.section-content-new {
    padding: 20px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, var(--surface), var(--surface-soft));
    box-shadow: var(--shadow-sm);
}

.subscription-box-new {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.subscription-metrics-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.subscription-metrics-new .setting-item-new {
    padding: 10px 0;
}

.subscription-actions-new {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Profile Upload */
.profile-upload-new {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.avatar-upload-new {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: var(--surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px dashed var(--border);
    overflow: hidden;
}

.avatar-upload-new:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

.avatar-upload-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-btn-new {
    padding: 10px 20px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-btn-new:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Input Groups */
.input-group-new {
    margin-bottom: 16px;
}

.input-group-new label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-soft);
    margin-bottom: 8px;
}

.input-group-new input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
    transition: all 0.2s ease;
}

.input-group-new input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.input-row-new {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Setting Items */
.setting-item-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease, transform 0.2s ease;
}

.setting-item-new:hover {
    background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
    transform: translateX(2px);
}

.setting-item-new:last-of-type {
    border-bottom: none;
    padding-bottom: 16px;
}

.setting-label-new {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

/* Language Toggle */
.language-toggle-new {
    display: flex;
    gap: 4px;
    background: var(--surface-soft);
    padding: 4px;
    border-radius: var(--radius-md);
}

.lang-btn-new {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-soft);
}

.lang-btn-new.active {
    background: var(--primary);
    color: white;
}

/* View Mode Toggle */
.view-toggle-new {
    display: flex;
    gap: 6px;
    background: var(--surface-soft);
    padding: 4px;
    border-radius: var(--radius-md);
}

.view-btn-new {
    padding: 8px 14px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.view-btn-new.active {
    background: var(--primary);
    color: white;
}

/* Text Size Buttons */
.text-size-new {
    display: flex;
    gap: 4px;
}

.size-btn-new {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
}

.size-btn-new:nth-child(1) {
    font-size: 0.7rem;
}

.size-btn-new:nth-child(2) {
    font-size: 0.8rem;
}

.size-btn-new:nth-child(3) {
    font-size: 0.9rem;
}

.size-btn-new:nth-child(4) {
    font-size: 1rem;
}

.size-btn-new:nth-child(5) {
    font-size: 1.1rem;
}

.size-btn-new.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Dock Slider */
.dock-slider-new {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dock-slider-new input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.dock-slider-new input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dock-slider-new input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.dock-value-new {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 45px;
    text-align: right;
}

/* Theme Grid */
.themes-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.theme-tile-new {
    cursor: pointer;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.25s ease;
    text-align: left;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.85));
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.theme-tile-new[aria-checked="true"] {
    border-color: var(--primary);
    box-shadow: 0 12px 32px rgba(var(--primary-rgb), 0.2);
}

.theme-tile-new:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.theme-preview-new {
    position: relative;
    height: 72px;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}

.theme-preview-new::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
}

.theme-preview-new.cozy {
    background: linear-gradient(135deg, #f4e9dd, #f7d7b8, #fef6ec);
}

.theme-preview-new.clean {
    background: linear-gradient(135deg, #ffffff, #e7eef8, #d6e4ff);
}

.theme-preview-new.night {
    background: linear-gradient(135deg, #0f172a, #111827, #1f2937);
}

.theme-preview-new.zen {
    background: linear-gradient(135deg, #e3f8f2, #c6f6d5, #b2f5ea);
}

.theme-preview-new.street {
    background: linear-gradient(135deg, #111827, #0f172a, #0f766e);
}

.theme-preview-new.classic {
    background: linear-gradient(135deg, #f9f4e7, #f0e4cf, #f7f1e3);
}

.theme-preview-new.pro {
    background: linear-gradient(135deg, #0f766e, #0ea5e9, #f8fafc);
}

.theme-preview-new.midnight-purple {
    background: linear-gradient(135deg, #0f1027, #1f1b47, #6b21a8);
}

.theme-preview-new.sunset-orange {
    background: linear-gradient(135deg, #311512, #7c2d12, #f97316);
}

.theme-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.theme-tile-new[aria-checked="true"] .theme-label {
    color: var(--primary);
}

/* Payment Items */
.payment-item-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.payment-item-new:last-child {
    border-bottom: none;
}

.payment-info-new {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-name-new {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.payment-desc-new {
    font-size: 0.8rem;
    color: var(--text-soft);
}

/* Modern Switch */
.switch-new {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch-new input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-new {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: 0.3s;
    border-radius: 28px;
}

.slider-new:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-new input:checked+.slider-new {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.switch-new input:checked+.slider-new:before {
    transform: translateX(22px);
}

/* Stats Grid */
.stats-grid-new {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card-new {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.stat-icon-new {
    font-size: 1.5rem;
}

.stat-info-new {
    display: flex;
    flex-direction: column;
}

.stat-value-new {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label-new {
    font-size: 0.75rem;
    color: var(--text-soft);
}

.view-wrap-btn-new {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-wrap-btn-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

/* Credits Footer */
.settings-credits-new {
    margin-top: 32px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
}

.credits-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.credits-icon {
    font-size: 1.5rem;
}

.credits-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.credits-info {
    margin-bottom: 12px;
}

.credits-info p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.credits-info strong {
    color: var(--text);
    font-weight: 600;
}

.credits-version {
    font-size: 0.8rem;
    color: var(--text-soft);
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW PREMIUM PANEL DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

.premium-panel-new {
    padding: clamp(14px, 4vw, 22px);
    padding-bottom: 140px;
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

.premium-hero {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    color: white;
}

.premium-hero-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.premium-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.premium-hero p {
    opacity: 0.9;
    margin: 0;
}

.premium-current-status {
    text-align: center;
    margin-bottom: 24px;
}

.status-badge {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-badge.free {
    background: var(--surface-soft);
    color: var(--text-soft);
    border: 1px solid var(--border);
}

.status-badge.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

/* Plan Cards Grid Layout - Show all 4 plans vertically (sorted by price: cheap first) */
.plan-carousel-viewport {
    overflow: visible;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
}

.plan-carousel-track {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 4px;
}

.plan-carousel-track .plan-card-new {
    width: 100%;
    min-width: unset;
    flex-shrink: unset;
}

/* Hide carousel navigation since we show all plans */
.plan-carousel-nav {
    display: none;
}

.plan-carousel-btn {
    display: none;
}

.plan-carousel-dots {
    display: none;
}

.plan-carousel-dot {
    display: none;
}

/* Coupon input styling - make them visible and attractive */
.plan-coupon-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.coupon-input-new {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text);
    transition: all 0.2s ease;
}

.coupon-input-new:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.coupon-input-new::placeholder {
    color: var(--text-soft);
}

.coupon-btn-new {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.coupon-btn-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.coupon-btn-new:active {
    transform: translateY(0);
}

.coupon-feedback-new {
    font-size: 0.85rem;
    text-align: center;
    min-height: 20px;
    padding: 4px 0;
}

.coupon-feedback-new.success {
    color: var(--success);
}

.coupon-feedback-new.error {
    color: var(--danger);
}

/* Show coupon hint in AI chat subscription message */
.coupon-hint-text {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin-top: 12px;
}

.coupon-hint-text strong {
    color: var(--primary);
    background: var(--primary-soft);
    padding: 2px 8px;
    border-radius: 4px;
}

/* New Plan Cards (inside carousel) */
.plan-card-new {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.plan-card-new:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.plan-card-new.featured {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(239, 68, 68, 0.05));
}

.plan-card-new.ultra {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(168, 85, 247, 0.05));
}

.plan-badge-new {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    white-space: nowrap;
}

.plan-card-new.ultra .plan-badge-new {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.plan-header-new {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.plan-header-new h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
}

.plan-price-new {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.plan-price-new strong {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.plan-price-new span {
    font-size: 0.875rem;
    color: var(--text-soft);
}

.plan-features-new {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.plan-features-new li {
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.plan-features-new li:last-child {
    border-bottom: none;
}

.plan-coupon-new {
    display: flex;
    gap: 8px;
}

.coupon-input-new {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--surface);
    color: var(--text);
}

.coupon-btn-new {
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.coupon-btn-new:hover {
    background: var(--accent);
}

.coupon-feedback-new {
    margin-top: 8px;
    font-size: 0.8rem;
    min-height: 20px;
}

.coupon-feedback-new.success {
    color: #10b981;
}

.coupon-feedback-new.error {
    color: #ef4444;
}

/* Premium Buy Section */
.premium-buy-section {
    text-align: center;
}

.premium-buy-button {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.premium-buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Premium / Pro panel: fit on phone */
@media (max-width: 600px) {
    .premium-panel-new {
        padding: 12px;
        padding-bottom: 120px;
        max-width: 100%;
        overflow: visible;
    }

    .pricing-hero-new {
        padding: 20px 16px;
        margin-bottom: 20px;
    }

    .pricing-title-modern {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .pricing-subtitle-modern {
        font-size: 0.85rem;
    }

    .pricing-kicker {
        font-size: 0.8rem;
    }

    .pricing-status-card {
        padding: 14px;
        margin-top: 16px;
    }

    .status-row {
        font-size: 0.85rem;
    }

    .status-hint {
        font-size: 0.75rem;
    }

    .home-quick-actions {
        gap: 8px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .quick-action-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 140px;
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .pricing-cards-container {
        gap: 16px;
    }

    .pricing-card-modern {
        padding: 16px;
        border-radius: 16px;
    }

    .pricing-plan-name {
        font-size: 1.2rem;
    }

    .pricing-price-amount {
        font-size: 1.6rem;
    }

    .pricing-price-period {
        font-size: 0.8rem;
    }

    .pricing-description {
        font-size: 0.85rem;
    }

    .pricing-usage-preview {
        padding: 10px;
        margin: 12px 0;
    }

    .usage-preview-header {
        font-size: 0.8rem;
    }

    .pricing-features-list {
        gap: 8px;
    }

    .pricing-feature-item {
        font-size: 0.85rem;
    }

    .pricing-coupon-modern {
        gap: 8px;
        margin-top: 12px;
    }

    .coupon-input-modern {
        font-size: 0.85rem;
        padding: 10px 12px;
    }

    .coupon-btn-modern {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .pricing-footnote {
        font-size: 0.8rem;
        padding: 0 12px;
    }

    .pricing-docs {
        padding: 16px;
        margin-top: 20px;
    }

    .docs-header h2 {
        font-size: 1.2rem;
    }

    .docs-header p {
        font-size: 0.85rem;
    }

    .docs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .doc-card {
        padding: 14px;
    }

    .doc-card h3 {
        font-size: 1rem;
    }

    .doc-step-list {
        font-size: 0.85rem;
    }

    .doc-note {
        font-size: 0.8rem;
    }

    .doc-example {
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .doc-tags span {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

/* Premium Dock Button - Beautiful Design */
.dock-item-premium {
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    border: 1px solid #f59e0b !important;
    position: relative;
    overflow: hidden;
}

.dock-item-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.5) 50%,
            transparent 70%);
    animation: premium-shine 3s ease-in-out infinite;
}

@keyframes premium-shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.dock-item-premium .dock-icon-wrapper {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 10px;
    padding: 6px;
}

.dock-item-premium .dock-icon {
    color: white !important;
    stroke: white !important;
}

.dock-item-premium .dock-label {
    color: #92400e !important;
    font-weight: 700 !important;
}

.dock-item-premium:hover {
    background: linear-gradient(135deg, #fde68a, #fcd34d) !important;
    transform: translateY(-6px) scale(1.08) !important;
    box-shadow:
        0 8px 24px rgba(245, 158, 11, 0.4),
        0 4px 12px rgba(217, 119, 6, 0.3) !important;
}

.dock-item-premium.active {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #b45309 !important;
}

.dock-item-premium.active .dock-icon-wrapper {
    background: white;
}

.dock-item-premium.active .dock-icon {
    color: #f59e0b !important;
    stroke: #f59e0b !important;
}

.dock-item-premium.active .dock-label {
    color: white !important;
}

.dock-item-premium .dock-indicator-premium {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
}

/* Hide premium dock for paid users */
.dock-item-premium.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    .settings-new {
        padding: 12px;
        padding-bottom: 120px;
        max-width: 100%;
        border-radius: 16px;
    }

    .settings-header-new {
        padding: 20px 16px;
        margin-bottom: 20px;
        border-radius: 16px;
    }

    .settings-header-new h1 {
        font-size: 1.4rem;
    }

    .settings-subtitle {
        font-size: 0.85rem;
    }

    .settings-grid-new {
        gap: 16px;
    }

    .section-header-new {
        padding: 16px;
        gap: 12px;
        flex-wrap: wrap;
    }

    .section-icon-new {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .section-title-new h3 {
        font-size: 1rem;
    }

    .section-title-new p {
        font-size: 0.8rem;
    }

    .section-content-new {
        padding: 16px;
    }

    .input-row-new {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .input-group-new {
        margin-bottom: 12px;
    }

    .input-group-new input {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

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

    .theme-tile-new {
        border-radius: 14px;
    }

    .theme-preview-new {
        height: 60px;
    }

    .theme-label {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .stats-grid-new {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card-new {
        padding: 14px;
    }

    .support-buttons-new {
        flex-direction: column;
        gap: 10px;
    }

    .support-btn-new {
        width: 100%;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .settings-credits-new {
        padding: 16px;
        gap: 12px;
    }

    .profile-upload-new {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .avatar-upload-new {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }

    .upload-btn-new {
        width: 100%;
        text-align: center;
    }

    .payment-item-new {
        padding: 12px 0;
    }

    .payment-name-new {
        font-size: 0.95rem;
    }

    .payment-desc-new {
        font-size: 0.8rem;
    }

}

/* ═══════════════════════════════════════════════════════════════════════════
   SUPPORT & SUBSCRIPTION BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.support-buttons-new {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.support-btn-new {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.support-btn-new.chat {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.support-btn-new.chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.support-btn-new.cancel {
    background: var(--surface-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.support-btn-new.cancel:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.support-btn-new.cancel:disabled,
.support-btn-new.cancel[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--surface-soft);
    color: var(--text-muted);
    border-style: dashed;
    border-color: var(--border);
}

.support-btn-new.upgrade {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
}

.support-btn-new.upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.support-btn-new.export {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
}

.support-btn-new.export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.support-btn-new.import {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    cursor: pointer;
}

.support-btn-new.import:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.renew-box-new {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    margin: 10px 0 12px;
    border-radius: calc(var(--radius-md) + 2px);
    background:
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.18), transparent 55%),
        radial-gradient(circle at 85% 20%, rgba(236, 72, 153, 0.16), transparent 55%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.85));
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.renew-box-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.12);
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.renew-box-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-soft);
    margin-bottom: 2px;
}

.renew-box-value {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1.15;
}

.renew-box-sub {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.support-note-new {
    font-size: 0.85rem;
    color: var(--text-soft);
    text-align: center;
    margin: 0;
    padding: 12px;
    background: var(--surface-soft);
    border-radius: var(--radius-md);
}

/* Dark theme refinements for Settings */
html[data-theme="night-shop"] .settings-new {
    background:
        radial-gradient(circle at 18% 18%, rgba(52, 211, 153, 0.08), transparent 34%),
        radial-gradient(circle at 85% 12%, rgba(96, 165, 250, 0.1), transparent 34%),
        linear-gradient(135deg, rgba(12, 16, 24, 0.98), rgba(10, 14, 20, 0.95));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 26px 68px rgba(0, 0, 0, 0.6);
}

html[data-theme="night-shop"] .settings-header-new {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.92));
    color: var(--text);
    border: 1px solid rgba(52, 211, 153, 0.18);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

html[data-theme="night-shop"] .settings-section-new {
    background: rgba(15, 22, 34, 0.98);
    border-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="night-shop"] .settings-section-new:hover {
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

html[data-theme="night-shop"] .section-header-new {
    background: rgba(15, 22, 34, 0.92);
    border-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="night-shop"] .section-content-new {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(12, 16, 24, 0.98));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

html[data-theme="night-shop"] .subscription-box-new {
    background: rgba(10, 14, 20, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

html[data-theme="night-shop"] .renew-box-new {
    background:
        radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.18), transparent 60%),
        radial-gradient(circle at 85% 20%, rgba(244, 114, 182, 0.18), transparent 60%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(12, 16, 24, 0.98));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

html[data-theme="night-shop"] .renew-box-icon {
    background: rgba(52, 211, 153, 0.16);
    border-color: rgba(52, 211, 153, 0.28);
}

html[data-theme="night-shop"] .support-note-new {
    background: rgba(15, 22, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="night-shop"] .support-btn-new.cancel {
    background: rgba(244, 114, 182, 0.16);
    border-color: rgba(244, 114, 182, 0.28);
    color: #fbcfe8;
}

html[data-theme="night-shop"] .support-btn-new.cancel:hover {
    background: rgba(244, 114, 182, 0.24);
    border-color: rgba(244, 114, 182, 0.4);
    color: #fdf2f8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIMPLE TODO APP UI
   ═══════════════════════════════════════════════════════════════════════════ */

.todo-simple {
    padding: 20px;
    padding-bottom: 160px;
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.todo-simple-header h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.todo-simple-header p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.todo-simple-input {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.todo-simple-input input {
    flex: 1;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-soft);
    font-size: 1rem;
    color: var(--text);
}

.todo-simple-input button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: var(--text-on-primary);
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

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

.todo-simple-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all 0.2s ease;
    animation: fastSlideUp 0.2s ease both;
}

.todo-simple-item:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.todo-simple-item.done {
    opacity: 0.7;
}

.todo-simple-item.done .todo-simple-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-simple-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.todo-simple-check.checked {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
}

.todo-simple-text {
    flex: 1;
    font-size: 1rem;
}

.todo-simple-delete {
    border: none;
    background: var(--surface-soft);
    color: var(--text-soft);
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.todo-simple-empty {
    text-align: center;
    color: var(--text-soft);
    padding: 12px 8px;
}

.todo-add-fab {
    position: fixed;
    right: 18px;
    bottom: 110px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--primary-soft), var(--surface));
    color: var(--text);
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1200;
}

.todo-add-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.todo-add-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-on-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.todo-add-label {
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW MODERN TODO APP UI
   ═══════════════════════════════════════════════════════════════════════════ */

.todo-app-new {
    padding: 20px;
    padding-bottom: 160px;
    max-width: 700px;
    margin: 0 auto;
}

/* Header */
.todo-header-new {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    color: white;
}

.todo-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.todo-header-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.todo-header-content p {
    opacity: 0.85;
    font-size: 0.9rem;
    margin: 0;
}

.todo-header-stats {
    display: flex;
    gap: 12px;
}

.todo-stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.todo-stat-badge.completed {
    background: rgba(16, 185, 129, 0.3);
}

.todo-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.todo-stat-label {
    font-size: 0.7rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.todo-add-task-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.todo-add-task-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

/* Quick Add Task */
.todo-quick-add-new {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--surface);
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.quick-task-input-new {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--surface-soft);
    color: var(--text);
    transition: all 0.2s ease;
}

.quick-task-input-new:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.quick-task-select-new {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    min-width: 120px;
}

.quick-add-btn-new {
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-add-btn-new:hover {
    background: var(--accent);
    transform: scale(1.05);
}

/* Category Tabs */
.todo-tabs-new {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.todo-tabs-new::-webkit-scrollbar {
    display: none;
}

.todo-tab-new {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: var(--text);
}

.todo-tab-new:hover {
    border-color: var(--primary);
}

.todo-tab-new.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.todo-tab-new .tab-icon {
    font-size: 1rem;
}

/* Progress Bar */
.todo-progress-new {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text);
}

.progress-percent {
    font-weight: 600;
    color: var(--primary);
}

.progress-bar-new {
    height: 8px;
    background: var(--surface-soft);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill-new {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Calendar Card */
.todo-calendar-card-new {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 16px;
}

.calendar-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.calendar-card-title {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.calendar-icon {
    font-size: 1.5rem;
}

.calendar-card-title h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.calendar-card-title p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.refresh-btn-new {
    padding: 8px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
}

.refresh-btn-new:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.calendar-list-new {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

/* Mini Calendar Card */
.todo-mini-calendar-card-new {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 20px;
}

.mini-calendar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.mini-calendar-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* Task List */
.todo-list-new {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Task Item */
.todo-item-new {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    animation: fastSlideUp 0.25s ease both;
}

.todo-item-new:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.todo-item-new.completed {
    opacity: 0.7;
}

.todo-item-new.completed .todo-text-new {
    text-decoration: line-through;
    color: var(--text-soft);
}

.todo-checkbox-new {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.todo-checkbox-new:hover {
    border-color: var(--primary);
}

.todo-checkbox-new.checked {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
    transform: scale(1.05);
}

.todo-checkbox-new.checked svg {
    display: block;
}

.todo-checkbox-new svg {
    display: none;
    width: 14px;
    height: 14px;
    color: white;
}

.todo-content-new {
    flex: 1;
    min-width: 0;
}

.todo-text-new {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 6px;
    word-break: break-word;
}

.todo-meta-new {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.todo-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--surface-soft);
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-soft);
}

.todo-date-badge {
    font-size: 0.75rem;
    color: var(--text-soft);
}

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

.todo-action-btn {
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-soft);
    transition: all 0.2s ease;
}

.todo-action-btn:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.todo-action-btn.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Empty State */
.todo-empty-new {
    text-align: center;
    padding: 48px 24px;
}

.empty-illustration {
    margin-bottom: 24px;
}

.todo-empty-new h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
}

.todo-empty-new p {
    font-size: 0.95rem;
    color: var(--text-soft);
    margin: 0;
}

/* Floating Add Button - in .app (not .panel) so position:fixed works; stays put when scrolling */
.floating-add-btn-new {
    position: fixed;
    bottom: 92px;
    right: max(20px, env(safe-area-inset-right, 20px));
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    touch-action: manipulation;
}

.floating-add-btn-new:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5);
}

.floating-add-btn-new:active {
    transform: scale(0.96);
}

/* ═══════════════════════════════════════════════════════════════════════════
   REDESIGNED NOTES SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.notes-section-new {
    margin-top: 24px;
    padding-top: 24px;
}

.notes-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.divider-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    background: var(--surface);
    border-radius: 999px;
    border: 1px solid var(--border);
}

.notes-toolbar-new {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.notes-search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.notes-search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.notes-search-box svg {
    color: var(--text-soft);
    flex-shrink: 0;
}

.notes-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text);
    outline: none;
}

.notes-search-box input::placeholder {
    color: var(--text-soft);
}

.add-note-fab {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.add-note-fab:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.add-note-fab:active {
    transform: translateY(0) scale(0.98);
}

/* Notes Empty State */
.notes-empty-new {
    text-align: center;
    padding: 48px 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
}

.notes-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.notes-empty-new h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
}

.notes-empty-new p {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin: 0;
}

/* Notes Masonry Grid */
.notes-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

/* Note Card */
.note-card-new {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.note-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.note-card-new.color-yellow {
    background: linear-gradient(135deg, #fef3c7, #fef9c3);
    border-color: #fcd34d;
}

.note-card-new.color-pink {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    border-color: #f9a8d4;
}

.note-card-new.color-blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #93c5fd;
}

.note-card-new.color-green {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-color: #6ee7b7;
}

.note-card-new.color-purple {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-color: #c4b5fd;
}

.note-title-new {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-preview-new {
    font-size: 0.8rem;
    color: var(--text-soft);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    margin-bottom: 12px;
}

.note-footer-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.note-date-new {
    font-size: 0.7rem;
    color: var(--text-soft);
}

.note-actions-new {
    display: flex;
    gap: 4px;
}

.note-action-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    transition: all 0.2s ease;
}

.note-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
}

.note-action-btn.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Responsive for Phone Size */
@media (max-width: 600px) {

    /* Dock Mobile Styles */
    .dock {
        padding: 0 8px 12px;
    }

    .dock-inner {
        padding: 8px 6px;
        gap: 2px;
    }

    .dock-item {
        min-width: 48px;
        padding: 6px 8px;
        gap: 2px;
    }

    .dock-icon-wrapper {
        width: 20px;
        height: 20px;
    }

    .dock-icon {
        width: 18px;
        height: 18px;
    }

    .dock-label {
        font-size: 0.55rem;
        margin-top: 2px;
    }

    .dock-item-premium .dock-icon-wrapper {
        padding: 4px;
    }

    /* Todo App Mobile */
    .todo-app-new {
        padding: 12px;
        padding-bottom: 140px;
    }

    .todo-header-new {
        padding: 16px;
        border-radius: 16px;
        flex-direction: column;
        gap: 12px;
    }

    .todo-header-right {
        width: 100%;
        align-items: stretch;
    }

    .todo-header-content h1 {
        font-size: 1.25rem;
    }

    .todo-header-stats {
        width: 100%;
        justify-content: space-around;
    }

    .todo-add-task-btn {
        justify-content: center;
        width: 100%;
    }

    .todo-stat-badge {
        padding: 8px 12px;
    }

    .todo-stat-number {
        font-size: 1.25rem;
    }

    .todo-quick-add-new {
        flex-wrap: wrap;
    }

    .quick-task-input-new {
        width: 100%;
    }

    .quick-task-select-new {
        flex: 1;
    }

    .todo-tabs-new {
        gap: 6px;
    }

    .todo-tab-new {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .support-buttons-new {
        flex-direction: column;
    }

    .floating-add-btn-new {
        bottom: 90px;
        right: 16px;
        width: 50px;
        height: 50px;
    }

    /* Notes Mobile */
    .notes-section-new {
        margin-top: 20px;
        padding-top: 20px;
    }

    .notes-divider {
        gap: 12px;
        margin-bottom: 16px;
    }

    .divider-text {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .notes-toolbar-new {
        gap: 8px;
        margin-bottom: 16px;
    }

    .notes-search-box {
        padding: 10px 14px;
        gap: 10px;
    }

    .notes-search-box input {
        font-size: 0.9rem;
    }

    .add-note-fab {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .notes-masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .note-card-new {
        padding: 12px;
    }

    .note-title-new {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .note-preview-new {
        font-size: 0.75rem;
        -webkit-line-clamp: 3;
        margin-bottom: 10px;
    }

    .note-footer-new {
        padding-top: 10px;
    }

    .note-date-new {
        font-size: 0.65rem;
    }

    .note-action-btn {
        width: 24px;
        height: 24px;
    }

    .notes-empty-new {
        padding: 32px 16px;
    }

    .notes-empty-icon {
        font-size: 2.5rem;
    }

    .notes-empty-new h4 {
        font-size: 1rem;
    }

    .notes-empty-new p {
        font-size: 0.85rem;
    }

    /* Calendar Cards Mobile */
    .todo-calendar-card-new,
    .todo-mini-calendar-card-new {
        padding: 12px;
        margin-bottom: 12px;
    }

    .calendar-card-title h3 {
        font-size: 0.9rem;
    }

    .calendar-card-title p {
        font-size: 0.75rem;
    }

    .calendar-icon {
        font-size: 1.25rem;
    }

    /* Task Items Mobile */
    .todo-item-new {
        padding: 12px;
        gap: 10px;
    }

    .todo-checkbox-new {
        width: 22px;
        height: 22px;
    }

    .todo-text-new {
        font-size: 0.9rem;
    }

    .todo-category-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .todo-progress-new {
        padding: 12px;
    }

    .progress-info {
        font-size: 0.85rem;
    }
}

/* Extra small phones */
@media (max-width: 380px) {
    .dock-item {
        min-width: 42px;
        padding: 5px 6px;
    }

    .dock-label {
        font-size: 0.5rem;
    }

    .notes-masonry {
        grid-template-columns: 1fr;
    }

    .todo-tabs-new {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .todo-tab-new {
        flex-shrink: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DOCK V2 - BEAUTIFUL MODERN iOS-STYLE DOCK
   ═══════════════════════════════════════════════════════════════════════════ */

.dock.dock-v2 {
    bottom: 16px;
    padding: 0 12px;
}

.dock.dock-v2 .dock-inner {
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-theme="dark"] .dock.dock-v2 .dock-inner,
html[data-theme="midnight-purple"] .dock.dock-v2 .dock-inner,
html[data-theme="sunset-orange"] .dock.dock-v2 .dock-inner {
    background: rgba(var(--surface-rgb, 30, 30, 30), 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dock.dock-v2 .dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    min-width: 52px;
    border-radius: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.dock.dock-v2 .dock-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--surface-soft), var(--surface));
    border: 1px solid var(--border);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock.dock-v2 .dock-icon {
    width: 18px;
    height: 18px;
    color: var(--text-soft);
    transition: all 0.2s ease;
}

.dock.dock-v2 .dock-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-soft);
    text-align: center;
    white-space: nowrap;
    opacity: 0.9;
    transition: all 0.2s ease;
}

/* Dock Item Hover */
.dock.dock-v2 .dock-item:hover {
    transform: translateY(-4px) scale(1.05);
}

.dock.dock-v2 .dock-item:hover .dock-icon-box {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dock.dock-v2 .dock-item:hover .dock-icon {
    color: var(--primary);
}

.dock.dock-v2 .dock-item:hover .dock-label {
    color: var(--primary);
}

/* Dock Item Active State */
.dock.dock-v2 .dock-item.active {
    background: transparent;
}

.dock.dock-v2 .dock-item.active .dock-icon-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

.dock.dock-v2 .dock-item.active .dock-icon {
    color: white;
}

.dock.dock-v2 .dock-item.active .dock-label {
    color: var(--primary);
    font-weight: 700;
}

/* Premium Dock Item V2 */
.dock.dock-v2 .dock-item-premium .dock-icon-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fcd34d;
}

.dock.dock-v2 .dock-item-premium .dock-icon {
    color: #d97706;
}

.dock.dock-v2 .dock-item-premium .dock-label {
    color: #b45309;
}

.dock.dock-v2 .dock-item-premium:hover .dock-icon-box {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.dock.dock-v2 .dock-item-premium.active .dock-icon-box {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.dock.dock-v2 .dock-item-premium.active .dock-icon {
    color: white;
}

.dock.dock-v2 .dock-item-premium.hidden {
    display: none !important;
}

/* dock-v3: ensure labels are always visible with icons */
.dock.dock-v3 .dock-label {
    display: block;
    max-width: 56px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dock V2 Mobile Responsive */
@media (max-width: 600px) {
    .dock.dock-v2 {
        bottom: 12px;
        padding: 0 8px;
    }

    .dock.dock-v2 .dock-inner {
        padding: 6px 8px;
        gap: 2px;
        border-radius: 18px;
    }

    .dock.dock-v2 .dock-item {
        padding: 6px 10px;
        min-width: 48px;
        gap: 3px;
    }

    .dock.dock-v2 .dock-icon-box {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .dock.dock-v2 .dock-icon {
        width: 16px;
        height: 16px;
    }

    .dock.dock-v2 .dock-label {
        font-size: 0.55rem;
    }
}

@media (max-width: 380px) {
    .dock.dock-v2 .dock-item {
        padding: 5px 8px;
        min-width: 42px;
    }

    .dock.dock-v2 .dock-icon-box {
        width: 26px;
        height: 26px;
    }

    .dock.dock-v2 .dock-icon {
        width: 14px;
        height: 14px;
    }

    .dock.dock-v2 .dock-label {
        font-size: 0.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTES / TASKS TABS (panel-notes)
   ═══════════════════════════════════════════════════════════════════════════ */

.notes-tasks-tabs {
    display: flex;
    gap: 4px;
    padding: 0 0 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.tab-btn-nt {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-soft);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn-nt:hover {
    color: var(--text);
    background: var(--surface-soft);
}

.tab-btn-nt.active {
    color: var(--primary-strong);
    background: var(--primary-soft);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTES APP V2 - BEAUTIFUL MODERN DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

.notes-app-v2 {
    position: relative;
    margin-top: 16px;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 45%),
        linear-gradient(180deg, rgba(34, 197, 94, 0.08), transparent 55%),
        var(--surface);
    border-radius: 24px;
    padding: 26px 22px 30px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Notes Header */
.notes-header-v2 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.notes-header-v2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 140px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

.notes-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notes-icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.notes-icon-badge svg {
    color: white;
}

.notes-title-v2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.notes-subtitle-v2 {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin: 2px 0 0 0;
    line-height: 1.4;
    max-width: 320px;
}

.notes-stats-v2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.note-stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(180deg, var(--surface), var(--primary-soft));
    border-radius: 20px;
    border: 1px solid rgba(34, 197, 94, 0.25);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.12);
}

.note-stat-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-strong);
}

.note-stat-text {
    font-size: 0.75rem;
    color: var(--primary-strong);
    font-weight: 500;
}

/* Notes Controls */
.notes-controls-v2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.notes-search-v2 {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(180deg, var(--surface), var(--surface-soft));
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.notes-search-v2:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.notes-search-v2 svg {
    color: var(--text-soft);
    flex-shrink: 0;
}

.notes-search-v2 input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text);
    outline: none;
}

.notes-search-v2 input::placeholder {
    color: var(--text-soft);
}

.notes-add-btn-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.25);
}

.notes-add-btn-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

.notes-add-btn-v2:active {
    transform: scale(0.98);
}

.notes-filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.notes-filter-row .filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    transition: all 0.2s ease;
}

.notes-filter-row .filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.notes-filter-row .filter-btn.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
}

/* Color Filter Pills */
.notes-color-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
}

.notes-color-filters::-webkit-scrollbar {
    display: none;
}

.color-filter-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-soft);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.color-filter-pill:hover {
    background: var(--surface-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.color-filter-pill.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.color-dot.yellow {
    background: #fcd34d;
}

.color-dot.green {
    background: #6ee7b7;
}

.color-dot.blue {
    background: #93c5fd;
}

.color-dot.pink {
    background: #f9a8d4;
}

.color-dot.gray {
    background: #9ca3af;
}

/* Notes Empty State */
.notes-empty-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-illustration-v2 {
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.notes-empty-v2 h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.notes-empty-v2 p {
    font-size: 0.9rem;
    color: var(--text-soft);
    margin: 0 0 20px 0;
    max-width: 360px;
}

.empty-create-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.empty-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

/* Notes Grid V2 */
.notes-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

/* Note Card V2 */
.note-card-v2 {
    position: relative;
    background: var(--surface);
    border-radius: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    animation: noteCardEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

@keyframes noteCardEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.note-card-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
    opacity: 0.8;
}

.note-card-v2:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.note-card-v2:active {
    transform: translateY(-2px) scale(1.01);
}

/* Note Card Colors */
.note-card-v2.color-yellow {
    background: linear-gradient(165deg, #fffbeb, #fef3c7);
    border-color: #fcd34d;
    color: #d97706;
}

.note-card-v2.color-green {
    background: linear-gradient(165deg, #ecfdf5, #d1fae5);
    border-color: #6ee7b7;
    color: #059669;
}

.note-card-v2.color-blue {
    background: linear-gradient(165deg, #eff6ff, #dbeafe);
    border-color: #93c5fd;
    color: #2563eb;
}

.note-card-v2.color-pink {
    background: linear-gradient(165deg, #fdf2f8, #fce7f3);
    border-color: #f9a8d4;
    color: #db2777;
}

.note-card-v2.color-gray {
    background: linear-gradient(165deg, #f9fafb, #f3f4f6);
    border-color: #d1d5db;
    color: #6b7280;
}

/* Note Card Content */
.note-card-v2 .note-pin-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 12px;
}

.note-card-v2 .note-title-v2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-card-v2 .note-preview-v2 {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-card-v2 .note-footer-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.note-card-v2 .note-date-v2 {
    font-size: 0.7rem;
    color: var(--text-soft);
    font-weight: 500;
}

.note-card-v2 .note-actions-v2 {
    display: flex;
    gap: 6px;
}

.note-card-v2 .note-action-btn-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    opacity: 0;
}

.note-card-v2:hover .note-action-btn-v2 {
    opacity: 1;
}

/* Always show note actions on touch devices (no hover) */
@media (max-width: 600px) {
    .note-card-v2 .note-action-btn-v2 {
        opacity: 1;
    }
}

.note-card-v2 .note-action-btn-v2:hover {
    background: white;
    transform: scale(1.1);
}

.note-card-v2 .note-action-btn-v2.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

.note-card-v2 .note-action-btn-v2 svg {
    width: 14px;
    height: 14px;
}

/* Notes Mobile Responsive */
@media (max-width: 600px) {
    .notes-app-v2 {
        margin-top: 16px;
        padding: 20px 16px 24px;
    }

    .notes-header-v2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
    }

    .notes-icon-badge {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .notes-icon-badge svg {
        width: 20px;
        height: 20px;
    }

    .notes-title-v2 {
        font-size: 1.1rem;
    }

    .notes-subtitle-v2 {
        font-size: 0.8rem;
        max-width: 100%;
    }

    .notes-stats-v2 {
        width: 100%;
        justify-content: flex-start;
    }

    .notes-controls-v2 {
        flex-direction: column;
        gap: 10px;
        padding: 8px;
        box-shadow: none;
    }

    .notes-search-v2 {
        padding: 10px 14px;
    }

    .notes-add-btn-v2 {
        justify-content: center;
        padding: 12px 16px;
    }

    .notes-color-filters {
        gap: 6px;
        margin-bottom: 16px;
    }

    .color-filter-pill {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .notes-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .note-card-v2 {
        padding: 12px;
        min-height: 120px;
        border-radius: 14px;
    }

    .note-card-v2 .note-title-v2 {
        font-size: 0.9rem;
    }

    .note-card-v2 .note-preview-v2 {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .note-card-v2 .note-action-btn-v2 {
        opacity: 1;
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 380px) {
    .notes-grid-v2 {
        grid-template-columns: 1fr;
    }

    .note-card-v2 {
        min-height: 100px;
    }

    .color-filter-pill {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTES FLOATING ACTION BUTTON (FAB)
   ═══════════════════════════════════════════════════════════════════════════ */

.notes-fab {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong, #16a34a));
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fabPulse 2s ease-in-out infinite;
}

.notes-fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.5);
}

.notes-fab:active {
    transform: scale(0.95);
}

.notes-fab svg {
    transition: transform 0.3s ease;
}

@keyframes fabPulse {

    0%,
    100% {
        box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 6px 30px rgba(34, 197, 94, 0.6);
    }
}

@media (max-width: 600px) {
    .notes-fab {
        bottom: 90px;
        right: 16px;
        width: 56px;
        height: 56px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ONBOARDING TUTORIAL MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.onboarding-modal {
    max-width: 440px;
    width: 92%;
    border-radius: 24px;
    border: none;
    padding: 0;
    overflow: hidden;
    background: var(--surface, #fff);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.onboarding-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.onboarding-container {
    padding: 32px 28px 28px;
    position: relative;
}

.onboarding-skip {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-soft);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.onboarding-skip:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.onboarding-slides {
    position: relative;
    min-height: 320px;
}

.onboarding-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: slideIn 0.4s ease;
}

.onboarding-slide.active {
    display: flex;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.onboarding-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-soft, rgba(34, 197, 94, 0.1)), rgba(34, 197, 94, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: iconFloat 3s ease-in-out infinite;
}

.onboarding-icon.celebration {
    animation: iconCelebrate 0.6s ease;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes iconCelebrate {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.onboarding-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
    line-height: 1.3;
}

.onboarding-desc {
    font-size: 1rem;
    color: var(--text-soft);
    margin: 0 0 16px;
    line-height: 1.6;
    max-width: 340px;
}

.onboarding-desc strong {
    color: var(--primary);
    font-weight: 600;
}

.onboarding-tip {
    background: linear-gradient(135deg, var(--primary-soft, rgba(34, 197, 94, 0.1)), rgba(34, 197, 94, 0.05));
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--text);
    margin-top: 8px;
    border-left: 3px solid var(--primary);
}

.onboarding-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
}

.onboarding-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.onboarding-dots .dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

.onboarding-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.onboarding-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.onboarding-btn.secondary {
    background: var(--surface-soft);
    color: var(--text);
}

.onboarding-btn.secondary:hover {
    background: var(--border);
}

.onboarding-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong, #16a34a));
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.onboarding-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.onboarding-btn.primary:active {
    transform: scale(0.98);
}

/* Mobile responsive for onboarding */
@media (max-width: 480px) {
    .onboarding-modal {
        width: 95%;
        max-width: none;
        margin: 16px;
    }

    .onboarding-container {
        padding: 24px 20px 20px;
    }

    .onboarding-icon {
        width: 100px;
        height: 100px;
    }

    .onboarding-icon svg {
        width: 60px;
        height: 60px;
    }

    .onboarding-title {
        font-size: 1.3rem;
    }

    .onboarding-desc {
        font-size: 0.95rem;
    }

    .onboarding-slides {
        min-height: 280px;
    }

    .onboarding-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* ==========================================
   PRO UI REFRESH
   ========================================== */
body {
    background: var(--bg);
}

body::before {
    content: '';
    position: fixed;
    inset: -20% -20% auto;
    height: 65%;
    background:
        radial-gradient(circle at 15% 20%, rgba(var(--primary-rgb), 0.18), transparent 55%),
        radial-gradient(circle at 75% 10%, var(--accent-soft), transparent 50%),
        linear-gradient(120deg, rgba(var(--primary-rgb), 0.08), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.app {
    width: 100%;
    max-width: 540px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    z-index: 1;
    isolation: isolate;
    transform: scale(var(--ui-scale, 1));
    transform-origin: top center;
}

@media (max-width: 600px) {
    .app {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
        transform: none;
        /* prevent scaling from clipping content on phones */
        overflow: visible;
    }
}

.app::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(var(--primary-rgb), 0.06) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.25;
    pointer-events: none;
}

.app-header {
    background: linear-gradient(140deg, rgba(15, 118, 110, 0.16), rgba(255, 255, 255, 0));
    border-bottom: 1px solid var(--border-subtle);
    padding: 24px 22px 18px;
}

.app-title .title-en {
    font-size: 1.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-title .title-bn {
    color: var(--text-muted);
}

.dock-inner {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow);
}

.dock-item {
    border-radius: 16px;
}

.dock-item.active {
    background: var(--primary);
    color: var(--text-on-primary);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.25);
}

.dock-item.active .dock-label {
    color: var(--text-on-primary);
}

.dock-item.active .dock-icon {
    color: var(--text-on-primary);
}

.panel {
    background: transparent;
}

.panel-header h1 {
    font-weight: 700;
    letter-spacing: 0.01em;
}

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

.search-bar input,
.modal-form input,
.modal-form textarea,
.modal-form select,
.auth-form input,
.notes-search-v2 input,
.notes-search-box input {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.search-bar input:focus,
.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus,
.auth-form input:focus,
.notes-search-v2 input:focus,
.notes-search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.primary-btn,
.bill-action-btn.primary,
.notes-add-btn-v2,
.notes-fab,
.add-note-fab {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: var(--text-on-primary);
    border: none;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.secondary-btn,
.ghost-btn,
.bill-action-btn.secondary {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.customer-card,
.note-card,
.task-card,
.bill-card,
.bill-card-enhanced,
.debt-card,
.settings-card,
.todo-category-card,
.monthly-wrap-card,
.monthly-wrap-card-stat,
.notes-card,
.theme-tile-new {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.customer-card:hover,
.note-card:hover,
.task-card:hover,
.bill-card:hover,
.bill-card-enhanced:hover,
.debt-card:hover,
.settings-card:hover,
.todo-category-card:hover,
.monthly-wrap-card-stat:hover {
    box-shadow: var(--shadow);
}

.auth-card {
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    transform: scale(var(--ui-scale, 1));
    transform-origin: center top;
}

.theme-preview-new.pro {
    background: linear-gradient(135deg, #eef2f7, #dbe5ee);
}

.theme-preview-new.midnight-purple {
    background: linear-gradient(135deg, #1a0b2e, #2d1b4e);
}

.theme-preview-new.sunset-orange {
    background: linear-gradient(135deg, #292524, #44403c);
}

@media (max-width: 640px) {
    .app {
        width: 100%;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }

    .app-header {
        padding: 20px 18px 14px;
    }
}

/* ==========================================
   NEW PREMIUM GRID LAYOUT
   ========================================== */
.premium-panel-new {
    padding: 32px 22px 140px;
    max-width: 1080px;
    margin: 0 auto;
    background:
        radial-gradient(circle at 12% 18%, rgba(250, 204, 21, 0.18), transparent 30%),
        radial-gradient(circle at 88% 8%, rgba(99, 102, 241, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 247, 255, 0.9));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
    width: 100%;
}

.pricing-screen {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pricing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 18px;
    padding: 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.18), rgba(249, 115, 22, 0.16), rgba(14, 165, 233, 0.12));
    border: 1px solid rgba(249, 115, 22, 0.28);
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.18);
}

.pricing-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-strong);
    font-weight: 600;
    font-size: 0.8rem;
}

.pricing-hero h1 {
    margin: 12px 0 8px;
    font-size: 1.8rem;
}

.pricing-hero p {
    margin: 0;
    color: var(--text-soft);
    font-size: 1rem;
}

.pricing-current-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}

.pricing-current-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pricing-current-plan {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.pricing-current-usage,
.pricing-current-hint {
    font-size: 0.95rem;
    color: var(--text-soft);
}

.premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 8px;
}

@media (min-width: 900px) {
    .premium-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.plan-card-new {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.plan-card-new:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(var(--primary-rgb), 0.25);
}

.plan-card-new.featured {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(140deg, rgba(255, 248, 232, 0.9), rgba(255, 255, 255, 0.95));
}

.plan-card-new.ultra {
    border-color: rgba(14, 116, 144, 0.35);
    background: linear-gradient(140deg, rgba(235, 246, 250, 0.9), rgba(255, 255, 255, 0.95));
}

.plan-badge-new {
    position: absolute;
    top: -12px;
    left: 18px;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.25);
}

.plan-card-new.ultra .plan-badge-new {
    background: linear-gradient(135deg, #0ea5a4, #14b8a6);
}

.plan-header-new {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 14px;
}

.plan-name {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.plan-tagline {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.plan-price-new {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.plan-price-new strong {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary-strong);
}

.plan-limit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-strong);
    font-weight: 600;
    font-size: 0.85rem;
}

.plan-features-new {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.plan-features-new li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-subtle);
    font-size: 0.9rem;
}

.plan-features-new li:last-child {
    border-bottom: none;
}

.plan-footnote {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.plan-coupon-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.coupon-input-new {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
}

.coupon-btn-new {
    padding: 12px 14px;
    border-radius: var(--radius-md);
}

.pricing-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pricing-footnote {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
    text-align: center;
}

.pricing-buy-button {
    background: linear-gradient(135deg, #0f766e, #0b5f58);
}

@media (max-width: 860px) {
    .pricing-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .premium-panel-new {
        padding: 16px 12px 100px;
    }

    .pricing-hero {
        padding: 18px;
    }

    .pricing-hero h1 {
        font-size: 1.5rem;
    }

    .plan-card-new {
        padding: 16px;
    }
}

.dock-item-agent .dock-icon-box {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(245, 158, 11, 0.14));
    border-color: rgba(15, 118, 110, 0.4);
}

.dock-item-agent.active .dock-icon-box {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.28), rgba(245, 158, 11, 0.2));
    border-color: rgba(15, 118, 110, 0.6);
}

/* Voice Command Overlay */
.voice-listening-overlay {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.voice-listening-overlay.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.voice-status-text {
    font-size: 0.95rem;
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

.voice-wave {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 24px;
}

.voice-bar {
    width: 4px;
    background: var(--primary);
    border-radius: 4px;
    animation: voiceWave 1s infinite ease-in-out;
}

.voice-bar:nth-child(1) {
    height: 10px;
    animation-delay: 0.1s;
}

.voice-bar:nth-child(2) {
    height: 16px;
    animation-delay: 0.2s;
}

.voice-bar:nth-child(3) {
    height: 24px;
    animation-delay: 0.3s;
}

.voice-bar:nth-child(4) {
    height: 16px;
    animation-delay: 0.4s;
}

.voice-bar:nth-child(5) {
    height: 10px;
    animation-delay: 0.5s;
}

@keyframes voiceWave {

    0%,
    100% {
        transform: scaleY(0.4);
        opacity: 0.6;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
        background: var(--accent);
    }
}

/* ==========================================
   MODERN SUBSCRIPTION UI - SOFT CARDS DESIGN
   ========================================== */

.pricing-header-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 32px;
    position: relative;
}

.pricing-support-promo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(245, 158, 11, 0.08));
    border-radius: 16px;
    border: 1px dashed var(--border);
    text-align: center;
    max-width: 500px;
}

.pricing-support-promo a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: underline;
}

.pricing-support-promo span {
    font-size: 0.95rem;
    color: var(--text-soft);
}

.pricing-back-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pricing-back-btn:hover {
    background: var(--surface-soft);
    transform: translateX(-2px);
}

.pricing-title-modern {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.pricing-toggle-wrapper {
    display: flex;
    gap: 8px;
    background: var(--surface-soft);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.pricing-toggle-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pricing-toggle-btn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pricing-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .pricing-cards-container {
        gap: 24px;
    }
}

/* New mobile-friendly pricing layout */
.pricing-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 4px 12px;
}

.pricing-billing-toggle {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    display: inline-flex;
    padding: 4px;
    gap: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.billing-toggle-btn {
    border: none;
    background: transparent;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    color: var(--text-soft);
    cursor: pointer;
    min-width: 96px;
}

.billing-toggle-btn.active {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(15, 118, 110, 0.2));
    color: var(--primary);
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.15);
}

.pricing-save-pill {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 10px 26px rgba(251, 191, 36, 0.28);
}

.pricing-card-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 10px 0 22px;
}

@media (max-width: 520px) {
    .pricing-card-stack {
        grid-template-columns: 1fr;
    }
}

.pricing-pill-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 249, 246, 0.92));
    border-radius: 22px;
    border: 1px solid var(--border);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.pricing-pill-card.dark {
    background: radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.12), transparent 45%),
        linear-gradient(180deg, #111827, #0f172a);
    color: #fefce8;
    border-color: rgba(255, 215, 0, 0.35);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.pricing-pill-card.bright {
    background: radial-gradient(circle at 80% 10%, rgba(255, 213, 128, 0.35), transparent 50%),
        linear-gradient(180deg, #fffdf7, #fff8e8);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.18);
}

.pricing-pill-card[data-plan-card="free"] {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.pricing-pill-card.is-active {
    outline: 3px solid rgba(15, 118, 110, 0.25);
}

.pill-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pill-plan-label {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.pill-plan-note {
    margin: 2px 0 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.pricing-pill-card.dark .pill-plan-note {
    color: #cbd5f5;
}

.pill-status {
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--surface-soft);
    color: var(--text);
}

.pricing-pill-card.dark .pill-status {
    background: rgba(255, 255, 255, 0.12);
    color: #fefce8;
}

.pill-status.popular {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
}

.pill-price-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.pill-price {
    font-size: 2rem;
    font-weight: 900;
}

.pill-period {
    color: var(--text-soft);
    font-weight: 600;
}

.pricing-pill-card.dark .pill-period {
    color: #cbd5f5;
}

.pill-slashed {
    margin: -6px 0 6px;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 600;
}

.pricing-pill-card.dark .pill-slashed {
    color: #a5b4fc;
}

.pill-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pill-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
}

.pill-features .included::before,
.pill-features .excluded::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.pill-features .included::before {
    background: #10b981;
    mask: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"white\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 6L9 17l-5-5\"/></svg>') center/14px 14px no-repeat;
}

.pill-features .excluded {
    color: var(--text-muted);
    opacity: 0.8;
}

.pill-features .excluded::before {
    background: #d1d5db;
}

.pricing-pill-card.dark .pill-features .included::before {
    background: #a3e635;
}

.pill-cta {
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #0f766e, #0ea5e9);
    color: white;
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.2);
}

.pill-cta.light {
    background: linear-gradient(135deg, #fde68a, #fbbf24);
    color: #78350f;
    box-shadow: 0 10px 24px rgba(251, 191, 36, 0.28);
}

.pill-cta.ghost {
    background: var(--surface-soft);
    color: var(--text);
    box-shadow: none;
    border: 1px solid var(--border);
}

.pricing-pill-card[hidden] {
    display: none !important;
}

.pricing-card-modern {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 255, 0.9));
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    border: 1px solid var(--border-subtle);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    transform: perspective(1000px) rotateY(0deg);
}

.pricing-card-modern:hover {
    transform: perspective(1000px) rotateY(-2deg) translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.pricing-card-modern.featured,
.pricing-card-nano.featured {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(255, 215, 0, 0.05));
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.15);
}

.pricing-card-pro {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.05));
    border-color: rgba(139, 92, 246, 0.3);
}

.pricing-card-pro .pricing-plan-name,
.pricing-card-pro .pricing-price-amount {
    color: #7c3aed;
}

.pricing-card-modern.featured:hover,
.pricing-card-nano:hover {
    box-shadow: 0 16px 40px rgba(255, 107, 53, 0.2);
}

.pricing-card-pro:hover {
    box-shadow: 0 16px 40px rgba(139, 92, 246, 0.2);
}

.pricing-card-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pricing-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: -8px;
}

.pricing-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
}

/* Max Plan (Yearly) */
.pricing-card-max.featured {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.05));
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.pricing-card-max.featured:hover {
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.2);
}

.pricing-card-max .pricing-plan-name,
.pricing-card-max .pricing-price-amount {
    color: #2563eb;
}

/* Ultra Plan (Yearly) */
.pricing-card-ultra {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(219, 39, 119, 0.05));
    border-color: rgba(236, 72, 153, 0.3);
}

.pricing-card-ultra:hover {
    box-shadow: 0 16px 40px rgba(236, 72, 153, 0.2);
}

.pricing-card-ultra .pricing-plan-name,
.pricing-card-ultra .pricing-price-amount {
    color: #db2777;
}

.pricing-plan-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

.pricing-price-modern {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 8px 0;
}

.pricing-price-strike {
    font-size: 1.2rem;
    color: var(--text-soft);
    text-decoration: line-through;
    font-weight: 500;
}

.pricing-price-amount {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text);
}

.pricing-price-period {
    font-size: 1rem;
    color: var(--text-soft);
    font-weight: 500;
}

.pricing-description {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.6;
    margin: 0;
}

.pricing-savings-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.pricing-popular-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pricing-popular-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
}

.pricing-features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.pricing-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.pricing-feature-item.included {
    color: var(--text);
}

.pricing-feature-item.excluded {
    color: var(--text-soft);
    opacity: 0.6;
}

.pricing-feature-item .feature-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.pricing-feature-item.included .feature-icon {
    color: #10b981;
}

.pricing-feature-item.excluded .feature-icon {
    color: #9ca3af;
}

.pricing-coupon-modern {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.coupon-input-modern {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.coupon-input-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.coupon-btn-modern {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.coupon-btn-modern:hover {
    background: var(--primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.coupon-feedback-modern {
    margin-top: 8px;
    font-size: 0.85rem;
    min-height: 20px;
}

.coupon-feedback-modern.success {
    color: #10b981;
}

.coupon-feedback-modern.error {
    color: #ef4444;
}

.premium-coupon-hint {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.premium-coupon-hint code {
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
}

.pricing-action-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.pricing-action-cancel {
    background: var(--surface-soft);
    color: var(--text-soft);
    border: 1px solid var(--border);
    cursor: not-allowed;
}

.pricing-action-trial {
    background: linear-gradient(135deg, #1f2937, #111827);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.pricing-action-trial:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.pricing-action-trial:active {
    transform: translateY(0);
}

@media (max-width: 767px) {
    .pricing-cards-container {
        grid-template-columns: 1fr;
    }

    .pricing-card-modern {
        padding: 24px;
    }

    .pricing-title-modern {
        font-size: 1.25rem;
    }

    .prochat-shell {
        padding: 18px;
        border-radius: 22px;
    }

    .prochat-usage {
        flex-direction: column;
        align-items: stretch;
    }

    .prochat-input-bar {
        padding: 8px;
        gap: 8px;
    }

    .prochat-send-btn {
        width: 38px;
        height: 38px;
    }
}

/* ==========================================
   MODERN AI AGENT UI - CALM & COZY DESIGN
   ========================================== */

.prochat-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: calc(100vh - 220px);
    padding: 24px;
    background:
        radial-gradient(circle at 18% 10%, rgba(248, 113, 113, 0.22), transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.22), transparent 42%),
        linear-gradient(160deg, #ffffff, #f7f8fb);
    border-radius: 28px;
    border: 1px solid var(--border-subtle);
}

.prochat-hero {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 10px;
    padding: 8px 0 6px;
}

.prochat-orb {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.75), transparent 40%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.65), transparent 45%),
        radial-gradient(circle at 50% 60%, rgba(236, 72, 153, 0.65), transparent 55%),
        radial-gradient(circle at 40% 50%, rgba(251, 146, 60, 0.9), transparent 60%),
        radial-gradient(circle at 65% 55%, rgba(248, 113, 113, 0.85), transparent 65%);
    box-shadow:
        0 16px 40px rgba(248, 113, 113, 0.25),
        inset 0 6px 16px rgba(255, 255, 255, 0.6);
    filter: blur(0.2px);
}

.prochat-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.prochat-subtitle {
    color: var(--text-soft);
    font-size: 0.95rem;
}

.prochat-usage {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.prochat-usage-plan {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.prochat-usage-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.prochat-usage-meter {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prochat-usage-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.prochat-usage-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--surface-soft);
    overflow: hidden;
}

.prochat-usage-bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.prochat-usage-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.prochat-noapi-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.prochat-usage-credit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    min-width: 160px;
}

.prochat-credit-card {
    padding: 14px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 10px;
}

.prochat-credit-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 600;
}

.prochat-credit-toggle {
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.prochat-credit-toggle:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.prochat-credit-price {
    font-size: 0.85rem;
    color: var(--text-soft);
}

.prochat-credit-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.prochat-credit-form input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
}

.prochat-credit-note {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.85rem;
}

.prochat-lock {
    display: grid;
    place-items: center;
}

.prochat-lock-card {
    width: min(420px, 100%);
    padding: 18px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px dashed var(--border);
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 8px;
}

.prochat-messages {
    flex: 1;
    min-height: 240px;
    padding: 10px 2px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.prochat-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 12px 0;
}

.prochat-message {
    display: flex;
}

.prochat-message.user {
    justify-content: flex-end;
}

.prochat-message.assistant {
    justify-content: flex-start;
}

.prochat-bubble {
    max-width: min(520px, 82%);
    padding: 12px 16px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    line-height: 1.5;
}

.prochat-message.user .prochat-bubble {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 197, 253, 0.18));
    border-color: rgba(59, 130, 246, 0.2);
}

.prochat-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.prochat-add-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
}

.prochat-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-soft);
    border-radius: 14px;
    padding: 8px 12px;
}

.prochat-input-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
}

#prochat-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text);
}

#prochat-input:focus {
    outline: none;
}

.prochat-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: fastPop 0.35s ease both;
}

.prochat-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.25);
}

.prochat-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Pro Chat - Dark Theme Fixes */
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-shell {
    background:
        radial-gradient(circle at 18% 10%, rgba(248, 113, 113, 0.12), transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.12), transparent 42%),
        linear-gradient(160deg, #0f172a, #111827);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-title {
    color: #f8fafc;
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-subtitle,
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-usage-row,
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-credit-price,
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-credit-note,
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-empty {
    color: rgba(226, 232, 240, 0.78);
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-usage,
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-credit-card,
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-lock-card,
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-input-bar {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-usage-credit,
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-input-wrap,
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-add-btn {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-credit-toggle {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) #prochat-input {
    color: #f8fafc;
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-bubble {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-message.user .prochat-bubble {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(56, 189, 248, 0.18));
    border-color: rgba(56, 189, 248, 0.25);
    color: #f8fafc;
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .prochat-send-btn {
    background: linear-gradient(135deg, #1f2937, #0f172a);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.ai-agent-ui-modern {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - 200px);
    padding: 20px;
    background:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.14), transparent 32%),
        radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.14), transparent 26%),
        linear-gradient(135deg, #f7f9ff, #eef8ff);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow-y: auto;
}

.ai-nav-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ai-nav-menu,
.ai-nav-settings {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ai-nav-menu:hover,
.ai-nav-settings:hover {
    background: rgba(255, 255, 255, 0.5);
}

.ai-greeting-modern {
    text-align: center;
    margin-bottom: 32px;
}

.ai-greeting-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}

.ai-greeting-question {
    font-size: 1rem;
    color: var(--text-soft);
    margin: 0;
}

.ai-buddy-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    min-height: 200px;
}

.ai-buddy-orb {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent),
        linear-gradient(135deg, #8B5CF6, #3B82F6);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3),
        0 0 60px rgba(139, 92, 246, 0.2),
        inset 0 0 40px rgba(255, 255, 255, 0.2);
    position: relative;
    animation: buddyFloat 3s ease-in-out infinite;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* CARTOON EYES */
.ai-buddy-orb::before,
.ai-buddy-orb::after {
    content: '';
    position: absolute;
    top: 40%;
    width: 12px;
    height: 18px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: blink 4s infinite;
}

.ai-buddy-orb::before {
    left: 35%;
}

.ai-buddy-orb::after {
    right: 35%;
}

@keyframes blink {

    0%,
    48%,
    52%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.1);
    }
}

/* ANIMATION STATES */
.ai-buddy-orb.listening {
    animation: buddyPulse 1s ease-in-out infinite, buddyFloat 3s ease-in-out infinite;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.5),
        0 0 80px rgba(139, 92, 246, 0.4),
        inset 0 0 40px rgba(255, 255, 255, 0.3);
}

.ai-buddy-orb.thinking {
    animation: buddyThink 0.8s ease-in-out infinite, buddyFloat 3s ease-in-out infinite;
    background: linear-gradient(135deg, #F59E0B, #EF4444);
}

.ai-buddy-orb.thinking::before,
.ai-buddy-orb.thinking::after {
    height: 4px;
    /* squint */
    top: 45%;
    animation: none;
}

.ai-buddy-orb.happy {
    animation: buddyJump 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(135deg, #10B981, #3B82F6);
}

.ai-buddy-orb.happy::before,
.ai-buddy-orb.happy::after {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    /* wide eyes */
    top: 38%;
    animation: none;
}

.ai-buddy-orb.react {
    animation: wiggle 0.4s ease-in-out;
}

@keyframes buddyJump {
    0% {
        transform: translateY(0) scale(1);
    }

    40% {
        transform: translateY(-30px) scale(1.1);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes buddyFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes buddyPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes buddyThink {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

.ai-buddy-eyes {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 16px;
}

.ai-buddy-eye {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    animation: blink 3s infinite;
}

.ai-buddy-eye.left {
    margin-left: -8px;
}

.ai-buddy-eye.right {
    margin-right: -8px;
}

@keyframes blink {

    0%,
    90%,
    100% {
        transform: scaleY(1);
    }

    95% {
        transform: scaleY(0.1);
    }
}

.ai-suggestions-modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 32px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.ai-suggestion-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-suggestion-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ai-suggestion-btn:active {
    transform: translateY(0);
}

.suggestion-icon {
    font-size: 1.5rem;
}

.ai-input-bar-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-top: auto;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.ai-input-add-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ai-input-add-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.ai-input-modern {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    padding: 8px 0;
    outline: none;
}

.ai-input-modern::placeholder {
    color: var(--text-soft);
}

.ai-send-btn-modern {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ai-send-btn-modern:hover {
    background: var(--primary-soft);
    border-color: rgba(var(--primary-rgb), 0.35);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.ai-send-btn-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ai-voice-btn-modern {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.ai-voice-btn-modern:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.4);
}

.ai-voice-btn-modern.listening {
    animation: voicePulse 1.5s ease-in-out infinite;
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

@keyframes voicePulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }

    50% {
        box-shadow: 0 4px 24px rgba(239, 68, 68, 0.6), 0 0 0 8px rgba(239, 68, 68, 0.1);
    }
}

.ai-limit-message-modern {
    margin: 24px auto;
    max-width: 500px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ai-limit-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.ai-limit-icon-modern {
    font-size: 3rem;
}

.ai-limit-content h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
}

.ai-limit-content p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.ai-limit-cta-modern {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-limit-cta-modern:hover {
    background: var(--primary-strong);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.ai-chat-messages-modern {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.ai-message-modern {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ai-message-modern.user {
    flex-direction: row-reverse;
}

.ai-message-avatar-modern {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-message-modern.assistant .ai-message-avatar-modern {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
}

.ai-message-modern.user .ai-message-avatar-modern {
    background: var(--surface-soft);
}

.ai-message-content-modern {
    flex: 1;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid var(--border-subtle);
}

.ai-message-modern.user .ai-message-content-modern {
    background: linear-gradient(135deg, var(--primary-soft), rgba(15, 118, 110, 0.1));
    border-color: rgba(var(--primary-rgb), 0.3);
}

@media (max-width: 480px) {
    .ai-suggestions-modern {
        grid-template-columns: 1fr;
    }

    .ai-buddy-orb {
        width: 100px;
        height: 100px;
    }
}

/* ==========================================
   PHASE 3: REDESIGNED TASKS & NOTES UI
   ========================================== */

/* --- Tasks: Horizontal Calendar Strip --- */
.calendar-strip {
    display: flex;
    gap: 12px;
    padding: 16px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-bottom: 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.calendar-strip::-webkit-scrollbar {
    display: none;
}

.calendar-day-card {
    flex: 0 0 64px;
    height: 96px;
    background: var(--surface);
    border: 2px solid var(--border-subtle);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    scroll-snap-align: start;
}

.calendar-day-card.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 8px 20px var(--primary-soft);
    transform: translateY(-4px);
}

.calendar-day-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.calendar-day-card.active .calendar-day-name {
    color: rgba(255, 255, 255, 0.9);
}

.calendar-day-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.calendar-day-card.active .calendar-day-number {
    color: white;
}

.calendar-day-status {
    display: flex;
    gap: 4px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
}

.calendar-day-card.active .status-dot {
    background: rgba(255, 255, 255, 0.5);
}

.status-dot.complete {
    background: var(--success);
}

.status-dot.incomplete {
    background: var(--danger);
}

/* --- Habit-style Task Cards --- */
.habit-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.habit-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
}

.habit-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2.5px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.habit-checkbox.checked {
    background: var(--primary);
}

.habit-checkbox svg {
    width: 16px;
    height: 16px;
    stroke: white;
    stroke-width: 3;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.habit-checkbox.checked svg {
    opacity: 1;
}

.habit-content {
    flex: 1;
}

.habit-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.habit-card.checked .habit-title {
    text-decoration: line-through;
    color: var(--text-soft);
    opacity: 0.7;
}

.habit-streak {
    font-size: 0.85rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.habit-streak span {
    color: var(--text-soft);
}

/* --- Notes: Tabbed Architecture & Folder Grid --- */
.notes-tabs-modern {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    padding: 0 4px;
}

.notes-tab-btn {
    padding: 8px 0 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.notes-tab-btn.active {
    color: var(--text);
}

.notes-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.folders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.folder-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.folder-tile:hover {
    background: var(--surface-soft);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.folder-icon {
    font-size: 2rem;
    margin-bottom: 4px;
}

.folder-name {
    font-weight: 600;
    color: var(--text);
}

.notes-masonry {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.note-card-modern {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.note-card-modern:hover {
    box-shadow: var(--shadow);
    border-color: var(--border);
}

.note-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.note-title-modern {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.note-tags-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.note-tag-pill {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text-soft);
    border: 1px solid var(--border-subtle);
}

.note-snippet {
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* FAB Adjustments */
.notes-fab-new {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: black;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    z-index: 100;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .notes-masonry {
        grid-template-columns: 1fr;
    }
}

/* Dock updates for 7 items */
.dock-item-agent {
    position: relative;
}

.dock-item-agent::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 16px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.35), rgba(15, 118, 110, 0));
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: -1;
}

.dock-item-agent:hover::after,
.dock-item-agent.active::after {
    opacity: 1;
}

@media (max-width: 720px) {
    .dock-inner {
        gap: 4px;
        padding: 10px 12px;
    }

    .dock-item {
        min-width: 48px;
        padding: 6px 8px;
    }

    .dock-label {
        font-size: 0.6rem;
    }

    .dock-icon {
        width: 18px;
        height: 18px;
    }
}

/* AI usage strip */
.ai-usage-strip {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    margin: 0 auto 18px;
    max-width: 640px;
}

html[data-theme="dark"] .ai-usage-strip {
    background: rgba(31, 41, 55, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
}

.ai-usage-plan {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.ai-usage-plan strong {
    font-size: 1rem;
    color: var(--text);
}

.ai-usage-meter {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-usage-meter-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.ai-usage-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--surface-soft);
    overflow: hidden;
}

#ai-usage-bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

#ai-usage-bar[data-state="unlimited"] {
    background: linear-gradient(90deg, #2563eb, #22c55e, #f59e0b);
    animation: fastShimmer 2s linear infinite;
}

.ai-usage-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ai-noapi-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 520px) {
    .ai-usage-strip {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Voice preview cards */
.voice-preview-card {
    margin-top: 12px;
    padding: 14px;
    background: var(--surface-soft);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.voice-preview-header h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.voice-preview-header p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.voice-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.voice-preview-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.voice-preview-field span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.voice-preview-field strong {
    font-size: 0.95rem;
}

.voice-preview-field.span-2 {
    grid-column: span 2;
}

.voice-preview-actions {
    display: flex;
    gap: 10px;
}

.field-missing input,
.field-missing textarea,
.field-missing select {
    border-color: var(--danger);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

.field-missing {
    animation: fastShake 0.3s ease-out;
}

/* Quick voice button */
.quick-voice-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-voice-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.quick-voice-btn.recording {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

/* Pricing + docs layout */
.pricing-hero-new {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
    margin-bottom: 24px;
}

.pricing-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pricing-subtitle-modern {
    margin: 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.5;
}

.pricing-status-card {
    background: var(--surface);
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pricing-status-card .status-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text);
}

.pricing-status-card .status-hint {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.home-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.quick-action-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary-strong);
    background: var(--primary-soft);
}

.pricing-current-pill {
    display: none;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pricing-card-modern.is-active .pricing-current-pill {
    display: inline-flex;
}

.pricing-usage-preview {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

html[data-theme="dark"] .pricing-usage-preview {
    background: rgba(31, 41, 55, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

.usage-preview-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.usage-preview-meter {
    height: 6px;
    background: var(--surface-soft);
    border-radius: 999px;
    overflow: hidden;
}

.usage-preview-meter span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.usage-preview-meter.is-unlimited span {
    background: linear-gradient(90deg, #2563eb, #22c55e, #f59e0b);
    animation: fastShimmer 1.6s linear infinite;
}

.pricing-docs {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.docs-header h2 {
    margin: 0 0 6px;
}

.docs-header p {
    margin: 0;
    color: var(--text-soft);
}

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

.doc-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-step-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.doc-tags span {
    background: var(--surface-soft);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: var(--text-soft);
    border: 1px dashed var(--border);
}

.doc-example {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}

.doc-note {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 0.85rem;
    font-weight: 600;
}

@media (min-width: 820px) {
    .pricing-hero-new {
        grid-template-columns: 1.2fr 0.8fr;
        align-items: center;
    }

    .docs-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .home-quick-actions {
        grid-template-columns: 1fr;
    }

    .todo-add-fab {
        right: 12px;
        bottom: 96px;
        padding: 11px 12px;
    }
}

@media (max-width: 768px) {

    .premium-panel-new,
    .settings-new {
        padding: 14px 12px 120px;
        border-radius: var(--radius-lg);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
        margin: 0 auto 18px;
    }

    .pricing-hero-new {
        grid-template-columns: 1fr;
    }
}

/* Paywall modal */
.ai-paywall-modal .ai-paywall-card {
    text-align: center;
    gap: 12px;
}

.ai-paywall-icon {
    font-size: 2.5rem;
}

.ai-paywall-subtitle {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

/* ==========================================
   PHASE 4: DOCK V4 & AI AGENT BUTTON
   ========================================== */

/* Hide old dock */
.dock-v2,
.dock-v3 {
    display: none !important;
}

/* New Dock V4 */
.dock.dock-v4 {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: center bottom;
    transition: transform 0.25s ease, opacity 0.2s ease;
    z-index: 1000;
    width: auto;
    max-width: 90%;
    pointer-events: auto;
}

.dock.dock-v4.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.dock-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.05);
    max-width: min(92vw, 620px);
    transform: scale(calc(var(--dock-scale, 1) * var(--ui-scale, 1)));
    transform-origin: center bottom;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.dock-container::-webkit-scrollbar {
    display: none;
}

html[data-theme="dark"] .dock-container {
    background: rgba(31, 41, 55, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 6px 10px;
    min-width: 60px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-soft);
}

.dock-item:hover {
    background: var(--surface-soft);
    color: var(--text);
    transform: translateY(-2px);
}

.dock-item.active {
    color: var(--primary);
}

.dock-icon-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dock-item.active .dock-icon-wrapper {
    transform: scale(1.1);
}

.dock-item.active .dock-icon {
    stroke-width: 2.5;
}

.dock-label {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.9;
    line-height: 1.2;
}

.dock-item.active .dock-label {
    font-weight: 700;
    opacity: 1;
    color: currentColor;
}

/* Agent Button - The Star */
.dock-item-agent {
    padding: 0;
    margin: 0 8px;
    overflow: visible;
}

.dock-agent-bubble {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid var(--surface);
    margin-top: -14px;
    /* Pop out effect */
}

html[data-theme="dark"] .dock-agent-bubble {
    border-color: #1f2937;
    /* Match dark surface */
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.5);
}

.dock-item-agent:hover .dock-agent-bubble {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.5);
}

.dock-item-agent.active .dock-agent-bubble {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

.dock-icon-agent {
    width: 22px;
    height: 22px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.dock-label-agent {
    font-size: 0.7rem;
    font-weight: 700;
    color: #8b5cf6;
    margin-top: 4px;
}

html[data-theme="dark"] .dock-label-agent {
    color: #a78bfa;
}

.dock-item-premium {
    color: #b45309;
    font-weight: 600;
    margin-left: auto;
}

.dock-item-premium:hover,
.dock-item-premium.active {
    background: linear-gradient(135deg, #f7e8c4, #f1d291);
    color: #7c2d12;
    box-shadow: 0 10px 28px rgba(180, 83, 9, 0.35);
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-item-premium {
    color: #facc15;
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-item-premium:hover,
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-item-premium.active {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(234, 179, 8, 0.25));
    color: #fcd34d;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .dock.dock-v4 {
        bottom: 12px;
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        padding: 0 4px;
        /* Move padding here */
    }

    .dock-container {
        padding: 8px 8px;
        gap: 4px;
        justify-content: space-around;
        width: 100%;
        max-width: 100% !important;
        /* Override the min(86vw, 520px) */
    }

    .dock-item {
        min-width: 0 !important;
        /* Use 0 and important to override legacy styles */
        flex: 1;
        padding: 6px 2px;
        max-width: 16.66%;
        /* Explicit 1/6th width */
    }

    .dock-label {
        font-size: 0.52rem !important;
        /* Force smaller size */
        letter-spacing: -0.03em;
        white-space: nowrap;
    }

    .dock-agent-bubble {
        width: 36px;
        height: 36px;
        margin-top: -10px;
    }

    .dock-icon-agent {
        width: 16px;
        height: 16px;
    }

    .dock-icon-wrapper {
        width: 18px;
        height: 18px;
    }

    .dock-icon {
        width: 16px;
        height: 16px;
    }
}

/* Fix for Settings and Premium on Mobile - Comprehensive */
@media (max-width: 768px) {

    .premium-panel-new,
    .settings-new {
        padding-bottom: 160px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .pricing-hero-new {
        padding: 24px 16px;
    }

    .settings-grid-new {
        gap: 16px;
    }

    .pricing-card-stack {
        grid-template-columns: 1fr;
        padding: 0 4px;
    }
}

@media (max-width: 480px) {

    .settings-new,
    .premium-panel-new {
        padding: 12px 10px 160px !important;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
        margin: 0 4px;
        width: calc(100% - 8px);
    }

    .settings-header-new {
        padding: 20px 12px !important;
        border-radius: 16px !important;
        margin-bottom: 16px !important;
    }

    .settings-header-new h1 {
        font-size: 1.4rem !important;
    }

    .section-header-new {
        padding: 12px 10px !important;
        gap: 10px !important;
    }

    .section-icon-new {
        width: 36px !important;
        height: 36px !important;
    }

    .section-content-new {
        padding: 12px 10px !important;
    }

    .setting-item-new {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 14px 0 !important;
    }

    /* Stack items that have long controls or many buttons */
    .setting-item-new:has(.text-size-new),
    .setting-item-new:has(.language-toggle-new) {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .setting-label-new {
        font-size: 0.92rem !important;
    }

    .themes-grid-new {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .pricing-hero-new {
        padding: 16px 12px !important;
    }

    .pricing-title-modern {
        font-size: 1.35rem !important;
    }

    .pricing-status-card {
        padding: 12px !important;
    }

    .pricing-toggle-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .pricing-card-stack {
        gap: 14px !important;
    }

    .pricing-pill-card {
        padding: 16px !important;
        border-radius: 18px !important;
    }

    .pill-price-line .pill-price {
        font-size: 1.8rem !important;
    }
}

/* ==========================================
   SETTINGS + PREMIUM REBUILD (MOBILE FIRST)
   ========================================== */
#panel-settings .settings-new,
#panel-premium .premium-panel-new {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 16px 14px 120px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

#panel-settings .settings-header-new {
    padding: 18px 16px;
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(15, 118, 110, 0.15), rgba(255, 255, 255, 0.7));
    border: 1px solid var(--border-subtle);
}

#panel-settings .settings-header-new h1 {
    margin: 0 0 6px;
    font-size: 1.45rem;
    letter-spacing: 0.02em;
}

#panel-settings .settings-subtitle {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

#panel-settings .settings-grid-new {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

#panel-settings .settings-section-new {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

#panel-settings .section-header-new {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

#panel-settings .section-title-new h3 {
    margin: 0;
    font-size: 1.05rem;
}

#panel-settings .section-title-new p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--text-soft);
}

#panel-settings .section-content-new {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#panel-settings .input-row-new {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

#panel-settings .input-group-new input {
    width: 100%;
}

#panel-settings .themes-grid-new {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

#panel-settings .support-buttons-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#panel-settings .settings-credits-new {
    padding: 18px 16px;
    border-radius: 18px;
    border: 1px dashed var(--border);
    background: var(--surface-soft);
}

/* Premium layout */
#panel-premium .pricing-hero-new {
    padding: 18px 16px;
    border-radius: 20px;
}

#panel-premium .pricing-status-card {
    width: 100%;
    margin-top: 16px;
}

#panel-premium .pricing-toggle-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

#panel-premium .pricing-billing-toggle {
    width: 100%;
    justify-content: space-between;
}

#panel-premium .pricing-card-stack {
    grid-template-columns: 1fr;
    gap: 14px;
}

#panel-premium .pricing-pill-card {
    padding: 16px;
    border-radius: 18px;
}

/* Small value text used in settings subscription overview */
.setting-value-new {
    font-weight: 800;
    color: var(--text);
}

@media (min-width: 720px) {

    #panel-settings .settings-new,
    #panel-premium .premium-panel-new {
        padding: 20px 20px 140px;
    }

    #panel-settings .settings-grid-new {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #panel-settings .input-row-new {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #panel-settings .themes-grid-new {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    #panel-premium .pricing-toggle-row {
        flex-direction: row;
        align-items: center;
    }

    #panel-premium .pricing-card-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 980px) {
    #panel-premium .pricing-card-stack {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==========================================
   PHONE / DESKTOP VIEW MODES
   ========================================== */
body[data-view="phone"] .app {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-left: none !important;
    border-right: none !important;
    transform: none !important;
    overflow: visible !important;
}

body[data-view="phone"] .panel {
    padding: 0 12px 120px !important;
}

body[data-view="phone"] #panel-settings .settings-grid-new {
    grid-template-columns: 1fr !important;
}

body[data-view="phone"] #panel-settings .input-row-new {
    grid-template-columns: 1fr !important;
}

body[data-view="phone"] #panel-settings .themes-grid-new {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-view="phone"] #panel-premium .pricing-toggle-row {
    flex-direction: column !important;
    align-items: stretch !important;
}

body[data-view="phone"] #panel-premium .pricing-billing-toggle {
    width: 100% !important;
}

body[data-view="phone"] #panel-premium .pricing-card-stack {
    grid-template-columns: 1fr !important;
}

body[data-view="desktop"] {
    background: radial-gradient(circle at 20% 20%, rgba(var(--primary-rgb, 34, 197, 94), 0.08), transparent 32%),
        radial-gradient(circle at 82% 0%, rgba(59, 130, 246, 0.06), transparent 30%),
        linear-gradient(180deg, var(--bg), var(--surface-soft));
}

body[data-view="desktop"] .app {
    width: calc(100% - 320px);
    max-width: 1440px;
    min-width: 760px;
    margin: 36px 32px 56px 260px;
    border-radius: 26px;
    background: linear-gradient(180deg, var(--surface), var(--surface-soft));
    border: 1px solid var(--border);
    box-shadow: 0 24px 72px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

body[data-view="desktop"] .app-header {
    justify-content: space-between;
    padding: 18px 32px 14px;
    background: linear-gradient(180deg, rgba(var(--primary-rgb, 15, 118, 110), 0.08), rgba(var(--primary-rgb, 15, 118, 110), 0));
    border-bottom: 1px solid var(--border-subtle);
}

body[data-view="desktop"] .app-title {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

body[data-view="desktop"] .panel {
    padding: 0 40px 160px;
}

body[data-view="desktop"] #panel-settings .settings-grid-new {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

body[data-view="desktop"] #panel-settings .settings-new {
    padding: 32px 32px 160px;
    gap: 32px;
}

body[data-view="desktop"] #panel-ai .prochat-shell {
    max-width: 1100px;
    margin: 12px auto 0;
    padding: 28px 32px;
    gap: 24px;
}

body[data-view="desktop"] #panel-ai .prochat-usage {
    padding: 16px 20px;
    gap: 20px;
}

body[data-view="desktop"] #panel-ai .prochat-messages {
    min-height: 360px;
}

body[data-view="desktop"] #panel-ai .prochat-input-bar {
    padding: 12px 16px;
}

body[data-view="desktop"] #panel-settings .themes-grid-new {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

body[data-view="desktop"] #panel-settings .settings-section-new,
body[data-view="desktop"] #panel-settings .settings-header-new {
    border: 1px solid var(--border);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    background: var(--surface);
}

@media (max-width: 1100px) {
    body[data-view="desktop"] .dock-v4 {
        left: 20px;
        width: 180px;
    }

    body[data-view="desktop"] .app {
        width: calc(100% - 220px);
        margin: 28px 16px 52px 200px;
        min-width: 0;
    }

    body[data-view="desktop"] .panel {
        padding: 0 28px 150px;
    }
}

/* ==========================================
   2026 UI FIXES: Dark theme + Desktop dock
   ========================================== */

/* UI scale should scale the app; dock uses dock scale only. */
.dock-v4 {
    transform: translateX(-50%) scale(var(--dock-scale, 1));
}

/* Dark themes: make dock glass match theme surface. */
html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-container {
    background: rgba(var(--surface-rgb, 15, 23, 42), 0.82);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(148, 163, 184, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-agent-bubble {
    border-color: rgba(var(--surface-rgb, 31, 41, 55), 1);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.5);
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-label-agent {
    color: #a78bfa;
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-item {
    color: rgba(226, 232, 240, 0.82);
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-item:hover {
    background: rgba(148, 163, 184, 0.18);
    color: #f8fafc;
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-item.active {
    color: #f8fafc;
}

html:is([data-theme="dark"], [data-theme="night-shop"], [data-theme="midnight-purple"], [data-theme="sunset-orange"]) .dock-label {
    color: rgba(226, 232, 240, 0.9);
}

/* Desktop: turn the dock into a left sidebar so the layout has no empty left gap. */
body[data-view="desktop"] .dock-v4 {
    left: 24px;
    bottom: 50%;
    width: 126px;
    max-width: none;
    transform: translateY(50%) scale(var(--dock-scale, 1));
    transform-origin: left center;
}

body[data-view="desktop"] .dock-container {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 12px;
    gap: 8px;
    border-radius: 24px;
}

body[data-view="desktop"] .dock-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    min-width: 0;
    border-radius: 16px;
}

body[data-view="desktop"] .dock-label {
    font-size: 0.78rem;
    opacity: 0.85;
    margin-top: 0;
}

body[data-view="desktop"] .dock-item:hover {
    transform: translateY(0);
}

body[data-view="desktop"] .dock-item.active .dock-icon-wrapper {
    transform: scale(1.08);
}

body[data-view="desktop"] .dock-item-agent {
    margin: 0;
    padding: 10px 12px;
}

body[data-view="desktop"] .dock-item-premium {
    margin-top: auto;
}

body[data-view="desktop"] .dock-agent-bubble {
    width: 44px;
    height: 44px;
    border-width: 2px;
    margin-top: 0;
    border-radius: 16px;
}

body[data-view="desktop"] .dock-label-agent {
    margin-top: 0;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: none;
}

body[data-view="desktop"] .app {
    width: calc(100% - 210px);
    margin: 28px 32px 56px 170px;
    min-width: 760px;
}

/* Desktop: settings grid is flex in base; switch to grid on desktop. */
body[data-view="desktop"] #panel-settings .settings-grid-new {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

@media (min-width: 1400px) {
    body[data-view="desktop"] #panel-settings .settings-grid-new {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    body[data-view="desktop"] .dock-v4 {
        left: 50%;
        bottom: 22px;
        width: auto;
        max-width: 95%;
        transform: translateX(-50%) scale(var(--dock-scale, 1));
        transform-origin: center bottom;
    }

    body[data-view="desktop"] .dock-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 12px;
        gap: 6px;
    }

    body[data-view="desktop"] .dock-item {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 10px;
        border-radius: 18px;
    }

    body[data-view="desktop"] .dock-item-agent {
        padding: 0;
        margin: 0 10px;
    }

    body[data-view="desktop"] .dock-agent-bubble {
        width: 60px;
        height: 60px;
        border-width: 4px;
        margin-top: -28px;
        border-radius: 22px;
    }

    body[data-view="desktop"] .dock-label-agent {
        margin-top: 6px;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    body[data-view="desktop"] .app {
        width: calc(100% - 32px);
        min-width: 0;
        margin: 24px 16px 96px;
    }
}

/* ==========================================
   SIMPLE TODO POLISH
   ========================================== */
body[data-todo-mode="simple"] .calendar-strip {
    display: none;
}

body[data-todo-mode="simple"] .habit-card {
    padding: 12px 14px;
    border-radius: 18px;
    margin-bottom: 10px;
}

body[data-todo-mode="simple"] .habit-title {
    font-size: 1rem;
    margin-bottom: 0;
}

.habit-meta {
    font-size: 0.88rem;
    color: var(--text-soft);
    margin-top: 6px;
    line-height: 1.35;
}

body[data-todo-mode="simple"] .habit-streak {
    display: none;
}

/* ==========================================
   ONBOARDING: UI SIZE PICKER
   ========================================== */
.onboarding-ui-size {
    width: 100%;
    max-width: 340px;
    margin-top: 10px;
    padding: 12px;
    border-radius: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.onboarding-ui-size-title {
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}

.onboarding-ui-size-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.onboarding-ui-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.onboarding-ui-btn.active {
    border-color: rgba(var(--primary-rgb), 0.6);
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
}
