/* ── Client Panel CSS v4 ── */

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

:root {
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "Space Mono", monospace;
  --bg-page:   #F8F9FA;
  --bg-card:   #FFFFFF;
  --bg-sidebar: #1C1C1E;
  --border:    #E5E7EB;
  --text-primary:   #111827;
  --text-secondary: #6B7280;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --accent:       #E63946;
  --accent-light: rgba(230,57,70,0.10);
  --accent-btn:   #D62839;
  --accent-hover: #B71C2C;
}

body.theme-rescuelink { --accent:#E63946; --accent-light:rgba(230,57,70,0.10); --accent-btn:#D62839; --accent-hover:#B71C2C; }
body.theme-infolink   { --accent:#1565C0; --accent-light:rgba(21,101,192,0.10); --accent-btn:#1565C0; --accent-hover:#0D47A1; }
body.theme-evaclink   { --accent:#2E7D32; --accent-light:rgba(46,125,50,0.10);  --accent-btn:#2E7D32; --accent-hover:#1B5E20; }

html, body { height: 100%; font-family: var(--font); background: var(--bg-page); color: var(--text-primary); }

/* ── Login screen ── */
.cp-login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.cp-login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}
.cp-login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.cp-login-logo-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-btn), var(--accent-hover));
  display: flex; align-items: center; justify-content: center;
}
.cp-login-logo-icon svg { width: 24px; height: 24px; }
.cp-login-logo-text { font-size: 1rem; font-weight: 700; }
.cp-login-logo-sub  { font-size: 0.75rem; color: var(--text-secondary); }
.cp-login-title { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 20px; }

.cp-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cp-form-group label,
.cp-form-row .cp-form-group label { font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); }
.cp-form-group input,
.cp-form-group select,
.cp-form-group textarea,
.cp-form-input, .cp-form-select, .cp-form-textarea {
  padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: var(--font); color: var(--text-primary);
  background: var(--bg-card); outline: none; transition: border-color 0.15s; resize: vertical;
}
.cp-form-group input:focus, .cp-form-input:focus, .cp-form-select:focus, .cp-form-textarea:focus { border-color: var(--accent); }
.cp-form-row { display: flex; gap: 12px; }
.cp-form-row .cp-form-group { flex: 1; }
.cp-form-group--type { max-width: 220px; }

.cp-login-error {
  padding: 10px 12px; background: #FEF2F2; border: 1px solid #FECACA;
  border-radius: var(--radius-sm); color: #B91C1C; font-size: 0.8125rem; margin-bottom: 14px;
}
.cp-btn-login {
  width: 100%; padding: 12px; background: var(--accent-btn); color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: 0.9375rem; font-weight: 600;
  font-family: var(--font); cursor: pointer; transition: background 0.15s;
}
.cp-btn-login:hover { background: var(--accent-hover); }
.cp-btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── App layout ── */
.cp-app { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ── */
.cp-sidebar {
  width: 240px; flex-shrink: 0; background: var(--bg-sidebar);
  display: flex; flex-direction: column; overflow-y: auto; z-index: 100;
  transition: transform 0.25s ease;
}
.cp-sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 16px 16px; }
.cp-sidebar-logo-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-btn), var(--accent-hover));
  display: flex; align-items: center; justify-content: center;
}
.cp-sidebar-logo-icon svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cp-sidebar-logo-text { font-size: 0.875rem; font-weight: 700; color: #fff; line-height: 1.2; }
.cp-sidebar-logo-sub  { font-size: 0.7rem; color: rgba(255,255,255,0.45); }
.cp-sidebar-divider   { height: 1px; background: rgba(255,255,255,0.08); margin: 8px 0; }

.cp-module-switcher { padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; }
.cp-module-btn {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px;
  border-radius: var(--radius-sm); border: none; background: transparent;
  color: rgba(255,255,255,0.55); font-family: var(--font); font-size: 0.8125rem;
  font-weight: 500; cursor: pointer; transition: all 0.15s; width: 100%; text-align: left;
}
.cp-module-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.cp-module-btn:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.8); }
.cp-module-btn.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }

.cp-nav { padding: 6px 10px; flex: 1; }
.cp-nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px;
  border: none; border-radius: var(--radius-sm); background: transparent;
  color: rgba(255,255,255,0.55); font-family: var(--font); font-size: 0.875rem;
  font-weight: 500; cursor: pointer; transition: all 0.15s; text-align: left;
}
.cp-nav-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.cp-nav-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.8); }
.cp-nav-item.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.cp-nav-item span { flex: 1; }
.cp-nav-count {
  background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px; min-width: 20px; text-align: center;
}

