/* Dark Theme Webkit Autofill Override */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary, #f5f5f4) !important;
    -webkit-box-shadow: 0 0 0px 1000px #191817 inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* --- Global Variables & Theme Config --- */
:root {
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px; /* Larger radius for clean card look */
    --radius-xl: 32px;
    
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Default Accent Color Palette */
    --accent: #a855f7; /* Vibrant Purple */
    --accent-rgb: 168, 85, 247;
    --accent-hover: #9333ea;
    --accent-glow: rgba(var(--accent-rgb), 0.25);
    --border-color-active: rgba(var(--accent-rgb), 0.6);
    --border-glow: rgba(var(--accent-rgb), 0.15);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-app: #121110; /* Cozy dark warm grey */
    --bg-sidebar: #191817;
    --bg-card: #201e1d; /* Solid physical cards */
    --bg-card-hover: #262423;
    --bg-panel-sec: #191817;
    
    --border-color: #2b2927;
    
    --text-primary: #f5f5f4;
    --text-secondary: #a8a29e;
    --text-muted: #78716c;
    --text-light: #e7e5e4;
    
    --color-success: #10b981;
    --color-success-glow: rgba(16, 185, 129, 0.15);
    --color-danger: #f43f5e;
    --color-danger-glow: rgba(244, 63, 94, 0.15);
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
    
    --glass-blur: none;
    --card-glow-opacity: 0.15;
}

/* Light Theme Variables (Neo-Brutalist Cream Canvas) */
[data-theme="light"] {
    --bg-app: #f4f0ea; /* Warm cream Neo-Brutalist canvas */
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff; /* Crisp white physical cards */
    --bg-card-hover: #faf8f5;
    --bg-panel-sec: #eae4db;
    
    --accent: #8b5cf6; /* Royal violet accent */
    --accent-hover: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.2);
    
    --border-color: #111111; /* Bold high contrast black border */
    
    --text-primary: #111111;   /* High contrast black */
    --text-secondary: #2b2b2b; /* Deep charcoal */
    --text-muted: #555555;     /* Dark slate grey */
    --text-light: #111111;
    
    --color-success: #059669;
    --color-success-glow: rgba(5, 150, 105, 0.1);
    --color-danger: #db2777;
    --color-danger-glow: rgba(219, 39, 119, 0.1);
    
    --shadow-sm: 2px 2px 0px #111111;
    --shadow-md: 4px 4px 0px #111111;
    --shadow-lg: 6px 6px 0px #111111;
    
    --glass-blur: none;
    --card-glow-opacity: 0.08;
}

/* --- Resets --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    line-height: 1.5;
}

button, input, textarea, select {
    font-family: inherit;
    color: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- App Layout Structure --- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.app-sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform var(--transition-normal), background-color var(--transition-normal);
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
    stroke-width: 2.5;
}

.sidebar-close {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.sidebar-close:hover {
    background-color: var(--border-color);
}

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

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 12px 6px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.nav-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link i {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
}

.nav-link.active {
    color: #ffffff;
    background-color: var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow);
}

[data-theme="light"] .nav-link.active {
    color: #111111;
    background-color: #d2ff38;
    border: 2px solid #111111;
    box-shadow: 3px 3px 0px #111111;
    font-weight: 800;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    color: inherit;
    transition: color var(--transition-fast);
}

.footer-link-btn:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

.dot-separator {
    user-select: none;
}

/* --- Main Area & Header --- */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents overflow issues */
}

.app-header {
    height: 70px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(var(--bg-app), 0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    max-width: 600px;
}

.menu-toggle-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.menu-toggle-btn:hover {
    background-color: var(--bg-card-hover);
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

#global-search {
    width: 100%;
    padding: 10px 48px 10px 42px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

[data-theme="light"] #global-search {
    background-color: #ffffff;
    border: 2px solid #111111;
    box-shadow: 3px 3px 0px #111111;
    border-radius: 12px;
    font-weight: 600;
}

#global-search:focus {
    border-color: var(--accent);
    background-color: var(--bg-sidebar);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

[data-theme="light"] #global-search:focus {
    border-color: #111111;
    box-shadow: 4px 4px 0px #111111;
}

.search-shortcut {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 6px;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-active);
}

.theme-toggle i {
    width: 18px;
    height: 18px;
}

[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* --- Content Views Manager --- */
.content-container {
    padding: 40px;
    flex: 1;
    overflow-y: auto;
}

.app-view {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--transition-normal) ease-out, transform var(--transition-normal) ease-out;
}

.app-view.active {
    display: block;
    animation: slideIn var(--transition-normal) forwards;
}

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

/* --- Hero Section & Dashboard --- */
.dashboard-hero {
    margin-bottom: 36px;
}

.dashboard-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
}

