@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-sidebar-hover: rgba(15, 159, 144, 0.04);
    --bg-sidebar-active: rgba(15, 159, 144, 0.08);
    
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --text-white-muted: #94a3b8;
    
    --color-accent: #0f9f90;
    --color-accent-hover: #0d8a7c;
    --color-accent-light: rgba(15, 159, 144, 0.1);
    
    --color-danger: #ef4444;
    --color-danger-light: #fee2e2;
    --color-danger-text: #b91c1c;
    
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    --color-warning-text: #b45309;
    
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    --color-success-text: #047857;
    
    --color-info: #3b82f6;
    --color-info-light: #dbeafe;
    --color-info-text: #1d4ed8;
    
    --border-color: #e2e8f0;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.03), 0 8px 10px -6px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(0, 0, 0, 0.02);
    --sidebar-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    --modal-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Global Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.4);
}

/* Layout Shell */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* 1. Mandatory Secure Login Gate */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.login-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    color: #ffffff;
    text-align: center;
    transition: all 0.3s ease;
}

.login-header {
    margin-bottom: 30px;
}

.login-icon {
    font-size: 54px;
    color: #0d9488;
    margin-bottom: 16px;
    text-shadow: 0 0 16px rgba(13, 148, 136, 0.4);
}

.login-card h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin: 10px 0;
    background: linear-gradient(135deg, #3b82f6, #0d9488);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card p {
    font-size: 13.5px;
    color: #94a3b8;
    margin-top: 4px;
}

.login-form-group {
    margin-bottom: 22px;
    text-align: left;
}

.login-form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.login-input-wrapper i {
    position: absolute;
    left: 16px;
    color: #64748b;
    font-size: 16px;
    transition: color 0.3s ease;
}

.login-input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(15, 23, 42, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.login-input-wrapper input:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(15, 23, 42, 0.95);
}

.login-input-wrapper input:focus + i {
    color: #0d9488;
}

.btn-login-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.3);
    margin-top: 10px;
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(13, 148, 136, 0.4);
}

.btn-login-submit:active {
    transform: translateY(0);
}

.login-error {
    color: #ef4444;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 600;
}

.login-footer {
    margin-top: 30px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
}

/* Left Sidebar Navigation */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.015);
    border-right: 1px solid var(--border-color);
    justify-content: space-between;
    position: relative;
    z-index: 10;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f1f5f9;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.avatar-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: #475569;
    flex-shrink: 0;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.avatar-wrapper:hover {
    transform: scale(1.05);
    filter: brightness(0.9);
}

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

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-subtitle {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* Navigation Lists */
.nav-scroll-area {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 4px;
}

.nav-scroll-area::-webkit-scrollbar {
    width: 4px;
}
.nav-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(15, 159, 144, 0.1);
    border-radius: 4px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 12px;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.nav-section-header .nav-section-title {
    margin-bottom: 0;
}
.btn-sidebar-add {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition-fast);
    padding: 2px 6px;
    border-radius: 4px;
}
.btn-sidebar-add:hover {
    color: var(--color-accent);
    background-color: var(--color-accent-light);
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
}

.context-label {
    flex-grow: 1;
    text-align: left;
}

