/* ==========================================================================
   LifeFlow - Ultra Modern Life Dashboard CSS
   ========================================================================== */


/* --- Root Variables & Themes --- */
:root {
    /* Main HSL Colors */
    --hue-primary: 215;
    --hue-accent: 175;
    
    --bg-dark: #090d16;
    --bg-card: rgba(18, 26, 43, 0.65);
    --bg-card-hover: rgba(28, 39, 64, 0.75);
    --bg-glass: rgba(255, 255, 255, 0.03);
    
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-bright: rgba(255, 255, 255, 0.18);
    
    --primary: hsl(190, 100%, 50%);
    --primary-glow: rgba(0, 229, 255, 0.35);
    --secondary: hsl(270, 95%, 65%);
    --secondary-glow: rgba(168, 85, 247, 0.35);
    --accent: hsl(160, 84%, 48%);
    --warning: hsl(38, 92%, 56%);
    --danger: hsl(350, 89%, 60%);
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --sidebar-width: 260px;
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 24px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Theme Options */
[data-theme="midnight"] {
    --primary: hsl(210, 100%, 56%);
    --secondary: hsl(230, 90%, 68%);
    --primary-glow: rgba(59, 130, 246, 0.35);
}

[data-theme="sunset"] {
    --primary: hsl(25, 95%, 53%);
    --secondary: hsl(340, 82%, 52%);
    --primary-glow: rgba(249, 115, 22, 0.35);
}

[data-theme="emerald"] {
    --primary: hsl(158, 80%, 44%);
    --secondary: hsl(187, 85%, 43%);
    --primary-glow: rgba(16, 185, 129, 0.35);
}

/* --- Global Reset & Essentials --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 229, 255, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Typography Headings */
h1, h2, h3, h4, .brand-title {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* --- Layout Architecture --- */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 30%, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tag {
    font-size: 0.65rem;
    background: rgba(0, 229, 255, 0.15);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Navigation Links */
.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item .nav-link,
.nav-item button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--border-radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    text-decoration: none;
}

.nav-item .nav-link:hover,
.nav-item button:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active .nav-link,
.nav-item.active button {
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.15), rgba(168, 85, 247, 0.05));
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-item .nav-link i,
.nav-item button i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* --- Compact Collapsible Sidebar Category Folders --- */
.nav-group {
    list-style: none;
    margin-bottom: 0.15rem;
}

.nav-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.nav-group-header:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.nav-group-header.active {
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.25);
}

.nav-group-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-group-title i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-group-arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-group.open .nav-group-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.nav-sub-list {
    list-style: none;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 0.5rem;
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
    border-left: 2px solid rgba(0, 229, 255, 0.25);
    margin-left: 1.1rem;
}

.nav-group.open .nav-sub-list {
    display: flex;
    animation: subListSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.nav-sub-list .nav-item .nav-link {
    padding: 0.6rem 0.8rem;
    font-size: 0.88rem;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.theme-selector {
    display: flex;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
}

.theme-dot {
    flex: 1;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.theme-dot.default { background: linear-gradient(135deg, hsl(190, 100%, 50%), hsl(270, 95%, 65%)); }
.theme-dot.midnight { background: linear-gradient(135deg, hsl(210, 100%, 56%), hsl(230, 90%, 68%)); }
.theme-dot.sunset { background: linear-gradient(135deg, hsl(25, 95%, 53%), hsl(340, 82%, 52%)); }
.theme-dot.emerald { background: linear-gradient(135deg, hsl(158, 80%, 44%), hsl(187, 85%, 43%)); }

.theme-dot.active {
    border-color: #fff;
    transform: scale(1.1);
}

/* Main Content Wrapper */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem;
    max-width: 1600px;
}

/* Header Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.greeting-box h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.greeting-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.live-clock-badge {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.live-clock-time {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.live-clock-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Views & Containers */
.view-section {
    display: none;
    animation: fadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.view-section.active {
    display: block;
}

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

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}

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

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--text-main);
}

.card-title span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.card-title i {
    color: var(--primary);
    margin-right: 0.2rem;
}

.weather-search-input {
    display: inline-block !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1.5px solid var(--border-glass) !important;
    border-radius: 20px !important;
    color: #ffffff !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    padding: 0.25rem 0.6rem !important;
    width: 95px !important;
    max-width: 120px !important;
    outline: none !important;
    text-align: center !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.weather-search-input:hover,
.weather-search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px var(--primary-glow) !important;
    background: rgba(0, 229, 255, 0.08) !important;
    width: 110px !important;
}

/* --- Dashboard Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

/* Stat Widgets */
.stat-widget {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
}

.stat-info .stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
}

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

/* Weather Widget */
.weather-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-temp {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.weather-location {
    font-weight: 700;
    font-size: 1.1rem;
}

.weather-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: capitalize;
}

.weather-search-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 140px;
}

/* Motivational Quote Banner */
.quote-banner {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.quote-banner i {
    font-size: 2.2rem;
    color: var(--primary);
    opacity: 0.8;
}

.quote-text {
    font-size: 1.05rem;
    font-weight: 500;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.4;
}

.quote-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    font-style: normal;
    font-weight: 700;
}

