:root {
    --primary: #3b82f6; /* Modern Blue */
    --primary-hover: #2563eb;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --light: #f1f5f9;
    --dark: #0f172a;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text2: #64748b;
    --border: #e2e8f0;
    --input-bg: #f8fafc;
    --input-border: #cbd5e1;
    --bento-gap: 16px;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 4px 24px -6px rgba(0, 0, 0, 0.05);
}

body.dark {
    color-scheme: dark;
    --bg: #0b0f19;
    --card: rgba(30, 41, 59, 0.4);
    --text: #f8fafc;
    --text2: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --light: rgba(255, 255, 255, 0.03);
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.15);
    --secondary: #475569;
    --primary: #60a5fa;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body {
    color-scheme: light;
    font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    margin: 0;
    padding: 20px;
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* Base Container as Bento Grid Parent if needed, but mostly max-width wrapper */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: transparent;
    padding: 0; 
    border-radius: 0;
    box-shadow: none;
}

h1, h2 {
    text-align: center;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

h1 {
    font-size: 2rem;
    cursor: pointer;
    border-bottom: 2px dashed transparent;
    display: inline-block;
    transition: border-color 0.3s;
}

h1:hover { border-bottom-color: var(--primary); }

.title-wrapper { text-align: center; margin-bottom: 24px; }
h2 { font-size: 1.4rem; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-top: 30px; text-align: left;}

.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.95rem; color: var(--text2); }

input, select, button, textarea {
    font-family: 'Inter', sans-serif;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    background: var(--input-bg);
    color: var(--text);
    transition: all 0.2s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

button {
    cursor: pointer;
    color: #fff;
    border: none;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

button:active:not(:disabled) { transform: translateY(0); }

.btn-primary { background: var(--primary); }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); width: auto; padding: 6px 12px; font-size: 0.85rem; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }

.action-buttons { display: flex; gap: 8px; margin-top: 10px; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; width: auto; border-radius: 8px; }

/* Bento Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    padding: 6px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    cursor: pointer;
    color: var(--secondary);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
    transition: all 0.3s;
}

.tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.section { display: none; }
.section.active { display: block; animation: fadeIn 0.4s ease-out; }

/* Bento Grids for Data */
#agentsList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--bento-gap);
    margin-top: 15px;
}
#stallsList {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 15px;
}

