
:root {
  --bg: #eef6ff;
  --card: #ffffff;
  --text: #0b1b34;
  --muted: #64748b;
  --blue: #2563eb;
  --blue2: #0f55e8;
  --green: #16a34a;
  --orange: #ea580c;
  --red: #dc2626;
  --line: rgba(15, 35, 70, .10);
  --shadow: 0 18px 50px rgba(8,24,54,.10);
  --radius: 22px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(37,99,235,.12), transparent 30%),
              radial-gradient(circle at top right, rgba(20,184,166,.12), transparent 30%),
              linear-gradient(135deg, #f8fbff, var(--bg));
  color: var(--text);
}
.hidden { display: none !important; }
.login-screen { min-height: 100vh; padding: 36px; }
.login-shell {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: stretch;
}
.login-hero, .login-card, .login-info-grid > div, .panel, .form-card, .notice-card, .request-card, .service-card, .stat-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.login-hero {
  padding: 44px;
  min-height: 520px;
  background:
    linear-gradient(135deg, rgba(8,24,54,.82), rgba(37,99,235,.48)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800'%3E%3Crect width='1200' height='800' fill='%23dff0ff'/%3E%3Cpath d='M0 570 C200 500 360 590 560 540 C780 485 970 550 1200 510 L1200 800 L0 800 Z' fill='%2365a565'/%3E%3Crect x='680' y='300' width='300' height='190' rx='10' fill='%23fff'/%3E%3Cpath d='M650 305 L830 195 L1010 305 Z' fill='%234a5b73'/%3E%3Crect x='210' y='450' width='440' height='120' rx='16' fill='%230f223d'/%3E%3Ctext x='430' y='525' text-anchor='middle' font-family='Georgia' font-size='52' fill='%23e7d5a8'%3ESERVICE%3C/text%3E%3C/svg%3E") center/cover;
  color: white;
}
.login-hero h1 { font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: .95; letter-spacing: -.06em; margin: 18px 0; max-width: 780px; }
.login-hero p { color: rgba(255,255,255,.86); font-size: 1.08rem; max-width: 680px; }
.hero-badge { display: inline-flex; padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.14); font-weight: 800; }
.hero-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 38px; }
.hero-cards div { padding: 16px; background: rgba(255,255,255,.14); border-radius: 18px; }
.hero-cards strong, .hero-cards span { display: block; }
.hero-cards span { color: rgba(255,255,255,.75); margin-top: 4px; }
.login-card { padding: 30px; align-self: center; }
.login-card h2 { margin-top: 0; font-size: 2rem; letter-spacing: -.04em; }
label { display:block; font-weight: 800; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(37,99,235,.55); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
button {
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: white;
  font-weight: 900;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font: inherit;
}
button.secondary { background: #e8eef8; color: var(--text); }
button.danger { background: linear-gradient(135deg, #ef4444, #b91c1c); }
button.small { padding: 8px 10px; font-size: .88rem; }
button:hover { transform: translateY(-1px); }
.muted { color: var(--muted); }
.message { font-weight: 800; min-height: 22px; }
.message.error { color: var(--red); }
.sample-logins { margin-top: 22px; display: grid; gap: 8px; }
.sample-logins code { background: #f1f5f9; padding: 8px; border-radius: 10px; font-size: .85rem; }
.login-info-grid {
  max-width: 1180px;
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.login-info-grid > div { padding: 18px; }
.login-info-grid h3 { margin-top: 0; }
.app-shell { padding: 24px; max-width: 1280px; margin: 0 auto; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 22px;
  background: rgba(255,255,255,.92);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.75);
}
.topbar h1 { margin: 0; letter-spacing: -.04em; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-weight: 700; }
.top-actions { display: flex; gap: 10px; }
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
  padding: 10px;
  background: rgba(255,255,255,.88);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.tabs button { background: transparent; color: #40516a; box-shadow: none; }
.tabs button.active { background: linear-gradient(135deg, var(--blue), var(--blue2)); color: #fff; }
.page { display: none; }
.page.active { display: block; }
.page-head { margin: 26px 0 16px; }
.page-head h2 { margin: 0; font-size: 2rem; letter-spacing: -.04em; }
.stat-grid, .service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card { padding: 20px; }
.stat-card span { font-size: 2.4rem; font-weight: 950; color: var(--blue); }
.stat-card p { margin: 4px 0 0; color: var(--muted); font-weight: 800; }
.panel, .form-card { padding: 22px; margin-top: 16px; }
.workflow { display: flex; flex-wrap: wrap; gap: 10px; align-items:center; }
.workflow div { background: #f1f5f9; padding: 12px 14px; border-radius: 14px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.full { grid-column: 1 / -1; }
.card-list { display: grid; gap: 14px; }
.request-card, .service-card { padding: 18px; }
.request-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.badge { display:inline-flex; border-radius: 999px; padding: 7px 10px; font-weight: 900; font-size: .8rem; background: #e0f2fe; color: #075985; }
.badge.New { background: #e0f2fe; color: #075985; }
.badge.Scheduled { background: #dbeafe; color: #1d4ed8; }
.badge.Assigned { background: #ede9fe; color: #6d28d9; }
.badge.InProgress { background: #ffedd5; color: #c2410c; }
.badge.Completed { background: #dcfce7; color: #15803d; }
.badge.Cancelled { background: #fee2e2; color: #b91c1c; }
.request-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; color: var(--muted); margin: 12px 0; }
.admin-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.sync-status { padding: 12px 14px; border-radius: 14px; background: #ecfdf5; color: #166534; border: 1px solid #bbf7d0; font-weight: 800; margin: 10px 0; }
.sync-status.error { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
footer { margin: 24px 0 0; color: var(--muted); text-align: center; padding: 18px; }
@media (max-width: 900px) {
  .login-screen, .app-shell { padding: 16px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { min-height: 420px; padding: 28px; }
  .hero-cards, .login-info-grid, .stat-grid, .service-grid, .form-grid, .admin-controls { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tabs button { white-space: nowrap; }
  .request-meta { grid-template-columns: 1fr; }
}



/* V2.1 Clean Login Page Fix
   Simplifies the left login hero and removes sample email info.
   Rest of the app is unchanged. */

.login-hero.simple-login-hero {
  min-height: 520px;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 48px !important;
  background:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,0.22), transparent 22%),
    linear-gradient(135deg, #12325f 0%, #2563eb 58%, #14b8a6 100%) !important;
  color: #ffffff !important;
  overflow: hidden;
  position: relative;
}

.login-hero.simple-login-hero::before {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.login-hero.simple-login-hero::after {
  content: "";
  position: absolute;
  right: 70px;
  top: 80px;
  width: 170px;
  height: 170px;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  transform: rotate(12deg);
}

.simple-icon {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.26);
  color: #fff;
  font-weight: 950;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.login-hero.simple-login-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.6rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.06em !important;
  max-width: 700px !important;
  margin: 0 0 20px 0 !important;
  color: #fff !important;
  position: relative;
  z-index: 1;
}

.login-hero.simple-login-hero p {
  color: rgba(255,255,255,0.88) !important;
  max-width: 560px !important;
  font-size: 1.08rem !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  position: relative;
  z-index: 1;
}

.sample-logins {
  display: none !important;
}

.login-card {
  align-self: center;
}

@media (max-width: 900px) {
  .login-hero.simple-login-hero {
    min-height: 340px;
    padding: 32px !important;
  }

  .login-hero.simple-login-hero h1 {
    font-size: 2.6rem !important;
  }
}



/* Step 1: Remove Workflow + Refresh
   Dashboard workflow panel and top-right refresh button removed.
   Rest of the app unchanged. */

#refreshBtn {
  display: none !important;
}

.workflow {
  display: none !important;
}

.workflow-hide,
.dashboard-workflow-panel {
  display: none !important;
}




/* Step 2: Professional Settings Page */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.settings-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(8,24,54,.10);
  padding: 22px;
}

.settings-card h3 {
  margin: 0 0 14px;
  letter-spacing: -.03em;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(15,35,70,.08);
}

.settings-row:first-of-type {
  border-top: 0;
}

.settings-row strong {
  display: block;
  margin-bottom: 4px;
}

.settings-row p {
  margin: 0;
}

.settings-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 900;
  font-size: .82rem;
}

.settings-dot {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7);
  flex: 0 0 auto;
}

.settings-wide {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-row {
    align-items: flex-start;
    flex-direction: column;
  }
}




/* Step 3: Legal Page */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.legal-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(8,24,54,.10);
  padding: 22px;
}

.legal-card h3 {
  margin: 0 0 10px;
  letter-spacing: -.03em;
}

.legal-card p {
  margin: 10px 0 0;
  color: #64748b;
  line-height: 1.6;
}

.legal-wide {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .legal-grid {
    grid-template-columns: 1fr;
  }
}




/* Step A: Legal page fix */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.legal-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(8,24,54,.10);
  padding: 22px;
}

.legal-card h3 {
  margin: 0 0 10px;
  letter-spacing: -.03em;
}

.legal-card p {
  margin: 10px 0 0;
  color: #64748b;
  line-height: 1.6;
}

.legal-wide {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .legal-grid {
    grid-template-columns: 1fr;
  }
}




/* Step B: Functional Settings + Theme */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.settings-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(8,24,54,.10);
  padding: 22px;
}

.settings-card h3 {
  margin: 0 0 14px;
  letter-spacing: -.03em;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(15,35,70,.08);
}

.settings-row:first-of-type {
  border-top: 0;
}

.settings-row strong {
  display: block;
  margin-bottom: 4px;
}

.settings-row p {
  margin: 0;
}

.settings-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 900;
  font-size: .82rem;
}

.settings-wide {
  grid-column: 1 / -1;
}

.segmented-control {
  display: inline-flex;
  padding: 5px;
  border-radius: 16px;
  background: #eef2f7;
  gap: 4px;
}

.segmented-control .settings-option {
  background: transparent;
  color: #475569;
  box-shadow: none;
  padding: 9px 14px;
  border-radius: 12px;
}

.segmented-control .settings-option.active {
  background: linear-gradient(135deg, #2563eb, #0f55e8);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37,99,235,.22);
}

.toggle-switch {
  width: 48px;
  height: 28px;
  padding: 3px;
  border-radius: 999px;
  background: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: none;
  flex: 0 0 auto;
}

.toggle-switch span {
  width: 22px;
  height: 22px;
  display: block;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15,23,42,.22);
  transition: transform .18s ease;
}

.toggle-switch.active {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.toggle-switch.active span {
  transform: translateX(20px);
}

.settings-save-message {
  margin-top: 12px;
  color: #2563eb;
  font-weight: 900;
}

/* Full dark mode for the service portal */
body.dark-mode {
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.20), transparent 30%),
    radial-gradient(circle at top right, rgba(20,184,166,.16), transparent 30%),
    linear-gradient(135deg, #06101f, #0b1729 52%, #0d1c31) !important;
  color: #f8fbff;
}

body.dark-mode .topbar,
body.dark-mode .tabs,
body.dark-mode .panel,
body.dark-mode .form-card,
body.dark-mode .request-card,
body.dark-mode .service-card,
body.dark-mode .stat-card,
body.dark-mode .settings-card,
body.dark-mode .legal-card,
body.dark-mode footer {
  background: rgba(13,25,44,.92) !important;
  color: #f8fbff !important;
  border-color: rgba(255,255,255,.10) !important;
  box-shadow: 0 16px 42px rgba(0,0,0,.26) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode strong,
body.dark-mode label {
  color: #f8fbff !important;
}

body.dark-mode p,
body.dark-mode .muted,
body.dark-mode small,
body.dark-mode .page-subtitle,
body.dark-mode .legal-card p {
  color: #aebbd0 !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: rgba(6,16,31,.90) !important;
  color: #f8fbff !important;
  border-color: rgba(255,255,255,.14) !important;
}

body.dark-mode .tabs button {
  color: #c9d6ea !important;
}

body.dark-mode .tabs button.active {
  color: #fff !important;
}

body.dark-mode .segmented-control {
  background: rgba(6,16,31,.90);
}

body.dark-mode .settings-pill {
  background: rgba(37,99,235,.18);
  color: #93c5fd;
}

@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-row {
    align-items: flex-start;
    flex-direction: column;
  }
}




/* Step C: Public footer wording */
footer {
  font-weight: 700;
  letter-spacing: -0.01em;
}




/* Step D: Clean Settings Wording */
#settings .settings-card.settings-wide {
  max-width: none;
}

#settings .settings-card p.settings-save-message {
  margin-top: 16px;
}




/* Step F: Assigned Jobs Activity Log */
.job-log-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(8,24,54,.10);
  padding: 22px;
}

.job-log-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.job-log-head h3 {
  margin: 10px 0 6px;
}

.job-log-date {
  color: #64748b;
  font-weight: 800;
  white-space: nowrap;
}

.job-log-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
}

.job-log-details div {
  background: #f8fafc;
  border: 1px solid rgba(15,35,70,.07);
  border-radius: 14px;
  padding: 12px;
}

.job-log-details strong,
.job-log-details span {
  display: block;
}

.job-log-details strong {
  font-size: .78rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.job-log-details span {
  font-weight: 800;
  color: #0b1b34;
  word-break: break-word;
}

.job-timeline {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  position: relative;
  padding: 0 0 18px;
}

.timeline-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 22px;
  bottom: -2px;
  width: 2px;
  background: #dbe3ef;
}

.timeline-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
  border: 4px solid #f8fafc;
  box-shadow: 0 0 0 1px rgba(15,35,70,.08);
  z-index: 1;
}

.timeline-step.complete .timeline-dot {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.timeline-step strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-step p {
  margin: 0;
  color: #475569;
}

.timeline-step small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-weight: 700;
}

.job-log-actions {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(15,35,70,.08);
}

body.dark-mode .job-log-card {
  background: rgba(13,25,44,.92) !important;
  color: #f8fbff !important;
  border-color: rgba(255,255,255,.10) !important;
}

body.dark-mode .job-log-details div {
  background: rgba(6,16,31,.70) !important;
  border-color: rgba(255,255,255,.08) !important;
}

body.dark-mode .job-log-details span,
body.dark-mode .timeline-step strong {
  color: #f8fbff !important;
}

body.dark-mode .timeline-step p,
body.dark-mode .timeline-step small,
body.dark-mode .job-log-date,
body.dark-mode .job-log-details strong {
  color: #aebbd0 !important;
}

body.dark-mode .timeline-dot {
  border-color: #0b1729;
}

@media (max-width: 900px) {
  .job-log-head {
    flex-direction: column;
  }

  .job-log-details {
    grid-template-columns: 1fr;
  }

  .job-log-actions {
    grid-template-columns: 1fr;
  }
}




/* Guest Access */
.guest-access-box {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(15,35,70,.10);
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-weight: 800;
  margin-bottom: 14px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: rgba(15,35,70,.10);
  flex: 1;
}

.guest-access-box h3 {
  margin: 0 0 8px;
}

.guest-grid {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.guest-btn {
  width: 100%;
}

.bot-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  pointer-events: none !important;
}

body.guest-role .tabs button:not([data-page="requestService"]):not([data-page="contact"]):not([data-page="legal"]) {
  display: none !important;
}

body.guest-role #dashboard,
body.guest-role #myRequests,
body.guest-role #allRequests,
body.guest-role #assignedJobs,
body.guest-role #services,
body.guest-role #announcements,
body.guest-role #settings {
  display: none !important;
}

.guest-notice {
  padding: 12px 14px;
  border-radius: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-weight: 800;
  margin: 12px 0;
}

body.dark-mode .guest-access-box {
  border-color: rgba(255,255,255,.12);
}

body.dark-mode .guest-notice {
  background: rgba(37,99,235,.16);
  border-color: rgba(147,197,253,.22);
  color: #93c5fd;
}




/* Assignment Save Fix */
.save-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  background: #0f172a;
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(15,23,42,.28);
  font-weight: 900;
}

body.dark-mode .save-toast {
  background: #2563eb;
}


/* Technician Update Log Fix */




/* Announcement Audience Dropdown */
.announcement-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.audience-badge {
  background: #f1f5f9;
  color: #475569;
}

body.dark-mode .audience-badge {
  background: rgba(255,255,255,.10);
  color: #cbd5e1;
}




/* Login Access Request */
.request-access-btn {
  width: 100%;
  margin-top: 12px;
}

.access-request-box {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(15,35,70,.10);
  border-radius: 18px;
  background: #f8fafc;
}

.access-request-box h3 {
  margin: 0 0 8px;
}

.access-request-box .guest-grid {
  margin-top: 12px;
}

body.dark-mode .access-request-box {
  background: rgba(6,16,31,.70);
  border-color: rgba(255,255,255,.10);
}




/* Admin Login Requests Page */
.login-request-help {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.login-request-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(8,24,54,.10);
  padding: 22px;
}

.login-request-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.login-request-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.login-request-grid div {
  background: #f8fafc;
  border: 1px solid rgba(15,35,70,.07);
  border-radius: 14px;
  padding: 12px;
}

.login-request-grid strong,
.login-request-grid span {
  display: block;
}

.login-request-grid strong {
  font-size: .78rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.login-request-grid span {
  font-weight: 800;
  color: #0b1b34;
  word-break: break-word;
}

.login-request-actions {
  display: grid;
  grid-template-columns: 190px 1fr auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.login-request-note {
  margin-top: 12px;
  font-size: .92rem;
}

.save-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  background: #0f172a;
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(15,23,42,.28);
  font-weight: 900;
}

body.dark-mode .login-request-help {
  background: rgba(37,99,235,.16);
  border-color: rgba(147,197,253,.22);
  color: #93c5fd;
}

body.dark-mode .login-request-card {
  background: rgba(13,25,44,.92) !important;
  color: #f8fbff !important;
  border-color: rgba(255,255,255,.10) !important;
}

body.dark-mode .login-request-grid div {
  background: rgba(6,16,31,.70) !important;
  border-color: rgba(255,255,255,.08) !important;
}

body.dark-mode .login-request-grid span {
  color: #f8fbff !important;
}

body.dark-mode .login-request-grid strong {
  color: #aebbd0 !important;
}

@media (max-width: 900px) {
  .login-request-head {
    flex-direction: column;
  }

  .login-request-grid,
  .login-request-actions {
    grid-template-columns: 1fr;
  }
}




/* Login Requests Visibility Fix */
.reload-login-requests-btn {
  margin: 14px 0;
}




/* Announcement Delete Button */
.announcement-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.announcement-delete-btn {
  background: #fff5f5;
  color: #dc2626;
  border: 1px solid #fecaca;
  box-shadow: none;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 900;
}

.announcement-delete-btn:hover {
  background: #fee2e2;
}

.save-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  background: #0f172a;
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(15,23,42,.28);
  font-weight: 900;
}

body.dark-mode .announcement-delete-btn {
  background: rgba(220,38,38,.15);
  color: #fecaca;
  border-color: rgba(248,113,113,.25);
}

body.dark-mode .save-toast {
  background: #2563eb;
}




/* Menu Style Toggle: Top Tabs / Side Menu */
body.side-menu-mode .app-shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  align-items: start;
}

body.side-menu-mode .tabs {
  position: sticky;
  top: 16px;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  border-radius: 22px;
}

body.side-menu-mode .tabs button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

body.side-menu-mode .page,
body.side-menu-mode footer {
  grid-column: 2;
}

body.side-menu-mode .topbar {
  grid-column: 1 / -1;
}

body.side-menu-mode .tabs {
  grid-column: 1;
  grid-row: 2 / span 20;
}

body.side-menu-mode #settings .segmented-control .settings-option.active {
  background: linear-gradient(135deg, #2563eb, #0f55e8);
  color: #fff;
}

@media (max-width: 900px) {
  body.side-menu-mode .app-shell {
    display: block;
  }

  body.side-menu-mode .tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }

  body.side-menu-mode .tabs button {
    width: auto;
    white-space: nowrap;
  }
}