/* --- Buttons & Inputs --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #00b4d8);
    color: #040b14 !important;
    font-weight: 700;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary i,
.btn-primary span {
    color: inherit !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-glass);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

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

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 10px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-icon i {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* --- Ultra Modern Form Control & Input System --- */
.form-control,
.form-input,
input[type="text"]:not(.weather-search-input),
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="time"],
select,
textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 0.75rem 1.1rem !important;
    color: var(--text-main, #f8fafc) !important;
    font-size: 0.95rem !important;
    font-family: inherit;
    outline: none !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hover State */
.form-control:hover,
.form-input:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="month"]:hover,
select:hover,
textarea:hover {
    border-color: rgba(0, 229, 255, 0.4) !important;
    background: rgba(15, 23, 42, 0.85) !important;
}

/* Glowing Focus State */
.form-control:focus,
.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary, #00e5ff) !important;
    background: rgba(15, 23, 42, 0.95) !important;
    box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    color: #ffffff !important;
}

/* Placeholder Styling */
.form-control::placeholder,
.form-input::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(148, 163, 184, 0.55) !important;
    font-weight: 400;
}

/* Chrome/Safari/Edge Browser Autofill Background & Text Color 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: #f8fafc !important;
    -webkit-box-shadow: 0 0 0px 1000px #0f172a inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
    border: 1.5px solid rgba(0, 229, 255, 0.4) !important;
    border-radius: 12px !important;
}

/* Readonly & Disabled Inputs */
.form-control:read-only,
.form-input:read-only,
input:read-only,
.form-control:disabled,
.form-input:disabled,
input:disabled {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    color: rgba(148, 163, 184, 0.6) !important;
    cursor: not-allowed;
    opacity: 0.75;
}

/* Custom Select Dropdown Arrow & Option Styling */
select.form-control,
select.form-input,
select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300e5ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    padding-right: 2.5rem !important;
    cursor: pointer;
}

select option {
    background: #0f172a !important;
    color: #f8fafc !important;
    padding: 0.6rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

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

.form-group:focus-within label {
    color: var(--primary, #00e5ff) !important;
    transition: color 0.25s ease;
}

/* --- Habit Tracker View --- */
.habit-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.habit-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.habit-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-glass-bright);
}

.habit-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.habit-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid var(--border-glass-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: transparent;
}

.habit-checkbox.completed {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    transform: scale(1.05);
}

.habit-info h4 {
    font-size: 1rem;
    font-weight: 600;
}

.habit-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.streak-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* --- Task & Pomodoro View --- */
.tasks-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.task-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-muted, #94a3b8) !important;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    background: rgba(0, 229, 255, 0.1) !important;
    color: #ffffff !important;
    border-color: rgba(0, 229, 255, 0.35) !important;
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary, #00e5ff) 0%, #00b4d8 100%) !important;
    color: #040b14 !important;
    border-color: var(--primary, #00e5ff) !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.4) !important;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.task-item.completed {
    opacity: 0.55;
}

.task-item.completed .task-title {
    text-decoration: line-through;
}

.priority-tag {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.priority-high { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.priority-low { background: rgba(16, 185, 129, 0.2); color: var(--accent); }

/* Pomodoro Widget */
.pomodoro-card {
    text-align: center;
}

.timer-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.timer-svg circle {
    fill: none;
    stroke-width: 8;
}

.timer-bg { stroke: rgba(255, 255, 255, 0.08); }
.timer-progress {
    stroke: var(--primary);
    stroke-dasharray: 565;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.timer-display-time {
    position: absolute;
    font-family: 'Outfit', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.sound-toggle-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.sound-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.sound-btn.active {
    background: rgba(0, 229, 255, 0.15);
    color: var(--primary);
    border-color: var(--primary);
}

/* --- Finance View --- */
.finance-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-container {
    height: 220px;
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 0.5rem;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(180deg, var(--primary), rgba(0, 229, 255, 0.2));
    border-radius: 6px 6px 0 0;
    transition: height 0.5s ease;
    min-height: 4px;
}

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

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid var(--border-glass);
}

.amount-income { color: var(--accent); font-weight: 700; }
.amount-expense { color: var(--danger); font-weight: 700; }

/* --- Notes & Journaling View --- */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 1.25rem;
}

.note-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    position: relative;
    transition: var(--transition);
}

.note-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-glass-bright);
}

.note-card.pinned {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.05);
}

.note-card h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.note-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex-grow: 1;
    white-space: pre-wrap;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-glass);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.mood-selector {
    display: flex;
    gap: 1rem;
    justify-content: space-around;
    margin: 1rem 0;
}

.mood-btn {
    font-size: 2.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    filter: grayscale(80%);
}

.mood-btn:hover, .mood-btn.active {
    filter: grayscale(0%);
    transform: scale(1.25);
}

/* --- Shopping & Meal View --- */
.shopping-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shopping-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

.meal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 1rem;
}

.meal-day-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1rem;
}

.meal-day-card h5 {
    color: var(--primary);
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    font-weight: 700;
}