.stall-item, .agent-card, .rent-item {
    background: var(--card);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stall-item:hover, .agent-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Adjust rent item inside calculation list to be more horizontal */
.rent-item {
    flex-direction: row;
    align-items: center;
    margin-bottom: 10px;
    padding: 12px 16px;
    border-radius: 12px;
}

.rent-details { flex: 1; }
.rent-date { font-weight: 700; color: var(--primary); font-size: 0.9rem; }
.rent-loc { font-size: 0.9rem; color: var(--text); font-weight: 500; }
.amount-input-group { display: flex; align-items: center; gap: 8px; background: var(--input-bg); padding: 4px 12px; border-radius: 10px; border: 1px solid var(--border); }
.amount-input { width: 70px; padding: 4px; text-align: right; border: none; background: transparent; font-weight: 700; font-size: 1rem; }
.amount-input:focus { box-shadow: none; border-bottom: 2px solid var(--primary); border-radius: 0; }

.agent-group {
    margin-top: 24px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.agent-header {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
}

.agent-total { color: var(--success); font-size: 1.2rem; }

.empty-state { text-align: center; color: var(--text2); padding: 40px 20px; border: 2px dashed var(--border); border-radius: 16px; margin: 20px 0; }

.total-rent-box {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    padding: 24px;
    border-radius: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(255,255,255,0.2);
}
.total-rent-box div:nth-child(2) { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; margin: 5px 0;}

.agent-color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: middle; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

.filter-bar { margin-bottom: 20px; position: relative;}
.filter-bar input { background: var(--card); border: 1px solid var(--glass-border); border-radius: 16px; padding: 14px 20px; padding-left: 45px; box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.filter-bar::before { content: '🔍'; position: absolute; left: 16px; top: 12px; font-size: 1.1rem; z-index: 2; opacity: 0.6;}

/* Monthly Tables to Bento Bars */
.monthly-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; margin-top: 10px; }
.monthly-table th, .monthly-table td { padding: 12px 16px; text-align: left; }
.monthly-table th { color: var(--text2); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.monthly-table tr td { background: var(--card); }
.monthly-table tr td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; border: 1px solid var(--border); border-right: none;}
.monthly-table tr td:nth-child(2) { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.monthly-table tr td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; border: 1px solid var(--border); border-left: none; }

.monthly-bar { height: 24px; border-radius: 12px; background: linear-gradient(90deg, #10b981, #059669); transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); min-width: 4px; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);}

.backup-area { margin-top: 30px; padding: 24px; background: var(--card); border: 1px dashed var(--primary); border-radius: 16px; text-align: center; backdrop-filter: blur(12px);}
.backup-area button { margin-bottom: 10px; width: 100%; max-width: 200px; display: inline-block; margin-right: 10px;}

.agent-card-info { flex: 1; margin-bottom: 12px; }
.agent-card-info strong { font-size: 1.1rem; }
.agent-card-info small { display: block; color: var(--text2); margin-top: 5px; font-size: 0.85rem; }

input[type="color"] { width: 44px; height: 44px; padding: 2px; border: 1px solid var(--border); border-radius: 50%; cursor: pointer; overflow: hidden; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }

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

.dark-toggle { width: 44px; height: 44px; border-radius: 14px; background: var(--card); color: var(--text); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; border: 1px solid var(--glass-border); transition: all 0.3s; box-shadow: var(--shadow); }
.dark-toggle:hover { background: var(--border); transform: rotate(15deg); }

.wa-copy-row { display: flex; gap: 10px; margin-top: 15px; } .wa-copy-row button { flex: 1; padding: 12px; border-radius: 12px;}

/* Toasts */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; width: 90%; max-width: 400px; }
.toast { padding: 16px 24px; border-radius: 16px; color: #fff; font-size: 1rem; font-weight: 600; box-shadow: 0 10px 40px rgba(0,0,0,0.3); pointer-events: auto; animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; align-items: center; justify-content: space-between; gap: 12px; backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.2); }
.toast-content { display: flex; align-items: center; gap: 10px; flex: 1; }
.toast-close { background: rgba(255,255,255,0.2); border: none; color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.toast-close:hover { background: rgba(255,255,255,0.4); }
.toast-success { background: rgba(16, 185, 129, 0.9); } .toast-error { background: rgba(239, 68, 68, 0.9); } .toast-info { background: rgba(59, 130, 246, 0.9); } .toast-warning { background: rgba(245, 158, 11, 0.9); color: #1e293b; }
.toast.fade-out { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.9); } }

/* Modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 10001; padding: 20px; animation: fadeIn 0.2s; }
.modal-box { background: var(--card); border-radius: 24px; padding: 32px; max-width: 420px; width: 100%; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); color: var(--text); border: 1px solid var(--glass-border); }
.modal-box h3 { margin: 0 0 16px; font-size: 1.4rem; font-weight: 800; } 
.modal-box p { margin: 0 0 24px; color: var(--text2); line-height: 1.6; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 10px;}
.modal-actions button { padding: 12px 24px; border-radius: 12px; font-size: 1rem; }

/* Login / Auth */
.login-gate { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; text-align: center; padding: 40px 20px; max-width: 480px; margin: 0 auto; animation: fadeIn 0.5s ease; }
.login-gate h1 { font-size: 2.8rem; margin-bottom: 8px; font-weight: 800; letter-spacing: -1px; background: linear-gradient(135deg, var(--primary), #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-gate p { color: var(--text2); margin-bottom: 40px; font-size: 1.1rem; }
.login-gate-logo { font-size: 4rem; margin-bottom: 10px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2)); animation: float 6s infinite ease-in-out; }
.btn-google { background: rgba(30, 41, 59, 0.8); color: #fff; border-radius: 16px; padding: 16px 20px; font-size: 1.15rem; font-weight: 600; box-shadow: 0 4px 15px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; backdrop-filter: blur(10px); transition: transform 0.2s, box-shadow 0.2s; }
.btn-google:hover { background: rgba(51, 65, 85, 0.9); transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.2); }


/* Login Features & PWA Install */
.login-features { display: flex; flex-direction: column; gap: 12px; margin-top: 40px; width: 100%; text-align: left; }
.feature-badge { background: rgba(255,255,255,0.05); border: 1px solid var(--border); padding: 12px 16px; border-radius: 12px; font-size: 0.95rem; color: var(--text); display: flex; align-items: center; gap: 10px; backdrop-filter: blur(5px); }
.trial-hint-text { margin-top: 30px; font-size: 0.9rem; color: var(--accent); font-weight: 600; letter-spacing: 0.5px; opacity: 0.8; }

.btn-install-pwa { background: linear-gradient(135deg, #10b981, #059669); color: white; border: none; border-radius: 16px; padding: 16px 20px; font-size: 1.1rem; font-weight: bold; width: 100%; margin-top: 25px; cursor: pointer; box-shadow: 0 4px 15px rgba(16,185,129,0.3); transition: all 0.2s; animation: pulse 2s infinite; }
.btn-install-pwa:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(16,185,129,0.5); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); } 70% { box-shadow: 0 0 0 10px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
/* Paywall (Zero-Trust Hardened UI) */
.paywall-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(12px) saturate(150%); z-index: 9999; overflow-y: auto; padding: 40px 20px; }
.paywall-container { max-width: 800px; margin: 0 auto; text-align: center; animation: toastIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.paywall-container h2 { color: #fff; font-size: 2.2rem; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 40px; }
.pricing-card { background: rgba(30, 41, 59, 0.7); border-radius: 24px; padding: 32px 24px; border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(10px); color: #fff; }
.pricing-card:hover { border-color: var(--primary); transform: translateY(-5px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.pricing-card.popular { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2)); border-color: var(--primary); box-shadow: 0 0 30px rgba(59, 130, 246, 0.3); }
.plan-price { font-size: 2.8rem; font-weight: 800; font-family: 'Outfit'; margin: 10px 0; }
.btn-subscribe { background: #fff; color: var(--primary); font-size: 1.1rem; padding: 14px; border-radius: 14px; margin-top: 15px;}
.pricing-card.popular .btn-subscribe { background: linear-gradient(to right, #3b82f6, #8b5cf6); color: #fff; border: none; }

/* Helpers & Utils */
.sync-bar, .notebook-bar { background: var(--card); border: 1px solid var(--glass-border); padding: 12px 16px; border-radius: 16px; margin-bottom: 16px; align-items: center; box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.trial-banner { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; padding: 12px 20px; border-radius: 16px; margin-bottom: 20px; font-size: 1rem; font-weight: 600; text-align: center; box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2); }
body.dark .trial-banner { background: linear-gradient(135deg, #451a03, #78350f); color: #fde68a; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.stall-cb { width: 24px; height: 24px; border-radius: 6px; accent-color: var(--primary); }
.batch-bar { display: flex; gap: 12px; align-items: center; padding: 12px 20px; background: var(--card); border-radius: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* Option A: Accordion & High Density */
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}
.accordion-body.expanded {
    max-height: 5000px;
    transition: max-height 0.4s ease-in;
}
.rent-item-strip {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.1);
}
.rent-item-strip:last-child {
    border-bottom: none;
}
.strip-left { flex: 1; display: flex; align-items: center; gap: 8px;}
.strip-right { display: flex; align-items: center; gap: 4px; font-family: 'Inter', Consolas, monospace;}
.rent-date { font-weight: 600; color: var(--primary); font-size: 0.85rem; font-family: 'Inter', Consolas, monospace; font-variant-numeric: tabular-nums; }
.rent-loc { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.strip-input { width: 55px; padding: 2px 4px; text-align: right; border: 1px solid transparent; background: transparent; font-weight: 700; font-size: 0.9rem; font-family: 'Inter', Consolas, monospace; border-radius: 4px;}
.strip-input:focus { border: 1px solid var(--primary); background: var(--input-bg); outline: none;}
.agent-header { cursor: pointer; transition: background 0.2s;}
.agent-header:hover { background: rgba(255,255,255,0.05) !important; filter: brightness(1.1); }
.expand-icon { font-size: 0.8em; transition: transform 0.3s; color: var(--text2); display: inline-block; }
.expand-icon.rotate { transform: rotate(-180deg); }
.agent-total { font-family: 'Inter', Consolas, monospace; font-variant-numeric: tabular-nums; font-size: 1.2rem; display: flex; align-items: center; gap: 10px;}

/* Ghost Placeholder for Title */
#appTitle[contenteditable]:empty:before {
    content: attr(data-placeholder);
    color: var(--text2);
    opacity: 0.5;
    pointer-events: none;
    display: block;
}
#appTitle[contenteditable] {
    outline: none;
    padding: 6px 16px;
    margin: -6px -16px;
    border-radius: 12px;
    transition: background 0.2s, box-shadow 0.2s;
    min-width: 150px;
}
#appTitle[contenteditable]:hover {
    background: rgba(255,255,255,0.04);
}
#appTitle[contenteditable]:focus {
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 1px var(--primary);
}

/* Option A: Sleek Stall Item Strips */
.stall-item-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: background 0.2s;
}
.stall-item-strip:hover {
    background: rgba(255, 255, 255, 0.05);
}
.strip-info {
    flex: 1;
    margin-left: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.strip-loc {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}
.strip-detail {
    font-size: 0.8rem;
    color: var(--text2);
    font-family: 'Inter', Consolas, monospace;
}
.strip-actions {
    display: flex;
    gap: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.stall-item-strip:hover .strip-actions,
.stall-item-strip:focus-within .strip-actions {
    opacity: 1;
    pointer-events: auto;
}
/* Force show on smaller screens */
@media (max-width: 600px) {
    .strip-actions {
        opacity: 1;
        pointer-events: auto;
    }
}
.strip-btn {
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    width: auto;
}

/* ===== CALENDAR VIEW ===== */
.cal-grid {
    margin-top: 16px;
}
.cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.cal-weekday {
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 0;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cal-weekend { color: var(--danger); }
.cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.cal-cell {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-height: 72px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    position: relative;
}
.cal-cell.cal-empty {
    background: transparent;
    border-color: transparent;
}
.cal-cell.cal-has-events {
    cursor: pointer;
    border-color: var(--primary);
    border-width: 1.5px;
}
.cal-cell.cal-has-events:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59,130,246,0.25);
    border-color: var(--primary);
}
.cal-cell.cal-today {
    background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(99,102,241,0.10));
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.cal-day-num {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    font-family: 'Inter', Consolas, monospace;
    font-variant-numeric: tabular-nums;
}
.cal-today .cal-day-num {
    color: var(--primary);
    font-size: 1.05rem;
}
.cal-event-count {
    font-size: 0.65rem;
    color: var(--text2);
    margin-top: 2px;
}
.cal-day-total {
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--success);
    font-family: 'Inter', Consolas, monospace;
    margin-top: 1px;
}
.cal-dots {
    display: flex;
    gap: 3px;
    margin-top: 3px;
    justify-content: center;
    flex-wrap: wrap;
}
.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.cal-dot-more {
    font-size: 0.55rem;
    color: var(--text2);
    line-height: 6px;
}

/* Calendar responsive */
@media (max-width: 600px) {
    .cal-cell { min-height: 56px; padding: 4px 2px; border-radius: 6px; }
    .cal-day-num { font-size: 0.8rem; }
    .cal-event-count { font-size: 0.55rem; }
    .cal-day-total { font-size: 0.65rem; }
    .cal-dot { width: 4px; height: 4px; }
}


.cal-range-bar {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    height: 3px;
    border-radius: 2px;
    opacity: 0.7;
}

/* ===== FIRST SCREEN BENTO DASHBOARD ===== */
.bento-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.bento-card {
    background: var(--card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.bento-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.bento-card-title {
    font-size: 0.8rem;
    color: var(--text2);
    font-weight: 600;
    margin-bottom: 4px;
}
.bento-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}
.bento-card-value.primary-color {
    color: var(--primary);
}
.bento-card-value.success-color {
    color: var(--success);
}
@media (max-width: 600px) {
    .bento-dashboard {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .bento-card {
        padding: 12px;
    }
    .bento-card-value {
        font-size: 1.3rem;
    }
}

/* ===== WHATSAPP BUBBLE PREVIEW ===== */
.wa-preview-container {
    margin-top: 20px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}
.wa-preview-header {
    background: #075e54;
    color: #fff;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
body.dark .wa-preview-header {
    background: #202c33;
}
.wa-preview-body {
    background: #efeae2;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-height: 150px;
    position: relative;
}
body.dark .wa-preview-body {
    background: #0b141a;
}
.wa-bubble {
    background: #d9fdd3;
    color: #111b21;
    border-radius: 8px 0 8px 8px;
    padding: 8px 12px;
    max-width: 85%;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative;
    text-align: left;
}
body.dark .wa-bubble {
    background: #005c4b;
    color: #e9edef;
}
.wa-bubble-time {
    font-size: 0.65rem;
    color: rgba(17, 27, 33, 0.45);
    float: right;
    margin-top: 4px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    gap: 2px;
}
body.dark .wa-bubble-time {
    color: rgba(233, 237, 239, 0.5);
}
.wa-bubble::after {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 8px;
    height: 13px;
    background: radial-gradient(circle at bottom left, transparent 8px, #d9fdd3 8px);
}
body.dark .wa-bubble::after {
    background: radial-gradient(circle at bottom left, transparent 8px, #005c4b 8px);
}

/* ===== NOTEBOOK BAR & SYNC BAR PREMIUM OPTIMIZATION (v1.0.3) ===== */
.notebook-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 8px 12px !important;
    background: var(--card) !important;
    border-radius: 16px !important;
    margin-bottom: 16px !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--shadow) !important;
}

.notebook-bar label {
    display: inline-block !important;
    white-space: nowrap !important;
    margin: 0 !important;
    font-size: 0.85rem !important;
    color: var(--text2) !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
}

.notebook-bar select {
    flex: 1 !important;
    min-width: 100px !important;
    width: auto !important;
    padding: 8px 10px !important;
    font-size: 0.9rem !important;
    border-radius: 8px !important;
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    height: 38px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.notebook-bar select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

.notebook-bar .nb-btn {
    width: auto !important;
    height: 38px !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    background: var(--light) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.notebook-bar .nb-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    transform: translateY(-1px) !important;
}

.notebook-bar .nb-btn[onclick="deleteNotebook()"]:hover {
    background: var(--danger) !important;
    color: #fff !important;
    border-color: var(--danger) !important;
}

.sync-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
}