/* Service Schedule Step 1: Availability / Blocked Dates */
.blocked-date-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.blocked-date-warning {
  margin-top: 6px;
  color: #b91c1c;
  font-weight: 800;
}

.blocked-date-warning.hidden {
  display: none;
}

#availability .availability-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
}

@media (max-width: 900px) {
  .blocked-date-card {
    flex-direction: column;
    align-items: flex-start;
  }

  #availability .availability-grid {
    grid-template-columns: 1fr;
  }
}




/* Service Schedule Step 2: Date + Time Slot Availability */
.slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(15,35,70,.10);
  border-radius: 999px;
  background: #f8fafc;
  padding: 8px 10px 8px 14px;
  font-weight: 800;
}

.mini-delete {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: .82rem;
}

.service-slot-selector-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(15,35,70,.10);
}

.service-slot-selector-box label {
  display: block;
  font-weight: 900;
  margin-bottom: 6px;
}

#serviceAvailableSlotSelect option:disabled {
  color: #b91c1c;
  background: #fee2e2;
}

body.dark-mode .slot-pill,
body.dark-mode .service-slot-selector-box {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}


/* Real login setup */
.link-button {
  background: transparent;
  border: 0;
  padding: 8px 0 4px;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  box-shadow: none;
}
.link-button:hover {
  opacity: 0.8;
}