/* --- Modals --- */
.modal-overlay {
    display: none !important;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 8, 16, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: rgba(18, 26, 43, 0.95);
    border: 1px solid var(--border-glass-bright);
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 90%;
    max-width: 520px;
    box-shadow: var(--shadow-glow);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Mobile Responsiveness */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .col-8, .col-6, .col-4, .col-3 { grid-column: span 1; }
    .tasks-layout { grid-template-columns: 1fr; }
    .finance-stats { grid-template-columns: 1fr; }
}

/* Fixed Mobile Bottom App Bar (iPhone Dock) */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0 !important;
        padding-top: max(calc(env(safe-area-inset-top, 0px) + 0.85rem), 2.35rem) !important;
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
        padding-bottom: max(1.5rem, calc(var(--sab, 0px) + 1.25rem)) !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    .mobile-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        border-radius: 12px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12)) !important;
        color: #fff !important;
        font-size: 1.15rem !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        transition: all 0.2s ease !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }
    .mobile-toggle:active {
        transform: scale(0.94) !important;
        background: rgba(0, 229, 255, 0.15) !important;
        border-color: rgba(0, 229, 255, 0.3) !important;
    }

    /* Mobile Bottom Navigation Dock removed - sidebar is primary navigation */
    .mobile-bottom-nav {
        display: none !important;
    }

    /* Mobile Layout Grid Overrides */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }

    .col-12, .col-8, .col-6, .col-4, .col-3 {
        grid-column: span 1 !important;
    }

    .topbar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem !important;
        margin-bottom: 1.15rem !important;
        width: 100% !important;
        padding-top: 0 !important;
    }

    .topbar-brand-greeting {
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .greeting-box {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .greeting-box h1 {
        font-size: 1.35rem !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: #fff !important;
    }

    .greeting-box p {
        font-size: 0.75rem !important;
        color: var(--text-muted, #94a3b8) !important;
        margin: 2px 0 0 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .topbar-actions {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.45rem !important;
    }

    .topbar-user-badge {
        height: 40px !important;
        border-radius: 12px !important;
        padding: 0 0.65rem !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(0, 229, 255, 0.25) !important;
        flex-shrink: 0 !important;
        font-size: 0.8rem !important;
        box-sizing: border-box !important;
    }

    .topbar-user-badge span:first-of-type {
        font-weight: 700 !important;
        color: #fff !important;
        font-size: 0.82rem !important;
        max-width: 70px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .live-clock-badge {
        height: 40px !important;
        border-radius: 12px !important;
        padding: 0 0.6rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.45rem !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12)) !important;
        flex: 1 !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
    }

    .live-clock-badge i {
        font-size: 0.85rem !important;
        color: var(--primary, #00e5ff) !important;
        flex-shrink: 0 !important;
    }

    .live-clock-time {
        font-size: 0.84rem !important;
        font-weight: 700 !important;
        color: var(--primary, #00e5ff) !important;
        line-height: 1.1 !important;
        font-variant-numeric: tabular-nums !important;
    }

    .live-clock-date {
        font-size: 0.68rem !important;
        color: var(--text-muted, #94a3b8) !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    #quickAddBtn {
        height: 40px !important;
        width: 40px !important;
        min-width: 40px !important;
        border-radius: 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        font-size: 1rem !important;
        flex-shrink: 0 !important;
        box-shadow: 0 0 12px rgba(0, 229, 255, 0.3) !important;
    }

    /* Glass Cards Mobile Padding */
    .glass-card {
        padding: 1rem 0.85rem !important;
    }

    /* Finance Module Mobile UX */
    .finance-stats {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.6rem !important;
        margin-bottom: 1rem !important;
    }

    .finance-stats .glass-card:last-child {
        grid-column: span 2 !important;
    }

    .finance-stats .glass-card {
        padding: 0.85rem !important;
    }

    .finance-stats .glass-card div[style*="font-size: 1.8rem"] {
        font-size: 1.35rem !important;
    }

    .form-row-2, .form-row-3 {
        grid-template-columns: 1fr !important;
        gap: 0.6rem !important;
    }

    /* Garage Module Mobile UX */
    #vehicleTabsContainer {
        display: flex !important;
        gap: 0.5rem !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 6px !important;
        -webkit-overflow-scrolling: touch;
    }

    #vehicleTabsContainer .filter-btn {
        flex: 0 0 auto !important;
        font-size: 0.82rem !important;
        padding: 0.45rem 0.85rem !important;
    }

    /* Weather Widget Mobile UX */
    .weather-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    .weather-temp {
        font-size: 2.2rem !important;
    }

    .weather-search-input {
        width: 120px !important;
        font-size: 0.78rem !important;
        padding: 0.3rem 0.6rem !important;
    }

    .eu-license-plate {
        font-size: 0.82rem !important;
        height: 28px !important;
        padding-right: 6px !important;
        letter-spacing: 1px !important;
    }

    .eu-license-plate .eu-blue-bar,
    .eu-license-plate .blue-bar {
        width: 18px !important;
        margin-right: 6px !important;
        padding: 2px 2px !important;
    }

    /* Overview Dashboard Mobile Optimizations */
    .glass-card {
        padding: 1rem 0.85rem !important;
        overflow: hidden;
    }

    .edit-mode-active .glass-card {
        overflow: visible !important;
    }

    .dash-widget-header {
        gap: 0.5rem !important;
    }

    .dash-widget-title {
        font-size: 0.98rem !important;
    }

    .dash-widget-sub {
        font-size: 0.74rem !important;
    }

    .dash-stats-grid {
        gap: 0.25rem !important;
        padding: 0.5rem 0.25rem !important;
    }

    .dash-stat-label {
        font-size: 0.6rem !important;
        letter-spacing: -0.2px !important;
    }

    .dash-stat-val {
        font-size: 0.82rem !important;
    }

    .dash-card-footer {
        gap: 0.4rem !important;
    }

    .dash-footer-text {
        font-size: 0.72rem !important;
    }

    .dash-footer-btn {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.65rem !important;
    }

    .dash-debts-footer {
        font-size: 0.74rem !important;
        gap: 0.35rem !important;
    }

    #weatherHourlyForecast {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding: 6px 2px 8px 2px !important;
        gap: 0.5rem !important;
    }

    #weatherHourlyForecast::-webkit-scrollbar {
        display: none !important;
    }

    .hourly-pill {
        flex: 0 0 auto !important;
        min-width: 62px !important;
        padding: 0.5rem 0.3rem !important;
    }

    .hourly-time {
        font-size: 0.7rem !important;
    }

    .hourly-icon {
        font-size: 1.1rem !important;
        margin: 4px 0 !important;
    }

    .hourly-temp {
        font-size: 0.85rem !important;
    }



    /* Modal Touch Target Optimization */
    .modal-content {
        width: 95% !important;
        padding: 1.25rem !important;
        max-height: 88vh !important;
        overflow-y: auto !important;
    }

    .form-control, .btn {
        min-height: 44px !important;
    }

    .hide-mobile {
        display: none !important;
    }
}

/* --- Overview Dashboard Responsive Widget System --- */
.dash-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.dash-widget-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.dash-widget-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.dash-badge-status {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    white-space: nowrap;
}

.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.6rem 0.4rem;
    text-align: center;
    margin-bottom: 0.75rem;
}