.btn-delete-context {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-link:hover .btn-delete-context {
    opacity: 0.6;
}

.nav-link:hover .btn-delete-context:hover {
    opacity: 1;
    color: var(--color-danger) !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
}

.btn-delete-context i {
    font-size: 11px;
}

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

.nav-link.active {
    background-color: var(--bg-sidebar-active);
    color: var(--color-accent);
    font-weight: 600;
    border-left: 3px solid var(--color-accent);
}

.nav-icon {
    font-size: 16px;
    opacity: 0.8;
    width: 20px;
    text-align: center;
}

/* Bottom Location Subtext */
.sidebar-footer {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn-sidebar-settings {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    font-family: var(--font-heading);
    transition: var(--transition-fast);
}

.btn-sidebar-settings:hover {
    background-color: var(--bg-sidebar-hover);
    color: var(--text-primary);
}

.btn-sidebar-settings i {
    font-size: 14px;
    opacity: 0.8;
}

.location-text {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
}

/* Main Workspace Panel */
.main-workspace {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Header Banner */
.header-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.header-title-area h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

/* 1. Top Navbar Expansion Styles */
.top-navbar-row {
    display: flex;
    gap: 4px;
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
    margin-left: 20px;
    margin-right: auto;
}

.top-nav-btn {
    background: none;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.top-nav-btn:hover {
    color: var(--text-primary);
    background-color: rgba(15, 159, 144, 0.05);
}

.top-nav-btn.active {
    background-color: var(--bg-card);
    color: var(--color-accent);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Export Data Button */
.btn-pdf-export {
    background-color: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    padding: 8px 14px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-pdf-export:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

/* 2. Dual Digital Clocks in Header */
.dual-clocks-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.clock-capsule {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 14px;
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 6px;
}

.clock-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--color-accent);
    text-transform: uppercase;
    background: var(--color-accent-light);
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.clock-time {
    font-family: monospace;
    font-weight: 700;
}

/* Buttons */
.btn-quick-add {
    background-color: var(--color-accent);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(15, 159, 144, 0.2);
}

.btn-quick-add:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
}

.btn-settings {
    background-color: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-settings:hover {
    color: var(--text-primary);
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.btn-mobile-link {
    background-color: var(--bg-card);
    color: var(--text-teal, #14b8a6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-mobile-link:hover {
    color: var(--text-teal-hover, #0d9488);
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* Dashboard Grid Canvas */
.grid-canvas {
    flex-grow: 1;
    padding: 24px 32px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
}

/* Card Panel Containers */
.card-panel {
    background-color: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.01);
}

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

.card-title-group h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.card-title-group h3:hover {
    color: var(--color-accent) !important;
}

.card-title-group p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card-action-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.card-action-menu-btn:hover {
    color: var(--text-primary);
    background-color: #f1f5f9;
}

.card-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Grid layout row sizes: Calendar has been expanded visually */
.card-pending-tasks {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    height: 380px;
}

.card-calls {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    height: 440px;
}

.card-calendar-july {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    height: 380px;
}

.card-recurring-payments {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    height: 440px;
}

.card-diary {
    grid-column: 2 / 3;
    grid-row: 2 / 4; /* Cover spaces of Row 2 (where Business Calendar was) and Row 3 */
    height: auto; /* Allow auto-stretch to fill the grid row span */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
}

.card-ideas {
    display: flex;
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    height: 380px;
}

.card-schedule-timeline {
    display: none;
}

/* CARD 1: Pending Tasks Elements */
.tasks-total-badge {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-accent);
    font-family: var(--font-heading);
    margin-bottom: 12px;
}

.tasks-total-badge span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 6px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.task-list.detailed-grid {
    display: flex;
    flex-direction: row;
    gap: 0;
    margin-bottom: 0;
    width: 100%;
}

.detailed-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.detailed-column:not(:last-child) {
    border-right: 1px solid var(--border-color);
    padding-right: 24px;
}

.detailed-column:not(:first-child) {
    padding-left: 24px;
}

.detailed-grid .task-item {
    background-color: transparent;
    border: none;
    border-bottom: 1px dashed rgba(226, 232, 240, 0.6);
    padding: 8px 6px;
    border-radius: 6px;
}

.detailed-grid .task-item:hover {
    background-color: rgba(15, 159, 144, 0.03);
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: var(--transition-fast);
}

.task-item:hover {
    background-color: #f1f5f9;
}

.task-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.task-checkbox-container input {
    display: none;
}

.task-checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.task-checkbox-container input:checked + .task-checkbox-custom {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.task-checkbox-container input:checked + .task-checkbox-custom::after {
    content: "";
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: block;
    margin-bottom: 2px;
}

.task-details {
    flex-grow: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.task-item.completed .task-details {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-context-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-show-all {
    background-color: #f1f5f9;
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    margin-top: auto;
    transition: var(--transition-fast);
    border: 1px solid #e2e8f0;
}

.btn-show-all:hover {
    background-color: #e2e8f0;
}

/* CARD 2: Calendar Expanded & Mini-Grid tracker */
.calendar-filter-bar {
    display: flex;
    gap: 4px;
    background-color: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.calendar-filter-btn {
    background: none;
    border: none;
    padding: 6px 8px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.calendar-filter-btn.active {
    background-color: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 4. Mini-calendar Visual Grid style rules */
.mini-calendar-container {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.mini-calendar-header {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.mini-cal-day-header {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    padding: 2px 0;
}

.mini-cal-day-header:nth-child(6),
.mini-cal-day-header:nth-child(7) {
    color: #b91c1c;
}

.mini-cal-cell {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 3px 0;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.mini-cal-cell.weekend {
    color: #b91c1c;
}

.mini-cal-cell:hover {
    background-color: #e2e8f0;
    color: var(--text-primary);
}

.mini-cal-cell.today {
    background-color: var(--color-accent) !important;
    color: var(--text-white) !important;
    border: none !important;
    font-weight: 700;
}

.mini-cal-cell.has-events {
    background-color: #99f6e4 !important;
    border: 1.5px solid #2dd4bf !important;
    border-radius: 6px;
    font-weight: 700;
    color: #0f766e !important;
}

.mini-cal-cell.weekend.has-events {
    color: #991b1b !important;
    background-color: #fecaca !important;
    border: 1.5px solid #f87171 !important;
}

.mini-cal-cell.has-events::after {
    content: none !important; /* Hide dot on solid cells */
}

.mini-cal-cell.today.has-events::after {
    content: ""; /* Keep dot on today's cell */
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--text-white);
}

.mini-cal-cell.empty {
    pointer-events: none;
    opacity: 0.15;
}

.mini-cal-cell.filtered-selected {
    outline: 2px solid #2563eb !important;
    outline-offset: -2px;
}

/* Mini Calendar Events List Simple Line Layout */
.mini-calendar-events-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 4px 0;
}

.mini-calendar-events-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 16px;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 2px;
}

.mini-calendar-events-list::-webkit-scrollbar {
    width: 4px;
}
.mini-calendar-events-list::-webkit-scrollbar-track {
    background: transparent;
}
.mini-calendar-events-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.mini-event-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background-color: transparent !important;
    border: none;
    padding: 1px 0 1px 6px !important;
    cursor: pointer;
    min-width: 0;
    transition: var(--transition-fast);
}

.mini-event-item:hover {
    background-color: transparent !important;
    opacity: 0.8;
}

.mini-event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.mini-event-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
}

.mini-event-title {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.25;
}

.mini-event-time {
    font-size: 9.5px;
    color: var(--text-secondary);
    white-space: normal !important;
    word-break: break-word !important;
    margin-top: 1px;
}

/* 4. Restyled event block item styling rules: elegant light pastel shade, thin border framing */
.event-agenda-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 480px; /* Matches expanded depth scroll area */
    overflow-y: auto;
}

.event-agenda-card {
    display: flex;
    gap: 14px;
    border-radius: 10px;
    padding: 12px;
    transition: var(--transition-fast);
    cursor: pointer;
    /* Crisp thin border line */
    border: 1px solid var(--border-color);
}

.event-agenda-card:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.btn-delete-event-shortcut {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11.5px;
    padding: 4px 6px;
    margin-left: auto;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s, background-color 0.2s;
    align-self: center;
}

.mini-event-item:hover .btn-delete-event-shortcut,
.event-agenda-card:hover .btn-delete-event-shortcut {
    opacity: 0.7;
}

.mini-event-item .btn-delete-event-shortcut:hover,
.event-agenda-card .btn-delete-event-shortcut:hover {
    opacity: 1;
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}

/* Event categories pastel shading colors */
.event-agenda-card.cat-work {
    background-color: #eff6ff; /* light blue */
    border-color: #bfdbfe;
    color: #1e3a8a;
}
.event-agenda-card.cat-work .event-title {
    color: #1e3a8a;
}

.event-agenda-card.cat-recur {
    background-color: #f0fdf4; /* light green */
    border-color: #bbf7d0;
    color: #14532d;
}
.event-agenda-card.cat-recur .event-title {
    color: #14532d;
}

.event-agenda-card.cat-personal {
    background-color: #fffbeb; /* light amber */
    border-color: #fde68a;
    color: #78350f;
}
.event-agenda-card.cat-personal .event-title {
    color: #78350f;
}

.event-agenda-card.cat-default {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

.event-date-badge {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-heading);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.event-date-badge.red { color: var(--color-danger-text); }
.event-date-badge.blue { color: var(--color-info-text); }
.event-date-badge.orange { color: var(--color-warning-text); }
.event-date-badge.green { color: var(--color-success-text); }

.event-date-month {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.event-date-day {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.event-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    overflow: hidden;
}

.event-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    opacity: 0.85;
}

/* CARD 3: Recurring Payments Elements */
.payments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.payment-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 10px 12px;
    position: relative;
    cursor: pointer;
    transition: var(--transition-fast);
}

.payment-card:hover {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
}

.payment-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.payment-icon-wrapper.business {
    background-color: var(--color-success-light);
    color: var(--color-success-text);
}

.payment-icon-wrapper.personal {
    background-color: var(--color-warning-light);
    color: var(--color-warning-text);
}

.payment-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.payment-badge-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.payment-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.payment-badge.business {
    background-color: var(--color-success-light);
    color: var(--color-success-text);
}

.payment-badge.personal {
    background-color: var(--color-warning-light);
    color: var(--color-warning-text);
}

.payment-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.payment-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.payment-status-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.payment-status-pill.paid {
    background-color: var(--color-success-light);
    color: var(--color-success-text);
}

.payment-status-pill.pending {
    background-color: var(--color-warning-light);
    color: var(--color-warning-text);
}

.payments-summary-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.payments-summary-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-metric-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.summary-metric-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.payments-chart-and-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.see-all-payments-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.see-all-payments-link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.payment-mini-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 40px;
    padding: 2px 6px;
    background-color: #f8fafc;
    border-radius: 6px;
    border: 1px solid #f1f5f9;
}

.payment-chart-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.payment-chart-bar {
    width: 14px;
    border-radius: 2px 2px 0 0;
    background-color: var(--text-muted);
    min-height: 2px;
    transition: height 0.3s ease;
}

.payment-chart-bar.paid {
    background-color: var(--color-success);
}

.payment-chart-bar.pending {
    background-color: var(--color-warning);
}

.payment-chart-bar.upcoming {
    background-color: var(--color-info);
}

.payment-chart-label {
    font-size: 8px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* CARD 4: Calls categorized by priority */
.calls-priority-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.call-priority-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 10px 12px;
}

.call-priority-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.call-priority-icon.highest {
    background-color: var(--color-danger-light);
    color: var(--color-danger-text);
}

.call-priority-icon.high {
    background-color: var(--color-warning-light);
    color: var(--color-warning-text);
}

.call-priority-icon.standard {
    background-color: var(--color-info-light);
    color: var(--color-info-text);
}

.call-priority-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.call-priority-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.call-items-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.call-item {
    font-size: 12.5px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: var(--transition-fast);
    cursor: pointer;
}

.call-item:hover {
    background-color: #f1f5f9;
}

.call-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
}

.call-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.call-tag.red {
    background-color: var(--color-danger-light);
    color: var(--color-danger-text);
}

.call-tag.orange {
    background-color: var(--color-warning-light);
    color: var(--color-warning-text);
}

.call-tag.blue {
    background-color: var(--color-info-light);
    color: var(--color-info-text);
}

.call-tag.green {
    background-color: rgba(220, 252, 231, 1);
    color: rgba(21, 128, 61, 1);
}

.call-time {
    font-size: 11px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* CARD 5: Follow-ups Single-Column Tab View */
.kanban-tabs-navigation {
    display: flex;
    gap: 4px;
    background-color: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
}

.kanban-tab-btn {
    background: none;
    border: none;
    padding: 5px 10px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.kanban-tab-btn.active {
    background-color: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.kanban-single-column-container {
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 10px;
    height: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.kanban-cards-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 2px;
}

.kanban-card {
    background-color: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    transition: var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.kanban-card-title {
    font-size: 14px;
    font-weight: 750;
    color: var(--text-primary);
    line-height: 1.35;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.kanban-context-pill {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

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

.kanban-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.kanban-action-btn:hover {
    color: var(--text-primary);
    background-color: #f1f5f9;
}

/* Modals & Dialog System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 100;
}

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

.modal-container {
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--modal-shadow);
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
}

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

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

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-close-modal:hover {
    background-color: #e2e8f0;
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #f8fafc;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(15, 159, 144, 0.15);
}

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

.btn-submit {
    background-color: var(--color-accent);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-submit:hover {
    background-color: var(--color-accent-hover);
}

.btn-cancel {
    background-color: #e2e8f0;
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-cancel:hover {
    background-color: #cbd5e1;
}

.btn-delete-item {
    background-color: var(--color-danger);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-right: auto;
}

.btn-delete-item:hover {
    background-color: #dc2626;
}

/* Tabs in Modal */
.quick-add-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
    padding-bottom: 8px;
    overflow-x: auto;
}

.quick-add-tabs::-webkit-scrollbar {
    display: none;
}

.quick-add-tab-btn {
    background: none;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.quick-add-tab-btn:hover {
    color: var(--text-primary);
    background-color: #f1f5f9;
}

.quick-add-tab-btn.active {
    background-color: var(--color-accent-light);
    color: var(--color-accent);
}

.modal-container.large {
    max-width: 700px;
}

.search-bar-container {
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 13.5px;
    color: var(--text-primary);
}

.tasks-grid-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 45vh;
    overflow-y: auto;
    padding-right: 4px;
}

.tasks-grid-list::-webkit-scrollbar {
    width: 6px;
}

.tasks-grid-list::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.task-grid-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.task-grid-item:hover {
    background-color: #f1f5f9;
}

.task-grid-item.completed {
    opacity: 0.7;
}

.task-grid-item-title {
    flex-grow: 1;
    font-size: 13.5px;
    font-weight: 500;
}

.task-grid-item.completed .task-grid-item-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.btn-task-action {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.btn-task-action:hover {
    color: var(--text-primary);
    background-color: #e2e8f0;
}

/* Toast */
.alert-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--bg-sidebar);
    color: var(--text-white);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    z-index: 1000;
}

.alert-toast.active {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive Grid styling */
@media (max-width: 1200px) {
    .grid-canvas {
        grid-template-columns: 1fr 1fr;
    }
    .card-pending-tasks {
        grid-column: 1 / 2;
    }
    .card-calls {
        grid-column: 1 / 2;
    }
    .card-calendar-july {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        height: auto;
    }
    .card-recurring-payments {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
        height: auto;
    }
    .card-follow-ups {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        height: auto;
    }
    .card-ideas {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
        height: auto;
    }
    .card-habits {
        grid-column: 1 / 3;
        grid-row: 4 / 5;
        height: auto;
    }
}

/* Offset for Preview Bar */
body {
    padding-top: 40px;
    box-sizing: border-box;
}
.app-container {
    height: calc(100vh - 40px) !important;
}
.login-overlay {
    height: calc(100vh - 40px) !important;
    top: 40px !important;
}

/* Preview Switcher Bar Styling */
#preview-switcher-bar {
    font-family: 'Outfit', sans-serif;
}
.preview-mode-btn {
    border: none;
    cursor: pointer;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 11.5px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}


/* Card Panel Colors (Pastel Hues & Structured Borders) */
.card-panel.card-pending-tasks {
    background-color: rgba(219, 234, 254, 0.5) !important;
    border: 1px solid rgba(147, 197, 253, 0.8) !important;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.02);
}
.card-panel.card-pending-tasks .card-header {
    background-color: rgba(147, 197, 253, 0.25) !important;
    border-bottom: 1px solid rgba(147, 197, 253, 0.5) !important;
}
.card-panel.card-pending-tasks .card-title-group h3 {
    color: #1d4ed8;
}
.card-panel.card-pending-tasks .task-item {
    background-color: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}
.card-panel.card-pending-tasks .task-item:hover {
    background-color: #f8fafc !important;
}
.card-panel.card-pending-tasks .task-search-bar input {
    background-color: #ffffff !important;
}

.card-panel.card-calendar-july {
    background-color: rgba(204, 251, 241, 0.5) !important;
    border: 1px solid rgba(115, 230, 206, 0.8) !important;
    box-shadow: 0 4px 20px rgba(115, 230, 206, 0.02);
}
.card-panel.card-calendar-july .card-header {
    background-color: rgba(115, 230, 206, 0.25) !important;
    border-bottom: 1px solid rgba(115, 230, 206, 0.5) !important;
}
.card-panel.card-calendar-july .card-title-group h3 {
    color: #0f9f90;
}

.card-panel.card-recurring-payments {
    background-color: rgba(243, 232, 255, 0.5) !important;
    border: 1px solid rgba(216, 180, 254, 0.8) !important;
    box-shadow: 0 4px 20px rgba(216, 180, 254, 0.02);
}
.card-panel.card-recurring-payments .card-header {
    background-color: rgba(216, 180, 254, 0.25) !important;
    border-bottom: 1px solid rgba(216, 180, 254, 0.5) !important;
}
.card-panel.card-recurring-payments .card-title-group h3 {
    color: #6d28d9;
}
.card-panel.card-recurring-payments .payment-card {
    background-color: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}
.card-panel.card-recurring-payments .payment-card:hover {
    background-color: #f8fafc !important;
}

.card-panel.card-calls {
    background-color: rgba(253, 235, 238, 0.6) !important;
    border: 1px solid rgba(249, 194, 204, 0.8) !important;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.02);
}
.card-panel.card-calls .card-header {
    background-color: rgba(249, 194, 204, 0.25) !important;
    border-bottom: 1px solid rgba(249, 194, 204, 0.5) !important;
}
.card-panel.card-calls .card-title-group h3 {
    color: #be185d;
}
.card-panel.card-calls .call-priority-row {
    background-color: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.card-panel.card-follow-ups {
    background-color: rgba(254, 240, 219, 0.6) !important;
    border: 1px solid rgba(251, 211, 167, 0.8) !important;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.02);
}
.card-panel.card-follow-ups .card-header {
    background-color: rgba(251, 211, 167, 0.25) !important;
    border-bottom: 1px solid rgba(251, 211, 167, 0.5) !important;
}
.card-panel.card-follow-ups .card-title-group h3 {
    color: #c2410c;
}
.card-panel.card-follow-ups .kanban-card {
    background-color: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.card-panel.card-ideas {
    background-color: rgba(254, 252, 219, 0.6) !important;
    border: 1px solid rgba(251, 238, 167, 0.8) !important;
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.02);
}
.card-panel.card-ideas .card-header {
    background-color: rgba(251, 238, 167, 0.25) !important;
    border-bottom: 1px solid rgba(251, 238, 167, 0.5) !important;
}
.card-panel.card-ideas .card-title-group h3 {
    color: #a16207;
}
.card-panel.card-ideas .ideas-text-input {
    background-color: #ffffff !important;
}
.card-panel.card-ideas .ideas-item {
    background-color: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

/* Ideas & Scratchpad list layout styling */
.ideas-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ideas-text-input {
    flex-grow: 1;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    transition: var(--transition-fast);
    height: 38px;
    resize: none;
}

.ideas-text-input:focus {
    outline: none;
    border-color: rgba(234, 179, 8, 0.6);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
    height: auto;
    min-height: 55px;
}

.ideas-upload-btn {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.ideas-upload-btn:hover {
    color: #a16207;
    background-color: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.3);
}

.ideas-list-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

/* Custom scrollbar for ideas container */
.ideas-list-container::-webkit-scrollbar {
    width: 5px;
}
.ideas-list-container::-webkit-scrollbar-track {
    background: transparent;
}
.ideas-list-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.ideas-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: var(--transition-fast);
}

.ideas-item:hover {
    background-color: #f8fafc;
    border-color: rgba(234, 179, 8, 0.3);
}

.ideas-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    min-width: 0;
}

.ideas-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.ideas-item-icon.text {
    background-color: rgba(234, 179, 8, 0.1);
    color: #a16207;
}

.ideas-item-icon.image {
    background-color: rgba(234, 179, 8, 0.1);
    color: #a16207;
}

.ideas-item-image-preview {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ideas-attached-thumbnail {
    max-width: 150px;
    max-height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ideas-attached-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ideas-item-icon.file {
    background-color: rgba(15, 159, 144, 0.1);
    color: #0f9f90;
}

.ideas-item-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
}

.ideas-item-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
    white-space: pre-wrap;
}

.ideas-item-file-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ideas-file-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-accent);
    text-decoration: none;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
}

.ideas-file-link:hover {
    text-decoration: underline;
}

.ideas-file-size {
    font-size: 11px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.ideas-item-time {
    font-size: 10.5px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.btn-delete-idea {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.btn-delete-idea:hover {
    color: var(--color-danger);
    background-color: var(--color-danger-light);
}

.btn-edit-idea {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.btn-edit-idea:hover {
    color: var(--color-accent);
    background-color: rgba(37, 99, 235, 0.08);
}

/* Dynamic Image Modal Styles */
.ideas-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.ideas-image-modal-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ideas-image-modal-container img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 3px solid #ffffff;
}

.ideas-image-modal-caption {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.ideas-image-modal-close {
    position: absolute;
    top: -40px;
    right: -10px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 36px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.ideas-image-modal-close:hover {
    color: var(--color-danger);
}

/* Card header add button styling */
.card-add-task-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.card-add-task-btn:hover {
    color: var(--color-accent);
    background-color: var(--color-accent-light);
}

/* Top Navbar Section Focus Mode */
.detailed-pending-tasks-container {
    display: none;
}

.grid-canvas[class*="focus-"] > .card-panel,
.grid-canvas[class*="focus-"] > .card-diary,
.grid-canvas[class*="focus-"] > .detailed-pending-tasks-container {
    display: none !important;
}

.grid-canvas.focus-pending-tasks > .detailed-pending-tasks-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    height: 100% !important;
    width: 100% !important;
}

.detailed-pending-tasks-container > .card-panel {
    grid-column: auto !important;
    grid-row: auto !important;
    height: 100% !important;
}

.grid-canvas.focus-pending-tasks > .card-pending-tasks {
    display: none !important;
}

.grid-canvas.focus-calendar > .detailed-calendar-layout,
.grid-canvas.focus-calls > .card-calls,
.grid-canvas.focus-ideas > .card-ideas {
    display: flex !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    height: 100% !important;
    width: 100% !important;
}

.grid-canvas.focus-diary {
    display: none !important;
}

.grid-canvas.focus-diary ~ .detailed-diary-layout {
    display: flex !important;
    width: 100% !important;
    flex: 1 1 0% !important;
    height: 100% !important;
    min-height: 80vh !important;
    flex-direction: row !important;
}

/* Detailed Recurring Payments View side-by-side layout */
.card-payments-calendar {
    display: none;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.02);
}
.card-payments-calendar .card-header {
    background-color: rgba(16, 185, 129, 0.05);
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}
.card-payments-calendar .card-title-group h3 {
    color: #065f46;
}

.payments-calendars-scroll {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 4px;
}

.payment-card.paid .payment-title {
    text-decoration: line-through overline;
    opacity: 0.7;
}

.payment-card.paid .payment-meta {
    opacity: 0.7;
}

/* Monthly Timeline Styling */
.payments-timeline-section {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-main, #f8fafc);
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
}
.payments-timeline-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.payments-timeline-list {
    position: relative;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.payments-timeline-list::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: var(--border-color, #e2e8f0);
}
.payments-timeline-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.payments-timeline-dot {
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #10b981; /* Paid color */
    border: 2px solid var(--card-bg, #ffffff);
}
.payments-timeline-dot.pending {
    background-color: #ef4444; /* Pending color */
}
.payments-timeline-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.payments-timeline-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
}
.payments-timeline-name.paid {
    text-decoration: line-through overline;
    color: var(--text-secondary, #64748b);
    opacity: 0.7;
}
.payments-timeline-date {
    font-size: 10.5px;
    color: var(--text-secondary, #64748b);
}
.payments-timeline-amount {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
}
.payments-timeline-amount.paid {
    text-decoration: line-through overline;
    color: var(--text-secondary, #64748b);
    opacity: 0.7;
}


.grid-canvas.focus-recurring-payments > .card-recurring-payments {
    display: flex !important;
    grid-column: 1 / 2 !important;
    grid-row: 1 / -1 !important;
    height: 100% !important;
    width: 100% !important;
}

.grid-canvas.focus-recurring-payments > .card-payments-calendar {
    display: flex !important;
    grid-column: 2 / 4 !important;
    grid-row: 1 / -1 !important;
    height: 100% !important;
    width: 100% !important;
}

/* Payments Calendar highlights */
.mini-cal-cell.has-payment::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--payment-dot-color, #ef4444);
}

/* Card highlight pulse keyframe */
@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0px rgba(59, 130, 246, 0.5);
        border-color: rgba(59, 130, 246, 0.8);
        background-color: rgba(59, 130, 246, 0.05);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
        border-color: rgba(59, 130, 246, 0.8);
        background-color: rgba(59, 130, 246, 0.05);
    }
    100% {
        box-shadow: 0 0 0 0px rgba(59, 130, 246, 0);
    }
}
.payment-card.highlight-pulse {
    animation: highlightPulse 1.5s ease-in-out infinite;
    border-color: var(--color-accent) !important;
}

/* 6-Month Calendar Month Card Styling */
/* Payments Calendar Grid with thick black lines */
/* Payments Calendar Grid with thick black lines */
.payments-month-card {
    border-radius: 10px;
    padding: 12px 14px !important;
    margin-bottom: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: var(--transition-fast);
}

/* Restored shaded month cards for detailed view */
.payments-month-card.shade-blue {
    background-color: #dbeafe !important;
    border: 1px solid #bfdbfe !important;
}
.payments-month-card.shade-teal {
    background-color: #ccfbf1 !important;
    border: 1px solid #99f6e4 !important;
}
.payments-month-card.shade-purple {
    background-color: #f3e8ff !important;
    border: 1px solid #e9d5ff !important;
}
.payments-month-card.shade-pink {
    background-color: #ffe4e6 !important;
    border: 1px solid #fecdd3 !important;
}
.payments-month-card.shade-orange {
    background-color: #ffedd5 !important;
    border: 1px solid #fed7aa !important;
}
.payments-month-card.shade-yellow {
    background-color: #fef9c3 !important;
    border: 1px solid #fef08a !important;
}

/* Scoped override to remove border/background in Payments Calendar panel */
.card-payments-calendar .payments-month-card {
    border: none !important;
    border-radius: 0;
    padding: 10px 0 0 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    margin-bottom: 0;
    height: 100%;
}
.card-payments-calendar .payments-month-card.shade-teal {
    background-color: transparent !important;
    border: none !important;
}

.payments-month-card .payments-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.payments-month-card .payments-month-header h4 {
    font-size: 24px; /* Large header like image */
    font-weight: 800;
    color: #0f172a;
    font-family: var(--font-heading);
    margin: 0;
}

.cal-nav-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.cal-nav-btn:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.cal-nav-btn i {
    font-size: 14px;
}

.payments-month-card .mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1.5px solid #0f172a; /* Grid border */
    background-color: #ffffff;
    gap: 0px !important; /* No gap so lines connect! */
    flex-grow: 1;
}

.payments-month-card .mini-cal-day-header {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    padding: 10px 0;
    border-bottom: 1.5px solid #0f172a;
    border-right: 1px solid #cbd5e1;
    background-color: #f8fafc;
    text-transform: capitalize;
}

.payments-month-card .mini-cal-day-header:last-child {
    border-right: none;
}

.payments-month-card .mini-cal-cell {
    border-bottom: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    min-height: 42px; /* Base landscape height for detailed calendar grid views */
    padding: 6px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    border-radius: 0 !important; /* Flat edges for grid */
    background-color: #ffffff;
    transition: background-color 0.2s;
    overflow-y: auto; /* Enable scrolling inside cell if many payments exist */
}

/* Scoped tall cell height for the Payments Calendar only */
.card-payments-calendar .payments-month-card .mini-cal-cell {
    min-height: 115px;
}

.payments-month-card .mini-cal-cell:nth-child(7n) {
    border-right: none; /* Connect rows correctly */
}

.payments-month-card .mini-cal-cell.empty {
    background-color: #f8fafc;
    opacity: 0.5;
}

.payments-month-card .mini-cal-cell.weekend {
    color: #ef4444; /* Soft red for weekends */
    background-color: #fffbeb; /* Light yellow hue for weekends to look premium */
}

/* Today's date highlight */
.payments-month-card .mini-cal-cell.today-cell {
    background-color: rgba(59, 130, 246, 0.08) !important; /* Soft blue background */
    outline: 2px solid #3b82f6 !important; /* Blue outline */
    outline-offset: -2px;
    z-index: 5;
}

.payments-month-card .mini-cal-cell.today-cell .mini-cal-day-num {
    background-color: #3b82f6; /* Blue badge for the day number */
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    display: inline-block;
    margin-bottom: 4px;
}

.payments-month-card .mini-cal-cell:hover {
    background-color: #f1f5f9 !important;
}

.payments-month-card .mini-cal-cell.filtered-selected {
    outline: 2.5px solid var(--color-accent) !important;
    outline-offset: -2.5px;
    z-index: 10;
}

/* Payment Tag inside Calendar Cell */
.mini-cal-day-num {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 3px;
    flex-shrink: 0;
}

.mini-cal-cell-payments {
    display: flex;
    flex-direction: column;
    gap: 2.5px;
    width: 100%;
}

.mini-cal-payment-tag {
    font-family: var(--font-body) !important;
    font-size: 8.5px;
    font-weight: 500;
    padding: 1.5px 4px;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-cal-payment-tag.pending {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecdd3;
}

.mini-cal-payment-tag.paid {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.payment-tag-title.paid {
    text-decoration: line-through overline;
}


/* Payments Filter Banner Styling */
.payments-filter-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(15, 159, 144, 0.06);
    border: 1px solid rgba(15, 159, 144, 0.15);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-primary);
}

.btn-clear-payment-filter {
    background-color: var(--color-accent);
    border: none;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: 'Outfit', sans-serif;
}
.btn-clear-payment-filter:hover {
    background-color: #0d8a7c;
    box-shadow: 0 2px 6px rgba(15, 159, 144, 0.2);
}

/* Detailed Calendar View Layout (With grid on top, timeline under) */
.detailed-calendar-layout {
    display: none;
    flex-direction: column;
    gap: 16px;
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    height: auto !important;
    width: 100%;
    overflow-y: visible;
    padding-right: 4px;
}

.card-detailed-calendars,
.card-detailed-timeline {
    width: 100%;
    height: auto !important;
    flex-shrink: 0;
}

.detailed-calendars-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 24px;
    transition: var(--transition-fast);
}

.detailed-calendars-grid.cols-1 {
    max-width: 100%;
    width: 100%;
}

/* All cells across all stacked views use a spacious height */
.detailed-calendars-grid .mini-cal-cell {
    min-height: 115px !important;
}

/* Lined Grid Calendar Styles for Detailed View */
.detailed-calendars-grid .mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0 !important;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-right: none;
    border-radius: 6px;
    overflow: hidden;
    background-color: #ffffff;
    margin-top: 8px;
}

.detailed-calendars-grid .mini-cal-day-header {
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 6px 4px;
    font-weight: 800;
    text-align: center;
    background-color: #f8fafc;
    font-size: 11px;
}

.detailed-calendars-grid .mini-cal-cell {
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-radius: 0 !important;
    min-height: 85px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 4px 6px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
    background-color: #ffffff;
    box-sizing: border-box;
    font-size: 11px;
    text-align: left;
}

.detailed-calendars-grid .mini-cal-cell:hover {
    background-color: #f8fafc;
}

.detailed-calendars-grid .mini-cal-day-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: block;
    text-align: left;
}

.detailed-calendars-grid .mini-cal-cell.weekend .mini-cal-day-num {
    color: #ef4444;
}

.detailed-calendars-grid .mini-cal-cell.today-cell {
    background-color: #eff6ff !important;
}

.detailed-calendars-grid .mini-cal-cell.today-cell .mini-cal-day-num {
    color: #2563eb;
    font-weight: 800;
}

.detailed-calendars-grid .mini-cal-cell-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    flex-grow: 1;
    max-height: 98px; /* Taller scroll container since cells are bigger */
    padding-right: 1px;
}

.detailed-calendars-grid .mini-cal-cell-events::-webkit-scrollbar {
    width: 2px;
}
.detailed-calendars-grid .mini-cal-cell-events::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 2px;
}

.mini-cal-detailed-event-tag {
    font-family: var(--font-body) !important;
    font-size: 9.5px;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: normal !important;
    word-break: break-word !important;
    margin-bottom: 2px;
    line-height: 1.25;
    text-align: left;
    border: 1px solid transparent;
}

.mini-cal-detailed-event-tag.tag-color-red {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b !important;
}

.mini-cal-detailed-event-tag.tag-color-green {
    background-color: #dcfce7 !important;
    border-color: #86efac !important;
    color: #166534 !important;
}

.mini-cal-detailed-event-tag.tag-color-orange {
    background-color: #ffedd5 !important;
    border-color: #fdba74 !important;
    color: #9a3412 !important;
}

.mini-cal-detailed-event-tag.tag-color-blue {
    background-color: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
}

.card-detailed-timeline {
    width: 100%;
    margin-bottom: 24px;
}

.card-detailed-timeline .event-agenda-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns timeline under grid for maximum screen usage! */
    gap: 12px;
    max-height: none;
    overflow-y: visible;
}

@media (max-width: 1024px) {
    .detailed-calendars-grid.cols-3,
    .detailed-calendars-grid.cols-6,
    .detailed-calendars-grid.cols-12 {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-detailed-timeline .event-agenda-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .detailed-calendars-grid.cols-3,
    .detailed-calendars-grid.cols-6,
    .detailed-calendars-grid.cols-12 {
        grid-template-columns: 1fr;
    }
}

/* Detailed Calls Three Columns Layout */
.grid-canvas.focus-calls .calls-priority-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 10px;
}

.grid-canvas.focus-calls .call-priority-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background-color: #ffffff;
    padding: 20px;
    min-height: 350px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease-in-out;
}

.grid-canvas.focus-calls .call-priority-row:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    border-color: rgba(203, 213, 225, 1);
}

.grid-canvas.focus-calls .call-priority-icon {
    margin-bottom: 8px;
    flex-shrink: 0;
}

.grid-canvas.focus-calls .call-priority-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.grid-canvas.focus-calls .call-priority-header {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(241, 245, 249, 1);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grid-canvas.focus-calls .call-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.grid-canvas.focus-calls .call-item {
    background-color: var(--bg-primary);
    border: 1px solid rgba(241, 245, 249, 0.8);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.grid-canvas.focus-calls .call-item:hover {
    background-color: rgba(248, 250, 252, 1);
    border-color: rgba(226, 232, 240, 1);
    transform: translateY(-1px);
}

@media (max-width: 992px) {
    .grid-canvas.focus-calls .calls-priority-container {
        grid-template-columns: 1fr;
    }
}

/* Call Shaded Columns CSS */
.grid-canvas.focus-calls .call-priority-row.shade-blue {
    background-color: rgba(219, 234, 254, 0.5) !important;
    border: 1px solid rgba(147, 197, 253, 0.8) !important;
}
.grid-canvas.focus-calls .call-priority-row.shade-blue .call-priority-header {
    color: #1d4ed8 !important;
    border-bottom: 1px solid rgba(147, 197, 253, 0.5) !important;
}

.grid-canvas.focus-calls .call-priority-row.shade-teal {
    background-color: rgba(204, 251, 241, 0.5) !important;
    border: 1px solid rgba(115, 230, 206, 0.8) !important;
}
.grid-canvas.focus-calls .call-priority-row.shade-teal .call-priority-header {
    color: #0d9488 !important;
    border-bottom: 1px solid rgba(115, 230, 206, 0.5) !important;
}

.grid-canvas.focus-calls .call-priority-row.shade-purple {
    background-color: rgba(243, 232, 255, 0.5) !important;
    border: 1px solid rgba(216, 180, 254, 0.8) !important;
}
.grid-canvas.focus-calls .call-priority-row.shade-purple .call-priority-header {
    color: #7c3aed !important;
    border-bottom: 1px solid rgba(216, 180, 254, 0.5) !important;
}

/* Ensure white backgrounds for items inside shaded blocks for a gorgeous contrast */
.grid-canvas.focus-calls .call-priority-row .call-item {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}
.grid-canvas.focus-calls .call-priority-row .call-item:hover {
    background-color: #f8fafc !important;
    border-color: rgba(203, 213, 225, 1) !important;
}

/* Completed Call item styles */
.call-item.completed .call-text {
    text-decoration: line-through !important;
    color: var(--text-secondary) !important;
    opacity: 0.6;
}

/* Kanban Board Detailed View Layout (Three Columns Side-by-Side) */
.kanban-single-column-container.detailed-board {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    height: auto !important;
}

.kanban-board {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.kanban-column {
    background-color: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 480px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 1);
}

.kanban-column-title {
    font-size: 16px;
    font-weight: 850;
    color: var(--text-primary);
}

.kanban-column-count {
    background-color: #e2e8f0;
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.kanban-column-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 400px;
}

/* Kanban card overrides for detailed drag board */
.kanban-column-body .kanban-card {
    cursor: grab;
}

.kanban-column-body .kanban-card:active {
    cursor: grabbing;
}

/* Dragging hover and active states */
.kanban-card.dragging {
    opacity: 0.4 !important;
    border: 1px dashed var(--color-primary) !important;
    box-shadow: none !important;
}

.kanban-column-body.drag-over {
    background-color: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(59, 130, 246, 0.4);
}

/* Solid Pastel Shading & Borders for Kanban Board Columns */
.kanban-board .kanban-column:nth-child(1) {
    background-color: rgba(219, 234, 254, 0.5) !important;
    border: 1px solid rgba(147, 197, 253, 0.8) !important;
}
.kanban-board .kanban-column:nth-child(1) .kanban-column-title {
    color: #1d4ed8 !important;
}

.kanban-board .kanban-column:nth-child(2) {
    background-color: rgba(204, 251, 241, 0.5) !important;
    border: 1px solid rgba(115, 230, 206, 0.8) !important;
}
.kanban-board .kanban-column:nth-child(2) .kanban-column-title {
    color: #0d9488 !important;
}

.kanban-board .kanban-column:nth-child(3) {
    background-color: rgba(243, 232, 255, 0.5) !important;
    border: 1px solid rgba(216, 180, 254, 0.8) !important;
}
.kanban-board .kanban-column:nth-child(3) .kanban-column-title {
    color: #7c3aed !important;
}

/* Ensure white backgrounds for cards inside shaded columns */
.kanban-column .kanban-card {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}
.kanban-column .kanban-card:hover {
    background-color: #f8fafc !important;
    border-color: rgba(203, 213, 225, 1) !important;
}

/* Multi-column grid for Ideas & Scratchpad detailed page view */
.grid-canvas.focus-ideas .ideas-list-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    max-height: none !important;
    overflow-y: auto !important;
    align-content: start !important;
}

.ideas-column {
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Shading colors for ideas columns */
.ideas-col-blue {
    background-color: rgba(219, 234, 254, 0.5) !important;
    border: 1px solid rgba(147, 197, 253, 0.8) !important;
}
.ideas-col-teal {
    background-color: rgba(204, 251, 241, 0.5) !important;
    border: 1px solid rgba(115, 230, 206, 0.8) !important;
}
.ideas-col-purple {
    background-color: rgba(243, 232, 255, 0.5) !important;
    border: 1px solid rgba(216, 180, 254, 0.8) !important;
}

/* Make each idea item match card styling inside the columns */
.ideas-column .ideas-item {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    align-items: flex-start !important;
    min-height: 54px !important;
}
.ideas-column .ideas-item:hover {
    background-color: #f8fafc !important;
    border-color: rgba(203, 213, 225, 1) !important;
}

@keyframes flash-gold {
    0% {
        border-color: rgba(234, 179, 8, 1) !important;
        box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.4) !important;
    }
    100% {
        border-color: var(--border-color);
        box-shadow: none;
    }
}
.ideas-text-input.flash-highlight {
    animation: flash-gold 1s ease-out;
}

/* Habit Tracker Dashboard Block & Detailed View CSS */

.card-panel.card-habits {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    height: 440px;
    background-color: rgba(209, 250, 229, 0.5) !important;
    border: 1px solid rgba(167, 243, 208, 0.8) !important;
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.02);
}

.card-panel.card-habits .card-header {
    background-color: rgba(167, 243, 208, 0.25) !important;
    border-bottom: 1px solid rgba(167, 243, 208, 0.5) !important;
}

.card-panel.card-habits .card-title-group h3 {
    color: #047857;
}

.habits-tabs-bar {
    display: flex;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8fafc;
}

.habits-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.habits-tab-btn.active {
    background-color: #ffffff;
    color: #0f9f90;
    border-bottom: 2px solid #0f9f90;
}

.habits-checklist-wrapper {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex-grow: 1;
}

.habits-checklist-header {
    display: flex;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.habit-name-col {
    flex-grow: 1;
}

.habit-days-cols {
    display: flex;
    gap: 8px;
    width: 202px;
    justify-content: space-between;
}

.habit-days-cols span {
    width: 22px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
}

.habit-checklist-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.habit-checklist-row:last-child {
    border-bottom: none;
}

.habit-info-cell {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 12px;
}

.habit-row-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.habit-row-progress-container {
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    width: 100px;
    overflow: hidden;
}

.habit-row-progress-bar {
    height: 100%;
    background-color: #0f9f90;
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.habit-checkboxes-cell {
    display: flex;
    gap: 8px;
    width: 202px;
    justify-content: space-between;
}

.habit-checkbox-label {
    display: block;
}

.habit-checkbox-label input {
    display: none;
}

.habit-custom-checkbox {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    background-color: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.habit-checkbox-label input:checked + .habit-custom-checkbox {
    background-color: #0f9f90;
    border-color: #0f9f90;
}

.habit-checkbox-label input:checked + .habit-custom-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Detailed Layout view styles */
.detailed-habits-layout {
    display: none;
}

.grid-canvas.focus-habits > .detailed-habits-layout {
    display: flex !important;
    flex-direction: column;
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    height: 100% !important;
    width: 100% !important;
    gap: 16px;
}

.habits-detailed-header {
    margin-bottom: 4px;
}

.habits-detailed-title-group h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.habits-detailed-title-group p {
    font-size: 13.5px;
    color: var(--text-secondary);
}

.habits-detailed-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    flex-grow: 1;
    height: calc(100% - 60px);
}

.habits-col {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.habits-col-all {
    background-color: rgba(219, 234, 254, 0.4) !important;
    border: 1px solid rgba(147, 197, 253, 0.8) !important;
}

.habits-col-all .card-header {
    background-color: rgba(147, 197, 253, 0.2) !important;
    border-bottom: 1px solid rgba(147, 197, 253, 0.4) !important;
}

.habits-col-today {
    background-color: rgba(204, 251, 241, 0.4) !important;
    border: 1px solid rgba(115, 230, 206, 0.8) !important;
}

.habits-col-today .card-header {
    background-color: rgba(115, 230, 206, 0.2) !important;
    border-bottom: 1px solid rgba(115, 230, 206, 0.4) !important;
}

.habits-col-streaks {
    background-color: rgba(243, 232, 255, 0.4) !important;
    border: 1px solid rgba(216, 180, 254, 0.8) !important;
}

.habits-col-streaks .card-header {
    background-color: rgba(216, 180, 254, 0.2) !important;
    border-bottom: 1px solid rgba(216, 180, 254, 0.4) !important;
}

.habits-badge-count {
    background-color: var(--color-accent);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.habits-col-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    height: calc(100% - 60px);
    overflow-y: auto;
}

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

.habits-search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 13px;
}

#habits-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    font-size: 13.5px;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

#habits-search-input:focus {
    border-color: #0f9f90;
    box-shadow: 0 0 0 3px rgba(15, 159, 144, 0.15);
}

.habits-list-all, .habits-list-today {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Row item templates for Col 1 and 2 */
.habit-item-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-fast);
}

.habit-item-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.habit-item-name {
    flex-grow: 1;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.habit-item-check-circle {
    color: #cbd5e1;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.habit-item-check-circle.checked {
    color: #0f9f90;
}

.habit-action-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 13px;
    transition: color 0.2s ease;
}

.habit-action-btn:hover {
    color: var(--text-primary);
}

.habit-action-btn.delete:hover {
    color: var(--color-danger);
}

/* Col 2 Today Item */
.habit-today-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-fast);
}

