/* PanelCero - card styles only, light theme matching CAPCA live site */
.chat-response{position:fixed;bottom:20px;right:24px;width:400px;max-height:450px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;box-shadow:0 4px 12px rgba(0,0,0,0.1);overflow-y:auto;display:none;z-index:999;font-size:13px;line-height:1.6}
.chat-response.open{display:block}
.chat-response .msg{margin-bottom:10px;padding:8px 12px;border-radius:8px}
.chat-response .msg.user{background:#e8f0fe}
.chat-response .msg.assistant{background:#f3f4f6}
.chat-response .msg strong{display:block;margin-bottom:2px;font-size:11px;color:#6b7280;text-transform:uppercase;letter-spacing:.05em}
.chat-response .typing{color:#9ca3af;font-style:italic}
.panel-content{flex:1;min-width:0;min-height:0;padding:10px 28px 14px;overflow-y:auto;background:#f9fafb;position:relative}
.grid-rows{display:flex;flex-direction:column;gap:6px}
.section-label{font-size:13px;color:#6b7280;letter-spacing:.02em;margin:8px 0 4px;font-weight:600;text-transform:uppercase;display:flex;align-items:center;gap:8px}
.section-label .section-add{cursor:pointer;width:24px;height:24px;border-radius:50%;background:#2a2aa9;color:#fff;border:none;display:grid;place-items:center;font-size:16px;font-weight:400;line-height:1;flex-shrink:0;transition:background .15s}
.section-label .section-add:hover{background:#1e1e80}
.card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:12px 14px;box-shadow:0 1px 2px rgba(0,0,0,0.05);position:relative;display:flex;flex-direction:column;justify-content:space-between;transition:box-shadow .2s,transform .15s;cursor:pointer;overflow:hidden}
.card:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1);transform:translateY(-1px)}
.card.empty{background:transparent;border:1.5px dashed #d1d5db;box-shadow:none;align-items:center;justify-content:center;color:#9ca3af;font-size:28px;font-weight:300}
.card.empty:hover{border-color:#2a2aa9;color:#2a2aa9}
.card .remove-btn{position:absolute;top:4px;right:4px;width:20px;height:20px;border-radius:50%;background:#fef2f2;color:#dc2626;border:none;cursor:pointer;display:none;place-items:center;font-size:12px;z-index:10}
.card:hover .remove-btn{display:grid}
.fn-card .icon{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;background:#e8f0fe}
.fn-card .icon svg{width:20px;height:20px;color:#2a2aa9}
.fn-card .label{font-size:14px;font-weight:600;color:#454546}
.ind-card .ind-label{font-size:10px;letter-spacing:.08em;color:#9ca3af;font-weight:600;text-transform:uppercase}
.ind-card .ind-value{font-size:28px;font-weight:700;letter-spacing:-.03em;line-height:1;margin:6px 0}
.ind-card .ind-value .unit{font-size:14px;font-weight:500;opacity:.7;margin-left:2px}
.ind-card .ind-foot{font-size:11px;display:flex;align-items:center;gap:4px;font-weight:500}
.ind-card .ind-foot.up,.ind-card .ind-foot.down{color:#059669}
.ind-card .ind-foot.neutral{color:#6b7280}
.ind-card .ind-foot .arrow{font-size:8px}
.init-card .top{display:flex;justify-content:space-between;align-items:flex-start}
.init-card .ic{width:28px;height:28px;border-radius:7px;display:grid;place-items:center;background:#e8f0fe}
.init-card .ic svg{width:14px;height:14px;color:#2a2aa9}
.init-card .pct{font-size:12px;font-weight:600;color:#6b7280}
.init-card .ititle{font-size:11px;font-weight:600;line-height:1.2;color:#454546}
.init-card .bar{height:5px;background:#e5e7eb;border-radius:3px;overflow:hidden;margin-top:8px}
.init-card .bar .fill{height:100%;border-radius:3px}
.init-card .kpi{font-size:10px;color:#6b7280;font-family:'JetBrains Mono',monospace;margin-top:4px}
.init-card .kpi strong{color:#454546}
.cal-card .top{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:4px}
.cal-card .when{font-size:10px;letter-spacing:.1em;color:#6b7280;font-weight:600;text-transform:uppercase;line-height:1.3}
.cal-card .count{width:22px;height:22px;border-radius:50%;background:#d1fae5;color:#059669;font-size:10px;font-weight:600;display:grid;place-items:center}
.cal-card .count.blue{background:#dbeafe;color:#2563eb}
.cal-card .day{font-size:30px;font-weight:700;letter-spacing:-.04em;line-height:1;margin:2px 0 4px;color:#454546}
.cal-card .events{font-size:10px;color:#6b7280;line-height:1.4;font-family:'JetBrains Mono',monospace}
.weather-card .sun{color:#d97706}
.weather-card .label{font-size:10px;letter-spacing:.1em;color:#6b7280;font-weight:600;text-transform:uppercase}
.weather-card .temp{font-size:30px;font-weight:700;letter-spacing:-.04em;line-height:1;color:#454546}
.weather-card .temp .deg{font-size:16px;font-weight:500}
.weather-card .hum{font-size:11px;color:#6b7280}
.forecast-card .label{font-size:10px;letter-spacing:.1em;color:#6b7280;font-weight:600;text-transform:uppercase}
.forecast-card .days{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-top:6px;text-align:center}
.forecast-card .day-col{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;color:#6b7280}
.forecast-card .dlabel{font-size:10px;color:#9ca3af;font-weight:600}
.forecast-card .ico{font-size:14px}
.mkt-card .ic{width:28px;height:28px;border-radius:7px;display:grid;place-items:center;background:#e8f0fe}
.mkt-card .ic svg{width:14px;height:14px;color:#2a2aa9}
.mkt-card .arr{color:#9ca3af}
.mkt-card .name{font-size:14px;font-weight:600;color:#454546}
.mkt-card .sub{font-size:11px;color:#6b7280}
.ev-card .label{font-size:10px;letter-spacing:.1em;color:#6b7280;font-weight:600;text-transform:uppercase;line-height:1.3}
.ev-card .big{font-size:28px;font-weight:700;letter-spacing:-.03em;line-height:1;margin:4px 0;color:#454546}
.ev-card .big .u{font-size:11px;font-weight:500;color:#6b7280;margin-left:4px}
.ev-card .desc{font-size:10px;color:#6b7280;font-family:'JetBrains Mono',monospace;line-height:1.4}
.ev-card .bars{display:flex;align-items:flex-end;gap:3px;height:18px;margin-top:4px}
.ev-card .bars span{flex:1;background:#2563eb;border-radius:1px;opacity:.5}
.news-card .live{display:inline-flex;align-items:center;gap:4px;background:#fef2f2;color:#dc2626;font-size:9px;font-weight:700;letter-spacing:.08em;padding:3px 7px;border-radius:4px}
.news-card .live .dot{width:5px;height:5px;border-radius:50%;background:#dc2626;animation:pulse 1.5s infinite}
@keyframes pulse{50%{opacity:.3}}
.news-card .headline{font-size:13px;font-weight:600;line-height:1.2;margin-top:6px;color:#454546}
.news-card .src{font-size:10px;color:#6b7280;margin-top:4px}
.month-card .grid-days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin:4px 0}
.month-card .grid-days span{aspect-ratio:1;background:#f3f4f6;border-radius:2px}
.month-card .grid-days span.act-1{background:#a5f3fc}
.month-card .grid-days span.act-2{background:#6ee7b7}
.month-card .grid-days span.act-3{background:#fde68a}
.month-card .grid-days span.act-4{background:#f9a8d4}
.month-card .grid-days span.act-5{background:#c4b5fd}
.alert-card .ic{color:#dc2626}
.alert-card .num{font-size:18px;font-weight:700;color:#dc2626}
.alert-card .ititle{font-size:14px;font-weight:600;margin-top:2px;color:#454546}
.alert-card .sub{font-size:10px;color:#6b7280;font-family:'JetBrains Mono',monospace}
.cp-card .badge{display:inline-flex;align-items:center;background:#dbeafe;color:#2563eb;font-size:9px;font-weight:700;letter-spacing:.08em;padding:3px 7px;border-radius:4px}
.cp-card .ic{color:#d97706}
.sent-card .bar{display:flex;height:24px;border-radius:4px;overflow:hidden;margin:4px 0}
.sent-card .bar .pos{background:#059669;display:grid;place-items:center;font-size:10px;font-weight:700;color:#fff}
.sent-card .bar .neu{background:#d1d5db}
.sent-card .bar .neg{background:#dc2626;display:grid;place-items:center;font-size:10px;font-weight:700;color:#fff}
.sent-card .sub{font-size:11px;color:#6b7280;font-family:'JetBrains Mono',monospace}
.footer{margin-top:16px;padding:10px 0;display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#9ca3af;font-family:'JetBrains Mono',monospace;border-top:1px solid #e5e7eb;flex-shrink:0}
.accent-white .icon{background:#e8f0fe;color:#2a2aa9}
.accent-violet .icon{background:#ede9fe;color:#7c3aed}
.accent-emerald .icon{background:#d1fae5;color:#059669}
.accent-cyan .icon{background:#cffafe;color:#0891b2}
.accent-red .icon{background:#fee2e2;color:#dc2626}
.accent-pink .icon{background:#fce7f3;color:#db2777}
.accent-indigo .icon{background:#e0e7ff;color:#4f46e5}
.v-violet{color:#7c3aed}
.v-emerald{color:#059669}
.v-cyan{color:#0891b2}
.v-red{color:#dc2626}
.v-pink{color:#db2777}
.v-indigo{color:#4f46e5}
.v-amber{color:#d97706}
.v-orange{color:#ea580c}
.v-blue{color:#2563eb}
.v-green{color:#16a34a}
.v-rose{color:#e11d48}
.v-white{color:#454546}
.fill-emerald{background:#059669}
.fill-blue{background:#2563eb}
.fill-green{background:#16a34a}
.fill-pink{background:#db2777}
.fill-amber{background:#d97706}
.fill-violet{background:#7c3aed}
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:1000;justify-content:center;align-items:flex-start;padding:40px 20px;overflow-y:auto}
.modal-overlay.open{display:flex}
.modal-content{background:#fff;border-radius:12px;padding:28px;width:100%;max-width:900px;max-height:85vh;overflow-y:auto;position:relative;box-shadow:0 20px 60px rgba(0,0,0,0.15)}
.modal-close{position:absolute;top:12px;right:16px;background:none;border:none;color:#6b7280;font-size:22px;cursor:pointer;width:32px;height:32px;border-radius:50%;display:grid;place-items:center}
.modal-close:hover{background:#f3f4f6}
.modal-title{font-size:18px;font-weight:700;margin-bottom:20px;color:#454546}
.available-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.available-widget{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:14px 12px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.available-widget:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1);border-color:#2a2aa9}
.available-widget .aw-icon{width:40px;height:40px;border-radius:8px;display:grid;place-items:center;background:#e8f0fe}
.available-widget .aw-icon svg{width:20px;height:20px;color:#2a2aa9}
.available-widget .aw-name{font-size:13px;font-weight:500;color:#454546}
.available-section{margin-bottom:20px}
.available-section-title{font-size:10px;letter-spacing:.1em;color:#9ca3af;font-weight:600;text-transform:uppercase;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #e5e7eb}
.detail-body{line-height:1.6;font-size:14px;color:#454546}
.detail-body p{margin-bottom:10px}
.detail-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;margin:16px 0}
.detail-stat{background:#f9fafb;border:1px solid #e5e7eb;border-radius:8px;padding:12px;text-align:center}
.detail-stat .ds-value{font-size:22px;font-weight:700;color:#2a2aa9}
.detail-stat .ds-label{font-size:10px;color:#6b7280;text-transform:uppercase;letter-spacing:.06em;margin-top:4px}
.detail-body .detail-bar{height:8px;background:#e5e7eb;border-radius:4px;overflow:hidden;margin:12px 0}
.detail-body .detail-bar .fill{height:100%;border-radius:4px}
.hidden{display:none!important}
a{color:inherit;text-decoration:none}
.grid{display:grid;grid-template-columns:repeat(8,1fr);gap:10px}

.card.dragging{opacity:.25;transform:scale(.98)}
#chat-response .clink{color:#2a2aa9;text-decoration:underline}#chat-response .cimg{max-width:100%;max-height:200px;border-radius:6px;margin:6px 0}
.cadd{cursor:pointer;background:#2a2aa9;color:#fff;border:none;padding:3px 10px;border-radius:5px;font-size:11px;font-weight:600;margin:2px;white-space:nowrap}
.chat-init-card{display:flex;gap:10px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:10px;margin:8px 0;box-shadow:0 1px 3px rgba(0,0,0,0.06);align-items:stretch}
.chat-init-card-img{flex-shrink:0;width:80px;border-radius:6px;overflow:hidden;background:#f3f4f6}
.chat-init-card-img img{width:100%;height:100%;object-fit:cover;display:block}
.chat-init-card-body{flex:1;display:flex;flex-direction:column;justify-content:center;gap:6px;min-width:0}
.chat-init-card-link{font-size:13px;font-weight:600;color:#2a2aa9;text-decoration:none;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.chat-init-card-link:hover{text-decoration:underline}
.chat-init-card-name{font-size:13px;font-weight:600;color:#454546;line-height:1.3}
.chat-init-card-body .cadd{align-self:flex-start}
.link-indicator{display:none!important}.card:hover .link-indicator{display:grid!important}
@keyframes slideIn{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:translateX(0)}}
.section-empty{font-size:14px!important;font-weight:500!important;color:#6b7280!important;min-height:120px}
/* === CCTV Camera Grid === */
.cctv-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:4px}
.cctv-cell{background:#0a0a14;border:1px solid #1e293b;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;transition:border-color .2s}
.cctv-cell:hover{border-color:#3b82f6;box-shadow:0 0 12px rgba(59,130,246,0.15)}
.cctv-header{display:flex;align-items:center;gap:6px;padding:5px 8px;background:#0f172a;border-bottom:1px solid #1e293b;font-size:10px;color:#94a3b8;font-family:'JetBrains Mono',monospace}
.cctv-dot{width:6px;height:6px;border-radius:50%;background:#22c55e;flex-shrink:0;animation:cctv-blink 1.5s infinite}
@keyframes cctv-blink{50%{opacity:.3}}
.cctv-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cctv-ts{color:#22c55e;font-weight:600;font-size:9px;letter-spacing:.05em}
.cctv-frame{aspect-ratio:16/9;background:#000;position:relative}
.cctv-frame iframe{width:100%;height:100%;display:block}
.cctv-player{width:100%;height:100%;min-height:100px}
.cctv-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0a0a14 0%,#1a1a2e 50%,#0a0a14 100%);position:relative;min-height:100px}
.cctv-placeholder::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,255,0,0.03) 2px,rgba(0,255,0,0.03) 4px)}
.cctv-play-icon{font-size:28px;color:rgba(255,255,255,0.3);transition:color .2s,transform .2s;z-index:1}
.cctv-cell:hover .cctv-play-icon{color:#fff;transform:scale(1.2);text-shadow:0 0 20px rgba(255,255,255,0.5)}
.cctv-footer{display:flex;align-items:center;gap:6px;padding:4px 8px;background:#0f172a;border-top:1px solid #1e293b;font-size:9px;color:#64748b;font-family:'JetBrains Mono',monospace}
.cctv-rec{width:4px;height:4px;border-radius:50%;background:#ef4444;animation:cctv-blink 1s infinite}
@media(max-width:1200px){.cctv-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:800px){.cctv-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:500px){.cctv-grid{grid-template-columns:1fr}}