.dash-stats-grid > div {
    min-width: 0;
    overflow: hidden;
}

.dash-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-stat-val {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-stat-val.primary { color: var(--primary); }
.dash-stat-val.accent { color: var(--accent); }
.dash-stat-val.accent-green { color: #10b981; }
.dash-stat-val.warning { color: var(--warning); }

.dash-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dash-footer-text {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.dash-footer-btn {
    font-size: 0.78rem !important;
    padding: 0.35rem 0.75rem !important;
    white-space: nowrap;
}

.dash-debts-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* EU License Plate Styling */
.eu-license-plate {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    color: #111111;
    border: 2.5px solid #111111;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 2px rgba(0, 0, 0, 0.25);
    font-family: 'DIN Alternate', 'FE-Schrift', 'Arial Black', 'Impact', sans-serif;
    font-weight: 900;
    line-height: 1;
    overflow: hidden;
    user-select: none;
    vertical-align: middle;
    white-space: nowrap;
    height: 38px;
    padding-right: 12px;
    font-size: 1.15rem;
    letter-spacing: 1.8px;
}

.eu-license-plate .blue-bar,
.eu-license-plate .eu-blue-bar {
    background: #003399;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 24px;
    padding: 4px 3px;
    margin-right: 9px;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    flex-shrink: 0;
}

.eu-license-plate .eu-country {
    color: #ffffff;
    font-weight: 900;
    font-size: 12px;
    line-height: 1;
    text-align: center;
}

.eu-license-plate .eu-stars-svg {
    width: 100%;
    height: auto;
    max-height: 40%;
}

.eu-license-plate .eu-plate-text {
    color: #0d0d0d;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.eu-license-plate .eu-plate-sticker {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: radial-gradient(circle, #22c55e 30%, #15803d 100%);
    border: 1.5px solid #000000;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    margin: 0 3px;
    flex-shrink: 0;
}

/* Native Drag & Drop & Dashboard Edit Mode Styling */
[data-widget-id] {
    position: relative;
    cursor: default;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Interactive Tile Builder (Kachel-Raster) in Edit Mode */
.edit-mode-active#sortableDashboardGrid {
    background: radial-gradient(rgba(0, 229, 255, 0.15) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    border-radius: var(--border-radius);
    padding: 1.25rem 1rem;
    margin-top: 0.5rem;
    border: 2px dashed rgba(0, 229, 255, 0.25);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.4);
    min-height: 400px;
    overflow: visible !important;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.edit-mode-active [data-widget-id] {
    cursor: grab !important;
    border: 2px dashed rgba(0, 229, 255, 0.5) !important;
    background: rgba(15, 23, 42, 0.85) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 229, 255, 0.12) !important;
    backdrop-filter: blur(16px);
    overflow: visible !important;
    animation: tilePulse 3s infinite ease-in-out;
}

@keyframes tilePulse {
    0%, 100% { border-color: rgba(0, 229, 255, 0.4); }
    50% { border-color: rgba(168, 85, 247, 0.6); }
}

.edit-mode-active [data-widget-id]:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 229, 255, 0.3) !important;
}

.edit-mode-active [data-widget-id]:active {
    cursor: grabbing !important;
}

.sortable-ghost {
    opacity: 0.6 !important;
    filter: brightness(1.2);
    transform: scale(0.98);
    border: 2px dashed var(--primary) !important;
}

.glass-card.drag-over {
    border: 2px dashed var(--primary) !important;
    background: rgba(0, 229, 255, 0.12) !important;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.4) !important;
}