.habit-today-card .habit-today-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.habit-today-card.checked .habit-today-checkbox {
    background-color: #0f9f90;
    border-color: #0f9f90;
}

.habit-today-card.checked .habit-today-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 9px;
    color: #ffffff;
}

.habit-today-info {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.habit-today-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.habit-today-card.checked .habit-today-title {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.habit-today-progress {
    flex-grow: 1;
    height: 6px;
    background-color: #cbd5e1;
    border-radius: 3px;
    overflow: hidden;
    max-width: 120px;
}

.habit-today-progress-bar {
    height: 100%;
    background-color: #0f9f90;
    width: 0%;
    transition: width 0.3s ease;
}

.habit-today-metric {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: right;
}

/* Col 3 Streaks & Analytics */
.habits-streaks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.habit-streak-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.habit-streak-badges {
    display: flex;
    gap: 6px;
}

.streak-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
}

.streak-badge.missed {
    background-color: #fef0db;
    color: #c2410c;
}

.streak-badge.best {
    background-color: #e0ecfb;
    color: #1d4ed8;
}

.streak-badge.broken {
    background-color: #fdebee;
    color: #be185d;
}

.habits-gauges-row {
    display: flex;
    gap: 16px;
    justify-content: space-around;
    margin-bottom: 24px;
    padding: 16px 0;
    border-top: 1px dashed #cbd5e1;
    border-bottom: 1px dashed #cbd5e1;
}

.habit-gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.habit-gauge-wrapper {
    position: relative;
    width: 90px;
    height: 45px;
}

.habit-gauge-svg {
    width: 100%;
    height: 100%;
}

.habit-gauge-percent {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.habit-gauge-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
}

.habits-history-section h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.habits-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.habit-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-primary);
}