.cp-sidebar-footer { padding: 12px 10px 16px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: auto; }
.cp-sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: var(--radius-sm); }
.cp-user-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-family: var(--mono);
}
.cp-user-info { flex: 1; min-width: 0; }
.cp-user-email { font-size: 0.75rem; color: rgba(255,255,255,0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-user-role  { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-top: 1px; }
.cp-user-logout {
  width: 28px; height: 28px; border: none; background: transparent;
  color: rgba(255,255,255,0.4); cursor: pointer; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s;
}
.cp-user-logout:hover { background: rgba(255,255,255,0.08); color: #fff; }
.cp-user-logout svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Main ── */
.cp-main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
.cp-topbar {
  display: flex; align-items: center; gap: 16px; padding: 16px 24px;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.cp-hamburger {
  display: none; width: 36px; height: 36px; border: none; background: transparent;
  cursor: pointer; border-radius: var(--radius-sm); align-items: center;
  justify-content: center; color: var(--text-secondary); flex-shrink: 0;
}
.cp-hamburger svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cp-topbar-title { font-size: 1rem; font-weight: 700; white-space: nowrap; }
.cp-topbar-search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg-page); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 12px; max-width: 380px; margin-left: auto;
}
.cp-topbar-search svg { width: 15px; height: 15px; fill: none; stroke: var(--text-secondary); stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.cp-topbar-search input { flex: 1; border: none; background: transparent; font-size: 0.875rem; color: var(--text-primary); padding: 9px 0; outline: none; }
.cp-content { padding: 24px; }

/* ── Object grid ── */
.cp-objects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.cp-object-card {
  background: var(--bg-card); border-radius: var(--radius-md);
  border: 1.5px solid var(--border); padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm); transition: border-color 0.15s, box-shadow 0.15s;
}
.cp-object-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.cp-card-top { display: flex; align-items: flex-start; gap: 12px; }
.cp-card-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent-light);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cp-card-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cp-card-info { flex: 1; min-width: 0; }
.cp-card-name    { font-size: 0.9375rem; font-weight: 700; line-height: 1.3; }
.cp-card-address { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 2px; }
.cp-card-nip { font-size: 0.75rem; color: var(--text-secondary); margin-top: 3px; font-family: var(--mono); }

.cp-card-live-badge,
.cp-live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; font-weight: 700; padding: 3px 9px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: 0.04em;
}
.cp-live-badge--danger  { background: #FEF2F2; color: #DC2626; }
.cp-live-badge--warning { background: #FFFBEB; color: #D97706; }
.cp-live-badge--info    { background: #EFF6FF; color: #2563EB; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.cp-card-actions { display: flex; gap: 8px; }
.cp-card-btn {
  flex: 1; padding: 9px 10px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary);
  font-family: var(--font); font-size: 0.8125rem; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.cp-card-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.cp-card-btn:hover { border-color: var(--accent); color: var(--accent); }
.cp-card-btn--live { background: #FEF3C7; border-color: #FDE68A; color: #92400E; }
.cp-card-btn--live:hover { background: #FDE68A; border-color: #F59E0B; color: #78350F; }
.cp-card-btn--preview { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
.cp-card-btn--preview:hover { background: #DBEAFE; border-color: #93C5FD; color: #1E3A8A; }

.cp-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; text-align: center; }
.cp-empty-state svg { width: 48px; height: 48px; stroke: var(--text-secondary); fill: none; stroke-width: 1.5; margin-bottom: 16px; }
.cp-empty-state h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.cp-empty-state p  { font-size: 0.875rem; color: var(--text-secondary); max-width: 320px; }
.cp-loading { padding: 40px; text-align: center; color: var(--text-secondary); font-size: 0.875rem; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cp-loading-spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cp-empty-text { font-size: 0.875rem; color: var(--text-secondary); }

/* ── Edit page ── */
.cp-edit-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.cp-back-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-secondary); font-family: var(--font);
  font-size: 0.8125rem; font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.cp-back-btn:hover { border-color: var(--accent); color: var(--accent); }
.cp-back-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cp-edit-title { font-size: 1.125rem; font-weight: 700; }

.cp-section { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-md); margin-bottom: 16px; overflow: hidden; }
.cp-section-head {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px;
  font-size: 0.875rem; font-weight: 700; border-bottom: 1px solid var(--border); background: var(--bg-page);
}
.cp-section-head svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.cp-section-body { padding: 20px; }

/* Contact rows */
.cp-contact-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.cp-row-input,
.cp-contact-input {
  flex: 1; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.8125rem; font-family: var(--font); color: var(--text-primary);
  background: var(--bg-card); outline: none; transition: border-color 0.15s;
}
.cp-contact-input:focus { border-color: var(--accent); }
.cp-row-remove {
  width: 30px; height: 30px; border: none; background: #FEF2F2;
  color: #DC2626; border-radius: 6px; cursor: pointer; font-size: 0.875rem; flex-shrink: 0; transition: all 0.15s;
}
.cp-row-remove:hover { background: #FECACA; }
.cp-add-row-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  border: 1.5px dashed var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary); font-family: var(--font);
  font-size: 0.8125rem; font-weight: 500; cursor: pointer; transition: all 0.15s; margin-top: 4px;
}
.cp-add-row-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* Toggle switches */
.cp-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cp-toggle-row:last-child { border-bottom: none; }
.cp-toggle-label { font-size: 0.875rem; }
.cp-toggle-switch { position: relative; display: inline-flex; cursor: pointer; }
.cp-toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.cp-toggle-track { width: 40px; height: 22px; border-radius: 11px; background: var(--border); transition: background 0.2s; position: relative; }
.cp-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 0.2s; }
.cp-toggle-switch input:checked + .cp-toggle-track { background: var(--accent); }
.cp-toggle-switch input:checked + .cp-toggle-track .cp-toggle-thumb { transform: translateX(18px); }

/* Boards (InfoLink) */
.cp-board-card { background: var(--bg-page); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; }
.cp-board-card-header { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.cp-board-title-input { width: 100%; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; font-family: var(--font); color: var(--text-primary); background: var(--bg-card); outline: none; margin-bottom: 8px; transition: border-color 0.15s; }
.cp-board-title-input:focus { border-color: var(--accent); }
.cp-board-text-area { width: 100%; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; font-family: var(--font); color: var(--text-primary); background: var(--bg-card); outline: none; resize: vertical; min-height: 80px; transition: border-color 0.15s; }
.cp-board-text-area:focus { border-color: var(--accent); }

/* Floor rows (EvacLink) */
.cp-floor-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-page); border: 1.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.cp-floor-info { flex: 1; display: flex; align-items: center; gap: 10px; }
.cp-floor-name { font-size: 0.8125rem; font-weight: 600; }
.cp-floor-label { font-size: 0.8125rem; font-weight: 600; min-width: 90px; }
.cp-floor-status { font-size: 0.75rem; color: var(--text-secondary); }
.cp-floor-status--ok { color: #16a34a; }
.cp-floor-status--missing { color: #D97706; }
.cp-floor-file-input { display: none; }
.cp-floor-upload { cursor: pointer; }
.cp-floor-upload-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-secondary); font-family: var(--font); font-size: 0.75rem; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.cp-floor-upload:hover .cp-floor-upload-btn { border-color: var(--accent); color: var(--accent); }
.cp-floor-upload-btn svg { flex-shrink: 0; }

/* Edit footer */
.cp-edit-footer { margin-top: 8px; padding-top: 8px; }

/* Save button */
.cp-save-btn { width: 100%; padding: 13px; background: var(--accent-btn); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 0.9375rem; font-weight: 600; font-family: var(--font); cursor: pointer; transition: background 0.15s; }
.cp-save-btn:hover { background: var(--accent-hover); }
.cp-save-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Modal ── */
.cp-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.cp-modal-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 28px; max-width: 520px; width: 100%; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.cp-modal-header { margin-bottom: 20px; }
.cp-modal-title  { font-size: 1.0625rem; font-weight: 700; }
.cp-modal-subtitle { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 4px; }
.cp-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.cp-btn-primary { padding: 10px 20px; background: var(--accent-btn); color: #fff; border: none; border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.cp-btn-primary:hover { background: var(--accent-hover); }
.cp-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.cp-btn-secondary { padding: 10px 20px; background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.cp-btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.cp-checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.875rem; }
.cp-checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ── Toast ── */
.cp-toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 20px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; color: #fff; box-shadow: var(--shadow-md); z-index: 2000; animation: toast-in 0.25s ease; }
@keyframes toast-in { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.cp-toast--success { background: #16a34a; }
.cp-toast--error   { background: #DC2626; }

/* ── Suspended screen ── */
.cp-suspended-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px; background: #F8F9FA;
}
.cp-suspended-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 48px 36px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-md); text-align: center;
}
.cp-suspended-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: #FEF2F2; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.cp-suspended-icon svg { width: 36px; height: 36px; stroke: #DC2626; }
.cp-suspended-title {
  font-size: 1.25rem; font-weight: 700; color: #DC2626; margin-bottom: 12px;
}
.cp-suspended-text {
  font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 24px;
}
.cp-suspended-contact {
  background: var(--bg-page); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 24px;
}
.cp-suspended-contact-row {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  font-size: 0.875rem; color: var(--text-primary); font-weight: 500;
}
.cp-suspended-contact-row svg { flex-shrink: 0; stroke: var(--text-secondary); }
.cp-suspended-logout { max-width: 240px; margin: 0 auto; }

/* ── Grace period banner ── */
.cp-grace-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; background: #FFFBEB; border-bottom: 1px solid #FDE68A;
  color: #92400E; font-size: 0.875rem; line-height: 1.5;
}
.cp-grace-banner svg { flex-shrink: 0; stroke: #D97706; }
.cp-grace-banner strong { font-weight: 700; }

/* ── InfoLink board editor (Quill) ── */
.cp-board-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg);
  transition: box-shadow 0.15s;
}
.cp-board-card:hover { box-shadow: var(--shadow-sm); }

.cp-board-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--sidebar-bg);
  border-bottom: 1.5px solid var(--border);
}
.cp-board-title-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  outline: none;
  padding: 2px 0;
}
.cp-board-title-input::placeholder { color: var(--text-secondary); font-weight: 400; }