.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.category-tabs::-webkit-scrollbar {
    height: 4px;
}
.category-tabs::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.category-tab {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.category-tab:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.category-tab.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Bento Cards Styling */
.bento-card {
    position: relative;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column-reverse; /* Reverses order: Content first, Icon second */
    align-items: center;
    text-align: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
    min-height: 200px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.bento-w2 {
    grid-column: span 1 !important;
}

/* Custom background glow on hover */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--border-color-active), transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.bento-card:hover .card-glow {
    opacity: var(--card-glow-opacity);
}

.bento-card:hover {
    border-color: var(--border-color-active);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background-color: var(--bg-card-hover);
}

.card-icon-wrapper {
    width: 100%;
    height: 120px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    background: #f6f3f0; /* Warm beige like Evernote */
    border: 1px solid #eae7e4;
    transition: all var(--transition-normal);
}

[data-theme="dark"] .card-icon-wrapper {
    background: #252321; /* Warm dark brown-gray */
    border: 1px solid #33302e;
}

.card-icon-wrapper svg {
    width: auto;
    height: 95px;
    display: block;
}

/* Tool specific colored themes for icons */
.age-calc-theme { color: #a855f7; }
.sip-calc-theme { color: #10b981; }
.emi-calc-theme { color: #f59e0b; }
.interest-calc-theme { color: #3b82f6; }
.discount-calc-theme { color: #ec4899; }
.percentage-calc-theme { color: #06b6d4; }
.fuel-calc-theme { color: #20b8a2; }
.word-counter-theme { color: #ef4444; }
.text-converter-theme { color: #6366f1; }
.image-compressor-theme { color: #8b5cf6; }
.qr-generator-theme { color: #f43f5e; }
.invoice-generator-theme { color: #10b981; }

.card-content {
    position: relative;
    z-index: 2;
    padding: 8px 8px 0 8px; /* Padding top instead of bottom for title */
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0;
    letter-spacing: -0.2px;
}

.card-content p {
    display: none; /* Hide description for clean centered look */
}

.card-arrow {
    display: none; /* Hide the arrow for the clean layout */
}


/* --- Tools Common Views & Layouts --- */
.view-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.back-btn i {
    width: 16px;
    height: 16px;
}

.back-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-active);
}

.view-title-wrap h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.view-title-wrap p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Glass panel components */
.glass-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.secondary-bg {
    background-color: var(--bg-panel-sec);
}

/* Standard tool side-by-side layout */
.tool-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.tool-layout-wide {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Input Styles */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group .subtext {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="password"],
.input-field,
.form-control,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
.input-field:focus,
.form-control:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Sliders custom styles */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-header span {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: var(--radius-sm);
    background: var(--border-color);
    outline: none;
    margin: 12px 0 6px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 8px var(--accent-glow);
    transition: transform var(--transition-fast);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.tenure-input-wrap {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

/* Color inputs styles */
input[type="color"] {
    -webkit-appearance: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 100%;
    height: 46px;
    cursor: pointer;
    padding: 0;
    background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: var(--radius-md);
}

/* Buttons style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 15px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-app);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    color: var(--text-primary);
    background-color: var(--border-color);
}

.btn-accent-outline {
    background-color: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.btn-accent-outline:hover {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-success {
    background-color: var(--color-success);
    color: #ffffff;
}

.btn-success:hover {
    background-color: #047857;
    box-shadow: 0 4px 15px var(--color-success-glow);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--color-danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #e11d48;
    box-shadow: 0 4px 15px var(--color-danger-glow);
    transform: translateY(-1px);
}

.btn-icon i {
    width: 18px;
    height: 18px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-full-w {
    width: 100%;
}

/* Common Dividers */
.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 20px 0;
}

/* --- Placeholder state --- */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.placeholder-icon {
    width: 60px;
    height: 60px;
    color: var(--border-color);
    margin-bottom: 16px;
    stroke-width: 1.5;
}

.result-placeholder p {
    font-size: 0.95rem;
}

.hidden {
    display: none !important;
}


/* --- AGE CALCULATOR SPECIFIC --- */
.age-main-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.age-main-card {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.age-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

.age-lbl {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.breakdown-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.95rem;
}

.breakdown-list li {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

.breakdown-list strong {
    color: var(--text-primary);
}


/* --- SIP & EMI SUMMARY BOXES --- */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.stat-row strong {
    color: var(--text-primary);
}

.currency-value {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.text-accent { color: var(--accent) !important; }
.text-primary { color: var(--text-primary) !important; }
.text-success { color: var(--color-success) !important; }

.stat-row.highlight {
    font-size: 1.15rem;
    font-weight: 700;
    padding: 14px 0;
    color: var(--text-primary);
}

.stat-row.highlight .currency-value {
    font-size: 1.6rem;
    font-weight: 800;
}

.wealth-ratio-bar {
    display: flex;
    height: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--bg-app);
    margin: 20px 0 10px 0;
}

.ratio-invested { background-color: var(--accent); }
.ratio-gains { background-color: var(--color-success); }

.ratio-legends {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.invested, .dot.principal { background-color: var(--accent); }
.dot.gains, .dot.interest { background-color: var(--color-success); }

/* EMI SPECIFIC */
.emi-summary-box {
    display: flex;
    flex-direction: column;
}

.emi-large-amount {
    text-align: center;
    padding: 10px 0;
}

.emi-lbl {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.emi-large-amount strong {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
}


/* --- INTEREST CALCULATOR WIDE --- */
.input-row-panel h3 {
    margin-bottom: 16px;
}

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

.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.margin-top-sm { margin-top: 10px; }
.margin-top-md { margin-top: 20px; }
.margin-top-xs { margin-top: 6px; }

.align-bottom {
    display: flex;
    align-items: flex-end;
}

.result-card {
    position: relative;
    padding: 24px;
    border-radius: var(--radius-md);
}

.result-card h3 {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.result-card .large-val {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.accent-border {
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background-color: var(--accent);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
}

.highlight-sub {
    font-weight: 700;
    border-top: 1px dashed var(--border-color);
    margin-top: 6px;
    padding-top: 12px;
    color: var(--text-primary);
}


/* --- DISCOUNT CALCULATOR SPECIFIC --- */
.final-price-box {
    text-align: center;
    padding: 10px 0;
}

.final-lbl {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.final-price-box strong {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
}


/* --- PERCENTAGE CALCULATOR SPECIFIC --- */
.gap-lg { gap: 30px; }

.math-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.math-card h3 {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.math-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    flex-wrap: wrap;
}

.math-input-sm {
    width: 70px;
    text-align: center;
    padding: 8px;
}

.math-input-md {
    width: 110px;
    text-align: center;
    padding: 8px;
}

.math-result-box {
    background-color: var(--bg-app);
    border: 1px dashed var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-top: 6px;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
}

.math-result-box strong {
    color: var(--accent);
}


/* --- FUEL & TRIP CALCULATOR SPECIFIC --- */
.fuel-summary-box {
    display: flex;
    flex-direction: column;
}

.fuel-large-cost {
    text-align: center;
    padding: 10px 0;
}

.fuel-lbl {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.fuel-large-cost strong {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
}


/* --- WORD & CHARACTER COUNTER SPECIFIC --- */
.text-tool-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: stretch;
}

.text-input-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.text-input-panel textarea {
    flex: 1;
    min-height: 280px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
}

.text-actions-bar {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.counter-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    gap: 16px;
}

.counter-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: var(--radius-md);
}

.counter-num {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
}

.counter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 4px;
}


/* --- ADVANCED TEXT CONVERTER SPECIFIC --- */
.converter-split-layout {
    display: grid;
    grid-template-columns: 1fr 180px 1fr;
    gap: 20px;
    align-items: stretch;
}

.split-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}

.split-panel textarea {
    flex: 1;
    min-height: 380px;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.split-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.actions-grid-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.actions-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}


/* --- IMAGE COMPRESSOR SPECIFIC --- */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background-color: var(--bg-app);
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent);
    background-color: var(--accent-glow);
}

.drop-icon {
    width: 44px;
    height: 44px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.drop-zone:hover .drop-icon {
    color: var(--accent);
}

.drop-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.compress-settings-box {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.comparison-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
}

.compare-side {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.compare-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.compare-side strong {
    font-size: 1.15rem;
    margin-top: 4px;
}

.compare-arrow {
    color: var(--text-muted);
}

.saving-badge {
    background-color: var(--color-success-glow);
    color: var(--color-success);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.preview-container {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 20px 0;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 250px;
    overflow: hidden;
}

.preview-container img {
    max-width: 100%;
    max-height: 226px;
    object-fit: contain;
    border-radius: 4px;
}

.compress-result-box {
    display: flex;
    flex-direction: column;
}


/* --- QR CODE GENERATOR SPECIFIC --- */
.qr-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
    margin-bottom: 24px;
}

.qr-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: calc(var(--radius-md) - 2px);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.qr-tab i {
    width: 16px;
    height: 16px;
}

.qr-tab:hover {
    color: var(--text-primary);
    background-color: var(--border-color);
}

.qr-tab.active {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.qr-tab-panel {
    margin-bottom: 4px;
}

.qr-error-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-danger-glow);
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    margin-top: 12px;
    animation: fadeIn 0.2s ease;
}

.qr-error-msg i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

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

.qr-canvas-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    min-height: 250px;
}

#qr-output-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

#qr-output-container .result-placeholder {
    color: #94a3b8;
    padding: 20px;
}

#qr-output-container .placeholder-icon {
    color: #cbd5e1;
}

#qr-output-container img {
    max-width: 100%;
    height: auto;
}

.qr-actions {
    margin-top: 20px;
}

.accordion-section {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.accordion-section h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}


/* --- MODALS STYLING --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(7, 9, 19, 0.6);
    backdrop-filter: var(--glass-blur);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

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

.modal-body h3 {
    font-size: 1.05rem;
    margin: 16px 0 6px 0;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 14px;
    line-height: 1.6;
}


/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
    .converter-split-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .actions-grid-column {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .actions-grid-column .btn {
        flex: 1 1 140px;
    }
    
    .actions-grid-column .divider {
        display: none;
    }
    
    .app-header {
        padding: 0 20px;
    }
    
    .content-container {
        padding: 20px;
    }
}

@media (max-width: 820px) {
    .tool-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .bento-w2 {
        grid-column: span 1;
    }
    
    .text-tool-layout {
        grid-template-columns: 1fr;
    }
    
    .counter-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }
    
    .app-sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .menu-toggle-btn {
        display: block;
    }
    
    .grid-3-col {
        grid-template-columns: 1fr;
    }
    
    .grid-2-col {
        grid-template-columns: 1fr;
    }
    
    .dashboard-hero h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .counter-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .age-main-cards {
        grid-template-columns: 1fr;
    }
    
    .tenure-input-wrap {
        grid-template-columns: 1fr;
    }
    
    .search-shortcut {
        display: none;
    }
    
    #global-search {
        padding-right: 16px;
    }
}

/* --- Document & File Converters Styles --- */
.logs-textarea {
    width: 100%;
    height: 100px;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    resize: none;
}

.file-drop-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    max-height: 160px;
    overflow-y: auto;
}

.file-drop-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.file-drop-list li .remove-file-btn {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.preview-scroll-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    margin-top: 15px;
    max-height: 400px;
}

.excel-table-render table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.excel-table-render th, .excel-table-render td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    white-space: nowrap;
}

.excel-table-render th {
    background-color: var(--bg-app);
    font-weight: 600;
}

.file-extract-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.file-extract-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.file-extract-list li button {
    padding: 6px 12px;
}

.drop-zone.dragover {
    border-color: var(--accent);
    background-color: rgba(79, 70, 229, 0.05);
}

/* Spinner rotation animation for loaders */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   INVOICE GENERATOR STYLES
   ========================================================================== */

/* Template Selector */
.invoice-template-selector {
    margin-bottom: 24px;
}
.invoice-template-selector .control-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.invoice-template-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.inv-template-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--surface-card);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.inv-template-tab:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--surface-hover);
}
.inv-template-tab.active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(99,102,241,0.08));
    color: var(--accent);
    box-shadow: 0 0 20px rgba(79,70,229,0.15);
}
.inv-template-tab i {
    width: 18px;
    height: 18px;
}

/* Layout */
.invoice-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 1100px) {
    .invoice-layout {
        grid-template-columns: 1fr;
    }
}

/* Form Panel */
.invoice-form-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 24px;
}
.invoice-form-panel input,
.invoice-form-panel textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}
.invoice-form-panel input:focus,
.invoice-form-panel textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

/* Logo + Invoice Info Row */
.inv-top-row {
    display: flex;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}
.inv-top-fields {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 600px) {
    .inv-top-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .inv-top-fields {
        width: 100%;
        grid-template-columns: 1fr;
    }
}

/* Logo Upload */
.inv-logo-upload-area {
    width: 140px;
    height: 90px;
    border-radius: 12px;
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    position: relative;
    background: var(--surface-hover);
    flex-shrink: 0;
}
.inv-logo-upload-area:hover {
    border-color: var(--accent);
    background: rgba(79,70,229,0.05);
}
.inv-logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
}
.inv-logo-placeholder i {
    width: 24px;
    height: 24px;
}
.inv-logo-preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Parties Row (From & To) */
.inv-parties-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}
.inv-party-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.inv-party-label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
@media (max-width: 650px) {
    .inv-parties-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Single Form Fields (Supply, Notes) */
.inv-single-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.inv-single-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Items Area */
.inv-items-area {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

/* Items Table */
.inv-items-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.inv-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.inv-items-table thead {
    background: var(--surface-hover);
}
.inv-items-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.inv-items-table td {
    padding: 8px;
    border-top: 1px solid var(--border-color);
    vertical-align: middle;
}
.inv-items-table input {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: var(--font-body);
}
.inv-items-table input:focus {
    outline: none;
    border-color: var(--accent);
}
.inv-items-table .inv-item-desc {
    min-width: 140px;
}
.inv-items-table .inv-item-num {
    width: 60px;
}
.inv-items-table .inv-item-amount {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
    text-align: right;
    padding-right: 10px;
}
.inv-item-remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.inv-item-remove-btn:hover {
    color: #ef4444;
    background: rgba(239,68,68,0.1);
}
.inv-item-remove-btn i {
    width: 16px;
    height: 16px;
}


/* Export Actions */
.inv-export-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    flex-wrap: wrap;
}

/* Preview Panel */
.invoice-preview-panel {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
}
.inv-preview-header {
    padding: 0 0 12px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.inv-preview-header h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.inv-preview-header h4 i {
    width: 18px;
    height: 18px;
    color: var(--accent);
}
.inv-preview-scroll {
    overflow-y: auto;
    flex: 1;
    padding: 4px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Preview Canvas (the actual invoice render) */
.inv-preview-canvas {
    background: #ffffff;
    color: #1a1a2e;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 24px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    min-height: auto;
    zoom: 0.72;
    width: 100%;
}

/* Invoice Preview Internal Styles */
.inv-preview-canvas .inv-p-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid #4f46e5;
}
.inv-preview-canvas .inv-p-logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}
.inv-preview-canvas .inv-p-logo-area img {
    max-height: 48px;
    max-width: 120px;
    object-fit: contain;
    border-radius: 4px;
}
.inv-preview-canvas .inv-p-company-name {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
}
.inv-preview-canvas .inv-p-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #4f46e5;
    text-align: right;
    margin: 0;
}
.inv-preview-canvas .inv-p-meta {
    text-align: right;
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}
.inv-preview-canvas .inv-p-meta span {
    display: block;
}