/* Date and time stamps */
.portal-timestamp {
  margin-top: 4px;
  font-size: 0.9rem;
}
.timestamp-line {
  margin: 6px 0 0;
  font-size: 0.9rem;
}
.slot-pill span {
  line-height: 1.35;
}


/* Refresh controls */
.top-actions { flex-wrap: wrap; justify-content: flex-end; }
#topRefreshBtn, #settingsRefreshBtn { font-weight: 900; }
.refresh-settings-card .settings-row { align-items: center; }
.refresh-settings-card .muted { max-width: 620px; line-height: 1.5; margin-top: 6px; }
.refresh-now-btn { white-space: nowrap; }
body.dark-mode #topThemeBtn,
body.dark-mode #topRefreshBtn,
body.dark-mode #settingsRefreshBtn {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: #fff;
}
@media (max-width: 700px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { justify-content: flex-start; }
  .refresh-settings-card .settings-row { flex-direction: column; align-items: flex-start; }
}

/* v32: flexible scheduling controls */
.mini-field {
  display: grid;
  gap: 5px;
  font-size: .78rem;
  font-weight: 900;
  color: var(--muted);
}
.mini-field input,
.mini-field select {
  width: 100%;
}
.small-note {
  margin-top: 8px;
  font-size: .85rem;
}
.job-log-actions {
  grid-template-columns: 180px 170px 150px 1fr auto;
}
@media (max-width: 900px) {
  .job-log-actions { grid-template-columns: 1fr; }
}


