body { font-family: 'Inter', sans-serif; transition: background-color 0.3s, color 0.3s; }
/* Skeleton loading shimmer */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
.dark .skeleton { background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%); background-size: 200% 100%; }
.stat-card { transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-5px); }
.result-card { border-radius: 16px; padding: 24px; text-align: center; color: white; min-width: 180px; transition: transform 0.2s, box-shadow 0.2s; }
.result-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.result-card.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.result-card.linkedin { background: #0A66C2; }
.result-card.facebook { background: #1877F2; }
.result-card.error { background: #dc2626 !important; }
.result-card .icon { width: 48px; height: 48px; margin: 0 auto 12px; }
.result-card .icon svg { width: 100%; height: 100%; }
.result-card .platform-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.result-card .status { font-size: 14px; opacity: 0.95; }
.upload-zone { border: 2px dashed #cbd5e1; transition: all 0.3s; background: linear-gradient(135deg, #f8fafc, #f1f5f9); }
.upload-zone:hover, .upload-zone.dragover { border-color: #6366f1; background: linear-gradient(135deg, #eef2ff, #e0e7ff); transform: scale(1.01); }
.image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.image-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; cursor: grab; transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.image-item:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.image-item.sortable-ghost { opacity: 0.4; }
.image-item.sortable-chosen { transform: scale(1.1); box-shadow: 0 8px 24px rgba(99,102,241,0.3); }
.image-item img { width: 100%; height: 100%; object-fit: cover; }
.image-item .order-badge { position: absolute; top: 6px; right: 6px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; }
.image-item .delete-btn { position: absolute; top: 6px; left: 6px; background: rgba(239,68,68,0.9); color: white; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity 0.2s; }
.image-item:hover .delete-btn { opacity: 1; }
.platform-card { border-radius: 16px; padding: 20px; transition: all 0.3s; }
.platform-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.platform-card.instagram { background: linear-gradient(135deg, #fdf2f8, #fce7f3); border: 1px solid #fbcfe8; }
.platform-card.linkedin { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1px solid #bfdbfe; }
.platform-card.facebook { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1px solid #93c5fd; }
.post-preview { background: white; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); overflow: hidden; }
.post-preview-header { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: 12px; }
.post-preview-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #8b5cf6); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; }
.carousel-preview { position: relative; aspect-ratio: 1; background: #f8fafc; overflow: hidden; }
.carousel-preview img { width: 100%; height: 100%; object-fit: cover; }
.carousel-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.carousel-dot.active { background: white; }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; background: rgba(255,255,255,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.carousel-nav.prev { left: 12px; }
.carousel-nav.next { right: 12px; }

/* ===== Dark Mode ===== */
body.dark { background-color: #0f172a; color: #e2e8f0; }

/* --- Backgrounds --- */
.dark .bg-white { background-color: #1e293b !important; }
.dark .bg-white\/60 { background-color: rgba(30,41,59,0.6) !important; }
.dark .bg-gray-50 { background-color: #1e293b !important; color: #e2e8f0 !important; }
.dark .bg-gray-100 { background-color: #0f172a !important; }
.dark .bg-gray-200 { background-color: #334155 !important; color: #e2e8f0 !important; }
.dark .bg-gray-300 { background-color: #475569 !important; color: #e2e8f0 !important; }
.dark .hover\:bg-gray-50:hover { background-color: #334155 !important; }
.dark .hover\:bg-gray-100:hover { background-color: #1e293b !important; }
.dark .hover\:bg-gray-300:hover { background-color: #4b5563 !important; }
.dark .bg-gray-200:hover { background-color: #4b5563 !important; }
.dark .hover\:bg-indigo-50:hover { background-color: #312e81 !important; }

/* --- Text colors --- */
.dark .text-gray-400 { color: #94a3b8 !important; }
.dark .text-gray-500, .dark .text-gray-600, .dark .text-gray-700 { color: #94a3b8 !important; }
.dark .text-gray-800, .dark .text-gray-900 { color: #e2e8f0 !important; }
.dark .text-black { color: #f1f5f9 !important; }
.dark .text-indigo-600, .dark .text-indigo-700 { color: #818cf8 !important; }
.dark .text-green-600, .dark .text-green-700, .dark .text-green-800 { color: #4ade80 !important; }
.dark .text-red-600, .dark .text-red-700, .dark .text-red-800 { color: #f87171 !important; }
.dark .text-yellow-600, .dark .text-yellow-700, .dark .text-yellow-800 { color: #facc15 !important; }
.dark .text-blue-600, .dark .text-blue-700, .dark .text-blue-800 { color: #60a5fa !important; }
.dark .text-pink-800, .dark .text-pink-600 { color: #f9a8d4 !important; }
.dark .text-purple-800, .dark .text-purple-600, .dark .text-purple-500 { color: #c4b5fd !important; }
.dark .text-slate-600 { color: #94a3b8 !important; }
.dark .placeholder-gray-400::placeholder { color: #64748b !important; }
.dark p, .dark span, .dark label, .dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 { color: inherit; }

/* --- Borders --- */
.dark .border, .dark .border-b, .dark .border-t, .dark .border-l, .dark .border-r { border-color: #334155 !important; }
.dark .border-gray-100, .dark .border-gray-200, .dark .border-gray-300 { border-color: #334155 !important; }
.dark .border-indigo-200 { border-color: #4338ca !important; }
.dark .divide-gray-200 > * + * { border-color: #334155 !important; }
.dark .border-dashed { border-color: #475569 !important; }

/* --- Form elements --- */
.dark input, .dark select, .dark textarea { background-color: #1e293b !important; color: #e2e8f0 !important; border-color: #334155 !important; }
.dark input::placeholder, .dark textarea::placeholder { color: #64748b !important; }
.dark input:focus, .dark select:focus, .dark textarea:focus { border-color: #6366f1 !important; }
.dark th { background-color: #1e293b !important; color: #94a3b8 !important; }
.dark td { color: #e2e8f0; border-color: #1e293b !important; }
.dark tr:hover { background-color: #1e293b !important; }

/* --- Shadows --- */
.dark .shadow-sm, .dark .shadow, .dark .shadow-md, .dark .shadow-lg, .dark .shadow-xl, .dark .shadow-2xl { box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important; }

/* --- Colored backgrounds (light variants) --- */
.dark .bg-pink-100, .dark .bg-pink-50, .dark .platform-card.instagram { background: linear-gradient(135deg, #831843, #9d174d) !important; color: #fce7f3 !important; border-color: #be185d !important; }
.dark .bg-blue-100, .dark .bg-blue-50, .dark .platform-card.linkedin { background: linear-gradient(135deg, #1e3a5f, #1e40af) !important; color: #bfdbfe !important; border-color: #3b82f6 !important; }
.dark .bg-green-100, .dark .bg-green-50 { background-color: #14532d !important; color: #bbf7d0 !important; }
.dark .bg-yellow-100, .dark .bg-yellow-50 { background-color: #713f12 !important; color: #fef08a !important; }
.dark .bg-red-100, .dark .bg-red-50 { background-color: #7f1d1d !important; color: #fecaca !important; }
.dark .bg-purple-100, .dark .bg-purple-50 { background-color: #581c87 !important; color: #e9d5ff !important; }
.dark .bg-indigo-100, .dark .bg-indigo-50, .dark .platform-card.facebook { background: linear-gradient(135deg, #1e3a8a, #1d4ed8) !important; color: #c7d2fe !important; border-color: #3b82f6 !important; }
.dark .bg-orange-100, .dark .bg-orange-50 { background-color: #7c2d12 !important; color: #fed7aa !important; }
.dark .bg-emerald-100, .dark .bg-emerald-50 { background-color: #064e3b !important; color: #a7f3d0 !important; }

/* --- Calendar --- */
.dark #calendar-grid > div { color: #e2e8f0 !important; }
.dark #calendar-grid .font-semibold { color: #e2e8f0 !important; }
.dark #calendar-grid > div.bg-gray-50 { background-color: #0f172a !important; } /* empty day cells — darker than active */
.dark #calendar-grid > div.cal-day-cell { background-color: #1e293b !important; border-color: #334155 !important; }
.dark #calendar-grid > div.cal-day-cell.ring-2 { --tw-ring-color: #818cf8; }
.dark .cal-day-cell .text-gray-400 { color: #64748b !important; }
.dark .cal-status-pill { background: #334155; color: #94a3b8; }
.dark .cal-status-pill:hover { background: #475569; }
.dark .cal-status-pill.active { color: #fff; }
.dark #day-posts-modal > div { background-color: #1e293b !important; }
.dark #day-posts-modal .border { border-color: #334155 !important; }

/* --- Upload / Preview --- */
.dark .upload-zone { background: linear-gradient(135deg, #1e293b, #0f172a); border-color: #475569; }
.dark .upload-zone:hover, .dark .upload-zone.dragover { background: linear-gradient(135deg, #312e81, #1e1b4b); border-color: #6366f1; }
.dark .post-preview { background: #1e293b; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.dark .post-preview-header { border-color: #334155; }
.dark .carousel-preview { background: #0f172a; }

/* --- Modals (generic) --- */
.dark [class*="modal"] > div.bg-white,
.dark [id*="modal"] > div.bg-white { background-color: #1e293b !important; }
.dark [class*="modal"] .border,
.dark [id*="modal"] .border { border-color: #334155 !important; }

/* --- Stat cards --- */
.dark .stat-card { background-color: #1e293b !important; }

/* --- Tables --- */
.dark table { color: #e2e8f0; }
.dark table thead { background-color: #1e293b; }
.dark table tbody tr { border-color: #1e293b; }
.dark table tbody tr:hover { background-color: #334155 !important; }

/* --- Badges --- */
.dark .badge-urgent { background: #7f1d1d; color: #fca5a5; }
.dark .badge-high { background: #7c2d12; color: #fed7aa; }
.dark .badge-normal { background: #1e3a8a; color: #93c5fd; }
.dark .badge-low { background: #374151; color: #9ca3af; }
.dark .badge-copywriter { background: #713f12; color: #fde68a; }
.dark .day-badge.active { background: #1e3a8a; color: #93c5fd; }
.dark .day-badge.inactive { background: #334155; color: #64748b; }

/* --- Top Nav & Header --- */
.dark #top-nav { background-color: rgba(15,23,42,0.85) !important; border-color: #1e293b !important; backdrop-filter: blur(20px); }
.dark .tab-link { color: #94a3b8 !important; }
.dark .tab-link:hover { color: #e2e8f0 !important; background-color: #1e293b !important; }
.dark .tab-link.active { color: #818cf8 !important; background-color: rgba(99,102,241,0.1) !important; }
.dark .subtab-link { color: #94a3b8 !important; }
.dark .subtab-link:hover { color: #e2e8f0 !important; }
.dark .subtab-link.active { color: #818cf8 !important; border-color: #818cf8 !important; }
.dark #ai-dropdown, .dark #user-dropdown { background-color: #1e293b !important; border-color: #334155 !important; }
.dark .dropdown-item { color: #e2e8f0 !important; }
.dark .dropdown-item:hover { background-color: #334155 !important; }
.dark #global-search-input, .dark #mobile-search-input { background-color: #1e293b !important; color: #e2e8f0 !important; border-color: #334155 !important; }
.dark #global-search-results, .dark #mobile-search-results { background-color: #1e293b !important; border-color: #334155 !important; }

/* --- Mobile Nav --- */
.dark #mobile-menu { background-color: #0f172a !important; }
.dark .mobile-nav-link { color: #94a3b8 !important; }
.dark .mobile-nav-link:hover, .dark .mobile-nav-link.active { color: #e2e8f0 !important; background-color: #1e293b !important; }
.dark #mobile-search-bar { background-color: #0f172a !important; }

/* --- Mobile Bottom Nav --- */
.dark nav.lg\:hidden.fixed.bottom-0 { background-color: rgba(15,23,42,0.92) !important; border-color: #1e293b !important; }
.dark .mobile-bottom-tab { color: #64748b !important; }
.dark .mobile-bottom-tab.active { color: #818cf8 !important; }

/* --- Hover states for nav buttons --- */
.dark button:hover, .dark a:hover { }
.dark .hover\:bg-gray-100:hover { background-color: #1e293b !important; }

/* --- Notification Preview Dropdown --- */
.notif-wrap { padding-bottom: 8px; margin-bottom: -8px; }
.notif-preview-dropdown {
    position: absolute; right: 0; top: 100%;
    width: 340px; background: #fff; border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15); border: 1px solid #e2e8f0;
    z-index: 60; overflow: hidden;
    transform-origin: top right;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
}
.notif-wrap:hover .notif-preview-dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
    pointer-events: auto;
}
.notif-preview-item {
    display: flex; gap: 10px; padding: 10px 14px; cursor: pointer;
    transition: background 0.12s; border-bottom: 1px solid #f1f5f9; align-items: flex-start;
}
.notif-preview-item:last-child { border-bottom: none; }
.notif-preview-item:hover { background: #f8fafc; }
.notif-preview-item.unread { background: #f0f4ff; }
.notif-preview-item.unread:hover { background: #e8edfc; }
.notif-preview-icon {
    width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9; color: #6366f1; font-size: 12px;
}
.notif-preview-body { flex: 1; min-width: 0; }
.notif-preview-title { font-size: 12px; font-weight: 600; color: #1e293b; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-preview-msg { font-size: 11px; color: #64748b; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.notif-preview-time { font-size: 10px; color: #94a3b8; margin-top: 2px; }

/* Dark mode */
.dark .notif-preview-dropdown { background: #1e293b; border-color: #334155; box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.dark .notif-preview-dropdown .border-gray-100 { border-color: #334155 !important; }
.dark .notif-preview-dropdown .text-gray-900 { color: #e2e8f0 !important; }
.dark .notif-preview-item { border-bottom-color: #2d3a4f; }
.dark .notif-preview-item:hover { background: #334155; }
.dark .notif-preview-item.unread { background: #1e2a4a; }
.dark .notif-preview-item.unread:hover { background: #263354; }
.dark .notif-preview-icon { background: #334155; color: #818cf8; }
.dark .notif-preview-title { color: #e2e8f0; }
.dark .notif-preview-msg { color: #94a3b8; }
.dark .notif-preview-time { color: #64748b; }

/* --- Toast --- */
.dark #toast-container > div { background-color: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }

/* --- Offline banner --- */
.dark #offline-banner { background-color: #92400e !important; color: #fef3c7 !important; }

/* --- Scrollbar --- */
.dark ::-webkit-scrollbar { width: 6px; height: 6px; }
.dark ::-webkit-scrollbar-track { background: #0f172a; }
.dark ::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ===== Platform Mockup Previews ===== */
.preview-tab { background: #f1f5f9; color: #64748b; cursor: pointer; border: 1px solid transparent; }
.preview-tab.active { background: #6366f1; color: #fff; }
.preview-tab.dimmed { opacity: 0.35; pointer-events: none; }
.dark .preview-tab { background: #1e293b; color: #94a3b8; }
.dark .preview-tab.active { background: #6366f1; color: #fff; }
.mockup-frame { border-radius: 12px; overflow: hidden; background: #f8fafc; border: 1px solid #e2e8f0; }
.dark .mockup-frame { background: #0f172a; border-color: #334155; }
.mockup-panel { font-size: 13px; line-height: 1.4; }

/* Instagram mockup */
.mockup-ig-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.mockup-ig-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.mockup-ig-user { font-weight: 600; font-size: 13px; }
.mockup-ig-dots { margin-left: auto; color: #262626; font-size: 16px; letter-spacing: 2px; }
.mockup-ig-image { width: 100%; background: #efefef; display: flex; align-items: center; justify-content: center; color: #bbb; position: relative; overflow: hidden; }
.mockup-ig-image img { width: 100%; height: 100%; object-fit: cover; }
.mockup-ig-actions { display: flex; align-items: center; gap: 14px; padding: 10px 12px 4px; font-size: 20px; color: #262626; }
.mockup-ig-actions .ig-save { margin-left: auto; }
.mockup-ig-likes { padding: 0 12px; font-size: 12px; font-weight: 600; color: #262626; }
.mockup-ig-caption { padding: 4px 12px 10px; font-size: 12px; color: #262626; }
.mockup-ig-caption .ig-user { font-weight: 600; }
.mockup-ig-caption .ig-more { color: #8e8e8e; cursor: pointer; }

/* LinkedIn mockup */
.mockup-li-header { display: flex; align-items: flex-start; gap: 10px; padding: 12px; }
.mockup-li-avatar { width: 40px; height: 40px; border-radius: 50%; background: #0a66c2; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.mockup-li-info { flex: 1; min-width: 0; }
.mockup-li-name { font-weight: 600; font-size: 13px; color: #000; }
.mockup-li-company { font-size: 11px; color: #666; }
.mockup-li-follow { color: #0a66c2; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.mockup-li-caption { padding: 0 12px 8px; font-size: 13px; color: #000; }
.mockup-li-image { width: 100%; background: #f3f2ef; display: flex; align-items: center; justify-content: center; color: #bbb; position: relative; overflow: hidden; }
.mockup-li-image img { width: 100%; height: 100%; object-fit: cover; }
.mockup-li-reactions { display: flex; align-items: center; gap: 4px; padding: 8px 12px 4px; font-size: 11px; color: #666; border-bottom: 1px solid #e0e0e0; }
.mockup-li-actions { display: flex; justify-content: space-around; padding: 6px 0; font-size: 12px; color: #666; font-weight: 600; }
.mockup-li-actions span { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 4px; cursor: pointer; }

/* Facebook mockup */
.mockup-fb-header { display: flex; align-items: center; gap: 10px; padding: 12px; }
.mockup-fb-avatar { width: 36px; height: 36px; border-radius: 50%; background: #1877f2; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.mockup-fb-info { flex: 1; }
.mockup-fb-name { font-weight: 600; font-size: 13px; color: #050505; }
.mockup-fb-meta { font-size: 11px; color: #65676b; display: flex; align-items: center; gap: 4px; }
.mockup-fb-caption { padding: 0 12px 8px; font-size: 14px; color: #050505; }
.mockup-fb-image { width: 100%; background: #f0f2f5; display: flex; align-items: center; justify-content: center; color: #bbb; position: relative; overflow: hidden; }
.mockup-fb-image img { width: 100%; height: 100%; object-fit: cover; }
.mockup-fb-stats { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 12px; color: #65676b; border-bottom: 1px solid #ced0d4; }
.mockup-fb-actions { display: flex; justify-content: space-around; padding: 4px 0; font-size: 13px; color: #65676b; font-weight: 600; }
.mockup-fb-actions span { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 6px; cursor: pointer; }

/* Story/Reel mockup */
.mockup-story-frame { width: 100%; max-width: 260px; margin: 0 auto; aspect-ratio: 9/16; border-radius: 16px; overflow: hidden; background: #000; position: relative; }
.mockup-story-frame img { width: 100%; height: 100%; object-fit: cover; }
.mockup-story-overlay { position: absolute; top: 0; left: 0; right: 0; padding: 12px; display: flex; align-items: center; gap: 8px; background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent); }
.mockup-story-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(45deg, #f09433, #dc2743); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; border: 2px solid #fff; flex-shrink: 0; }
.mockup-story-name { color: #fff; font-weight: 600; font-size: 12px; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.mockup-story-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #555; font-size: 32px; }

/* Carousel nav in mockups */
.mockup-carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; background: rgba(255,255,255,0.85); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 10px; color: #333; box-shadow: 0 1px 4px rgba(0,0,0,0.15); z-index: 2; }
.mockup-carousel-nav.prev { left: 6px; }
.mockup-carousel-nav.next { right: 6px; }
.mockup-carousel-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 2; }
.mockup-carousel-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.mockup-carousel-dots .dot.active { background: #fff; }

/* Dark mode mockups */
.dark .mockup-ig-header, .dark .mockup-ig-actions, .dark .mockup-ig-likes, .dark .mockup-ig-caption { color: #e0e0e0; }
.dark .mockup-ig-dots { color: #e0e0e0; }
.dark .mockup-ig-image { background: #1e293b; }
.dark .mockup-ig-caption .ig-more { color: #6b7280; }
.dark .mockup-li-header, .dark .mockup-li-caption { color: #e0e0e0; }
.dark .mockup-li-name { color: #e0e0e0; }
.dark .mockup-li-company, .dark .mockup-li-reactions, .dark .mockup-li-actions { color: #9ca3af; }
.dark .mockup-li-image { background: #1e293b; }
.dark .mockup-li-reactions { border-color: #374151; }
.dark .mockup-fb-header, .dark .mockup-fb-caption { color: #e0e0e0; }
.dark .mockup-fb-name { color: #e0e0e0; }
.dark .mockup-fb-meta, .dark .mockup-fb-stats, .dark .mockup-fb-actions { color: #9ca3af; }
.dark .mockup-fb-image { background: #1e293b; }
.dark .mockup-fb-stats { border-color: #374151; }

/* Kanban */
.kanban-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; min-height: 400px; }
.kanban-column { min-width: 280px; max-width: 320px; flex: 1; background: #f8fafc; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; }
.dark .kanban-column { background: #1e293b; }
.kanban-column-header { font-weight: 700; font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.kanban-cards { flex: 1; min-height: 100px; display: flex; flex-direction: column; gap: 10px; }
.kanban-card { background: white; border-radius: 12px; padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); cursor: grab; transition: all 0.2s; border-left: 4px solid #6366f1; }
.dark .kanban-card { background: #16213e; }
.kanban-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.kanban-card.sortable-ghost { opacity: 0.4; }
.kanban-card.priority-urgent { border-left-color: #ef4444; }
.kanban-card.priority-high { border-left-color: #f97316; }
.kanban-card.priority-normal { border-left-color: #3b82f6; }
.kanban-card.priority-low { border-left-color: #9ca3af; }
.badge-urgent { background: #fef2f2; color: #dc2626; }
.badge-high { background: #fff7ed; color: #ea580c; }
.badge-normal { background: #eff6ff; color: #2563eb; }
.badge-low { background: #f3f4f6; color: #6b7280; }
.badge-copywriter { background: #fefce8; color: #a16207; }
.notif-badge { position: absolute; top: -4px; right: -4px; background: #ef4444; color: white; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.day-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; margin: 2px; }
.day-badge.active { background: #dbeafe; color: #1d4ed8; }
.day-badge.inactive { background: #f3f4f6; color: #9ca3af; }
.tab-btn { padding: 8px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.tab-btn.active { background: #6366f1; color: white; }
.tab-btn:not(.active) { background: #f1f5f9; color: #64748b; }
.dark .tab-btn:not(.active) { background: #1e293b; color: #94a3b8; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.loading-spinner { width: 24px; height: 24px; border: 3px solid #e2e8f0; border-top-color: #6366f1; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes success-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.success-animation { animation: success-pulse 0.5s ease-in-out; }

/* Coverage bar styles (new) */
.coverage-bar { display: flex; gap: 2px; }
.coverage-bar .day-block { width: 24px; height: 24px; border-radius: 4px; }
.coverage-bar .day-block.filled { background: #6366f1; }
.coverage-bar .day-block.empty { background: #e2e8f0; }
.dark .coverage-bar .day-block.empty { background: #374151; }

/* Action items card (new) */
.action-item-card { border-radius: 12px; padding: 16px; border: 1px solid #e2e8f0; transition: all 0.2s; }
.action-item-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.dark .action-item-card { border-color: #374151; }

/* Toast */
.toast { padding: 12px 20px; border-radius: 10px; color: white; font-size: 14px; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease-out; }
.toast.success { background: #22c55e; }
.toast.error { background: #ef4444; }
.toast.info { background: #6366f1; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Calendar Rich Cards */
.cal-mini-card { border-left: 3px solid #94a3b8; border-radius: 6px; padding: 4px 6px; margin-bottom: 3px; background: white; cursor: pointer; transition: box-shadow 0.15s, transform 0.15s; font-size: 11px; overflow: hidden; }
.cal-mini-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); transform: translateY(-1px); }
.cal-border-draft { border-left-color: #94a3b8; }
.cal-border-pending-review { border-left-color: #eab308; }
.cal-border-needs-design { border-left-color: #f97316; }
.cal-border-needs-caption { border-left-color: #eab308; }
.cal-border-design-review { border-left-color: #8b5cf6; }
.cal-border-ready { border-left-color: #22c55e; }
.cal-border-scheduled { border-left-color: #3b82f6; }
.cal-border-posted { border-left-color: #10b981; }
.cal-card-top { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.cal-card-time { font-weight: 600; color: #6366f1; font-size: 10px; }
.cal-card-icons { display: flex; gap: 2px; font-size: 10px; }
.cal-status-dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex-shrink: 0; }
.cal-card-thumb { width: 100%; height: 40px; border-radius: 4px; overflow: hidden; margin-bottom: 2px; }
.cal-card-thumb img, .cal-card-thumb video { width: 100%; height: 100%; object-fit: cover; }
.cal-card-topic { color: #1e293b; font-size: 10px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 1px; }
.cal-card-caption { color: #64748b; font-size: 10px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-card-upload-hint { background: #ede9fe; color: #7c3aed; font-size: 9px; font-weight: 700; text-align: center; padding: 2px 4px; border-radius: 4px; margin-top: 2px; }
.cal-mini-card.cal-card-designer-upload { border: 1px dashed #8b5cf6; }
.cal-mini-card.cal-card-designer-upload:hover { background: #faf5ff; }
.cal-card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; flex-wrap: wrap; gap: 2px; }
.cal-card-client { color: #94a3b8; font-size: 9px; }
.cal-card-assignee { color: #6366f1; font-size: 9px; font-weight: 600; }
.dark .cal-card-topic { color: #e2e8f0; }
.dark .cal-card-upload-hint { background: #4c1d95; color: #c4b5fd; }
.dark .cal-mini-card.cal-card-designer-upload { border-color: #7c3aed; }
.dark .cal-mini-card.cal-card-designer-upload:hover { background: #2e1065; }
/* Schedule slot chips (expected posts from posting rules) */
.cal-schedule-slots { display: flex; flex-wrap: wrap; gap: 2px; }
.cal-schedule-slots { cursor: pointer; }
.cal-slot-chip { font-size: 9px; padding: 1px 4px; border-radius: 3px; background: #f0fdf4; color: #166534; border-left: 3px solid #6366f1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; line-height: 1.3; }
.cal-slot-chip.cal-slot-filled { background: #f0fdf4; color: #166534; text-decoration: line-through; opacity: 0.6; }
.cal-slot-chip.cal-slot-needs-content { background: #fef2f2; color: #b91c1c; font-weight: 700; border-left-color: #ef4444; }
.cal-slot-more { background: #f3f4f6; color: #6b7280; border-left-color: #9ca3af; font-weight: 600; }
.dark .cal-slot-chip { background: #14532d; color: #86efac; }
.dark .cal-slot-chip.cal-slot-needs-content { background: #451a1a; color: #fca5a5; }
.dark .cal-slot-chip.cal-slot-filled { background: #14532d; color: #86efac; }
.dark .cal-slot-more { background: #374151; color: #9ca3af; }

.cal-day-cell { min-height: 100px; transition: background 0.15s; position: relative; }
.cal-day-cell.drag-over { background: #ede9fe !important; border-color: #8b5cf6 !important; box-shadow: inset 0 0 0 2px #8b5cf6; }
.cal-status-pill { padding: 3px 10px; font-size: 11px; font-weight: 600; border: none; border-radius: 20px; cursor: pointer; background: #f3f4f6; color: #6b7280; transition: all 0.15s; }
.cal-status-pill:hover { background: #e5e7eb; }
.cal-status-pill.active { background: var(--pill-color, #6366f1); color: #fff; }
.cal-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Dark mode calendar cards */
.dark .cal-mini-card { background: #1e293b; color: #e0e0e0; }
.dark .cal-card-caption { color: #94a3b8; }
.dark .cal-card-client { color: #64748b; }
.dark .cal-day-cell.drag-over { background: #312e81 !important; border-color: #8b5cf6 !important; }
.dark #post-detail-modal > div { background-color: #16213e !important; color: #e0e0e0; }
.dark #post-detail-modal .border { border-color: #2a2a4a !important; }
.dark .brief-section { background: #1e293b !important; border-color: #374151 !important; }

/* Brief sections in post detail modal */
.brief-section { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.brief-section-title { font-size: 12px; font-weight: 600; color: #6366f1; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.brief-section-content { font-size: 14px; line-height: 1.5; }

/* Role-specific UX enhancements */
.role-banner { border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; }
.role-banner i { font-size: 18px; }
.role-banner-copywriter { background: #fefce8; border: 1px solid #fde68a; color: #92400e; }
.role-banner-designer { background: #faf5ff; border: 1px solid #e9d5ff; color: #6b21a8; }
.role-banner-reviewer { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.dark .role-banner-copywriter { background: #422006; border-color: #92400e; color: #fde68a; }
.dark .role-banner-designer { background: #3b0764; border-color: #6b21a8; color: #e9d5ff; }
.dark .role-banner-reviewer { background: #172554; border-color: #1e40af; color: #bfdbfe; }
.brief-section.role-focus { border-color: #6366f1; border-width: 2px; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.dark .brief-section.role-focus { box-shadow: 0 0 0 3px rgba(99,102,241,0.2); }
.design-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.design-gallery img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform 0.15s; }
.design-gallery img:hover { transform: scale(1.08); }
.design-item-wrap { position: relative; display: inline-block; }
.design-item-wrap img, .design-item-wrap video { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform 0.15s; }
.design-item-wrap:hover img, .design-item-wrap:hover video { transform: scale(1.08); }
.design-download-btn { position: absolute; bottom: 4px; right: 4px; background: rgba(99,102,241,0.9); color: white; border-radius: 6px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 11px; text-decoration: none; opacity: 0; transition: opacity 0.15s; }
.design-item-wrap:hover .design-download-btn { opacity: 1; }
.design-edit-btn { position: absolute; bottom: 4px; left: 4px; background: rgba(99,102,241,0.9); color: white; border: none; border-radius: 6px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; z-index: 2; opacity: 0; transition: opacity 0.15s, transform 0.15s; }
.design-item-wrap:hover .design-edit-btn { opacity: 1; }
.design-edit-btn:hover { transform: scale(1.15); }
.regen-field-btn { background: none; border: none; color: #6b7280; cursor: pointer; padding: 2px 6px; border-radius: 4px; font-size: 12px; transition: color 0.15s, background 0.15s; }
.regen-field-btn:hover { color: #10b981; background: #ecfdf5; }
.regen-field-btn.spinning i { animation: spin 0.8s linear infinite; }
.regen-inline-btn { background: rgba(255,255,255,0.7); border: none; color: #6b7280; cursor: pointer; padding: 2px 6px; border-radius: 4px; font-size: 11px; transition: color 0.15s, background 0.15s; }
.regen-inline-btn:hover { color: #10b981; background: rgba(255,255,255,0.9); }
.regen-inline-btn.spinning i { animation: spin 0.8s linear infinite; }
.design-remove-btn { position: absolute; top: 4px; left: 4px; background: #ef4444; color: white; border: none; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; z-index: 2; opacity: 0.85; transition: opacity 0.15s, transform 0.15s; }
.design-remove-btn:hover { opacity: 1; transform: scale(1.15); }

/* Upload thumbnail gallery (platform images + brief references) */
.upload-thumb-wrap { position: relative; width: 80px; height: 80px; border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; display: inline-block; transition: transform 0.15s; }
.upload-thumb-wrap:hover { transform: scale(1.06); }
.upload-thumb-img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; display: block; }
.upload-thumb-badge { position: absolute; top: 4px; left: 4px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; pointer-events: none; }
.upload-thumb-actions { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,0.6)); opacity: 0; transition: opacity 0.15s; }
.upload-thumb-wrap:hover .upload-thumb-actions { opacity: 1; }
.upload-thumb-btn { width: 22px; height: 22px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 10px; border: none; cursor: pointer; text-decoration: none; color: white; }
.upload-thumb-btn.download { background: rgba(99,102,241,0.9); }
.upload-thumb-btn.remove { background: rgba(239,68,68,0.9); }
.dark .upload-thumb-wrap { border-color: #374151; }

/* Image preview lightbox overlay */
.img-preview-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.img-preview-overlay.active { opacity: 1; pointer-events: auto; }
.img-preview-close { position: absolute; top: 16px; right: 20px; color: white; font-size: 32px; cursor: pointer; line-height: 1; }
.img-preview-close:hover { color: #a5b4fc; }
.img-preview-full { max-width: 50vw; max-height: 55vh; border-radius: 10px; object-fit: contain; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.img-preview-download { background: #6366f1; color: white; padding: 8px 20px; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 500; transition: background 0.15s; }
.img-preview-download:hover { background: #4f46e5; }

/* Reference gallery — larger, more visual cards */
.ref-gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.ref-gallery-item { position: relative; width: 220px; height: 170px; border-radius: 10px; overflow: hidden; cursor: pointer; border: 1px solid #e2e8f0; transition: transform 0.15s, box-shadow 0.15s; }
.ref-gallery-item:hover { transform: scale(1.04); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.ref-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.ref-gallery-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.7)); padding: 6px 8px; display: flex; align-items: center; justify-content: space-between; }
.ref-gallery-name { color: white; font-size: 10px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-gallery-delete { background: rgba(239,68,68,0.85); color: white; border: none; border-radius: 4px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; opacity: 0; transition: opacity 0.15s; flex-shrink: 0; }
.ref-gallery-item:hover .ref-gallery-delete { opacity: 1; }
.dark .ref-gallery-item { border-color: #374151; }
@media (max-width: 640px) {
    .ref-gallery-item { width: 160px; height: 120px; }
}

/* ===== Sidebar Nav Links (kept for compat) ===== */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.15s;
    text-decoration: none;
}
.sidebar-link:hover {
    background: #1e293b;
    color: #f1f5f9;
}
.sidebar-link.active {
    background: #4f46e5;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.sidebar-link.active i {
    color: #ffffff;
}

/* ===== Top Nav Tab Links ===== */
.tab-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    background: transparent;
}
.tab-link:hover {
    background: #f3f4f6;
    color: #111827;
}
.tab-link.active {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
}
.dark .tab-link { color: #94a3b8; }
.dark .tab-link:hover { background: #1e293b; color: #e2e8f0; }
.dark .tab-link.active { background: #312e81; color: #a5b4fc; }

/* ===== Content Sub-tabs ===== */
.subtab-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
}
.subtab-link:hover {
    color: #111827;
    border-color: #d1d5db;
}
.subtab-link.active {
    color: #4f46e5;
    border-color: #4f46e5;
    font-weight: 600;
}
.dark .subtab-link { color: #94a3b8; }
.dark .subtab-link:hover { color: #e2e8f0; border-color: #475569; }
.dark .subtab-link.active { color: #a5b4fc; border-color: #6366f1; }

/* ===== Dropdown Items ===== */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    transition: all 0.1s;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: transparent;
}
.dropdown-item:hover {
    background: #f3f4f6;
}
.dark .dropdown-item { color: #e2e8f0; }
.dark .dropdown-item:hover { background: #1e293b; }

/* ===== Mobile Nav Links ===== */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.15s;
    text-decoration: none;
}
.mobile-nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}
.mobile-nav-link.active {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
}

/* ===== Mobile Bottom Tab ===== */
.mobile-bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: none;
    padding: 4px 8px;
    transition: color 0.15s;
}
.mobile-bottom-tab.active {
    color: #4f46e5;
}
.mobile-bottom-tab.ai-tab {
    color: #4f46e5;
}

/* ===== Quick Action Cards ===== */
.quick-action-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
}
.quick-action-card:hover {
    border-color: #e0e0e0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.dark .quick-action-card {
    background: #1e293b;
    border-color: #334155;
}
.dark .quick-action-card:hover {
    border-color: #475569;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.dark .quick-action-card p.font-semibold { color: #e2e8f0; }

/* ===== New Stat Cards ===== */
.stat-card-new {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    transition: all 0.2s;
}
.stat-card-new:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}
.dark .stat-card-new {
    background: #1e293b;
    border-color: #334155;
}

/* ===== Top Nav Dark Mode ===== */
.dark #top-nav {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: #1e293b !important;
}
.dark #mobile-menu {
    background: #0f172a !important;
}
.dark .mobile-nav-link { color: #94a3b8; }
.dark .mobile-nav-link:hover { background: #1e293b; color: #e2e8f0; }
.dark .mobile-nav-link.active { background: #312e81; color: #a5b4fc; }
.dark #user-dropdown, .dark #ai-dropdown {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* ===== Mobile Top Bar (kept for compat) ===== */
.mobile-top-bar {
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.dark .mobile-top-bar {
    background: #0f172a !important;
    box-shadow: 0 1px 8px rgba(0,0,0,0.3);
}
.dark .mobile-top-bar h1 {
    color: #f1f5f9 !important;
}
.dark .mobile-top-bar a,
.dark .mobile-top-bar button {
    color: #94a3b8 !important;
}

/* ===== Bottom Nav Bar (mobile only) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
    border-top: 1px solid #f1f5f9;
}
@media (min-width: 1024px) {
    .bottom-nav { display: none; }
}

/* Tab items */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #b0b8c4;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}
.bottom-nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}
.bottom-nav-item i {
    font-size: 22px;
}
.bottom-nav-item span {
    line-height: 1;
}

/* Active state — colored pill + bold */
.bottom-nav-item.active {
    color: #4f46e5;
}
.bottom-nav-item.active .bottom-nav-icon {
    background: #eef2ff;
}
.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: #4f46e5;
}

/* Tap feedback */
.bottom-nav-item:active .bottom-nav-icon {
    transform: scale(0.88);
    background: #eef2ff;
}

/* Center "Create" button */
.bottom-nav-create {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(99,102,241,0.45);
    margin-top: -28px;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav-create:active {
    transform: scale(0.9);
    box-shadow: 0 3px 10px rgba(99,102,241,0.3);
}

/* ===== Dark mode bottom nav ===== */
.dark .bottom-nav {
    background: #0f172a;
    border-top-color: #1e293b;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
}
.dark .bottom-nav-item {
    color: #475569;
}
.dark .bottom-nav-item.active {
    color: #a5b4fc;
}
.dark .bottom-nav-item.active .bottom-nav-icon {
    background: rgba(99,102,241,0.15);
}
.dark .bottom-nav-item.active::before {
    background: #818cf8;
}
.dark .bottom-nav-item:active .bottom-nav-icon {
    background: rgba(99,102,241,0.1);
}
.dark .bottom-nav-create {
    box-shadow: 0 6px 20px rgba(99,102,241,0.3);
}

/* Responsive */
@media (max-width: 1023px) {
    #sidebar { left: 0; }
    #sidebar.open { transform: translateX(0) !important; }
    .stat-card { padding: 12px; }
    .stat-card p { font-size: 1.25rem; }
    table { font-size: 13px; }
    table th, table td { padding: 8px 10px; }
    .platform-card { padding: 12px; }
    .result-card { padding: 12px; min-width: auto; }
}
@media (max-width: 640px) {
    .quick-actions-grid { grid-template-columns: 1fr 1fr !important; }
    .result-card { padding: 12px; min-width: auto; }
    .result-card .platform-name { font-size: 14px; }
    .result-card .icon { width: 32px; height: 32px; }
    input, select, textarea { font-size: 16px !important; }
    .mobile-card-table tr { display: block; margin-bottom: 12px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; }
    .mobile-card-table td { display: block; padding: 4px 0; }
    #calendar-grid > div { min-height: 50px; font-size: 11px; }
    .cal-mini-card { font-size: 9px; padding: 3px 4px; }
    .cal-card-thumb { height: 28px; }
    .cal-day-cell { min-height: 60px; }
    .cal-status-pill { font-size: 10px; padding: 2px 8px; }
    .modal-content { width: 95% !important; max-width: 95% !important; margin: 10px; }
    .image-gallery { grid-template-columns: repeat(2, 1fr) !important; }
    .carousel-preview { height: 200px !important; }
    .platform-card { padding: 12px; }
    .platform-card textarea { height: 80px !important; }
}
@media (max-width: 375px) {
    .stat-card p { font-size: 1rem; }
    #calendar-grid > div { min-height: 40px; font-size: 10px; }
}

/* ===== Presentation View ===== */
.pres-viewport {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    position: relative;
    gap: 12px;
}
.pres-slide-container {
    flex: 1;
    max-width: 900px;
    cursor: pointer;
    animation: presSlideIn 0.3s ease-out;
}
@keyframes presSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
.pres-nav-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 16px;
    color: #475569;
}
.pres-nav-arrow:hover:not(:disabled) {
    background: #e0e7ff;
    border-color: #6366f1;
    color: #4f46e5;
    transform: scale(1.08);
}
.pres-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.pres-tov-block {
    background: linear-gradient(135deg, #4f46e5, #6366f1, #818cf8);
    color: white;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 16px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.6;
    unicode-bidi: plaintext;
}
.pres-tov-block .pres-tov-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-bottom: 8px;
    font-weight: 700;
}
.pres-caption-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
    unicode-bidi: plaintext;
    white-space: pre-wrap;
    font-size: 15px;
    line-height: 1.7;
}
.pres-caption-block .pres-caption-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6366f1;
    margin-bottom: 8px;
    font-weight: 700;
}
.pres-notes-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
    unicode-bidi: plaintext;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.6;
}
.pres-notes-block .pres-notes-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6366f1;
    margin-bottom: 8px;
    font-weight: 700;
}
.pres-images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    direction: ltr;
}
.pres-images-grid .pres-img-label {
    width: 100%;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6366f1;
    font-weight: 700;
    margin-bottom: 4px;
}
.pres-images-grid img.pres-ref-img {
    width: 220px;
    height: 170px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid #e2e8f0;
}
.pres-design-wrap img, .pres-design-wrap video { width: 200px !important; height: 160px !important; border-radius: 10px; border: 1px solid #e2e8f0; }
.pres-design-wrap:hover img, .pres-design-wrap:hover video { transform: scale(1.04); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.pres-design-wrap .design-download-btn { bottom: 8px; right: 8px; width: 28px; height: 28px; font-size: 13px; }
.pres-images-grid img.pres-design-img, .pres-images-grid video.pres-design-img {
    width: 200px;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid #e2e8f0;
}
.pres-images-grid img:hover, .pres-images-grid video:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.pres-slide-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.pres-slide-header .pres-date {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
}
.pres-slide-header .pres-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.pres-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
}
.pres-dot:hover {
    background: #94a3b8;
    transform: scale(1.2);
}
.pres-dot.active {
    background: #6366f1;
    transform: scale(1.3);
}
/* Fullscreen overlay */
.pres-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: white;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}
.pres-fullscreen .pres-viewport {
    flex: 1;
}
/* Dark mode presentation */
.dark .pres-slide-container {
    color: #e0e0e0;
}
.dark .pres-nav-arrow {
    background: #1e293b;
    border-color: #374151;
    color: #94a3b8;
}
.dark .pres-nav-arrow:hover:not(:disabled) {
    background: #312e81;
    border-color: #6366f1;
    color: #a5b4fc;
}
.dark .pres-tov-block {
    background: linear-gradient(135deg, #3730a3, #4f46e5, #6366f1);
}
.dark .pres-caption-block {
    background: #1e293b;
    border-color: #374151;
    color: #e0e0e0;
}
.dark .pres-notes-block {
    background: #1e293b;
    border-color: #374151;
    color: #e0e0e0;
}
.dark .pres-images-grid img {
    border-color: #374151;
}
.dark .pres-slide-header .pres-date {
    color: #e2e8f0;
}
.dark .pres-dot {
    background: #475569;
}
.dark .pres-dot.active {
    background: #818cf8;
}
.dark .pres-fullscreen {
    background: #1a1a2e;
}
/* Mobile responsive for presentation */
@media (max-width: 640px) {
    .pres-viewport { min-height: 400px; gap: 6px; }
    .pres-nav-arrow { width: 34px; height: 34px; font-size: 13px; }
    .pres-tov-block { font-size: 17px; padding: 14px 16px; }
    .pres-caption-block { font-size: 13px; padding: 12px 14px; }
    .pres-notes-block { font-size: 13px; padding: 12px 14px; }
    .pres-images-grid img.pres-ref-img { width: 160px; height: 120px; }
    .pres-images-grid img.pres-design-img, .pres-images-grid video.pres-design-img { width: 140px; height: 110px; }
    .pres-design-wrap img, .pres-design-wrap video { width: 140px !important; height: 110px !important; }
}

/* ===== Create Post Split Modal ===== */
.create-post-split {
    display: flex;
    min-height: 400px;
}
.create-post-form {
    flex: 1;
    min-width: 0;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    max-height: 75vh;
}
.create-post-preview {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    max-height: 75vh;
}
#cp-slides-list {
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
}
@media (max-width: 768px) {
    .create-post-split { flex-direction: column; }
    .create-post-form { border-right: none; border-bottom: 1px solid #e2e8f0; max-height: 70vh; overflow-y: auto; }
    .create-post-preview { max-height: 300px; }
    #cp-slides-list { max-height: 200px; }
}

/* Day cell hover + add button */
.cal-day-clickable { cursor: pointer; transition: background 0.15s, box-shadow 0.15s; }
.cal-day-clickable:hover { background: #f5f3ff !important; box-shadow: 0 2px 8px rgba(99,102,241,0.1); }
.cal-add-btn {
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: #6366f1; background: transparent;
    border: 1px solid transparent; cursor: pointer;
    opacity: 0; transition: opacity 0.15s, background 0.15s;
}
.cal-day-clickable:hover .cal-add-btn { opacity: 1; }
.cal-add-btn:hover { background: #e0e7ff; border-color: #6366f1; }

/* Platform multi-select toggles */
.platform-toggle {
    cursor: pointer;
    user-select: none;
}
.platform-toggle span {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    transition: all 0.15s;
}
.platform-toggle:hover span {
    border-color: #a5b4fc;
    background: #eef2ff;
}
.platform-toggle input:checked + span {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}
.dark .platform-toggle span {
    background: #1e293b;
    border-color: #374151;
    color: #94a3b8;
}
.dark .platform-toggle:hover span {
    border-color: #6366f1;
    background: #312e81;
}
.dark .platform-toggle input:checked + span {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

/* Carousel Slide Cards (Create Post Modal) */
.cp-slide-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    position: relative;
}
.cp-slide-card .cp-slide-number {
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.cp-slide-card textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 13px;
    resize: vertical;
    min-height: 48px;
}
.cp-slide-card .cp-slide-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}
.cp-slide-card:hover .cp-slide-delete { opacity: 1; }
.dark .cp-slide-card { background: #1e293b; border-color: #374151; }
.dark .cp-slide-card .cp-slide-number { color: #818cf8; }
.dark .cp-slide-card .cp-slide-delete { background: #7f1d1d; color: #fca5a5; }

/* Post slide modal sizing */
#post-slide-modal .pres-tov-block { font-size: 18px; }
#post-slide-modal .pres-caption-block { font-size: 14px; }
#post-slide-modal .pres-notes-block { font-size: 13px; }

/* Dark mode for new modals */
.dark #create-post-modal > div { background: #16213e !important; }
.dark .create-post-form { border-right-color: #374151; }
.dark .create-post-preview { background: #1e293b !important; }
.dark .create-post-preview .bg-white { background: #16213e !important; }
.dark #post-slide-modal > div { background: #16213e !important; }
.dark #schedule-picker-modal .bg-white { background: #16213e !important; }
.dark .cal-day-clickable:hover { background: #1e1b4b !important; }
.dark .cal-add-btn { color: #818cf8; }
.dark .cal-add-btn:hover { background: #312e81; border-color: #818cf8; }

/* Calendar Pin Button */
.cal-pin-btn {
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; color: #ec4899; background: transparent;
    border: 1px solid transparent; cursor: pointer;
    opacity: 0; transition: opacity 0.15s, background 0.15s;
}
.cal-day-clickable:hover .cal-pin-btn { opacity: 1; }
.cal-pin-btn:hover { background: #fce7f3; border-color: #ec4899; }
.dark .cal-pin-btn { color: #f472b6; }
.dark .cal-pin-btn:hover { background: #4a1942; border-color: #f472b6; }

/* Calendar Pin Badges */
.cal-pin-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 1px 6px; border-radius: 9999px; margin: 1px 2px 1px 0;
    font-size: 9px; font-weight: 600; line-height: 1.4;
    background: color-mix(in srgb, var(--pin-color) 12%, transparent);
    color: var(--pin-color); border: 1px solid color-mix(in srgb, var(--pin-color) 25%, transparent);
    cursor: default; max-width: 100%;
}
.cal-pin-icon { font-size: 8px; }
.cal-pin-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-pin-del {
    margin-left: 2px; cursor: pointer; font-size: 11px; font-weight: 700;
    opacity: 0.5; line-height: 1;
}
.cal-pin-del:hover { opacity: 1; color: #ef4444; }
.dark .cal-pin-badge {
    background: color-mix(in srgb, var(--pin-color) 18%, transparent);
    border-color: color-mix(in srgb, var(--pin-color) 35%, transparent);
}

/* Calendar Pin Popover */
.cal-pin-popover {
    position: absolute; z-index: 60; width: 220px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15); padding: 12px;
}
.cal-pin-popover-title {
    font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-pin-types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.cal-pin-type-opt {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 8px; border-radius: 8px; border: 1px solid #e2e8f0;
    background: #f8fafc; cursor: pointer; font-size: 11px; font-weight: 500;
    color: #334155; transition: all 0.15s;
}
.cal-pin-type-opt:hover { border-color: #6366f1; background: #eef2ff; }
.cal-pin-type-opt.selected { border-color: #6366f1; background: #e0e7ff; color: #4338ca; }
.cal-pin-note-input {
    width: 100%; padding: 5px 8px; border: 1px solid #e2e8f0; border-radius: 6px;
    font-size: 11px; margin-bottom: 8px; outline: none;
}
.cal-pin-note-input:focus { border-color: #6366f1; }
.cal-pin-submit {
    width: 100%; padding: 6px; border-radius: 8px; border: none;
    background: #6366f1; color: #fff; font-size: 11px; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
}
.cal-pin-submit:hover { background: #4f46e5; }
.dark .cal-pin-popover { background: #1e293b; border-color: #334155; }
.dark .cal-pin-popover-title { color: #94a3b8; }
.dark .cal-pin-type-opt { background: #0f172a; border-color: #334155; color: #cbd5e1; }
.dark .cal-pin-type-opt:hover { border-color: #818cf8; background: #1e1b4b; }
.dark .cal-pin-type-opt.selected { border-color: #818cf8; background: #312e81; color: #c7d2fe; }
.dark .cal-pin-note-input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
.dark .cal-pin-note-input:focus { border-color: #818cf8; }
.dark .cal-pin-submit { background: #818cf8; }
.dark .cal-pin-submit:hover { background: #6366f1; }

/* Global Search */
#global-search-results {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: #1e293b; border: 1px solid #334155; border-radius: 10px;
    max-height: 360px; overflow-y: auto; z-index: 60;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.search-group-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; padding: 8px 12px 4px; }
.search-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none; color: #e2e8f0; transition: background 0.15s; cursor: pointer; }
.search-item:hover, .search-item-active { background: #334155; }
.search-item-text { min-width: 0; flex: 1; }
.search-item-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-sub { font-size: 11px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.search-empty { padding: 16px; text-align: center; color: #64748b; font-size: 13px; }

/* Light mode overrides for search */
body:not(.dark) #global-search-results { background: #fff; border-color: #e2e8f0; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
body:not(.dark) .search-item { color: #1e293b; }
body:not(.dark) .search-item:hover, body:not(.dark) .search-item-active { background: #f1f5f9; }
body:not(.dark) .search-group-label { color: #94a3b8; }
body:not(.dark) .search-item-sub { color: #64748b; }
#mobile-search-results {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    max-height: 320px; overflow-y: auto; z-index: 60;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.dark #mobile-search-bar { background: #1e293b !important; }
.dark #mobile-search-bar input { background: #0f172a; color: #e2e8f0; border-color: #334155; }
.dark #mobile-search-results { background: #1e293b; border-color: #334155; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.dark #mobile-search-results .search-item { color: #e2e8f0; }
.dark #mobile-search-results .search-item:hover { background: #334155; }

/* WhatsApp-style Post Chat */
.post-chat-list { max-height: 250px; overflow-y: auto; padding: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.post-chat-msg { display: flex; }
.post-chat-mine { justify-content: flex-end; }
.post-chat-other { justify-content: flex-start; }
.post-chat-bubble { max-width: 80%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; position: relative; }
.post-chat-bubble-mine { background: #dcf8c6; border-bottom-right-radius: 4px; color: #1a1a1a; }
.post-chat-bubble-other { background: #f0f0f0; border-bottom-left-radius: 4px; color: #1a1a1a; }
.post-chat-name { font-size: 11px; font-weight: 700; color: #6366f1; margin-bottom: 2px; }
.post-chat-text { word-break: break-word; }
.post-chat-time { font-size: 10px; color: #999; text-align: right; margin-top: 2px; }
.post-chat-input-row { display: flex; gap: 8px; margin-top: 8px; }
.post-chat-input { flex: 1; border: 1px solid #e2e8f0; border-radius: 20px; padding: 8px 16px; font-size: 13px; outline: none; transition: border-color 0.2s; }
.post-chat-input:focus { border-color: #6366f1; }
.post-chat-send { background: #6366f1; color: white; border: none; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.post-chat-send:hover { background: #4f46e5; }
.dark .post-chat-bubble-mine { background: #1e4620; color: #e2e8f0; }
.dark .post-chat-bubble-other { background: #374151; color: #e2e8f0; }
.dark .post-chat-name { color: #818cf8; }
.dark .post-chat-time { color: #6b7280; }
.dark .post-chat-input { background: #1e293b; border-color: #374151; color: #e2e8f0; }

/* Edit diff in comments */
.post-chat-edit { max-width: 100% !important; background: #fffbeb !important; border: 1px solid #fcd34d; }
.edit-diff { margin-top: 6px; font-size: 12px; line-height: 1.5; }
.edit-before, .edit-after { padding: 6px 8px; border-radius: 6px; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.edit-before { background: #fef2f2; border-left: 3px solid #ef4444; color: #991b1b; text-decoration: line-through; opacity: 0.7; }
.edit-after { background: #f0fdf4; border-left: 3px solid #22c55e; color: #166534; }
.edit-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; text-decoration: none; }
.edit-before .edit-label { color: #dc2626; }
.edit-after .edit-label { color: #16a34a; }
.dark .post-chat-edit { background: #1e1b0f !important; border-color: #854d0e; }
.dark .edit-before { background: #1c0f0f; color: #fca5a5; border-color: #b91c1c; }
.dark .edit-after { background: #0f1c14; color: #86efac; border-color: #15803d; }
.edit-slide { padding: 4px 0; border-bottom: 1px dashed #e5e7eb; text-decoration: inherit; }
.edit-slide:last-child { border-bottom: none; }
.edit-slide-num { display: inline-block; font-size: 9px; font-weight: 700; background: rgba(0,0,0,.08); color: inherit; padding: 1px 5px; border-radius: 4px; margin-right: 4px; margin-bottom: 2px; text-decoration: none !important; }
.edit-slide-caption { font-size: 11px; opacity: 0.7; margin-top: 2px; font-style: italic; }
.dark .edit-slide { border-bottom-color: #334155; }
.dark .edit-slide-num { background: rgba(255,255,255,.1); }

/* Overdue post alerts */
.cal-card-overdue { border-left: 3px solid #ef4444 !important; animation: overduePulse 2s ease-in-out infinite; }
.cal-overdue-badge { font-size: 9px; font-weight: 700; color: #ef4444; background: #fef2f2; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
@keyframes overduePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } 50% { box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15); } }
.overdue-alert-banner { display: flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 1px solid #fecaca; border-radius: 10px; padding: 10px 16px; color: #991b1b; font-size: 13px; font-weight: 500; }
.overdue-alert-banner i { color: #ef4444; }
.dark .overdue-alert-banner { background: linear-gradient(135deg, #450a0a, #7f1d1d); border-color: #991b1b; color: #fca5a5; }
.dark .cal-overdue-badge { background: #450a0a; color: #fca5a5; }

/* Comment badge on calendar cards */
.cal-comment-badge { font-size: 9px; font-weight: 700; color: #6366f1; background: #eef2ff; padding: 1px 5px; border-radius: 4px; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; position: relative; animation: commentPulse 2s ease-in-out infinite; }
.cal-comment-badge::after { content: ''; position: absolute; inset: -3px; border-radius: 6px; border: 2px solid #6366f1; animation: commentRing 2s ease-in-out infinite; pointer-events: none; }
@keyframes commentPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes commentRing { 0%, 100% { opacity: 0; transform: scale(0.8); } 50% { opacity: 0.5; transform: scale(1.15); } }
.dark .cal-comment-badge { background: #312e81; color: #a5b4fc; }
.dark .cal-comment-badge::after { border-color: #818cf8; }

/* @Mention Autocomplete Dropdown */
.mention-dropdown { position: absolute; bottom: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 -4px 16px rgba(0,0,0,0.1); max-height: 180px; overflow-y: auto; z-index: 100; margin-bottom: 4px; display: none; }
.mention-dropdown.show { display: block; }
.mention-item { padding: 8px 12px; cursor: pointer; font-size: 13px; color: #334155; transition: background 0.15s; }
.mention-item:hover, .mention-item-active { background: #eef2ff; color: #4338ca; }
.mention-item .mention-at { color: #6366f1; font-weight: 600; margin-right: 2px; }
.mention-highlight { color: #4f46e5; background: rgba(99,102,241,0.1); padding: 0 2px; border-radius: 3px; font-weight: 600; }
.dark .mention-dropdown { background: #1e293b; border-color: #334155; box-shadow: 0 -4px 16px rgba(0,0,0,0.3); }
.dark .mention-item { color: #cbd5e1; }
.dark .mention-item:hover, .dark .mention-item-active { background: #312e81; color: #a5b4fc; }
.dark .mention-highlight { color: #a5b4fc; background: rgba(99,102,241,0.2); }

/* Notification Toast Popup */
.toast-notification { display: flex; align-items: flex-start; gap: 10px; background: #fff; border-left: 4px solid #6366f1; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); padding: 14px 16px; min-width: 300px; max-width: 400px; animation: toastSlideIn 0.35s ease-out; cursor: pointer; transition: opacity 0.3s, transform 0.3s; }
.toast-notification:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(0,0,0,0.18); }
.toast-notif-icon { width: 36px; height: 36px; border-radius: 50%; background: #eef2ff; color: #6366f1; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.toast-notif-body { flex: 1; min-width: 0; }
.toast-notif-title { font-size: 13px; font-weight: 600; color: #1e293b; margin-bottom: 2px; }
.toast-notif-message { font-size: 12px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-notif-close { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 14px; padding: 2px; flex-shrink: 0; line-height: 1; }
.toast-notif-close:hover { color: #475569; }
@keyframes toastSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.dark .toast-notification { background: #1e293b; border-color: #818cf8; box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.dark .toast-notif-icon { background: #312e81; color: #a5b4fc; }
.dark .toast-notif-title { color: #e2e8f0; }
.dark .toast-notif-message { color: #94a3b8; }
.dark .toast-notif-close { color: #64748b; }
.dark .toast-notif-close:hover { color: #94a3b8; }

/* Cairo Clock — sidebar */
.cairo-clock { text-align: center; margin-top: 24px; padding: 10px 0; border-top: 1px solid rgba(148,163,184,0.1); }
.cairo-clock-time { font-size: 22px; font-weight: 600; letter-spacing: 1px; color: #cbd5e1; font-variant-numeric: tabular-nums; line-height: 1.2; }
.cairo-clock-label { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 1.5px; color: #475569; margin-top: 2px; }

/* Shift Tracker */
.shift-tracker { margin-top: 12px; padding: 10px 12px; background: rgba(99,102,241,0.08); border-radius: 10px; border: 1px solid rgba(99,102,241,0.15); }
.shift-tracker.hidden { display: none; }
.shift-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #818cf8; margin-bottom: 8px; }
.shift-label i { margin-right: 4px; font-size: 10px; }
.shift-progress-bar { height: 6px; background: #1e293b; border-radius: 3px; overflow: hidden; }
.shift-progress-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #818cf8); border-radius: 3px; transition: width 1s linear; min-width: 2px; }
.shift-progress-fill.done { background: linear-gradient(90deg, #10b981, #34d399); }
.shift-info { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10px; font-weight: 500; color: #64748b; font-variant-numeric: tabular-nums; }
.shift-done-label { color: #34d399 !important; font-weight: 600; }
.shift-overtime-label { color: #f59e0b !important; font-weight: 600; }
.shift-overtime-label i { margin-right: 2px; font-size: 9px; }

/* === Designer Reminder Ticker === */
.reminder-ticker { margin-bottom: 16px; border-radius: 10px; border: 1px solid #fbbf24; background: linear-gradient(135deg, #fffbeb, #fef3c7); overflow: hidden; box-shadow: 0 2px 8px rgba(251,191,36,0.15); }
.reminder-ticker.reminder-has-urgent { border-color: #f87171; background: linear-gradient(135deg, #fef2f2, #fee2e2); box-shadow: 0 2px 8px rgba(248,113,113,0.2); }
.reminder-ticker.reminder-has-warning { border-color: #fbbf24; }
.reminder-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; cursor: pointer; user-select: none; }
.reminder-header-left { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #92400e; }
.reminder-has-urgent .reminder-header-left { color: #991b1b; }
.reminder-header-left i { font-size: 15px; }
.reminder-header-right { display: flex; align-items: center; gap: 10px; }
.reminder-dismiss-all { font-size: 11px; color: #b45309; background: none; border: none; cursor: pointer; text-decoration: underline; padding: 0; }
.reminder-dismiss-all:hover { color: #92400e; }
.reminder-has-urgent .reminder-dismiss-all { color: #dc2626; }
.reminder-chevron { font-size: 11px; color: #b45309; transition: transform 0.2s; }
.reminder-chevron-collapsed { transform: rotate(-90deg); }
.reminder-list { border-top: 1px solid rgba(251,191,36,0.3); }
.reminder-has-urgent .reminder-list { border-top-color: rgba(248,113,113,0.3); }
.reminder-item { display: flex; align-items: center; padding: 8px 14px; gap: 8px; border-bottom: 1px solid rgba(251,191,36,0.15); transition: opacity 0.3s, transform 0.3s; }
.reminder-item:last-child { border-bottom: none; }
.reminder-link { display: flex; align-items: center; gap: 8px; flex: 1; text-decoration: none; color: inherit; min-width: 0; }
.reminder-icon { font-size: 14px; flex-shrink: 0; }
.reminder-msg { font-size: 12px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reminder-x { background: none; border: none; cursor: pointer; font-size: 16px; color: #9ca3af; padding: 0 2px; flex-shrink: 0; line-height: 1; }
.reminder-x:hover { color: #ef4444; }
.reminder-item-urgent { background: rgba(239,68,68,0.06); }
.reminder-item-urgent .reminder-icon { color: #dc2626; }
.reminder-item-urgent .reminder-msg { color: #991b1b; font-weight: 600; }
.reminder-item-warning .reminder-icon { color: #d97706; }
.reminder-item-warning .reminder-msg { color: #92400e; }
.reminder-item-info { background: rgba(59,130,246,0.04); }
.reminder-item-info .reminder-icon { color: #2563eb; }
.reminder-item-info .reminder-msg { color: #1e40af; }
.reminder-dismiss-anim { opacity: 0; transform: translateX(40px); pointer-events: none; }
/* Dark mode */
.dark .reminder-ticker { background: linear-gradient(135deg, #292524, #1c1917); border-color: #78350f; }
.dark .reminder-ticker.reminder-has-urgent { background: linear-gradient(135deg, #1f1215, #1a1a2e); border-color: #7f1d1d; }
.dark .reminder-header-left { color: #fbbf24; }
.dark .reminder-has-urgent .reminder-header-left { color: #fca5a5; }
.dark .reminder-dismiss-all { color: #fbbf24; }
.dark .reminder-has-urgent .reminder-dismiss-all { color: #fca5a5; }
.dark .reminder-chevron { color: #fbbf24; }
.dark .reminder-list { border-top-color: rgba(120,53,15,0.4); }
.dark .reminder-item { border-bottom-color: rgba(120,53,15,0.2); }
.dark .reminder-item-urgent { background: rgba(127,29,29,0.2); }
.dark .reminder-item-urgent .reminder-icon { color: #fca5a5; }
.dark .reminder-item-urgent .reminder-msg { color: #fecaca; }
.dark .reminder-item-warning .reminder-icon { color: #fbbf24; }
.dark .reminder-item-warning .reminder-msg { color: #fde68a; }
.dark .reminder-item-info { background: rgba(30,58,138,0.15); }
.dark .reminder-item-info .reminder-icon { color: #93c5fd; }
.dark .reminder-item-info .reminder-msg { color: #bfdbfe; }
.dark .reminder-x { color: #6b7280; }
.dark .reminder-x:hover { color: #f87171; }
/* Mobile */
@media (max-width: 1023px) {
    .reminder-ticker { border-radius: 8px; margin-bottom: 12px; }
    .reminder-msg { font-size: 11px; }
}

/* ===== Overview: Two-Panel Layout ===== */
.overview-layout { display: flex; gap: 20px; min-height: calc(100vh - 160px); }
.overview-board-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.overview-board-header { margin-bottom: 8px; }
.overview-sidebar { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }

/* Overview kanban columns */
.overview-kanban { display: flex; gap: 10px; flex: 1; min-height: 0; }
.overview-col { flex: 1; min-width: 0; background: #f8fafc; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; }
.overview-col-header { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 0 4px; color: #64748b; }
.ov-col-count { background: #e2e8f0; color: #64748b; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; }
.overview-col-cards { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; }

/* Overview cards */
.overview-card { display: block; background: white; border-radius: 10px; padding: 10px 12px; border-left: 3px solid #6366f1; cursor: pointer; transition: all 0.2s; font-size: 12px; text-decoration: none; color: inherit; }
.overview-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.08); transform: translateY(-1px); }
.overview-card.post-card { border-left-color: #10b981; }
.overview-card .ov-title { font-weight: 600; font-size: 13px; margin: 4px 0 6px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.overview-card .ov-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #94a3b8; }

/* Sidebar sections */
.overview-sidebar-section { background: white; border-radius: 12px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }

/* Dark mode — overview */
.dark .overview-col { background: #1e293b; }
.dark .overview-col-header { color: #94a3b8; }
.dark .ov-col-count { background: #334155; color: #94a3b8; }
.dark .overview-card { background: #16213e; color: #e0e0e0; }
.dark .overview-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.3); }
.dark .overview-card.post-card { border-left-color: #34d399; }
.dark .overview-card .ov-meta { color: #64748b; }
.dark .overview-card .ov-meta .bg-gray-100 { background: #334155 !important; color: #94a3b8 !important; }
.dark .overview-sidebar-section { background: #16213e; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* Mobile: stack vertically, kanban scrolls horizontal */
@media (max-width: 1023px) {
    .overview-layout { flex-direction: column; min-height: auto; }
    .overview-sidebar { width: 100%; }
    .overview-kanban { overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
    .overview-col { min-width: 220px; flex-shrink: 0; }
}

/* ========== Check-in Overlay ========== */
.checkin-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; transition: opacity 0.4s; }
.checkin-overlay.hidden { display: none; pointer-events: none; }
.checkin-card { background: white; border-radius: 24px; padding: 48px 40px; text-align: center; max-width: 400px; width: 90%; box-shadow: 0 25px 60px rgba(0,0,0,0.3); animation: checkinSlideUp 0.4s ease-out; }
@keyframes checkinSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.checkin-icon { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 32px; }
.checkin-icon.on-time { background: #ecfdf5; color: #059669; }
.checkin-icon.late { background: #fefce8; color: #d97706; }
.checkin-icon.done { background: #dcfce7; color: #16a34a; }
.checkin-title { font-size: 24px; font-weight: 700; color: #1e293b; margin: 0 0 8px; }
.checkin-subtitle { font-size: 14px; color: #64748b; margin: 0 0 24px; }
.checkin-time { font-size: 40px; font-weight: 700; color: #1e293b; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.checkin-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #94a3b8; margin: 4px 0 28px; }
.checkin-action-btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 40px; border: none; border-radius: 14px; font-size: 16px; font-weight: 600; color: white; cursor: pointer; transition: all 0.2s; width: 100%; }
.checkin-action-btn.on-time { background: #059669; }
.checkin-action-btn.on-time:hover { background: #047857; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(5,150,105,0.4); }
.checkin-action-btn.late { background: #d97706; }
.checkin-action-btn.late:hover { background: #b45309; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(217,119,6,0.4); }
.checkin-action-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }
.checkin-status-msg { margin-top: 16px; font-size: 13px; color: #dc2626; font-weight: 500; }

/* ========== Attendance Page ========== */
.attendance-summary { display: flex; gap: 12px; flex-wrap: wrap; }
.att-stat-card { flex: 1; min-width: 100px; background: white; border-radius: 12px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); text-align: center; }
.att-stat-card.on-time { border-top: 3px solid #10b981; }
.att-stat-card.late { border-top: 3px solid #f59e0b; }
.att-stat-card.absent { border-top: 3px solid #ef4444; }
.att-stat-card.overtime { border-top: 3px solid #6366f1; }
.att-stat-num { font-size: 28px; font-weight: 700; line-height: 1.2; }
.att-stat-card.on-time .att-stat-num { color: #059669; }
.att-stat-card.late .att-stat-num { color: #d97706; }
.att-stat-card.absent .att-stat-num { color: #dc2626; }
.att-stat-card.overtime .att-stat-num { color: #6366f1; }
.att-stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; margin-top: 4px; }

.attendance-view-toggle button { transition: all 0.2s; color: #6b7280; }
.attendance-view-toggle button.active { background: white; color: #4f46e5; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.attendance-table-wrap { background: white; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow: hidden; }
.attendance-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.attendance-table th { text-align: left; padding: 10px 14px; background: #f8fafc; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #64748b; border-bottom: 1px solid #e2e8f0; }
.attendance-table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; }
.attendance-table tr:last-child td { border-bottom: none; }

.att-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.att-badge.on-time { background: #ecfdf5; color: #059669; }
.att-badge.late { background: #fefce8; color: #d97706; }
.att-badge.absent { background: #fef2f2; color: #dc2626; }

.attendance-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.attendance-dot.on_time { background: #10b981; }
.attendance-dot.late { background: #f59e0b; }
.attendance-dot.absent { background: #ef4444; }
.attendance-dot.weekend { background: #e2e8f0; }

.att-overtime-val { color: #d97706; font-weight: 600; font-size: 12px; }
.att-weekly-legend { display: flex; gap: 16px; justify-content: center; margin-top: 12px; font-size: 11px; color: #64748b; }
.att-weekly-legend span { display: flex; align-items: center; gap: 5px; }

/* Monthly attendance percentage bar */
.att-pct-bar { width: 100%; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.att-pct-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.att-pct-fill.att-pct-good { background: #10b981; }
.att-pct-fill.att-pct-warn { background: #f59e0b; }
.att-pct-fill.att-pct-bad { background: #ef4444; }
.att-pct-good { color: #059669; }
.att-pct-warn { color: #d97706; }
.att-pct-bad { color: #dc2626; }

/* ========== Attendance Dark Mode ========== */
.dark .checkin-card { background: #1e293b; }
.dark .checkin-title { color: #f1f5f9; }
.dark .checkin-subtitle { color: #94a3b8; }
.dark .checkin-time { color: #f1f5f9; }
.dark .checkin-icon.on-time { background: #064e3b; color: #34d399; }
.dark .checkin-icon.late { background: #78350f; color: #fbbf24; }
.dark .checkin-icon.done { background: #14532d; color: #4ade80; }

.dark .att-stat-card { background: #1e293b; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.dark .att-stat-card.on-time { border-top-color: #34d399; }
.dark .att-stat-card.late { border-top-color: #fbbf24; }
.dark .att-stat-card.absent { border-top-color: #f87171; }
.dark .att-stat-card.overtime { border-top-color: #818cf8; }
.dark .att-overtime-val { color: #fbbf24; }
.dark .att-weekly-legend { color: #94a3b8; }
.dark .att-pct-bar { background: #334155; }
.dark .att-pct-good { color: #34d399; }
.dark .att-pct-warn { color: #fbbf24; }
.dark .att-pct-bad { color: #f87171; }
.dark .att-stat-label { color: #64748b; }
.dark .attendance-view-toggle { background: #1e293b; }
.dark .attendance-view-toggle button { color: #94a3b8; }
.dark .attendance-view-toggle button.active { background: #334155; color: #818cf8; box-shadow: none; }
.dark .attendance-table-wrap { background: #1e293b; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.dark .attendance-table th { background: #0f172a !important; color: #94a3b8 !important; border-bottom-color: #334155 !important; }
.dark .attendance-table td { color: #e2e8f0 !important; border-bottom-color: #334155 !important; background-color: #1e293b; }
.dark .attendance-table td.text-gray-500 { color: #94a3b8 !important; }
.dark .attendance-table td .text-gray-500 { color: #94a3b8 !important; }
.dark .attendance-table td .text-gray-600 { color: #94a3b8 !important; }
.dark .attendance-table td .text-gray-300 { color: #475569 !important; }
.dark .attendance-table td .text-gray-400 { color: #64748b !important; }
.dark .attendance-table td .font-medium { color: #f1f5f9; }
.dark .attendance-table tr:hover td { background-color: #334155 !important; }
.att-row-idle td { background-color: #fef2f2 !important; }
.dark .att-row-idle td { background-color: #451a1a !important; }
.dark .att-badge.on-time { background: #064e3b; color: #6ee7b7; }
.dark .att-badge.late { background: #78350f; color: #fcd34d; }
.dark .att-badge.absent { background: #7f1d1d; color: #fca5a5; }
.dark .attendance-dot.weekend { background: #334155; }

/* ===== Additional Dark Mode Coverage ===== */

/* Mobile card table */
@media (max-width: 640px) {
    .dark .mobile-card-table tr { border-color: #334155; background: #1e293b; }
}

/* Tabs */
.dark .tab-btn:not(.active) { background: #1e293b; color: #94a3b8; }

/* Focus rings */
.dark .focus\:ring-2:focus { --tw-ring-color: rgba(99,102,241,0.5) !important; }

/* Hover states on bordered buttons */
.dark .hover\:shadow-md:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important; }

/* Chart.js canvas containers */
.dark canvas { filter: none; }

/* Border-left colored indicators (notifications, cards) */
.dark .border-l-4 { border-left-color: inherit; }

/* Settings / billing stat text */
.dark .font-bold { color: inherit; }
.dark .font-semibold { color: inherit; }

/* Links */
.dark a { color: inherit; }
.dark a:hover { color: inherit; }

/* Dropdown menus dynamically created */
.dark [class*="dropdown"] { background-color: #1e293b; border-color: #334155; }

/* Opacity classes with backgrounds */
.dark .opacity-60 { opacity: 0.5; }

/* Fix the checkout modal cancel button */
.dark .bg-gray-200.text-gray-600 { color: #e2e8f0 !important; }

/* Dark mode for inline-styled popups (schedule, share, quick-create) */
.dark [id$="-popup"] > div,
.dark #quick-create-modal > div > div:last-child,
.dark #cal-schedule-popup > div,
.dark #pipe-schedule-popup > div { background: #1e293b !important; color: #e2e8f0 !important; border-color: #334155 !important; }
.dark [id$="-popup"] input,
.dark [id$="-popup"] select,
.dark #quick-create-modal input,
.dark #quick-create-modal select { background: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }
.dark [id$="-popup"] h3,
.dark #quick-create-modal h3 { color: #f1f5f9 !important; }

/* Dark mode for week summary, trial badge, recent posts */
.dark #week-summary { background: #1e293b !important; border-color: #334155 !important; }
.dark #week-days > div { background: #0f172a !important; }
.dark #aic-recent-section { border-color: #334155 !important; }
.dark .aic-account-card, .dark .aid-account-card, .dark .aiv-account-card { border-color: transparent; }
.dark #aic-trial-badge, .dark #aid-trial-badge { background: rgba(245,158,11,0.15) !important; }