/* Parties Section */
.inv-preview-canvas .inv-p-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.inv-preview-canvas .inv-p-party-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4f46e5;
    margin-bottom: 6px;
}
.inv-preview-canvas .inv-p-party-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}
.inv-preview-canvas .inv-p-party-detail {
    font-size: 11px;
    color: #6b7280;
    margin: 1px 0;
}

/* Items Table in Preview */
.inv-preview-canvas .inv-p-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.inv-preview-canvas .inv-p-items-table thead {
    background: #4f46e5;
}
.inv-preview-canvas .inv-p-items-table th {
    padding: 10px 8px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
}
.inv-preview-canvas .inv-p-items-table th:last-child {
    text-align: right;
}
.inv-preview-canvas .inv-p-items-table td {
    padding: 10px 8px;
    font-size: 11px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}
.inv-preview-canvas .inv-p-items-table td:last-child {
    text-align: right;
    font-weight: 600;
}
.inv-preview-canvas .inv-p-items-table tbody tr:hover {
    background: #f9fafb;
}

/* Totals */
.inv-preview-canvas .inv-p-totals {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}
.inv-preview-canvas .inv-p-totals-table {
    width: 260px;
}
.inv-preview-canvas .inv-p-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
    color: #374151;
}
.inv-preview-canvas .inv-p-totals-row.grand-total {
    border-top: 2px solid #4f46e5;
    margin-top: 4px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 800;
    color: #4f46e5;
}

/* Notes */
.inv-preview-canvas .inv-p-notes {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}
.inv-preview-canvas .inv-p-notes-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4f46e5;
    margin-bottom: 6px;
}
.inv-preview-canvas .inv-p-notes-text {
    font-size: 11px;
    color: #6b7280;
    white-space: pre-wrap;
}

/* Freelancer Template Overrides */
.inv-preview-canvas.template-freelancer .inv-p-header {
    border-bottom-color: #10b981;
    flex-direction: column;
    gap: 8px;
}
.inv-preview-canvas.template-freelancer .inv-p-title {
    color: #10b981;
    text-align: left;
    font-size: 24px;
}
.inv-preview-canvas.template-freelancer .inv-p-meta {
    text-align: left;
}
.inv-preview-canvas.template-freelancer .inv-p-items-table thead {
    background: #10b981;
}
.inv-preview-canvas.template-freelancer .inv-p-party-label {
    color: #10b981;
}
.inv-preview-canvas.template-freelancer .inv-p-totals-row.grand-total {
    border-top-color: #10b981;
    color: #10b981;
}
.inv-preview-canvas.template-freelancer .inv-p-notes-title {
    color: #10b981;
}

/* GST Template Overrides */
.inv-preview-canvas.template-gst .inv-p-header {
    border-bottom-color: #f59e0b;
    border-bottom-width: 4px;
}
.inv-preview-canvas.template-gst .inv-p-title {
    color: #b45309;
    font-size: 22px;
}
.inv-preview-canvas.template-gst .inv-p-items-table thead {
    background: #b45309;
}
.inv-preview-canvas.template-gst .inv-p-party-label {
    color: #b45309;
}
.inv-preview-canvas.template-gst .inv-p-gst-badge {
    display: inline-block;
    background: #fef3c7;
    color: #b45309;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 4px;
}
.inv-preview-canvas.template-gst .inv-p-totals-row.grand-total {
    border-top-color: #f59e0b;
    color: #b45309;
}
.inv-preview-canvas.template-gst .inv-p-notes-title {
    color: #b45309;
}
.inv-preview-canvas.template-gst .inv-p-supply-info {
    font-size: 10px;
    color: #92400e;
    background: #fef3c7;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
}

/* Responsive for preview on mobile */
@media (max-width: 1100px) {
    .invoice-preview-panel {
        position: static;
        max-height: none;
    }
}

/* HSN/SAC & Place of Supply Toggle logic */
#inv-pos-group {
    display: none;
}
.inv-hsn-col {
    display: none;
}
.invoice-layout.template-gst #inv-pos-group {
    display: flex;
}
.invoice-layout.template-gst th.inv-hsn-col,
.invoice-layout.template-gst td.inv-hsn-col {
    display: table-cell;
}

/* ================================================================
   THEME CUSTOMIZER FLOATING PANEL
   ================================================================ */
.theme-customizer-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}
.theme-customizer-toggle::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-app);
}
.theme-customizer-toggle:hover {
    color: var(--accent);
    background-color: var(--bg-card-hover);
    border-color: var(--accent);
    transform: rotate(15deg);
}
.theme-customizer-toggle i {
    width: 18px;
    height: 18px;
}

.color-picker-header-wrap {
    position: relative;
}

.accent-color-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 270px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 500;
    display: none;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(12px);
}

.accent-color-popover.open {
    display: flex;
    animation: popoverFade 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.popover-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.theme-customizer-panel.open {
    right: 0;
}

.customizer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.customizer-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.customizer-header h3 i {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.customizer-close {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.customizer-close:hover {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
}

.customizer-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.customizer-section {
    padding: 14px 0;
}

.customizer-section label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

.swatch.active {
    border-color: var(--text-primary);
    transform: scale(1.1);
}

.swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 800;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.custom-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.custom-color-row input[type="color"] {
    width: 44px;
    height: 36px;
    border-radius: 8px;
    padding: 2px;
}

.custom-color-row span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.customizer-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.customizer-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.font-size-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px;
}

.font-size-btn {
    flex: 1;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.font-size-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

#font-size-display {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 40px;
    text-align: center;
}

.slider-val {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

.sidebar-style-toggle {
    display: flex;
    gap: 6px;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 5px;
}

.sidebar-style-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.sidebar-style-btn:hover {
    color: var(--text-primary);
}

.sidebar-style-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.customizer-divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px 0;
}

/* Sidebar Style Variants */
.app-sidebar.sidebar-compact {
    width: 72px;
}
.app-sidebar.sidebar-compact .nav-link span,
.app-sidebar.sidebar-compact .nav-group-title,
.app-sidebar.sidebar-compact .brand-logo span,
.app-sidebar.sidebar-compact .sidebar-footer {
    display: none;
}
.app-sidebar.sidebar-compact .sidebar-brand {
    justify-content: center;
    padding: 16px;
}
.app-sidebar.sidebar-compact .nav-link {
    justify-content: center;
    padding: 12px;
}
.app-sidebar.sidebar-floating {
    margin: 16px;
    height: calc(100vh - 32px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

/* ================================================================
   INVOICE CUSTOMIZATION BAR
   ================================================================ */
.invoice-customize-bar {
    margin-bottom: 24px;
    padding: 20px 24px;
}
.invoice-customize-bar h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}
.invoice-customize-bar h4 i {
    width: 18px;
    height: 18px;
    color: var(--accent);
}
.inv-customize-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.inv-customize-group {
    flex: 1;
    min-width: 140px;
}
.inv-customize-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.inv-customize-group select {
    padding: 8px 12px;
    font-size: 0.85rem;
}
.inv-color-picker-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.inv-color-picker-wrap input[type="color"] {
    width: 36px;
    height: 32px;
    border-radius: 8px;
    padding: 1px;
    cursor: pointer;
}
.inv-color-picker-wrap span {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: monospace;
}

/* ================================================================
   TEMPLATE DOWNLOADS SECTION
   ================================================================ */
.tpl-customizer-bar {
    margin-bottom: 24px;
    padding: 20px 24px;
}
.tpl-customizer-bar h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}
.tpl-customizer-bar h4 i {
    width: 18px;
    height: 18px;
    color: var(--accent);
}
.tpl-customize-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.tpl-customize-group {
    flex: 1;
    min-width: 140px;
}
.tpl-customize-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tpl-customize-group select {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.template-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: default;
}
.template-card:hover {
    border-color: var(--border-color-active);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.template-card-preview {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: #0f172a;
}
.template-card-preview .tpl-preview-render {
    width: 100%;
    height: 100%;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}

/* Mini template previews */
.tpl-mini-nav {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}
.tpl-mini-nav-dots {
    display: flex;
    gap: 4px;
}
.tpl-mini-nav-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    opacity: 0.7;
}
.tpl-mini-nav-links {
    display: flex;
    gap: 10px;
}
.tpl-mini-nav-link {
    height: 4px;
    width: 24px;
    border-radius: 2px;
    opacity: 0.5;
}
.tpl-mini-hero {
    padding: 16px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}
.tpl-mini-hero-title {
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}
.tpl-mini-hero-subtitle {
    font-size: 7px;
    opacity: 0.6;
    margin-bottom: 10px;
}
.tpl-mini-btn {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 7px;
    font-weight: 700;
    color: white;
    border: none;
}
.tpl-mini-cards-row {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow: hidden;
}
.tpl-mini-card {
    flex: 1;
    height: 40px;
    border-radius: 6px;
    opacity: 0.3;
}

.template-card-body {
    padding: 20px;
}
.template-card-body h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}
.template-card-body p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}
.template-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.template-card-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid transparent;
}
.template-card-actions {
    display: flex;
    gap: 10px;
}
.template-card-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 0.82rem;
    padding: 8px 14px;
}