/* Business Analytics Add-On */
.analytics-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}
.analytics-toolbar select {
  min-width: 180px;
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.analytics-card span {
  font-size: 1.55rem;
}
.analytics-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.analytics-chart-panel h3 {
  margin-top: 0;
}
.analytics-chart {
  min-height: 190px;
  display: grid;
  gap: 10px;
  align-content: start;
  margin-top: 10px;
}
.chart-bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 48px;
  gap: 10px;
  align-items: center;
  font-size: .9rem;
}
.chart-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
}
.chart-track {
  height: 13px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.chart-fill {
  height: 100%;
  min-width: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}
.chart-value {
  text-align: right;
  font-weight: 800;
  color: var(--text);
}
.chart-columns {
  display: flex;
  align-items: end;
  gap: 9px;
  min-height: 165px;
  padding: 10px 6px 0;
  border-bottom: 1px solid #e5e7eb;
}
.chart-column-wrap {
  flex: 1;
  min-width: 34px;
  display: grid;
  gap: 7px;
  align-items: end;
  justify-items: center;
}
.chart-column {
  width: 100%;
  max-width: 42px;
  min-height: 5px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #14b8a6, #2563eb);
}
.chart-column-label {
  font-size: .72rem;
  color: var(--muted);
  text-align: center;
  min-height: 28px;
  word-break: break-word;
}
.chart-empty {
  color: var(--muted);
  padding: 18px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
}
body.dark-mode .chart-track {
  background: rgba(255,255,255,.12);
}
body.dark-mode .chart-columns {
  border-color: rgba(255,255,255,.12);
}
body.dark-mode .chart-empty {
  border-color: rgba(255,255,255,.18);
}

.analytics-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.analytics-panel h3,
.analytics-table-wrap h3 {
  margin-top: 0;
}
.analytics-list {
  display: grid;
  gap: 8px;
}
.analytics-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}
.analytics-row strong {
  white-space: nowrap;
}
.analytics-table-wrap {
  overflow-x: auto;
}
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.analytics-table th,
.analytics-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  font-size: .92rem;
}
.analytics-table th {
  background: #f9fafb;
  font-weight: 800;
}
.badge.Dropped,
.badge.Lost {
  background: #fef3c7;
  color: #92400e;
}
body.dark-mode .analytics-row,
body.dark-mode .analytics-table th {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.12);
}
body.dark-mode .analytics-table th,
body.dark-mode .analytics-table td {
  border-color: rgba(255,255,255,.12);
}


/* Admin Reports / Logs export section */
.reports-panel .form-grid { align-items: end; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.reports-table th, .reports-table td { white-space: nowrap; }
#reportPreview { max-height: 520px; overflow: auto; }

/* Collapsible cards added to reduce clutter in customer/admin/worker portals. */
.collapsible-card {
  overflow: hidden;
}
.collapsible-card > summary {
  list-style: none;
}
.collapsible-card > summary::-webkit-details-marker {
  display: none;
}
.collapsible-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 2px;
}
.summary-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.summary-main h3 {
  margin: 0 0 3px;
  line-height: 1.25;
}
.summary-main p {
  margin: 0;
}
.summary-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-size: .88rem;
  white-space: nowrap;
}
.summary-side strong::after {
  content: " +";
  color: var(--blue);
  font-weight: 950;
}
.collapsible-card[open] .summary-side strong::after {
  content: " −";
}
.collapsible-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.job-log-card-inner {
  display: grid;
  gap: 12px;
}
body.dark-mode .collapsible-body {
  border-color: rgba(255,255,255,.12);
}
@media (max-width: 700px) {
  .collapsible-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .summary-side {
    justify-items: start;
  }
}