/* Sleek Floating Tile Edit Bar */
.tile-edit-bar {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(0, 229, 255, 0.4);
    border-radius: 20px;
    padding: 3px 8px;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 229, 255, 0.2);
    z-index: 25;
    backdrop-filter: blur(10px);
}

.edit-mode-active .tile-edit-bar {
    display: flex;
}

.tile-edit-bar button {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-edit-bar button.tile-size-btn {
    color: var(--primary);
}

.tile-edit-bar button.tile-size-btn:hover {
    background: rgba(0, 229, 255, 0.2);
    color: #ffffff;
}

.tile-edit-bar button.tile-remove-btn {
    color: var(--danger);
}

.tile-edit-bar button.tile-remove-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

.tile-edit-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.2);
}

/* Live Drop Target Placeholder Box */
.drag-placeholder {
    border: 2.5px dashed var(--primary) !important;
    background: rgba(0, 229, 255, 0.1) !important;
    border-radius: var(--border-radius);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.35) !important;
    animation: placeholderPulse 1.2s infinite alternate ease-in-out;
    transition: all 0.15s ease-in-out;
}

@keyframes placeholderPulse {
    from { opacity: 0.65; transform: scale(0.99); }
    to { opacity: 1; transform: scale(1.01); }
}

.placeholder-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
    text-transform: uppercase;
}

/* Hourly Weather Forecast Styling */
#weatherHourlyForecast {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 8px 4px 6px 4px;
}

.hourly-pill {
    flex: 1;
    min-width: 68px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.6rem 0.4rem;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hourly-pill:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.35);
    transform: translateY(-2px);
}

.hourly-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.hourly-icon {
    font-size: 1.2rem;
    margin: 6px 0;
}

.hourly-temp {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-main);
}

/* --- Smart Garden Module & Compact Raised-Bed Plot --- */
.quick-plant-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.15));
    color: var(--text-main, #f8fafc);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.quick-plant-pill:hover,
.quick-plant-pill.active {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: var(--accent, #10b981) !important;
    color: var(--accent, #10b981) !important;
    transform: translateY(-1px);
}

.raised-bed-frame {
    background: radial-gradient(circle at 50% 50%, #2e1d11 0%, #170e07 100%);
    border: 3.5px solid #5a3d24;
    border-radius: 20px;
    padding: 0.75rem;
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.8), 0 8px 25px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.soil-grid {
    display: grid;
    gap: 0.6rem;
}

.soil-tile {
    min-height: 92px;
    background: radial-gradient(circle, rgba(54, 34, 18, 0.9) 0%, rgba(28, 16, 8, 0.95) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0.45rem 0.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 3px 10px rgba(0, 0, 0, 0.3);
    user-select: none;
}

.soil-tile:hover {
    border-color: var(--accent, #10b981);
    transform: translateY(-3px) scale(1.02);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(16, 185, 129, 0.35);
}

.soil-tile.empty-tile {
    border-style: dashed;
    opacity: 0.6;
}

.soil-tile.empty-tile:hover {
    opacity: 1;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(28, 16, 8, 0.95) 100%);
}

/* Plant Animations */
.plant-avatar {
    font-size: 1.7rem;
    line-height: 1;
    margin: 2px 0;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
    animation: plantSway 3.5s ease-in-out infinite alternate;
    transform-origin: bottom center;
}

@keyframes plantSway {
    0% { transform: rotate(-3deg) scale(1); }
    50% { transform: rotate(3deg) scale(1.04); }
    100% { transform: rotate(-3deg) scale(1); }
}

/* Harvest Ready Glow Animation */
.soil-tile.ready-for-harvest {
    border-color: #f59e0b !important;
    animation: harvestPulse 1.8s infinite ease-in-out alternate;
}

@keyframes harvestPulse {
    0% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.4), inset 0 0 8px rgba(245, 158, 11, 0.2); }
    100% { box-shadow: 0 0 24px rgba(245, 158, 11, 0.8), inset 0 0 16px rgba(245, 158, 11, 0.4); }
}

/* Water Splash Animation */
.water-anim {
    animation: waterSplash 0.8s ease-out;
}

@keyframes waterSplash {
    0% { filter: brightness(1); transform: scale(1); }
    50% { filter: brightness(1.6) drop-shadow(0 0 20px #00e5ff); transform: scale(1.06); }
    100% { filter: brightness(1); transform: scale(1); }
}

.plant-tile-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.plant-tile-tag {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 8px;
    text-transform: uppercase;
}
.plant-tag-growing { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.4); }
.plant-tag-ready { background: rgba(245, 158, 11, 0.25); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.5); }
.plant-tag-seed { background: rgba(0, 229, 255, 0.2); color: #00e5ff; border: 1px solid rgba(0, 229, 255, 0.4); }

/* Companion Planting Badge */
.companion-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.62rem;
    background: rgba(16, 185, 129, 0.9);
    color: #000;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Mischkultur-Ratgeber (Companion Planting Cards)
   ========================================================================== */
.companion-search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 0.8rem 1rem;
}

.companion-search-input {
    flex: 1;
    min-width: 220px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: var(--text-main);
    padding: 0.55rem 0.9rem 0.55rem 2.2rem;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.companion-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

.companion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 1.25rem;
}

.companion-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.companion-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.companion-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.companion-plant-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
}

.companion-plant-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.companion-category-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 229, 255, 0.25);
}