.cp-board-delete {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.cp-board-delete:hover { background: #fee2e2; color: #dc2626; }

.cp-board-quill-wrap { background: #fff; }

/* Override Quill's default styles to fit the panel */
.cp-board-quill-wrap .ql-toolbar {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 6px 10px;
  font-family: var(--font);
}
.cp-board-quill-wrap .ql-container {
  border: none;
  font-family: var(--font);
  font-size: 0.9375rem;
}
.cp-board-quill-wrap .ql-editor {
  min-height: 220px;
  padding: 14px 16px;
  line-height: 1.65;
  color: var(--text);
}
.cp-board-quill-wrap .ql-editor.ql-blank::before {
  color: var(--text-secondary);
  font-style: normal;
}
.cp-board-quill-wrap .ql-editor p,
.cp-board-quill-wrap .ql-editor li { margin-bottom: 4px; }

/* ── Mobile ── */
.cp-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; }

@media (max-width: 768px) {
  .cp-hamburger { display: flex; }
  .cp-sidebar { position: fixed; top: 0; left: 0; height: 100%; transform: translateX(-100%); width: 260px; }
  .cp-sidebar.open { transform: translateX(0); }
  .cp-sidebar-overlay.active { display: block; }
  .cp-topbar { padding: 12px 16px; }
  .cp-content { padding: 16px; }
  .cp-topbar-search { display: none; }
}

/* ── InfoLink + EvacLink: mobile-responsive forms ── */
@media (max-width: 640px) {
  /* Section body: less padding on small screens */
  .module-infolink .cp-section-body,
  .module-evaclink .cp-section-body { padding: 14px; }

  /* Contact rows: stacked card layout with ✕ in top-right corner */
  .module-infolink .cp-contact-row,
  .module-evaclink .cp-contact-row {
    flex-direction: column;
    gap: 6px;
    padding: 10px 10px 10px 10px;
    background: var(--bg-page);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    position: relative;
  }
  .module-infolink .cp-contact-row .cp-row-input,
  .module-evaclink .cp-contact-row .cp-row-input { width: 100%; flex: none; }
  .module-infolink .cp-contact-row .cp-row-remove,
  .module-evaclink .cp-contact-row .cp-row-remove {
    position: absolute;
    top: 8px;
    right: 8px;
  }

  /* Edit page header: title wraps below back button */
  .module-infolink .cp-edit-header,
  .module-evaclink .cp-edit-header { flex-wrap: wrap; gap: 8px 12px; margin-bottom: 16px; }
  .module-infolink .cp-edit-title,
  .module-evaclink .cp-edit-title { font-size: 0.9375rem; flex: 1 1 100%; line-height: 1.4; }

  /* Object card: smaller icon + actions stack */
  .module-infolink .cp-card-icon,
  .module-evaclink .cp-card-icon { width: 28px; height: 28px; border-radius: 7px; }
  .module-infolink .cp-card-icon svg,
  .module-evaclink .cp-card-icon svg { width: 14px; height: 14px; }
  .module-infolink .cp-card-actions,
  .module-evaclink .cp-card-actions { flex-direction: column; }
  .module-infolink .cp-card-btn svg,
  .module-evaclink .cp-card-btn svg { width: 14px; height: 14px; }

  /* Section head icons: slightly smaller */
  .module-infolink .cp-section-head svg,
  .module-evaclink .cp-section-head svg { width: 14px; height: 14px; }

  /* Board editor: smaller min-height on phone */
  .module-infolink .cp-board-quill-wrap .ql-editor { min-height: 150px; }

  /* EvacLink floor rows: stack vertically */
  .module-evaclink .cp-floor-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
  }
  .module-evaclink .cp-floor-info { flex-direction: column; align-items: flex-start; gap: 3px; }
  .module-evaclink .cp-floor-upload { display: block; }
  .module-evaclink .cp-floor-upload-btn {
    width: 100%;
    justify-content: center;
    padding: 11px 14px;
    font-size: 0.875rem;
  }

  /* Live Message modal: responsive layout */
  .cp-modal-overlay { padding: 12px; }
  .cp-modal-card { padding: 20px; max-width: 100%; }
  .cp-form-row--lm { flex-direction: column; gap: 0; }
  .cp-form-group--type { max-width: none !important; }
  .cp-modal-actions { flex-direction: column; }
  .cp-modal-actions .cp-btn-primary,
  .cp-modal-actions .cp-btn-secondary { width: 100%; text-align: center; }

  /* Toast: full-width centered at bottom */
  .cp-toast { right: 16px; left: 16px; bottom: 16px; text-align: center; }
}

/* ── Forgot password link ── */
.cp-login-forgot { text-align: center; margin-top: 14px; }
.cp-link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text-secondary); font-family: var(--font); font-size: 0.8125rem;
  text-decoration: underline; text-underline-offset: 2px; transition: color 0.15s;
}
.cp-link-btn:hover { color: var(--accent); }