/* Modern & Dark Invoice Template */
.inv-preview-canvas.template-modern .inv-p-header {
    border-bottom: 2px solid #e2e8f0;
}
.inv-preview-canvas.template-modern .inv-p-title {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 8px;
    color: #334155;
}
.inv-preview-canvas.template-modern .inv-p-items-table thead {
    background: #f1f5f9;
    color: #334155;
}
.inv-preview-canvas.template-modern .inv-p-totals-row.grand-total {
    border-top-color: #e2e8f0;
    color: #334155;
}

.inv-preview-canvas.template-dark {
    background: #1e1b2e !important;
    color: #e2e8f0 !important;
}
.inv-preview-canvas.template-dark .inv-p-header {
    border-bottom-color: #3b3456;
}
.inv-preview-canvas.template-dark .inv-p-title {
    color: #a78bfa;
    font-size: 26px;
}
.inv-preview-canvas.template-dark .inv-p-company-name {
    color: #f1f5f9;
}
.inv-preview-canvas.template-dark .inv-p-party-label {
    color: #a78bfa;
}
.inv-preview-canvas.template-dark .inv-p-party-name {
    color: #f1f5f9;
}
.inv-preview-canvas.template-dark .inv-p-party-detail {
    color: #94a3b8;
}
.inv-preview-canvas.template-dark .inv-p-items-table thead {
    background: #a78bfa;
    color: white;
}
.inv-preview-canvas.template-dark .inv-p-items-table tbody tr {
    border-color: #3b3456;
}
.inv-preview-canvas.template-dark .inv-p-items-table tbody td {
    color: #cbd5e1;
}
.inv-preview-canvas.template-dark .inv-p-totals-row {
    color: #cbd5e1;
}
.inv-preview-canvas.template-dark .inv-p-totals-row.grand-total {
    color: #a78bfa;
    border-top-color: #3b3456;
}
.inv-preview-canvas.template-dark .inv-p-notes-title {
    color: #a78bfa;
}
.inv-preview-canvas.template-dark .inv-p-notes-text {
    color: #94a3b8;
}
.inv-preview-canvas.template-dark .inv-p-meta span,
.inv-preview-canvas.template-dark .inv-p-meta strong {
    color: #94a3b8;
}

/* Responsive for new sections */
@media (max-width: 900px) {
    .inv-customize-row,
    .tpl-customize-row {
        flex-direction: column;
    }
    .templates-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .theme-customizer-panel {
        width: 100%;
        right: -100%;
    }
    .template-card-actions {
        flex-direction: column;
    }
}

/* --- Segmented Controls (Region Switches) --- */
.segmented-control {
    display: flex;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 4px;
    margin-bottom: 12px;
}

.segmented-control button {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.segmented-control button:hover {
    color: var(--text-primary);
    background-color: var(--border-color);
}

.segmented-control button.active {
    background-color: var(--accent);
    color: #ffffff;
}

/* --- Currency Selector Dropdowns --- */
.currency-selector-group {
    margin-bottom: 15px;
}

.currency-select {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.currency-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ================================================================
   PHOTO BACKGROUND REMOVER STYLE
   ================================================================ */
.file-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background-color: var(--bg-app);
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.file-dropzone:hover, .file-dropzone.dragover {
    border-color: var(--accent);
    background-color: var(--accent-glow);
}

.file-dropzone .dropzone-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.file-dropzone:hover .dropzone-icon {
    color: var(--accent);
}

.file-dropzone .dropzone-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.file-dropzone .browse-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
}

.file-dropzone .dropzone-subtext {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Checkered transparent background */
.transparent-checkered {
    background-color: #ffffff;
    background-image: 
        linear-gradient(45deg, #f3f4f6 25%, transparent 25%), 
        linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #f3f4f6 75%), 
        linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

[data-theme="dark"] .transparent-checkered {
    background-color: #1e293b;
    background-image: 
        linear-gradient(45deg, #0f172a 25%, transparent 25%), 
        linear-gradient(-45deg, #0f172a 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #0f172a 75%), 
        linear-gradient(-45deg, transparent 75%, #0f172a 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Results Content */
.results-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.results-tab {
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.results-tab:hover {
    color: var(--text-primary);
    border-color: var(--border-color-active);
}

.results-tab.active {
    background-color: var(--accent-glow);
    color: var(--accent);
    border-color: var(--accent);
}

/* Comparison Slider */
.comparison-slider-container {
    width: 100%;
    max-width: 550px;
    margin: 0 auto 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    user-select: none;
    background-color: var(--bg-app);
}

.comparison-slider img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

#slider-original-img {
    background-color: var(--bg-app);
}

.foreground-img-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.foreground-img-wrap .transparent-checkered {
    width: 100%;
    height: 100%;
}

.foreground-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: var(--accent);
    cursor: ew-resize;
    z-index: 10;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.handle-line {
    flex: 1;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.4);
}

.handle-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: ew-resize;
    transition: transform var(--transition-fast);
}

.slider-handle:hover .handle-button {
    transform: scale(1.1);
}

.handle-button i {
    width: 16px;
    height: 16px;
}

/* Side by side View */
.comparison-side-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    width: 100%;
}

.side-img-box {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-app);
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.img-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 600;
    z-index: 5;
    backdrop-filter: blur(4px);
}

.img-badge.badge-accent {
    background-color: var(--accent);
}

/* Loading Panel and Spinner */
.processing-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.processing-loader .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.progress-bar-container {
    width: 100%;
    max-width: 320px;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 16px 0 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-active));
    border-radius: 4px;
    transition: width 0.1s ease-out;
}

.progress-percent {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Tool Settings */
.tool-settings {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-select {
    padding: 10px 14px;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-tip {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .comparison-side-container {
        grid-template-columns: 1fr;
    }
    .comparison-slider {
        height: 280px;
    }
    .side-img-box {
        height: 220px;
    }
}

/* --- Invoice Generator Enhanced Layout and Dropdown Menu --- */
.inv-dropdown-container {
    position: relative;
    width: 100%;
}

.inv-download-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 4px;
    backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.inv-download-dropdown.active {
    display: flex;
    animation: dropdownOpen 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownOpen {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.inv-download-dropdown .dropdown-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 6px 12px 2px 12px;
}

.inv-download-dropdown .dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

.inv-download-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
}

.inv-download-dropdown .dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
}

.inv-download-dropdown .dropdown-item i {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.inv-download-dropdown .dropdown-item:hover i {
    color: var(--accent);
}

.inv-download-dropdown .dropdown-item i.icon-pdf {
    color: var(--color-danger);
}
.inv-download-dropdown .dropdown-item:hover i.icon-pdf {
    color: var(--accent);
}

.inv-download-dropdown .dropdown-item i.icon-image {
    color: var(--color-success);
}
.inv-download-dropdown .dropdown-item:hover i.icon-image {
    color: var(--accent);
}

.inv-download-dropdown .item-meta {
    display: flex;
    flex-direction: column;
}

.inv-download-dropdown .item-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

.inv-download-dropdown .item-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Premium physical paper look for invoice preview */
.invoice-preview-panel {
    background: var(--bg-panel-sec);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.inv-preview-scroll {
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

[data-theme="dark"] .inv-preview-scroll {
    background: rgba(0, 0, 0, 0.2);
}

.inv-preview-canvas {
    background: #ffffff;
    color: #0f172a;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
    min-height: auto; /* Dynamic height based on content to prevent scrollbar/space waste */
    max-width: 210mm;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Chevron animate */
#inv-pdf-trigger-btn .chevron-icon,
#inv-img-trigger-btn .chevron-icon {
    margin-left: auto;
    transition: transform var(--transition-fast);
}

#inv-pdf-trigger-btn.active .chevron-icon,
#inv-img-trigger-btn.active .chevron-icon {
    transform: rotate(180deg);
}

/* Dual Column Layout for Side-by-Side Actions */
.inv-export-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 20px;
}

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

/* ==========================================================================
   SEO ARTICLES & FAQ ACCORDIONS
   ========================================================================== */
/* ==========================================================================
   PREMIUM SEO ARTICLES & FAQ SECTION (THEME ADAPTIVE)
   ========================================================================== */
/* --- Static SEO Article Container (Inline on Tool Pages) --- */
/* --- Fully Expanded SEO Article Container (100% Google Indexable) --- */
.seo-article-container {
    margin: 40px 0 20px 0;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: visible;
    max-height: none !important;
    transition: all var(--transition-normal);
}

/* Ensure no height truncation */
.seo-article-container:not(.expanded):not([id^="seo-wrap-"]) {
    max-height: none !important;
}

.seo-article-container:hover {
    border-color: var(--border-color-active);
    box-shadow: var(--shadow-md);
}

.seo-article-container .seo-content {
    padding: 32px;
}

/* Banner / Header Bar for SEO Article Section */
.seo-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: var(--bg-panel-sec);
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

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

.seo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid var(--border-color-active);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.seo-meta-info {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.seo-toggle-btn {
    display: none !important;
}

/* Fully Visible Article Body for Instant Google Crawler Indexing */
.seo-article-body {
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    padding: 32px;
}

/* Hide Fade Overlay & Read More buttons completely */
.fade-overlay, .see-more-btn {
    display: none !important;
}

/* --- FAQ Accordion Styling (Fully Visible & Indexable) --- */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 28px;
}

.faq-item {
    background: var(--bg-panel-sec);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--border-color-active);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 10px 22px;
    background: transparent;
    border: none;
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    cursor: default;
}

.faq-question i, .faq-question svg {
    display: none !important;
}

.faq-answer {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    padding: 0 22px 20px 22px !important;
    font-size: 0.96rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.seo-content p {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.seo-content p.lead-p {
    font-size: 1.12rem;
    line-height: 1.85;
    color: var(--text-primary);
    font-weight: 500;
}

.seo-content strong {
    color: var(--text-primary);
    font-weight: 700;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

.seo-content code {
    background: var(--bg-panel-sec);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px 8px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.88em;
    color: var(--accent);
    word-break: break-word;
}

/* FAQ Section */
.faq-section {
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
    margin-top: 12px;
}

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

.faq-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-icon-badge {
    width: 40px;
    height: 40px;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid var(--border-color-active);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-heading {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.faq-subheading {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 2px 0 0 0;
}

.faq-count-badge {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-glow);
}

.faq-list-open {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item-card {
    background: var(--bg-panel-sec);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    transition: all var(--transition-fast);
}

.faq-item-card:hover {
    border-color: var(--border-color-active);
    border-left-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.faq-q-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.faq-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 7px;
    flex-shrink: 0;
    margin-top: 1px;
    box-shadow: 0 2px 6px var(--accent-glow);
}

.faq-q-text {
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.45;
    margin: 0;
}

.faq-a-body {
    padding-left: 38px;
}

.faq-a-body p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .seo-toggle-card {
        flex-direction: column;
        align-items: stretch;
    }
    .seo-toggle-btn {
        width: 100%;
        justify-content: center;
    }
    .seo-article-body {
        padding: 0 16px;
    }
    .seo-article-container.expanded .seo-article-body {
        padding: 20px 16px;
    }
    .seo-content h2 {
        font-size: 1.35rem;
    }
    .faq-a-body {
        padding-left: 0;
        margin-top: 8px;
    }
    .faq-q-head {
        gap: 10px;
    }
}


/* ================================================================
   LANDING PAGE STYLES
   ================================================================ */
.landing-view {
    padding: 0;
    overflow-y: auto;
}

/* Hero Section */
.landing-hero {
    background: linear-gradient(135deg, #09081a 0%, #1a1638 40%, #151528 100%);
    padding: 80px 48px 64px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(129,140,248,0.22) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 70%, rgba(236,72,153,0.18) 0%, transparent 55%),
        radial-gradient(circle at 50% 10%, rgba(16,185,129,0.12) 0%, transparent 40%);
    pointer-events: none;
}

.landing-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(99,102,241,0.18);
    border: 1px solid rgba(99,102,241,0.4);
    color: #c7d2fe;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px rgba(99,102,241,0.15);
    backdrop-filter: blur(10px);
}

.badge-pulse-dot {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 10px #34d399;
    animation: pulseGlow 2s infinite ease-in-out;
}

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

.landing-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 20px 0;
    letter-spacing: -1px;
}

.landing-accent {
    background: linear-gradient(135deg, #a5b4fc, #ec4899, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-subtitle {
    font-size: 1.15rem;
    color: #cbd5e1;
    max-width: 680px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* Landing Hero Search Bar */
.landing-search-box {
    max-width: 600px;
    margin: 0 auto 36px;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 6px 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}

.landing-search-box:focus-within {
    border-color: #818cf8;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.25), 0 12px 36px rgba(0, 0, 0, 0.4);
}

.landing-search-icon {
    width: 22px;
    height: 22px;
    color: #a5b4fc;
    margin-right: 12px;
    flex-shrink: 0;
}

.landing-search-box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    padding: 12px 0;
}

.landing-search-box input::placeholder {
    color: #94a3b8;
}

.landing-search-badge {
    background: rgba(129, 140, 248, 0.25);
    color: #c7d2fe;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    white-space: nowrap;
    border: 1px solid rgba(129, 140, 248, 0.3);
}

.landing-cta-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.landing-primary-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    border: none;
    color: #fff;
}

.landing-primary-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-large i {
    width: 20px;
    height: 20px;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    cursor: pointer;
    font-family: inherit;
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

/* Privacy Guarantee Banner */
.landing-privacy-banner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.7), rgba(15, 23, 42, 0.7));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 24px;
    padding: 36px 44px;
    margin: 24px 48px 36px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    align-items: center;
}

.lpb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.lpb-left h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.lpb-left p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
}

.lpb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.lpb-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
}

.lpb-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.lpb-num {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: #38bdf8;
    margin-bottom: 4px;
}

.lpb-label {
    font-size: 0.78rem;
    color: #cbd5e1;
    font-weight: 600;
}

/* Custom Colored Badges for LTC Cards */
.badge-red { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }
.badge-purple { background: rgba(168, 85, 247, 0.2); color: #e9d5ff; border: 1px solid rgba(168, 85, 247, 0.35); }
.badge-green { background: rgba(34, 197, 94, 0.2); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.35); }
.badge-blue { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.35); }
.badge-rose { background: rgba(244, 63, 94, 0.2); color: #fecdd3; border: 1px solid rgba(244, 63, 94, 0.35); }
.badge-emerald { background: rgba(16, 185, 129, 0.2); color: #a7f3d0; border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-amber { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-orange { background: rgba(249, 115, 22, 0.2); color: #fed7aa; border: 1px solid rgba(249, 115, 22, 0.35); }
.badge-pink { background: rgba(236, 72, 153, 0.2); color: #fbcfe8; border: 1px solid rgba(236, 72, 153, 0.35); }
.badge-cyan { background: rgba(6, 182, 212, 0.2); color: #a5f3fc; border: 1px solid rgba(6, 182, 212, 0.35); }
.badge-teal { background: rgba(20, 184, 166, 0.2); color: #99f6e4; border: 1px solid rgba(20, 184, 166, 0.35); }
.badge-indigo { background: rgba(99, 102, 241, 0.2); color: #c7d2fe; border: 1px solid rgba(99, 102, 241, 0.35); }

@media (max-width: 900px) {
    .landing-privacy-banner {
        grid-template-columns: 1fr;
        margin: 20px 20px 28px;
        padding: 28px 24px;
    }
}

/* Stats Bar */
.landing-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.lstat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 36px;
}

.lstat strong {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lstat span {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

.lstat-sep {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.12);
}

/* Tool Sections */
.landing-section {
    padding: 52px 48px 12px;
}

.landing-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 28px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.3px;
}

/* Tool Cards Grid */
.landing-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.landing-tool-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.22s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    box-sizing: border-box;
}

.landing-tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.22s;
    pointer-events: none;
}

.landing-tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.15);
}

.landing-tool-card:hover::before {
    opacity: 0.03;
}

.ltc-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ltc-icon i {
    width: 26px;
    height: 26px;
    color: #ffffff;
}

.ltc-content {
    flex: 1;
    min-width: 0;
}

.ltc-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.ltc-content p {
    font-size: 0.87rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0 0 10px 0;
}

.ltc-badge {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 100px;
    letter-spacing: 0.3px;
    opacity: 0.85;
}

.ltc-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 4px;
    transition: all 0.2s;
}

.landing-tool-card:hover .ltc-arrow {
    color: var(--accent);
    transform: translate(3px, -3px);
}

/* Feature Highlights Grid */
.landing-features-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 40px 48px 10px;
    margin-top: -24px;
    position: relative;
    z-index: 10;
}