.companion-section {
    margin-bottom: 0.9rem;
}

.companion-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.companion-section-title.good {
    color: #34d399;
}

.companion-section-title.bad {
    color: #f87171;
}

.companion-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.companion-tag {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}

.companion-tag.good {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.companion-tag.good:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.5);
}

.companion-tag.bad {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.companion-tag.bad:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.5);
}

.companion-tip-box {
    margin-top: 0.8rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font-size: 0.82rem;
    color: #fcd34d;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.companion-tip-box i {
    font-size: 0.95rem;
    margin-top: 0.1rem;
    color: #fbbf24;
    flex-shrink: 0;
}

/* ==========================================================================
   Custom Toast Notifications & Confirm Modals System (dasH v2.0)
   ========================================================================== */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
    max-width: 420px;
    width: calc(100% - 40px);
}

.toast-item {
    pointer-events: auto;
    background: rgba(16, 24, 40, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 0.85rem 1.1rem;
    color: var(--text-main);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.9rem;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-item.toast-hiding {
    opacity: 0;
    transform: translateX(100px) scale(0.95);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-item.success {
    border-color: rgba(16, 185, 129, 0.4);
}
.toast-item.success .toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.toast-item.danger,
.toast-item.error {
    border-color: rgba(239, 68, 68, 0.4);
}
.toast-item.danger .toast-icon,
.toast-item.error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.toast-item.warning {
    border-color: rgba(245, 158, 11, 0.4);
}
.toast-item.warning .toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.toast-item.info {
    border-color: rgba(0, 229, 255, 0.4);
}
.toast-item.info .toast-icon {
    background: rgba(0, 229, 255, 0.15);
    color: #00e5ff;
}

.toast-content {
    flex: 1;
    line-height: 1.4;
}

.toast-title {
    font-weight: 800;
    font-size: 0.92rem;
    margin-bottom: 0.15rem;
}

.toast-message {
    color: var(--text-muted);
    font-size: 0.84rem;
    white-space: pre-line;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: var(--text-main);
}

/* --- Modern Debt Status Badges --- */
.debt-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    user-select: none;
}

.debt-badge-active {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(0, 168, 255, 0.08));
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

.debt-badge-in_clarification {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.08));
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.debt-badge-paused {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.15), rgba(100, 116, 139, 0.08));
    color: #cbd5e1;
    border: 1px solid rgba(203, 213, 225, 0.3);
}

.debt-badge-paid_off {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.1));
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.4);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.18);
}

.badge-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.debt-badge-active .badge-pulse-dot {
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
    animation: badgePulse 2s infinite ease-in-out;
}

.debt-badge-in_clarification .badge-pulse-dot {
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
    animation: badgePulse 2s infinite ease-in-out;
}

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

/* --- Ultra Modern Modal Close Button --- */
.modal-close,
button.modal-close {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12)) !important;
    color: var(--text-muted, #94a3b8) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    outline: none !important;
    line-height: 1 !important;
}

.modal-close:hover,
button.modal-close:hover {
    background: rgba(239, 68, 68, 0.18) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
    transform: scale(1.08) rotate(90deg) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3) !important;
}

/* ==========================================================================
   iPhone 17 Pro & iOS Standalone WebApp Optimization
   ========================================================================== */