.habit-history-time {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Group headers for categorized lists in habits detailed view */
.habits-group-header {
    padding: 8px 4px 4px 4px;
    margin-top: 12px;
    margin-bottom: 6px;
    border-bottom: 1px dashed rgba(203, 213, 225, 0.6);
}

.habits-group-header h4 {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 0.75px;
    margin: 0;
}

.reminders-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    overflow-y: auto;
    height: calc(100% - 60px);
}

.reminder-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.reminder-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.reminder-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.reminder-text-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.reminder-subtext {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.reminder-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.reminder-slider {
    -webkit-appearance: none;
    width: 90px;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    transition: background 0.3s;
}

.reminder-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 6px;
    height: 16px;
    border-radius: 2px;
    background: #0f766e;
    cursor: pointer;
}

.reminder-slider-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background-color: #f1f5f9;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

.reminder-slider-toggle:hover {
    background-color: #e2e8f0;
    color: var(--text-primary);
}

.reminder-pill-badge {
    font-size: 11px;
    font-weight: 700;
    color: #c2410c;
    background-color: #ffedd5;
    padding: 4px 10px;
    border-radius: 9999px;
    flex-shrink: 0;
}

.reminder-counter-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.reminder-counter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: none;
    background-color: #f1f5f9;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

.reminder-counter-btn:hover {
    background-color: #e2e8f0;
}