.landing-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.landing-feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.lfc-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lfc-icon i {
    width: 24px;
    height: 24px;
}

.landing-feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.landing-feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Knowledge Base Showcase */
.landing-kb-section {
    background: var(--bg-panel-sec);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-top: 40px;
}

.landing-kb-intro {
    color: var(--text-secondary);
    font-size: 0.98rem;
    margin-top: -16px;
    margin-bottom: 28px;
}

.landing-kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.landing-kb-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.landing-kb-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.lkb-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.landing-kb-card h4 {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.landing-kb-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.lkb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

.lkb-link i {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.landing-kb-card:hover .lkb-link i {
    transform: translateX(4px);
}

/* Trust Badges */
.landing-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 40px 48px 56px;
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 10px 18px;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.trust-badge i {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.trust-badge:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Responsive Landing */
@media (max-width: 900px) {
    .landing-hero {
        padding: 60px 24px 52px;
    }
    .landing-section {
        padding: 36px 20px 12px;
    }
    .landing-tools-grid {
        grid-template-columns: 1fr;
    }
    .landing-stats {
        gap: 0;
    }
    .lstat {
        padding: 0 20px;
    }
    .lstat strong {
        font-size: 1.7rem;
    }
    .landing-trust {
        padding: 28px 20px 40px;
    }
    .landing-cta-row {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 500px) {
    .lstat-sep { display: none; }
    .lstat { padding: 10px 16px; }
    .landing-stats { gap: 0; flex-wrap: wrap; }
    .landing-hero { padding: 48px 16px 40px; }
    .landing-section { padding: 28px 16px 8px; }
    .landing-trust { padding: 20px 16px 32px; gap: 10px; }
}

/* ==========================================================================
   MODAL DIALOG & OVERLAY STYLING (Privacy & Terms)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-glass);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.modal-card-large {
    max-width: 820px;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-panel-sec);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 0 4px;
}

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

.modal-body {
    padding: 28px;
    overflow-y: auto;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.modal-body .modal-lead {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-body h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin: 20px 0 8px 0;
}

.modal-body p {
    margin-bottom: 14px;
}

.modal-body code {
    background: var(--bg-panel-sec);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-family: monospace;
    font-size: 0.88em;
    color: var(--text-primary);
}

/* ==========================================================================
   BLOG SYSTEM & ARTICLE READER STYLES
   ========================================================================== */
.blog-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.blog-hub-title h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.blog-hub-title p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 4px;
}

.blog-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.blog-filter-btn {
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.blog-filter-btn:hover, .blog-filter-btn.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.blog-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.blog-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.blog-post-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-active);
    box-shadow: var(--shadow-md);
}

.blog-card-banner {
    height: 160px;
    width: 100%;
    padding: 16px;
    display: flex;
    align-items: flex-end;
    position: relative;
}

.blog-card-category-badge {
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.blog-card-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

/* Single Article Reader View */
.single-article-container {
    max-width: 860px;
    margin: 0 auto;
}

.article-header-banner {
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    color: #ffffff;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.article-header-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.article-header-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
}

.article-author-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.article-author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.6);
}

.article-reader-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    color: var(--text-secondary);
    line-height: 1.85;
    font-size: 1.05rem;
}