/* Safe Area Inset Variables for Dynamic Island & iOS Home Indicator Bar */
:root {
    --sat: env(safe-area-inset-top, 0px);
    --sar: env(safe-area-inset-right, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
}

/* Ergonomic Touch & Disable Highlight */
html, body {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
    overscroll-behavior-y: none;
}

/* Prevent iOS Safari input auto-zoom (forces 16px minimum font size on mobile inputs) */
@media screen and (max-width: 768px) {
    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"],
    .form-control,
    .form-input {
        font-size: 16px !important;
    }
}

/* Standalone PWA & Mobile Ergonomics for iPhone */
@media all and (display-mode: standalone), (max-width: 768px) {
    body {
        padding-top: var(--sat);
        padding-bottom: var(--sab);
        padding-left: var(--sal);
        padding-right: var(--sar);
    }

    .sidebar {
        padding-top: max(1.5rem, calc(var(--sat) + 0.75rem)) !important;
    }

    .mobile-bottom-nav {
        display: none !important;
    }

    .main-wrapper {
        padding-bottom: max(1.5rem, calc(var(--sab) + 1.25rem)) !important;
    }

    /* Modal Overlay Safe Area Inset Support */
    .modal-content {
        max-height: calc(100vh - var(--sat) - var(--sab) - 40px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- Mobile Sidebar Close Button & Backdrop Overlay --- */
.sidebar-close-btn {
    display: none;
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12)) !important;
    color: var(--text-muted, #94a3b8) !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    position: relative;
    z-index: 1002 !important;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-close-btn:hover,
.sidebar-close-btn:active {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

.sidebar-overlay {
    display: none !important;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 8, 16, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 998 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.active {
    display: block !important;
    opacity: 1;
    pointer-events: all;
}

@media (max-width: 1024px) {
    .sidebar {
        z-index: 1000 !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0) !important;
        z-index: 1000 !important;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.8) !important;
    }

    .sidebar-close-btn {
        display: inline-flex !important;
    }

    .mobile-toggle {
        position: relative;
        z-index: 995 !important;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
    }
}

/* ==========================================================================
   Finanzamt Tax Report Print Stylesheet (@media print)
   ========================================================================== */
@media print {
    body, html {
        background: #ffffff !important;
        color: #111827 !important;
        font-size: 10pt !important;
    }

    .sidebar,
    .sidebar-overlay,
    .topbar,
    .mobile-bottom-nav,
    .no-print,
    .tax-tab-btn,
    .modal-overlay,
    #toastContainer,
    .btn,
    .tax-tab-content:not(#tabContentExport),
    .dashboard-grid:not(.tax-printable-report *),
    .stat-widget,
    .glass-card:not(.tax-printable-report) {
        display: none !important;
    }

    .app-container,
    .main-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    #tabContentExport {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .tax-printable-report {
        display: block !important;
        background: #ffffff !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        color: #111827 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .tax-printable-report h2,
    .tax-printable-report h3,
    .tax-printable-report h4 {
        color: #111827 !important;
    }

    .tax-printable-report table {
        color: #111827 !important;
        border-collapse: collapse !important;
        width: 100% !important;
    }

    .tax-printable-report th,
    .tax-printable-report td {
        border-bottom: 1px solid #e5e7eb !important;
        color: #111827 !important;
        padding: 6px 8px !important;
    }

    .tax-printable-report th {
        background: #f3f4f6 !important;
        font-weight: bold !important;
        color: #374151 !important;
    }

    .tax-printable-report div[style*="background: rgba(0,0,0,0.4)"] {
        background: #f9fafb !important;
        border: 2px solid #e5e7eb !important;
        color: #111827 !important;
    }

    .tax-printable-report div[style*="border-left"] {
        border-left: 4px solid #111827 !important;
        background: #f3f4f6 !important;
        color: #111827 !important;
    }

    .tax-printable-report div[style*="border-bottom: 2px solid"] {
        border-bottom: 2px solid #111827 !important;
    }

    .tax-printable-report strong,
    .tax-printable-report span,
    .tax-printable-report div {
        color: #111827 !important;
    }

    .tax-printable-report span[style*="color: #34d399"],
    .tax-printable-report div[style*="color: #34d399"],
    .tax-printable-report strong[style*="color: #34d399"] {
        color: #065f46 !important;
        font-weight: bold !important;
    }

    .tax-printable-report span[style*="color: #00e5ff"],
    .tax-printable-report div[style*="color: #00e5ff"],
    .tax-printable-report strong[style*="color: #00e5ff"] {
        color: #0369a1 !important;
        font-weight: bold !important;
    }

    @page {
        margin: 1.2cm;
        size: A4 portrait;
    }
}

/* ==========================================================================
   LVB Corporate Design Line Badges & Filter Buttons (him.l.de Standard)
   ========================================================================== */
.lvb-badge-btn {
    background: transparent;
    border: 2px solid transparent;
    padding: 2px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.lvb-badge-btn:focus,
.lvb-badge-btn:focus-visible {
    outline: none;
}

.lvb-badge-btn:hover {
    transform: translateY(-2px) scale(1.12);
    filter: drop-shadow(0 4px 10px rgba(0, 229, 255, 0.45));
}

.lvb-badge-btn.active {
    border-color: #00e5ff !important;
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.7), inset 0 0 8px rgba(0, 229, 255, 0.3) !important;
    transform: scale(1.12) !important;
    background: rgba(0, 229, 255, 0.15) !important;
}

.lvb-badge-btn.is-bus,
.lvb-badge-btn.is-night {
    border-radius: 50% !important;
}

.btn-secondary.active {
    background: rgba(0, 229, 255, 0.2) !important;
    border-color: #00e5ff !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4) !important;
}

.lvb-line-svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    transition: transform 0.15s ease;
}

.lvb-line-svg.is-tram {
    border-radius: 18%;
    overflow: hidden;
}

.lvb-line-svg.is-event {
    background: #ffffff !important;
}

.lvb-line-svg.is-bus,
.lvb-line-svg.is-night {
    border-radius: 50%;
}

.lvb-line-svg:hover {
    transform: scale(1.06);
}



/* ==========================================================================
   Handy-Feinschliff (Touch-Geräte): Tippflächen, Zoom, Überlauf
   ========================================================================== */
@media (pointer: coarse), (max-width: 768px) {
    /* Kein 300ms-Verzögerung / Doppeltipp-Zoom auf Bedienelementen, dezenter Tap-Effekt */
    a, button, .btn, .filter-btn, .nav-link, .nav-group-header, .theme-dot, input[type="checkbox"], select {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 229, 255, 0.15);
    }

    /* Icon-Buttons haben teils inline 26-32px: auf Apple-Richtwert (~44px) vergrößern */
    .btn-icon,
    .tile-size-btn,
    .tile-remove-btn {
        min-width: 40px !important;
        min-height: 40px !important;
    }

    /* Checkboxen leichter treffbar */
    .task-item input[type="checkbox"],
    .shopping-item input[type="checkbox"] {
        width: 24px !important;
        height: 24px !important;
        flex-shrink: 0;
    }

    /* Filter-Leisten horizontal wischbar statt umbrechen/abschneiden */
    .task-filters,
    .garage-vehicle-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.25rem;
    }
    .task-filters::-webkit-scrollbar,
    .garage-vehicle-tabs::-webkit-scrollbar { display: none; }
    .task-filters .filter-btn { flex-shrink: 0; white-space: nowrap; }

    /* Lange Wörter (Titel, Gläubiger, URLs) sprengen keine Kacheln mehr */
    .glass-card,
    .task-item,
    .note-card {
        overflow-wrap: anywhere;
        word-break: normal;
        min-width: 0;
    }

    /* Tabellen in Karten: seitlich scrollbar statt Seite zu verbreitern */
    .glass-card table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Modals: Inhalt scrollt, Schließen-Button bleibt erreichbar */
    .modal-content {
        width: calc(100vw - 1.5rem) !important;
        max-width: 560px;
    }

    /* "Heute"-Widget: Zeilen etwas höher für Daumen */
    [data-widget-id="widget-today"] a {
        min-height: 44px;
    }
}

/* Handy: Timer-Badge im Header ausblenden (läuft weiter, sichtbar unter Tasks & Zeiterfassung) */
@media (max-width: 768px) {
    #topbarLiveTimerBadge { display: none !important; }
}
/* ==========================================================================
   Einstellungen: kompakte Ansicht & weniger Animationen (per Benutzer einstellbar)
   ========================================================================== */
[data-compact] .glass-card { padding: 1rem !important; }
[data-compact] .dashboard-grid { gap: 0.7rem !important; }
[data-compact] .main-wrapper { padding-top: 1rem; }
[data-compact] .card-title { margin-bottom: 0.7rem; }
[data-reduce-motion] *, [data-reduce-motion] *::before, [data-reduce-motion] *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
}

/* Einstellungen-Seite */
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border-glass); }
.pref-row:last-child { border-bottom: none; }
.pref-row .pref-text { min-width: 0; }
.pref-row .pref-title { font-weight: 700; color: var(--text-main); font-size: 0.95rem; }
.pref-row .pref-desc { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }
.pref-switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.pref-switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.pref-switch span { position: absolute; inset: 0; background: rgba(255,255,255,0.12); border-radius: 26px; transition: background 0.2s; }
.pref-switch span::after { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.pref-switch input:checked + span { background: var(--primary); }
.pref-switch input:checked + span::after { transform: translateX(20px); }
.pref-theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 0.6rem; margin-top: 0.6rem; }
.pref-theme-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-radius: 12px; border: 1px solid var(--border-glass); background: rgba(255,255,255,0.03); color: var(--text-main); cursor: pointer; font-weight: 600; font-size: 0.85rem; }
.pref-theme-btn.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.pref-theme-btn i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }

/* ==========================================================================
   PWA / Handy-Feinschliff (iPhone-Standalone, Safe-Areas)
   ========================================================================== */
html { background: var(--bg-dark, #0a0f1a); }

@media all and (display-mode: standalone), (max-width: 768px) {
    /* Oben/unten kümmern sich .main-wrapper und .sidebar um die Safe-Area – am body zusätzlich wäre es doppelter Abstand */
    body { padding-top: 0 !important; padding-bottom: 0 !important; }

    /* Fenster nie unter Statusleiste/Home-Balken schieben */
    .modal-overlay { padding: var(--sat) var(--sar) var(--sab) var(--sal); box-sizing: border-box; }
    .modal-content { width: min(94vw, 100%); }

    /* Hinweise (Toasts) unterhalb der Statusleiste, über die volle Breite */
    #toastContainer { top: calc(var(--sat) + 12px); right: calc(var(--sar) + 12px); left: calc(var(--sal) + 12px); max-width: none; align-items: stretch; }

    /* Seitenleiste: unten über dem Home-Balken */
    .sidebar { padding-bottom: max(1.5rem, calc(var(--sab) + 1rem)) !important; overflow-y: auto; }
}

@media (max-width: 768px) {
    /* Titel in Karten dürfen umbrechen statt abgeschnitten zu werden */
    .card-title span { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
    .card-title { gap: 0.5rem; }
    /* Kacheln/Raster nie breiter als der Bildschirm */
    .glass-card, .dashboard-grid > * { min-width: 0; }
    /* Gut tippbare Knöpfe */
    .btn { min-height: 38px; }
    .btn-icon { min-width: 40px; min-height: 40px; }
}