/* ═════════════════════════════════════════════════════════════════
   Friday Wrap nudge banner + modal
   Added 2026-04-24 per FRIDAY_WRAP_SPEC_v1.md §8
   ═════════════════════════════════════════════════════════════════ */

.fw-nudge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  margin: 0 0 24px 0;
  background: linear-gradient(90deg, rgba(17,166,246,0.18), rgba(17,166,246,0.08));
  border: 1px solid rgba(17,166,246,0.45);
  border-radius: 8px;
  color: #E2E8F0;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(17,166,246,0.12);
}
.fw-nudge-icon { font-size: 20px; flex-shrink: 0; }
.fw-nudge-text { flex: 1; font-weight: 500; }
.fw-nudge-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.fw-nudge .btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
}
.fw-nudge .btn-ghost {
  background: transparent;
  color: #94A3B8;
  border: 1px solid rgba(148,163,184,0.3);
}
.fw-nudge .btn-ghost:hover {
  color: #E2E8F0;
  border-color: rgba(148,163,184,0.6);
}

.fw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  backdrop-filter: blur(2px);
}
.fw-modal {
  background: #111118;
  border: 1px solid #2A3441;
  border-radius: 10px;
  max-width: 720px;
  width: 100%;
  color: #E2E8F0;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6);
  margin: auto 0;
}
.fw-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #1E293B;
}
.fw-modal-eyebrow {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 11px;
  color: #11A6F6;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}
.fw-modal-sub {
  font-size: 13px;
  color: #94A3B8;
}
.fw-modal-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.fw-modal-close:hover { color: #E2E8F0; }
.fw-modal-body {
  padding: 20px 24px;
  line-height: 1.55;
  font-size: 14px;
}
.fw-modal-body h2 {
  color: #11A6F6;
  font-size: 15px;
  font-weight: 700;
  margin: 24px 0 8px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #1E293B;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.fw-modal-body h2:first-child { margin-top: 0; }
.fw-modal-body p { margin: 8px 0; }
.fw-modal-body ul, .fw-modal-body ol { margin: 8px 0; padding-left: 24px; }
.fw-modal-body li { margin: 4px 0; }
.fw-modal-body strong { color: #FFFFFF; }
.fw-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid #1E293B;
  font-size: 12px;
}
.fw-modal-footer .muted { color: #64748B; }

@media (max-width: 640px) {
  .fw-nudge {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .fw-nudge-actions { justify-content: flex-start; }
}

/* ─────────────────────────────────────────────────────────────────
   SquareKeeper Customer Dashboard — shared styles
   Chrome accent: sky blue (#11A6F6) — adopted 2026-04-21 (was emerald #10B981).
   Distinct from admin (amber) and from per-module colors (parking red,
   employee violet, maintenance blue, etc.).
   ───────────────────────────────────────────────────────────────── */

:root {
  --bg:          #0A0A0F;
  --bg-card:    #111118;
  --bg-hover:   #161622;
  --border:     #1E293B;
  --border-strong: #2A3441;
  --text:       #E2E8F0;
  --text-dim:   #94A3B8;
  --text-muted: #64748B;
  --accent:     #11A6F6;
  --accent-dim: #0980BF;
  --accent-soft: rgba(17, 166, 246, 0.15);
  --danger:     #EF4444;
  --warn:       #F59E0B;
  --success:    #10B981;     /* stays emerald — semantic green for success */
  --info:       #3B82F6;

  /* Module brand colors (for module cards on the module grid).
     Tenant stays emerald (formerly shared brand hue, now a distinct module accent). */
  --mod-parking:     #DC2626;
  --mod-maintenance: #3B82F6;
  --mod-employee:    #7C3AED;
  --mod-security:    #F97316;
  --mod-tenant:      #10B981;
  --mod-vendor:      #0891B2;
  --mod-operations:  #4338CA;    /* Wave 4 — indigo */
  --mod-marketing:   #DB2777;    /* Wave 5 — pink */
}

[data-theme="light"] {
  --bg:          #F8FAFC;
  --bg-card:    #FFFFFF;
  --bg-hover:   #F1F5F9;
  --border:     #E2E8F0;
  --border-strong: #CBD5E1;
  --text:       #0F172A;
  --text-dim:   #475569;
  --text-muted: #64748B;
  --accent:     #0980BF;       /* deeper sky for text-on-white contrast */
  --accent-dim: #075985;
  --accent-soft: rgba(17, 166, 246, 0.10);
}

/* Legacy class fallback — some older code paths set body.light-theme.
   Same overrides; keep until a future cleanup pass. */
body.light-theme {
  --bg:          #F8FAFC;
  --bg-card:    #FFFFFF;
  --bg-hover:   #F1F5F9;
  --border:     #E2E8F0;
  --border-strong: #CBD5E1;
  --text:       #0F172A;
  --text-dim:   #475569;
  --text-muted: #64748B;
  --accent:     #0980BF;
  --accent-dim: #075985;
  --accent-soft: rgba(17, 166, 246, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0 0 12px; font-weight: 600; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; color: var(--text-dim); }
p { margin: 0 0 12px; color: var(--text-dim); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: 'Consolas', 'Monaco', monospace;
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ─── App layout ─────────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.sidebar-header img {
  width: 32px;
  height: 32px;
  vertical-align: middle;
}

.sidebar-header .brand-name {
  font-weight: 600;
  font-size: 15px;
  margin-left: 8px;
  vertical-align: middle;
}

.sidebar-header .org-name {
  display: block;
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  margin-left: 40px;
}

.sidebar-nav {
  flex: 1;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 20px;
}

.sidebar-label {
  padding: 8px 20px 4px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.nav-item {
  display: block;
  padding: 10px 20px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}

.nav-item.active {
  background: var(--bg-hover);
  color: var(--accent);
  border-left-color: var(--accent);
}

.nav-item.module-link {
  font-size: 13px;
}

.nav-item.module-link .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-footer .user-email {
  display: block;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-size: 13px;
  word-break: break-all;
}

.sidebar-footer .version-tag {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Consolas', 'Monaco', monospace;
}

.main-content {
  padding: 32px 40px;
  overflow-y: auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 { margin: 0; }

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb a { color: var(--text-muted); }

/* ─── Cards / panels ─────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-header h2 { margin: 0; font-size: 16px; }

/* ─── Module grid (the centerpiece of the dashboard) ────────── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.module-card.active {
  border-color: var(--border-strong);
}

.module-card.active:hover {
  border-color: var(--module-color, var(--accent));
  transform: translateY(-2px);
}

.module-card.inactive {
  border-style: dashed;
  opacity: 0.7;
}

.module-card.inactive:hover {
  opacity: 1;
  border-style: solid;
  border-color: var(--module-color, var(--accent));
}

.module-card .mod-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.module-card .mod-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--module-color, var(--accent));
}

.module-card .mod-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.module-card .mod-status {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.module-card.active .mod-status {
  background: var(--accent-soft);
  color: var(--accent);
}

.module-card.inactive .mod-status {
  background: var(--bg-hover);
  color: var(--text-muted);
}

.module-card .mod-description {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 16px;
}

.module-card .mod-action {
  margin-top: auto;
}

.module-card .mod-price {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.module-card .mod-price strong {
  color: var(--text-dim);
  font-size: 14px;
}

/* Suite CTA banner */
.suite-banner {
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.suite-banner .pitch strong {
  color: var(--accent);
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.suite-banner .pitch {
  font-size: 13px;
  color: var(--text-dim);
}

/* ─── Tables ─────────────────────────────────────────────────── */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data-table th,
table.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg);
}

table.data-table tbody tr:last-child td { border-bottom: none; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge.active   { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge.trialing { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.badge.past-due { background: rgba(245, 158, 11, 0.15); color: var(--warn); }
.badge.suspended{ background: rgba(239, 68, 68, 0.15);  color: var(--danger); }
.badge.canceled { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }
.badge.free     { background: rgba(245, 158, 11, 0.15); color: var(--warn); }

.badge.tier-1 { background: rgba(245, 158, 11, 0.15); color: var(--warn); }
.badge.tier-2 { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.badge.tier-3 { background: rgba(100, 116, 139, 0.15); color: var(--text-dim); }
.badge.tier-4 { background: rgba(16, 185, 129, 0.15); color: var(--success); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  text-decoration: none;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #001423;
}

.btn.primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #FFF;
}

.btn.danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn.danger:hover {
  background: var(--danger);
  color: #FFF;
}

.btn.small {
  padding: 5px 12px;
  font-size: 12px;
}

.btn.full {
  width: 100%;
  justify-content: center;
  text-align: center;
}

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

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ─── Empty states ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text-dim);
  margin-bottom: 8px;
}

/* ─── Login screen ───────────────────────────────────────────── */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 40px 32px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}

.login-card .login-logo {
  margin-bottom: 24px;
}

.login-card .login-logo img {
  width: 56px;
  height: 56px;
}

.login-card h2 {
  font-size: 24px;
  margin: 8px 0 4px;
  color: var(--text);
}

.login-card .subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.login-card .form-group { text-align: left; }

.login-card .btn {
  width: 100%;
  margin-top: 8px;
}

.login-card .login-error {
  display: none;
  margin-top: 12px;
  padding: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: var(--danger);
  font-size: 13px;
}

.login-card .version {
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── Loading ────────────────────────────────────────────────── */
.loading {
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
}

/* ─── Access denied page ─────────────────────────────────────── */
.access-denied {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.access-denied h1 {
  color: var(--text-dim);
  margin-bottom: 8px;
}

/* ─── Utility ────────────────────────────────────────────────── */
.row { display: flex; gap: 12px; align-items: center; }
.row.space { justify-content: space-between; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.hide { display: none; }
.muted { color: var(--text-muted); font-size: 13px; }
.mono { font-family: 'Consolas', 'Monaco', monospace; font-size: 13px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.grid-2 .col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.grid-2 .col > .card { margin-bottom: 0; }
.grid-2 .col > .card:last-child { flex: 1; }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 20px; }
  .module-grid { grid-template-columns: 1fr; }
  .suite-banner { flex-direction: column; align-items: flex-start; }
}