/* ── Password reset message ── */
.cp-reset-msg {
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.8125rem;
  margin-bottom: 14px; line-height: 1.5;
}
.cp-reset-msg--success { background: #F0FDF4; border: 1px solid #86EFAC; color: #166534; }
.cp-reset-msg--error   { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; }

/* ── Profile completeness bar ── */
.cp-completeness { margin: 6px 0 2px; }
.cp-completeness-bar {
  height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; margin-bottom: 4px;
}
.cp-completeness-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.cp-completeness-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.01em; }

/* ── NFC scan count badge ── */
.cp-card-scans {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px;
}
.cp-card-scans svg { flex-shrink: 0; stroke: var(--text-secondary); }
.cp-card-scans strong { color: var(--text-primary); font-weight: 700; }

/* ── Bulk Live Bar ── */
.cp-bulk-bar { margin-bottom: 16px; }
.cp-bulk-live-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: 2px dashed #F59E0B; border-radius: var(--radius-sm);
  background: #FFFBEB; color: #92400E; font-family: var(--font);
  font-size: 0.8125rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.cp-bulk-live-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
.cp-bulk-live-btn:hover { background: #FDE68A; border-color: #D97706; }

/* ── Onboarding modal ── */
.cp-onboarding-card { text-align: center; max-width: 460px; }
.cp-onboarding-icon { font-size: 2.5rem; margin-bottom: 12px; }
.cp-onboarding-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.cp-onboarding-desc { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 20px; }
.cp-onboarding-list {
  list-style: none; text-align: left; display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px;
}
.cp-onboarding-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.875rem; line-height: 1.5; }
.cp-ob-icon { font-size: 1.1rem; flex-shrink: 0; width: 24px; text-align: center; padding-top: 1px; }
.cp-onboarding-btn { width: 100%; padding: 13px; font-size: 0.9375rem; }

/* ── Mobile additions for new elements ── */
@media (max-width: 640px) {
  .cp-bulk-live-btn { width: 100%; justify-content: center; }
  .cp-completeness-label { font-size: 0.6875rem; }
}