.article-reader-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 32px 0 16px 0;
}

.article-reader-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin: 24px 0 12px 0;
}

.article-reader-content p {
    margin-bottom: 20px;
}

.article-reader-content ul, .article-reader-content ol {
    margin: 16px 0 24px 24px;
}

.article-reader-content li {
    margin-bottom: 10px;
}

.article-reader-content a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Design System
   ========================================================================== */

@media (max-width: 1024px) {
    .app-main {
        padding: 0;
    }
    .content-container {
        padding: 24px 20px 60px;
    }
    .dashboard-hero h1 {
        font-size: 2.3rem;
    }
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    html {
        -webkit-tap-highlight-color: transparent;
    }
    
    body {
        font-size: 15px;
    }

    .app-container {
        flex-direction: column;
    }

    /* Fixed Glassmorphic Mobile Header */
    .app-header {
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 12px 16px;
        background: rgba(13, 15, 25, 0.88);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border-color);
    }

    .header-search {
        display: none;
    }

    .brand-logo-text {
        font-size: 1.15rem;
    }

    /* Mobile Sidebar Styling */
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 285px;
        max-width: 85vw;
        z-index: 1000;
        background: var(--bg-card);
        border-right: 1px solid var(--border-color);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    }

    .app-sidebar.active {
        transform: translateX(0);
    }

    /* Layout & View Padding */
    .content-container {
        padding: 16px 12px 48px;
    }

    .view-header {
        margin-bottom: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .view-header h2 {
        font-size: 1.6rem;
    }

    .view-header p {
        font-size: 0.95rem;
    }

    /* Dashboard & Hero Sections */
    .dashboard-hero {
        padding: 28px 18px;
        border-radius: var(--radius-md);
        margin-bottom: 24px;
        text-align: center;
    }

    .dashboard-hero h1 {
        font-size: 1.85rem;
        line-height: 1.25;
    }

    .dashboard-hero p {
        font-size: 0.98rem;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    /* Grids & Cards Stacking */
    .tools-grid,
    .blog-hub-grid,
    .blog-grid,
    .grid-3-col,
    .grid-2-col {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .tool-card {
        padding: 20px;
    }

    /* Tool Panels & Two-Column Split Adjustments */
    .tool-workspace-split,
    .calculator-split,
    .invoice-split-container {
        grid-template-columns: 1fr !important;
        flex-direction: column;
        gap: 20px;
    }

    .glass-panel {
        padding: 20px 16px !important;
        border-radius: var(--radius-md);
    }

    /* Buttons & Form Inputs Touch Targets */
    .btn,
    .input-field,
    .select-field,
    button {
        min-height: 44px;
        font-size: 0.95rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Article Reader & FAQ Accordion Mobile Touch */
    .article-reader-container,
    .seo-article-container {
        padding: 20px 16px !important;
    }

    .article-header h1 {
        font-size: 1.65rem;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .dashboard-hero h1 {
        font-size: 1.55rem;
    }

    .view-header h2 {
        font-size: 1.4rem;
    }

    .glass-panel {
        padding: 16px 12px !important;
    }

    .tool-card {
        padding: 16px;
    }
}

/* ==========================================================================
   DIBAKAR AI MULTITOOL — LUXURY AI DESIGN SYSTEM & AESTHETIC UPGRADES
   ========================================================================== */

/* Glassmorphism & Cosmic Theme Variables Overrides */
[data-theme="dark"] {
    --bg-app: #090a0f; /* Deep obsidian cosmic background */
    --bg-sidebar: rgba(14, 16, 24, 0.85);
    --bg-card: rgba(22, 25, 38, 0.65);
    --bg-card-hover: rgba(30, 35, 54, 0.85);
    --bg-panel-sec: rgba(17, 20, 31, 0.75);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-active: rgba(168, 85, 247, 0.6);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-light: #e2e8f0;
    
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    
    --glass-blur: blur(20px);
    --card-glow-opacity: 0.25;
}

[data-theme="light"] {
    --bg-app: #f4f5f9;
    --bg-sidebar: rgba(255, 255, 255, 0.9);
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --bg-panel-sec: rgba(246, 247, 251, 0.9);
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-active: rgba(168, 85, 247, 0.5);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #334155;
    
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
    
    --glass-blur: blur(20px);
    --card-glow-opacity: 0.08;
}

/* Ambient Background Floating Orbs */
.app-layout {
    position: relative;
    overflow-x: hidden;
}

.app-layout::before {
    content: '';
    position: fixed;
    top: -180px;
    right: -180px;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, rgba(59, 130, 246, 0.06) 50%, transparent 70%);
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 20s ease-in-out infinite alternate;
}

.app-layout::after {
    content: '';
    position: fixed;
    bottom: -180px;
    left: 220px;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.14) 0%, rgba(244, 63, 94, 0.06) 50%, transparent 70%);
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 24s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(45px, -35px) scale(1.1); }
    100% { transform: translate(-35px, 45px) scale(0.95); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.5);
    background-clip: padding-box;
}

/* Sidebar Glassmorphism */
.app-sidebar {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
}

.brand-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 20%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .brand-logo {
    background: linear-gradient(135deg, #0f172a 20%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    color: #a855f7;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
    animation: iconPulse 3s infinite ease-in-out;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.9)); }
}

.nav-link {
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    transform: translateX(4px);
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.nav-link.active i {
    color: #ffffff;
}

/* Header Glassmorphism */
.app-header {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background-color: rgba(var(--bg-app), 0.75);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

#global-search {
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.25s ease;
}

#global-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25), 0 8px 24px rgba(0, 0, 0, 0.15);
}

.theme-toggle {
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.08);
}

/* Cards & Bento Grid Ultra Aesthetic */
.bento-card, .landing-tool-card, .landing-feature-card, .landing-kb-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08), var(--shadow-sm);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.bento-card::after, .landing-tool-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.06) 50%, transparent 55%);
    transform: rotate(30deg);
    transition: all 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.bento-card:hover::after, .landing-tool-card:hover::after {
    opacity: 1;
    transform: rotate(30deg) translate(20%, 20%);
}

.bento-card:hover, .landing-tool-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: var(--border-color-active);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), 0 0 20px var(--accent-glow);
}

.card-icon-wrapper {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.bento-card:hover .card-icon-wrapper {
    transform: scale(1.04);
}

/* Glass Panels & Inputs */
.glass-panel {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-md);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

input[type="text"], input[type="email"], input[type="number"], input[type="date"], input[type="url"], input[type="password"], select, textarea {
    border-radius: var(--radius-md);
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="date"]:focus, input[type="url"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3.5px rgba(168, 85, 247, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Custom Sliders */
.slider {
    background: linear-gradient(90deg, var(--border-color), rgba(168, 85, 247, 0.2));
    height: 8px;
    border-radius: 99px;
}

.slider::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.6), 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid #ffffff;
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.9);
}

/* Buttons Upgrade */
.btn-primary, .landing-primary-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.35);
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.btn-primary:hover, .landing-primary-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    box-shadow: 0 10px 32px rgba(139, 92, 246, 0.55);
    transform: translateY(-2px);
}

.btn-large {
    border-radius: var(--radius-md);
    padding: 14px 28px;
    font-weight: 700;
}

/* Hero Title Multi-Color Shimmer */
.landing-title {
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .landing-title {
    background: linear-gradient(135deg, #0f172a 0%, #3730a3 50%, #7e22ce 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-accent {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Stats Badges */
.lstat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.lstat:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Result Cards & Stat Displays */
.result-card, .counter-card, .age-main-card, .lpb-card {
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.result-card:hover, .counter-card:hover, .age-main-card:hover {
    border-color: var(--border-color-active);
    transform: translateY(-2px);
}

/* ==========================================================================
   ULTRA-PREMIUM HIGH-CONTRAST SIDEBAR DESIGN
   ========================================================================== */
/* Desktop Fixed Pinned Sidebar */
@media (min-width: 769px) {
    .app-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        width: 285px !important;
        z-index: 1000 !important;
    }
    
    .app-main {
        margin-left: 285px !important;
        width: calc(100% - 285px) !important;
        min-width: 0 !important;
    }
}

.app-sidebar {
    width: 285px !important;
    background: linear-gradient(180deg, rgba(17, 19, 28, 0.96) 0%, rgba(11, 13, 20, 0.98) 100%) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-right: 1px solid rgba(168, 85, 247, 0.2) !important;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    height: 100vh;
    z-index: 100;
}

[data-theme="light"] .app-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 245, 250, 0.98) 100%) !important;
    border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.05);
}

.sidebar-brand {
    padding: 22px 24px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .sidebar-brand {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: rgba(0, 0, 0, 0.01);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    background: linear-gradient(135deg, #ffffff 30%, #c084fc 70%, #ec4899 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

[data-theme="light"] .brand-logo {
    background: linear-gradient(135deg, #0f172a 30%, #7e22ce 70%, #db2777 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.logo-icon {
    width: 26px !important;
    height: 26px !important;
    color: #a855f7 !important;
    background: rgba(168, 85, 247, 0.15);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
    stroke-width: 2.5;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px !important;
    display: flex;
    flex-direction: column;
    gap: 22px !important;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.3);
    border-radius: 10px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.7);
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 5px !important;
}

.nav-group-title {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 1.2px !important;
    color: #c084fc !important; /* Bright purple title for high contrast */
    padding: 4px 12px 6px 12px !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(192, 132, 252, 0.3), transparent);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px !important;
    padding: 0 14px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #f1f5f9 !important; /* Crisp high-contrast text */
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid transparent !important;
}

[data-theme="light"] .nav-link {
    color: #334155 !important;
}

.nav-link i {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2.2 !important;
    color: #a855f7;
    flex-shrink: 0;
    transition: transform 0.25s ease, color 0.25s ease !important;
}

.nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateX(5px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="light"] .nav-link:hover {
    color: #0f172a !important;
    background: rgba(168, 85, 247, 0.08) !important;
    border-color: rgba(168, 85, 247, 0.2) !important;
}

.nav-link:hover i {
    transform: scale(1.2) !important;
}

.nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    font-weight: 700 !important;
}