.reminder-counter-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 14px;
    text-align: center;
}

.reminders-subsection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding: 0 4px;
}

.reminders-subsection-header .subsection-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f766e;
    letter-spacing: 0.25px;
}

.reminders-subsection-header .add-post-link {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f766e;
    text-decoration: none;
    transition: opacity 0.2s;
}

.reminders-subsection-header .add-post-link:hover {
    opacity: 0.8;
}

.reminder-checkbox-label {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
}

.reminder-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.reminder-custom-checkbox {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.reminder-checkbox-label input:checked + .reminder-custom-checkbox {
    background-color: #0f766e;
    border-color: #0f766e;
}

.reminder-checkbox-label input:checked + .reminder-custom-checkbox::after {
    display: block;
}

.reminder-custom-checkbox::after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Business Reminders Detailed Layout styles */
.detailed-reminders-layout {
    display: none;
}

.grid-canvas.focus-reminders > .detailed-reminders-layout {
    display: flex !important;
    flex-direction: column;
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    height: 100% !important;
    width: 100% !important;
    gap: 16px;
}

.reminders-detailed-header {
    margin-bottom: 4px;
}

.reminders-detailed-title-group h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.reminders-detailed-title-group p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

.reminders-detailed-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.reminders-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.reminders-col-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reminders-badge-count {
    font-size: 11px;
    font-weight: 800;
    background-color: #e2e8f0;
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 4px;
}

.btn-add-reminder {
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-add-reminder:hover {
    opacity: 0.9;
}

/* Detailed card styling for reminders management */
.reminder-manage-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.reminder-manage-card:hover {
    border-color: #cbd5e1;
}

.reminder-manage-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.reminder-manage-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.reminder-manage-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reminder-manage-category {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    background-color: #e2e8f0;
    padding: 1px 5px;
    border-radius: 4px;
}

.reminder-manage-type-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #0f766e;
    background-color: #ccfbf1;
    padding: 1px 5px;
    border-radius: 4px;
}

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

.reminder-manage-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

.reminder-manage-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.reminder-manage-btn.delete:hover {
    background-color: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

/* Social posts style */
.social-post-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

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

.social-post-platform-badge {
    font-size: 9.5px;
    font-weight: 800;
    color: #1d4ed8;
    background-color: #dbeafe;
    padding: 1px 4px;
    border-radius: 3px;
}

.social-post-platform-badge.linkedin { color: #0077b5; background-color: #e1f5fe; }
.social-post-platform-badge.twitter { color: #1da1f2; background-color: #e8f5fe; }
.social-post-platform-badge.facebook { color: #1877f2; background-color: #e8f0fe; }
.social-post-platform-badge.instagram { color: #e1306c; background-color: #fce4ec; }
.social-post-platform-badge.tiktok { color: #000000; background-color: #f5f5f5; }

.social-post-content {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.social-post-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
}

.social-post-action-btn {
    border: none;
    background: none;
    font-size: 10px;
    font-weight: 700;
    color: #0f766e;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.social-post-action-btn:hover {
    background-color: #f1f5f9;
}

.social-post-action-btn.delete {
    color: #ef4444;
}

.social-post-action-btn.delete:hover {
    background-color: #fee2e2;
}

/* History row inside timeline */
.reminders-history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
}

.reminders-history-title {
    font-weight: 600;
    color: var(--text-primary);
}

.reminders-history-meta {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

@media (max-width: 1200px) {
    .reminders-detailed-columns {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* Loan & Debt Tracker Dashboard Card styles */
.card-panel.card-loans {
    grid-column: span 1;
    background-color: rgba(224, 242, 254, 0.5) !important;
    border: 1px solid rgba(186, 230, 253, 0.8) !important;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.02);
}
.card-panel.card-loans .card-header {
    background-color: rgba(186, 230, 253, 0.25) !important;
    border-bottom: 1px solid rgba(186, 230, 253, 0.5) !important;
}
.card-panel.card-loans .card-title-group h3 {
    color: #0369a1;
}

.loans-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.loan-section-header {
    margin-bottom: 8px;
}

.loan-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
}

.loan-section-desc {
    font-size: 11px;
    color: #0f766e;
    font-weight: 600;
    margin: 2px 0 0 0;
}

.loan-section-desc.random {
    color: #1d4ed8;
}

.loan-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}

.loan-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.loan-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.loan-title-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loan-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-primary);
}

.loan-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.loan-progress-bar {
    height: 6px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    flex: 1;
}

.loan-progress-fill {
    height: 100%;
    background-color: #0f766e;
    border-radius: 99px;
    transition: width 0.3s ease;
}

.loan-progress-fill.flexible {
    background-color: #1d4ed8;
}

.loan-progress-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.loan-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loan-pill-badge {
    font-size: 10px;
    font-weight: 800;
    color: #0f766e;
    background-color: #ccfbf1;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.loan-pill-badge.coral {
    color: #b91c1c;
    background-color: #fee2e2;
}

.loan-pill-badge.blue {
    color: #1d4ed8;
    background-color: #dbeafe;
}

.loan-payment-form {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    margin-left: 28px;
}

.loan-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    flex: 2;
}

.loan-input-prefix {
    background-color: #f1f5f9;
    border-right: 1px solid #cbd5e1;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-secondary);
}

.loan-input-field {
    border: none;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 600;
    width: 100%;
    outline: none;
    color: var(--text-primary);
}

.loan-date-wrapper {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    flex: 2;
    padding: 0 8px;
}

.loan-date-wrapper i {
    color: var(--text-secondary);
    margin-right: 6px;
    font-size: 12px;
}

.loan-date-field {
    border: none;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    outline: none;
    width: 100%;
    background: transparent;
    padding: 6px 0;
}

.btn-add-loan-payment {
    background-color: #0f766e;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 800;
    padding: 6px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.btn-add-loan-payment:hover {
    background-color: #0d5f58;
}

.loan-footer-row {
    border-top: 1px solid #e2e8f0;
    margin-top: 12px;
    padding-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.loan-footer-text {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Detailed Loans Page Layout styles */
.detailed-loans-layout {
    display: none;
}

.grid-canvas.focus-loans > .detailed-loans-layout {
    display: flex !important;
    flex-direction: column;
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    height: 100% !important;
    width: 100% !important;
    gap: 16px;
}

.loans-detailed-header {
    margin-bottom: 4px;
}

.loans-detailed-title-group h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.loans-detailed-title-group p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

.loans-detailed-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.loans-col {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.loans-col-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loans-badge-count {
    font-size: 11px;
    font-weight: 800;
    background-color: #e2e8f0;
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 4px;
}

.btn-add-loan {
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-add-loan:hover {
    opacity: 0.9;
}

.loan-manage-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.loan-manage-card:hover {
    border-color: #cbd5e1;
}

.loan-manage-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.loan-manage-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.loan-manage-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.loan-manage-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1d4ed8;
    background-color: #dbeafe;
    padding: 1px 5px;
    border-radius: 4px;
}

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

.loan-manage-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

.loan-manage-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.loan-manage-btn.delete:hover {
    background-color: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

.loan-ledger-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
}

.loan-ledger-title {
    font-weight: 600;
    color: var(--text-primary);
}

.loan-ledger-meta {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

@media (max-width: 1200px) {
    .loans-detailed-columns {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* Ensure Quick Add modal is wide enough to show all 9 tabs inline */
#quick-add-modal .modal-container {
    max-width: 800px;
}

/* Detailed Pages Column Colors */

/* Calendar Detailed columns */
.detailed-calendar-layout .card-detailed-calendars,
.detailed-calendar-layout .card-detailed-timeline {
    background-color: rgba(204, 251, 241, 0.5) !important;
    border: 1px solid rgba(115, 230, 206, 0.8) !important;
}
.detailed-calendar-layout .card-detailed-calendars .card-header,
.detailed-calendar-layout .card-detailed-timeline .card-header {
    background-color: rgba(115, 230, 206, 0.25) !important;
    border-bottom: 1px solid rgba(115, 230, 206, 0.5) !important;
}
.detailed-calendar-layout .card-detailed-calendars .card-title-group h3,
.detailed-calendar-layout .card-detailed-timeline .card-title-group h3 {
    color: #0f9f90;
}

/* Habits Detailed columns */
.detailed-habits-layout .habits-col {
    background-color: rgba(209, 250, 229, 0.5) !important;
    border: 1px solid rgba(167, 243, 208, 0.8) !important;
}
.detailed-habits-layout .habits-col .card-header {
    background-color: rgba(167, 243, 208, 0.25) !important;
    border-bottom: 1px solid rgba(167, 243, 208, 0.5) !important;
}
.detailed-habits-layout .habits-col .card-title-group h3 {
    color: #047857;
}

/* Reminders Detailed columns */
.detailed-reminders-layout .reminders-col {
    background-color: rgba(224, 231, 255, 0.5) !important;
    border: 1px solid rgba(199, 210, 254, 0.8) !important;
}
.detailed-reminders-layout .reminders-col .card-header {
    background-color: rgba(199, 210, 254, 0.25) !important;
    border-bottom: 1px solid rgba(199, 210, 254, 0.5) !important;
}
.detailed-reminders-layout .reminders-col .card-title-group h3 {
    color: #4338ca;
}

/* Loans Detailed columns */
.detailed-loans-layout .loans-col {
    background-color: rgba(224, 242, 254, 0.5) !important;
    border: 1px solid rgba(186, 230, 253, 0.8) !important;
}
.detailed-loans-layout .loans-col .card-header {
    background-color: rgba(186, 230, 253, 0.25) !important;
    border-bottom: 1px solid rgba(186, 230, 253, 0.5) !important;
}
.detailed-loans-layout .loans-col .card-title-group h3 {
    color: #0369a1;
}

/* Expanded Weekly Calendar Styles */
.detailed-calendars-grid.cols-1.weekly-view-expanded {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto;
}

.weekly-view-expanded .payments-month-card {
    background-color: rgba(204, 251, 241, 0.6) !important;
    border: 1px solid rgba(115, 230, 206, 0.9) !important;
    border-radius: 12px;
}

.weekly-view-expanded .payments-month-header h4 {
    font-size: 18px !important;
    font-weight: 800;
    color: #0f9f90 !important;
    text-align: center;
    margin: 0;
}

.weekly-view-expanded .mini-calendar-grid {
    gap: 24px !important;
    padding: 16px 0 !important;
}

.weekly-view-expanded .mini-cal-day-header {
    font-size: 15px !important;
    font-weight: 800;
    color: var(--text-primary);
    border-bottom: 2px solid rgba(115, 230, 206, 0.4);
    padding-bottom: 8px;
}

.weekly-view-expanded .mini-cal-cell {
    font-size: 20px !important;
    font-weight: 800;
    padding: 12px 0 !important;
    border-radius: 10px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    transition: all 0.2s ease;
}

.weekly-view-expanded .mini-cal-cell:hover {
    background-color: rgba(115, 230, 206, 0.2) !important;
    border-color: rgba(115, 230, 206, 0.5);
}

.weekly-view-expanded .mini-cal-cell.filtered-selected {
    background-color: #0f9f90 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(15, 159, 144, 0.3);
}

.weekly-view-expanded .mini-cal-cell.filtered-selected.weekend {
    color: white !important;
}

.weekly-view-expanded .mini-cal-cell.weekend {
    color: #b91c1c;
}

.weekly-view-expanded .mini-cal-cell.has-events::after {
    width: 8px;
    height: 8px;
    bottom: 6px;
    background-color: #0f9f90;
}

.weekly-view-expanded .mini-cal-cell.filtered-selected.has-events::after {
    background-color: white;
}

/* Card Action Dropdown Menu Styling */
.card-action-dropdown {
    position: absolute;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 180px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: slideDownMenu 0.15s ease-out;
}

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

.card-action-dropdown .dropdown-item {
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.15s ease;
    width: 100%;
}

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

.card-action-dropdown .dropdown-item i {
    width: 16px;
}

/* My Diary Styles */
.detailed-diary-layout {
    display: none;
    flex-direction: row;
    flex: 1 1 0%;
    height: 100%;
    min-height: 80vh;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background-color: var(--bg-main);
}

.diary-left-panel {
    flex: 0 0 320px;
    width: 320px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    box-sizing: border-box;
}

.diary-right-workspace {
    flex: 1 1 auto !important;
    width: calc(100% - 320px) !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    height: 100% !important;
    background-color: var(--card-bg) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    max-width: none !important;
}

.diary-bottom-input-bar {
    background-color: var(--card-bg) !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 12px 24px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    max-width: none !important;
}

.diary-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(15, 118, 110, 0.03);
}

.diary-panel-header h2 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.btn-diary-action {
    background-color: #0f766e;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
}

.btn-diary-action:hover {
    background-color: #0d9488;
}

.diary-search-box {
    padding: 12px 20px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.diary-search-box i {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 12px;
}

.diary-search-box input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px 8px 36px;
    font-size: 12.5px;
    background-color: var(--bg-main);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.diary-search-box input:focus {
    border-color: #0f766e;
}

.diary-profile-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.diary-profile-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.diary-profile-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.diary-profile-card.cat-business {
    background-color: #FFF2F2 !important;
    border-color: #fecaca !important;
}
.diary-profile-card.cat-business:hover {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
}
.diary-profile-card.cat-business.active {
    background-color: #fee2e2 !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1) !important;
}

.diary-profile-card.cat-personal {
    background-color: #F2FBF2 !important;
    border-color: #bbf7d0 !important;
}
.diary-profile-card.cat-personal:hover {
    background-color: #dcfce7 !important;
    border-color: #86efac !important;
}
.diary-profile-card.cat-personal.active {
    background-color: #dcfce7 !important;
    border-color: #16a34a !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1) !important;
}

.diary-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #475569;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

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

.diary-card-info {
    flex: 1;
    min-width: 0;
}

.diary-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
    width: 100%;
    min-width: 0;
}

.diary-card-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1;
    min-width: 0;
    margin-right: 8px;
}

.diary-card-date {
    font-size: 10px;
    color: var(--text-secondary);
}

.diary-card-snippet {
    font-size: 11.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.diary-card-actions {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.btn-diary-card {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.btn-diary-card.view:hover {
    background-color: #e0f2f1;
    border-color: #0f766e;
    color: #0f766e;
}

.btn-diary-card.edit:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.diary-profile-details {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: 100% !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    max-width: none !important;
}

.diary-profile-header {
    position: relative;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(15, 118, 110, 0.02);
    width: 100%;
    box-sizing: border-box;
}

.diary-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #0f766e;
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
}

.diary-header-info {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.diary-profile-avatar-container {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #475569;
    margin-bottom: 8px;
    overflow: hidden;
}

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

.diary-profile-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.diary-profile-member-since {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.diary-profile-meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--bg-main);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.diary-share-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    z-index: 2;
    transition: opacity 0.2s ease;
}

.diary-share-btn:hover {
    opacity: 0.8;
}

.diary-timeline-section {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 20px !important;
    background-color: var(--card-bg) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.diary-timeline-section h3 {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.diary-timeline-list {
    position: relative;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.diary-timeline-list::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background-color: var(--border-color);
}

.diary-timeline-item {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.diary-timeline-dot {
    position: absolute;
    left: -24px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #0f766e;
    border: 2px solid white;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.2);
    z-index: 1;
}

.diary-timeline-content {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.01);
    width: 100%;
    box-sizing: border-box;
}

.diary-timeline-item.starred-item .diary-timeline-content {
    background-color: #fefce8 !important; /* Premium soft yellow highlight */
    border: 1.5px solid #fef08a !important; /* Gold border */
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.05) !important;
}

.diary-timeline-item.starred-item .diary-timeline-dot {
    background-color: #eab308 !important; /* Gold dot */
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.3) !important;
}

.diary-timeline-date {
    font-size: 12.5px;
    font-weight: 800;
    color: #0f766e;
    margin-bottom: 4px;
}

.diary-timeline-text {
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text-primary);
    word-break: break-word !important;
    white-space: pre-wrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.diary-input-section {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background-color: white;
    display: flex;
    gap: 12px;
    align-items: center;
}

.diary-input-section input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12.5px;
    outline: none;
    transition: border-color 0.2s ease;
    background-color: var(--bg-main);
}

.diary-input-section input:focus {
    border-color: #0f766e;
}

.diary-send-btn {
    background-color: #0f766e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.diary-send-btn:hover {
    background-color: #0d9488;
}

/* Home Card Diary Preview styles */
.diary-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px;
}

.diary-preview-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.15s ease;
}

.diary-preview-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.diary-preview-info {
    flex: 1;
    min-width: 0;
}

.diary-preview-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.diary-preview-snippet {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.diary-tabs-bar {
    display: flex;
    background-color: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    margin: 0 16px 16px 16px;
    gap: 4px;
    box-sizing: border-box;
}

.diary-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: 'Inter', sans-serif;
    border-radius: 7px;
}

.diary-tab-btn:hover {
    color: var(--text-primary);
}

.diary-tab-btn.active {
    background-color: #ffffff;
    color: #0f766e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Payments filter tab bar styling */
.payments-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
    padding: 3px;
    background-color: var(--bg-main);
    border-radius: 8px;
}
.payments-filter-tab {
    flex: 1 1 auto;
    border: none;
    background: transparent;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    font-family: 'Inter', sans-serif;
}
.payments-filter-tab:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.5);
}
.payments-filter-tab.active {
    color: var(--text-white) !important;
    background-color: var(--color-accent) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Overdue payment red pulsing animation */
@keyframes pulse-red {
    0% {
        opacity: 1;
        color: #ef4444;
    }
    50% {
        opacity: 0.3;
        color: #b91c1c;
    }
    100% {
        opacity: 1;
        color: #ef4444;
    }
}
.overdue-blink {
    animation: pulse-red 1.5s infinite ease-in-out;
}