.nav-link.active i {
    color: #ffffff !important;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7)) !important;
}

/* Individual Sidebar Icon Theme Colors */
.nav-link[data-view="landing"] i { color: #a855f7 !important; }
.nav-link[data-view="dashboard"] i { color: #6366f1 !important; }

/* Media Group */
.nav-link[data-view="yt-thumbnail-downloader"] i { color: #ef4444 !important; }
.nav-link[data-view="image-compressor"] i { color: #c084fc !important; }
.nav-link[data-view="video-compressor"] i { color: #34d399 !important; }
.nav-link[data-view="invoice-generator"] i { color: #10b981 !important; }
.nav-link[data-view="video-to-frames"] i { color: #60a5fa !important; }
.nav-link[data-view="qr-generator"] i { color: #f43f5e !important; }
.nav-link[data-view="zip-utility"] i { color: #fbbf24 !important; }

/* Text Group */
.nav-link[data-view="word-counter"] i { color: #f87171 !important; }
.nav-link[data-view="text-converter"] i { color: #818cf8 !important; }

/* Finance Group */
.nav-link[data-view="age-calc"] i { color: #c084fc !important; }
.nav-link[data-view="sip-calc"] i { color: #34d399 !important; }
.nav-link[data-view="emi-calc"] i { color: #fbbf24 !important; }
.nav-link[data-view="interest-calc"] i { color: #60a5fa !important; }
.nav-link[data-view="discount-calc"] i { color: #f472b6 !important; }
.nav-link[data-view="percentage-calc"] i { color: #22d3ee !important; }
.nav-link[data-view="fuel-calc"] i { color: #2dd4bf !important; }

/* Trust & Support Group */
.nav-link[data-view="about"] i { color: #38bdf8 !important; }
.nav-link[data-view="contact"] i { color: #a78bfa !important; }
.nav-link[data-view="disclaimer"] i { color: #facc15 !important; }
.nav-link[data-view="privacy-policy"] i { color: #4ade80 !important; }
.nav-link[data-view="terms-of-service"] i { color: #fb923c !important; }

/* Resources & Blog */
.nav-link[data-view="blog"] i { color: #c084fc !important; }

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(0, 0, 0, 0.25) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: #94a3b8;
}

[data-theme="light"] .sidebar-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: rgba(0, 0, 0, 0.02) !important;
    color: #64748b;
}

.footer-link-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: inherit;
    font-weight: 600;
    color: #cbd5e1;
    transition: all 0.2s ease;
}

[data-theme="light"] .footer-link-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: #475569;
}

.footer-link-btn:hover {
    color: #ffffff;
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
    text-decoration: none;
}

/* ==========================================================================
   EXQUISITE LUXURY LIGHT THEME OVERRIDES & HIGH CONTRAST
   ========================================================================== */
[data-theme="light"] body {
    background-color: #eef1f6 !important;
    color: #0f172a !important;
}

[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] #global-search {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.16) !important;
    color: #0f172a !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] #global-search::placeholder {
    color: #64748b !important;
}

[data-theme="light"] .glass-panel,
[data-theme="light"] .bento-card,
[data-theme="light"] .result-card,
[data-theme="light"] .tool-card,
[data-theme="light"] .counter-card,
[data-theme="light"] .age-main-card,
[data-theme="light"] .lpb-card,
[data-theme="light"] .landing-tool-card,
[data-theme="light"] .landing-feature-card,
[data-theme="light"] .landing-kb-card {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07) !important;
}

[data-theme="light"] .glass-panel:hover,
[data-theme="light"] .bento-card:hover,
[data-theme="light"] .landing-tool-card:hover,
[data-theme="light"] .landing-feature-card:hover {
    border-color: rgba(124, 58, 237, 0.4) !important;
    box-shadow: 0 16px 36px rgba(124, 58, 237, 0.12) !important;
}

[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3, 
[data-theme="light"] h4,
[data-theme="light"] .view-header h2 {
    color: #0f172a !important;
    font-weight: 800 !important;
}

/* Headings inside cards & terms in Light Mode */
[data-theme="light"] .glass-panel h1,
[data-theme="light"] .glass-panel h2,
[data-theme="light"] .glass-panel h3,
[data-theme="light"] .legal-section h2,
[data-theme="light"] .legal-section h3,
[data-theme="light"] .legal-content h3 {
    color: #6d28d9 !important; /* Deep Rich Royal Purple */
    font-weight: 700 !important;
}

[data-theme="light"] p, 
[data-theme="light"] li, 
[data-theme="light"] span,
[data-theme="light"] label {
    color: #334155 !important; /* Rich dark slate for 100% crisp legibility */
}

[data-theme="light"] .btn-outline {
    background: #ffffff !important;
    border: 1.5px solid rgba(15, 23, 42, 0.2) !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

[data-theme="light"] .btn-outline:hover {
    background: #7c3aed !important;
    border-color: #7c3aed !important;
    color: #ffffff !important;
}

[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35) !important;
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="url"],
[data-theme="light"] input[type="password"],
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.16) !important;
    color: #0f172a !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2) !important;
}

/* ==========================================================================
   HERO MOCKUP SHOWCASE & 3D DISPLAY STYLES
   ========================================================================== */
.hero-mockup-wrapper {
    margin-top: 50px;
    width: 100%;
    max-width: 1050px;
    margin-left: auto;
    margin-right: auto;
    perspective: 1200px;
    position: relative;
    z-index: 10;
}

.hero-mockup-container {
    background: rgba(18, 20, 32, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(168, 85, 247, 0.25);
    transform: rotateX(6deg) translateY(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}

[data-theme="light"] .hero-mockup-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(124, 58, 237, 0.25);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15), 0 0 30px rgba(124, 58, 237, 0.15);
}

.hero-mockup-container:hover {
    transform: rotateX(0deg) translateY(-8px) scale(1.01);
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 60px rgba(168, 85, 247, 0.4);
}

.mockup-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(10, 12, 20, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .mockup-header-bar {
    background: #f1f5f9;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.mockup-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mockup-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.mockup-dots .red { background: #ff5f56; }
.mockup-dots .yellow { background: #ffbd2e; }
.mockup-dots .green { background: #27c93f; }

.mockup-url-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    max-width: 450px;
    width: 100%;
    justify-content: center;
}

[data-theme="light"] .mockup-url-bar {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #475569;
}

.mockup-lock-icon {
    width: 14px;
    height: 14px;
    color: #34d399;
}

.mockup-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    padding: 4px 10px;
    border-radius: 99px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 8px #34d399;
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.mockup-image-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-mockup-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-mockup-container:hover .hero-mockup-img {
    transform: scale(1.02);
}

.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 14px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    z-index: 10;
    animation: badgeFloat 4s ease-in-out infinite alternate;
}

.floating-badge.badge-1 {
    top: 24px;
    right: 24px;
    background: rgba(139, 92, 246, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.floating-badge.badge-2 {
    bottom: 28px;
    left: 28px;
    background: rgba(16, 185, 129, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation-delay: -2s;
}

@keyframes badgeFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    .hero-mockup-wrapper {
        perspective: none;
        margin-top: 30px;
    }
    .hero-mockup-container {
        transform: none;
    }
    .floating-badge {
        display: none;
    }
}

/* ==========================================================================
   NEO-BRUTALIST ISVISIBLE.AI DESIGN SYSTEM & HOMEPAGE SIDEBAR HIDE RULES
   ========================================================================== */

/* 1. Sidebar Hide on Homepage / Landing View */
body.is-landing-page #app-sidebar {
    display: none !important;
}

body.is-landing-page .app-main {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
}

body.is-landing-page .menu-toggle-btn,
body.is-landing-page .search-wrapper {
    display: none !important;
}

body.is-landing-page .content-container {
    padding: 0 !important;
}

/* 2. isvisible.ai Aesthetic Container */
.isvisible-hero {
    background-color: #f4f0ea;
    color: #111111;
    padding: 70px 24px 60px;
    text-align: center;
    position: relative;
    border-bottom: 2px solid #111111;
    font-family: 'Outfit', 'Inter', sans-serif;
}

[data-theme="dark"] .isvisible-hero {
    background-color: #161514;
    color: #f4f0ea;
    border-bottom: 2px solid #333333;
}

.isvisible-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #d2ff38;
    color: #111111;
    border: 2px solid #111111;
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 3px 3px 0px #111111;
    margin-bottom: 28px;
}

.badge-plus {
    font-size: 1rem;
    font-weight: 900;
}

.isvisible-title {
    font-family: 'Outfit', serif, sans-serif;
    font-size: clamp(2.6rem, 6vw, 4.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
    color: #111111;
}

[data-theme="dark"] .isvisible-title {
    color: #ffffff;
}

.isvisible-highlight {
    background-color: #d2ff38;
    color: #111111;
    border: 2.5px solid #111111;
    padding: 4px 20px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 4px 4px 0px #111111;
    transform: rotate(-1deg);
    margin-top: 4px;
}

.isvisible-subtitle {
    font-size: 1.15rem;
    color: #4a4a4a;
    max-width: 660px;
    margin: 0 auto 36px;
    line-height: 1.6;
    font-weight: 500;
}

[data-theme="dark"] .isvisible-subtitle {
    color: #a3a3a3;
}

/* Big Search Bar matching isvisible.ai mockup */
.isvisible-search-card {
    max-width: 680px;
    margin: 0 auto 48px;
}

.isvisible-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 2.5px solid #111111;
    border-radius: 20px;
    padding: 6px 6px 6px 20px;
    box-shadow: 6px 6px 0px #111111;
    gap: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.isvisible-input-wrapper:focus-within {
    transform: translateY(-2px);
    box-shadow: 8px 8px 0px #111111;
}

.isvisible-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.05rem;
    font-family: inherit;
    color: #111111 !important;
    font-weight: 500;
}

.isvisible-input-wrapper input::placeholder {
    color: #888888;
}

.isvisible-btn {
    background-color: #d2ff38;
    color: #111111;
    border: 2px solid #111111;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 2px 2px 0px #111111;
    transition: all 0.15s ease;
}

.isvisible-btn:hover {
    background-color: #c4f520;
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px #111111;
}

.isvisible-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #111111;
}

.isvisible-subtext {
    margin-top: 14px;
    font-size: 0.82rem;
    color: #666666;
    font-weight: 500;
}

[data-theme="dark"] .isvisible-subtext {
    color: #888888;
}

/* AI Report Result Card (Live Audit) */
.isvisible-report-card {
    max-width: 680px;
    margin: 0 auto 48px;
    background-color: #ffffff;
    border: 2.5px solid #111111;
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 6px 6px 0px #111111;
    text-align: left;
    display: none;
    animation: fadeInScale 0.3s ease-out forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #111111;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.report-score-badge {
    background-color: #d2ff38;
    color: #111111;
    border: 2px solid #111111;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.report-item {
    background-color: #f8f6f0;
    border: 1.5px solid #111111;
    border-radius: 12px;
    padding: 14px;
    font-size: 0.88rem;
}

.report-item strong {
    display: block;
    color: #111111;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.report-item span {
    color: #10b981;
    font-weight: 700;
}

/* Three Steps Section */
.isvisible-steps-container {
    background-color: #f4f0ea;
    padding: 40px 24px 80px;
    text-align: center;
    border-bottom: 2px solid #111111;
}

[data-theme="dark"] .isvisible-steps-container {
    background-color: #121110;
    border-bottom: 2px solid #333333;
}

.isvisible-section-tag {
    font-size: 0.78rem;
    font-weight: 800;
    color: #8b5cf6;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.isvisible-section-title {
    font-family: 'Outfit', serif, sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #111111;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

[data-theme="dark"] .isvisible-section-title {
    color: #ffffff;
}

.isvisible-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

.isvisible-step-card {
    border: 2.5px solid #111111;
    border-radius: 24px;
    padding: 32px 28px;
    text-align: left;
    box-shadow: 6px 6px 0px #111111;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.isvisible-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 10px 10px 0px #111111;
}

/* Color variations matching the isvisible.ai screenshot */
.isvisible-step-card.card-lime {
    background-color: #d2ff38;
    color: #111111;
}

.isvisible-step-card.card-purple {
    background-color: #9e77ed;
    color: #111111;
}

.isvisible-step-card.card-peach {
    background-color: #f9e8d9;
    color: #111111;
}

.step-num {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 18px;
    opacity: 0.85;
}

.isvisible-step-card h3 {
    font-family: 'Outfit', serif, sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}

.isvisible-step-card p {
    font-size: 0.92rem;
    line-height: 1.6;
    font-weight: 500;
    opacity: 0.9;
}

/* ==========================================================================
   UNIVERSAL NEO-BRUTALIST THEME OVERRIDES FOR ENTIRE WEBSITE (LIGHT MODE)
   ========================================================================== */
[data-theme="light"] .glass-panel,
[data-theme="light"] .tool-card,
[data-theme="light"] .bento-card,
[data-theme="light"] .blog-card,
[data-theme="light"] .blog-post-card,
[data-theme="light"] .modal-card,
[data-theme="light"] .tool-container {
    background-color: #ffffff !important;
    border: 2px solid #111111 !important;
    box-shadow: 4px 4px 0px #111111 !important;
}

[data-theme="light"] .btn-primary {
    background-color: #d2ff38 !important;
    color: #111111 !important;
    border: 2px solid #111111 !important;
    box-shadow: 3px 3px 0px #111111 !important;
    font-weight: 800 !important;
}

[data-theme="light"] .btn-primary:hover {
    transform: translate(-2px, -2px) !important;
    box-shadow: 5px 5px 0px #111111 !important;
}

[data-theme="light"] .btn-outline {
    background-color: #ffffff !important;
    color: #111111 !important;
    border: 2px solid #111111 !important;
    box-shadow: 3px 3px 0px #111111 !important;
    font-weight: 800 !important;
}

[data-theme="light"] .btn-outline:hover {
    transform: translate(-2px, -2px) !important;
    box-shadow: 5px 5px 0px #111111 !important;
}

[data-theme="light"] .app-sidebar {
    background-color: #f4f0ea !important;
    border-right: 2.5px solid #111111 !important;
}

[data-theme="light"] .sidebar-brand {
    border-bottom: 2.5px solid #111111 !important;
}

[data-theme="light"] .app-header {
    background-color: #f4f0ea !important;
    border-bottom: 2.5px solid #111111 !important;
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="url"],
[data-theme="light"] select,
[data-theme="light"] textarea {
    border: 1px solid rgba(0, 0, 0, 0.18) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    border-radius: 12px !important;
    background-color: #ffffff !important;
    color: #111111 !important;
    font-weight: 500 !important;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18) !important;
}

/* Neo-Brutalist Landing Page & Website-Wide Background Overrides (100% Identical #f4f0ea Everywhere) */
[data-theme="light"],
[data-theme="light"] body,
[data-theme="light"] .app-layout,
[data-theme="light"] .app-sidebar,
[data-theme="light"] .app-main,
[data-theme="light"] .app-header,
[data-theme="light"] .content-container,
[data-theme="light"] .app-view,
[data-theme="light"] .dashboard-hero,
[data-theme="light"] .isvisible-hero,
[data-theme="light"] .isvisible-steps-container,
[data-theme="light"] .landing-features-container,
[data-theme="light"] .landing-section,
[data-theme="light"] .blog-container {
    background-color: #f4f0ea !important;
}

[data-theme="light"] .landing-feature-card,
[data-theme="light"] .landing-tool-card {
    background-color: #ffffff !important;
    border: 2.5px solid #111111 !important;
    border-radius: 20px !important;
    box-shadow: 5px 5px 0px #111111 !important;
}

[data-theme="light"] .landing-feature-card:hover,
[data-theme="light"] .landing-tool-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 8px 8px 0px #111111 !important;
}

/* Privacy Guarantee Banner High-Contrast Neo-Brutalist Styling */
.landing-privacy-banner,
[data-theme="light"] .landing-privacy-banner {
    background-color: #111111 !important;
    color: #ffffff !important;
    border: 2.5px solid #111111 !important;
    border-radius: 24px !important;
    box-shadow: 6px 6px 0px #111111 !important;
}

.landing-privacy-banner h2,
.lpb-left h2,
[data-theme="light"] .landing-privacy-banner h2,
[data-theme="light"] .lpb-left h2 {
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 2.2rem !important;
    opacity: 1 !important;
}

.landing-privacy-banner p,
.lpb-left p,
[data-theme="light"] .landing-privacy-banner p,
[data-theme="light"] .lpb-left p {
    color: #e2e8f0 !important;
    font-size: 1rem !important;
    opacity: 0.95 !important;
}

.lpb-badge,
[data-theme="light"] .lpb-badge {
    background-color: #d2ff38 !important;
    color: #111111 !important;
    border: 2px solid #111111 !important;
    font-weight: 800 !important;
}

.lpb-card,
[data-theme="light"] .lpb-card {
    background-color: #ffffff !important;
    color: #111111 !important;
    border: 2.5px solid #111111 !important;
    border-radius: 16px !important;
    box-shadow: 4px 4px 0px #d2ff38 !important;
}

.lpb-num,
[data-theme="light"] .lpb-num {
    color: #111111 !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
}

.lpb-label,
[data-theme="light"] .lpb-label {
    color: #333333 !important;
    font-weight: 700 !important;
}

.ltc-arrow,
[data-theme="light"] .ltc-arrow {
    color: #111111 !important;
}

/* Universal Standalone Legal & Info Pages Neo-Brutalist Theme (Light Mode) */
[data-theme="light"] .page-container,
[data-theme="light"] .legal-page-body {
    background-color: #f4f0ea !important;
}

[data-theme="light"] .page-hero {
    background-color: #ffffff !important;
    border: 2.5px solid #111111 !important;
    border-radius: 24px !important;
    box-shadow: 6px 6px 0px #111111 !important;
}

[data-theme="light"] .legal-card {
    background-color: #ffffff !important;
    border: 2px solid #111111 !important;
    border-radius: 20px !important;
    box-shadow: 4px 4px 0px #111111 !important;
}

/* Explicit Cursor & Text Selection Fix for Article Editor, Textareas & Input Fields */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="password"],
.input-field,
.form-control,
textarea,
#blog-input-content,
#blog-input-title,
#blog-input-summary,
.blog-article-content,
.blog-content-area,
.single-blog-article,
[contenteditable="true"] {
    cursor: text !important;
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* Multi-Platform Share Option Button & Modal Styling */
.share-option-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border-radius: var(--radius-md, 10px) !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.share-option-btn:hover {
    transform: translateY(-2px) !important;
    opacity: 0.92 !important;
}

.share-option-btn i,
.share-option-btn svg {
    width: 18px !important;
    height: 18px !important;
}

#article-share-modal {
    z-index: 100000 !important;
}

/* Explicit Cursor & Click Target Fixes for Share Options */
#article-bottom-share-btn,
.share-option-btn,
.share-option-btn *,
button[onclick*="Share"],
button[onclick*="share"],
button[onclick*="copy"],
a.share-option-btn {
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}







