/* ==========================================================================
   ROZANA - SPRINT S0.2 DESIGN SYSTEM & COMPONENT STYLES
   Curated Modern Flat Material Palette | Responsive Smart Reflow | Light & Dark
   ========================================================================== */

:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-surface: rgba(79, 70, 229, 0.08);
  --primary-text: #FFFFFF;

  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F1F5F9;
  --bg-hover: #F8FAFC;
  --border-color: #E2E8F0;
  --border-light: #F1F5F9;

  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-dim: #94A3B8;

  --status-active-bg: #DCFCE7;
  --status-active-text: #166534;
  --status-active-dot: #16A34A;

  --status-ending-bg: #FEF3C7;
  --status-ending-text: #B45309;
  --status-ending-dot: #F59E0B;

  --status-expired-bg: #FEE2E2;
  --status-expired-text: #991B1B;
  --status-expired-dot: #DC2626;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

[data-theme="dark"] {
  --bg-page: #0B0F19;
  --bg-surface: #111827;
  --bg-surface-alt: #1F2937;
  --bg-hover: #1E293B;
  --border-color: #374151;
  --border-light: #1F2937;

  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;

  --status-active-bg: rgba(22, 163, 74, 0.2);
  --status-active-text: #4ADE80;

  --status-ending-bg: rgba(245, 158, 11, 0.2);
  --status-ending-text: #FCD34D;

  --status-expired-bg: rgba(220, 38, 38, 0.2);
  --status-expired-text: #F87171;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Layout Container */
.rz-app {
  display: flex;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
}

.rz-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* Sidebar */
.rz-sidebar {
  width: 240px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s ease;
}

.rz-sidebar-brand {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.rz-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.rz-brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.rz-nav-list {
  list-style: none;
  padding: 16px 12px;
  flex: 1;
}

.rz-nav-item {
  margin-bottom: 4px;
}

.rz-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.rz-nav-link:hover {
  background: var(--bg-surface-alt);
  color: var(--text-main);
}

.rz-nav-link.active {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
}

.rz-nav-badge {
  margin-left: auto;
  background: #EF4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

/* Main Area */
.rz-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar Header Banner (Sprint S0.2 Stepper) */
.rz-sprint-banner {
  background: #0F172A;
  color: #fff;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1E293B;
  flex-wrap: wrap;
  gap: 12px;
}

.rz-sprint-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rz-sprint-logo {
  font-size: 24px;
}

.rz-sprint-title {
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rz-sprint-sub {
  font-size: 0.75rem;
  color: #94A3B8;
}

.rz-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rz-step-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rz-step-pill.certified {
  background: rgba(22, 163, 74, 0.2);
  color: #4ADE80;
  border: 1px solid #16A34A;
}

.rz-step-pill.in-progress {
  background: #3B82F6;
  color: #FFFFFF;
}

.rz-step-pill.queued {
  background: #1E293B;
  color: #64748B;
  border: 1px solid #334155;
}

.rz-step-arrow {
  color: #64748B;
  font-weight: bold;
}

/* Content Area */
.rz-content {
  padding: 24px 28px;
  flex: 1;
}

/* Sub-Header Toolbar */
.rz-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 992px) {
  .rz-toolbar {
    padding: 10px 14px !important;
  }
}
@media (max-width: 768px) {
  .rz-toolbar .rz-search-input {
    width: 130px;
  }
}

.rz-breadcrumb {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rz-actions-bar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rz-search-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  width: 220px;
}

.rz-search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.rz-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.rz-user-avatar {
  width: 24px;
  height: 24px;
  background: var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Filter Tabs & Add CTA */
.rz-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.rz-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rz-tab-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.rz-tab-btn:hover {
  background: var(--bg-surface-alt);
  color: var(--text-main);
}

.rz-tab-btn.active {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
}

.rz-btn-primary {
  background: #0284C7;
  color: #FFFFFF;
  border: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.rz-btn-primary:hover {
  background: #0369A1;
}

/* Two-Column Cockpit Layout (Table Left, Form + Preview Right) */
.rz-cockpit-grid {
  display: grid;
  grid-template-columns: 1fr 340px 280px;
  gap: 20px;
  align-items: start;
}

/* Reminders Table Card */
.rz-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.rz-table-wrap {
  overflow-x: auto;
}

.rz-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.rz-table th {
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rz-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.rz-table tr:hover td {
  background: var(--bg-hover);
}

/* Title & Category */
.rz-item-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rz-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: bold;
  flex-shrink: 0;
}

.rz-item-title {
  font-weight: 600;
  color: var(--text-main);
}

.rz-item-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Cycle Pill */
.rz-cycle-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  text-transform: capitalize;
}

/* Dates */
.rz-date-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.rz-due-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #DC2626;
}

/* Live Countdown */
.rz-countdown-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.rz-countdown-val.urgent {
  color: #D97706;
}

.rz-countdown-val.expired {
  color: #DC2626;
}

/* Status Badges */
.rz-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.rz-status-badge.active {
  background: var(--status-active-bg);
  color: var(--status-active-text);
}

.rz-status-badge.ending-soon {
  background: var(--status-ending-bg);
  color: var(--status-ending-text);
}

.rz-status-badge.expired {
  background: var(--status-expired-bg);
  color: var(--status-expired-text);
}

/* Progress Bar */
.rz-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rz-progress-track {
  width: 60px;
  height: 6px;
  background: var(--border-color);
  border-radius: 999px;
  overflow: hidden;
}

.rz-progress-fill {
  height: 100%;
  background: #10B981;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.rz-progress-fill.ending-soon {
  background: #F59E0B;
}

.rz-progress-fill.expired {
  background: #EF4444;
}

.rz-progress-percent {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Actions Menu */
.rz-action-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.rz-action-btn:hover {
  background: var(--bg-surface-alt);
  color: var(--text-main);
}

/* Add / Edit Form Panel */
.rz-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rz-panel-title {
  font-weight: 700;
  font-size: 1rem;
}

.rz-panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-alt);
}

.rz-panel-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
}

.rz-panel-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.rz-form-body {
  padding: 20px;
}

.rz-form-group {
  margin-bottom: 14px;
}

.rz-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 5px;
}

.rz-input,
.rz-select,
.rz-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
}

.rz-input:focus,
.rz-select:focus,
.rz-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.rz-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
}

.rz-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.rz-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.rz-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  transition: 0.2s;
  border-radius: 999px;
}

.rz-toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.rz-toggle input:checked + .rz-toggle-slider {
  background-color: #0284C7;
}

.rz-toggle input:checked + .rz-toggle-slider:before {
  transform: translateX(18px);
}

.rz-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.rz-btn-cancel {
  flex: 1;
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.rz-btn-save {
  flex: 2;
  background: #0284C7;
  color: #fff;
  border: none;
  padding: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Right Widgets */
.rz-widget-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.rz-widget-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.rz-preview-countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0F172A;
  margin: 10px 0 6px;
}

[data-theme="dark"] .rz-preview-countdown {
  color: #F8FAFC;
}

.rz-cycle-guide-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.82rem;
}

.rz-cycle-guide-item:last-child {
  border-bottom: none;
}

/* Bottom Architecture & Flow Cards */
.rz-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.rz-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.rz-info-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.rz-step-box {
  background: var(--bg-surface-alt);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  border-left: 3px solid #0284C7;
}

/* ==========================================================================
   ROZANA S0.3 - SERVICE MASTER SPECIFIC STYLES & REF REFERENCE
   ========================================================================== */

/* Dark Sidebar matching Reference */
.rz-sidebar {
  width: 240px;
  background: #0B132B;
  border-right: 1px solid #1E293B;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s ease;
  min-height: 100vh;
}

.rz-sidebar .rz-sidebar-brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #1E293B;
}

.rz-sidebar .rz-brand-icon {
  width: 36px;
  height: 36px;
  background: #10B981;
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.rz-sidebar .rz-brand-name {
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.rz-sidebar .rz-nav-list {
  list-style: none;
  padding: 14px 10px;
  flex: 1;
}

.rz-sidebar .rz-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: #94A3B8;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.rz-sidebar .rz-nav-link:hover {
  background: #1E293B;
  color: #FFFFFF;
}

.rz-sidebar .rz-nav-link.active {
  background: #1E293B;
  color: #FFFFFF;
  font-weight: 600;
}

.rz-subnav-list {
  list-style: none;
  padding: 2px 0 6px 14px;
}

.rz-subnav-item {
  margin-bottom: 2px;
}

.rz-subnav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.rz-subnav-link:hover {
  background: #1E293B;
  color: #FFFFFF;
}

.rz-subnav-link.active {
  background: #2563EB !important;
  color: #FFFFFF !important;
  font-weight: 600;
}

.rz-sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid #1E293B;
  color: #64748B;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.rz-sidebar-footer:hover {
  color: #94A3B8;
}

/* Header Stepper Pills */
.rz-step-pill.certified-green {
  background: #064E3B;
  color: #34D399;
  border: 1px solid #059669;
}

.rz-step-pill.in-progress-orange {
  background: #EA580C;
  color: #FFFFFF;
  border: 1px solid #F97316;
}

.rz-step-pill.queued-gray {
  background: #1E293B;
  color: #94A3B8;
  border: 1px solid #334155;
}

/* Top KPI Stat Row (5 Cards) */
.rz-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .rz-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .rz-kpi-row {
    grid-template-columns: 1fr;
  }
}

.rz-kpi-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.rz-kpi-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.rz-kpi-stat-val {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
}

.rz-kpi-stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Service Master Table Styling */
.rz-service-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rz-service-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.rz-service-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.2;
}

.rz-service-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Check / Cross Icons for Morning/Evening */
.rz-check-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #DCFCE7;
  color: #16A34A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

.rz-cross-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FEE2E2;
  color: #DC2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

.rz-feather-icon {
  color: #16A34A;
  font-size: 14px;
}

/* Category Badge in Table */
.rz-cat-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #EFF6FF;
  color: #2563EB;
}

.rz-cat-badge.utility {
  background: #FEF3C7;
  color: #D97706;
}

/* Table Row Action Buttons */
.rz-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rz-icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #2563EB;
  font-size: 13px;
  transition: all 0.15s ease;
}

.rz-icon-btn:hover {
  background: var(--bg-surface-alt);
  border-color: #CBD5E1;
}

.rz-icon-btn.delete {
  color: #DC2626;
}

.rz-icon-btn.delete:hover {
  background: #FEE2E2;
  border-color: #F87171;
}

/* Previews Grid (4 Cards Row) */
.rz-previews-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 1280px) {
  .rz-previews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .rz-previews-grid {
    grid-template-columns: 1fr;
  }
}

.rz-preview-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.rz-preview-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.rz-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.84rem;
}

.rz-calc-label {
  color: var(--text-muted);
}

.rz-calc-val {
  font-weight: 700;
  color: var(--text-main);
}

.rz-calc-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-surface-alt);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Flow Stepper Card (Card 4) */
.rz-flow-step-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
}

.rz-flow-col {
  text-align: center;
  flex: 1;
}

.rz-flow-circle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
}

.rz-flow-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.rz-flow-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.rz-flow-arrow {
  color: #94A3B8;
  font-size: 14px;
  font-weight: bold;
}

/* Bottom 3 Cards Row */
.rz-bottom-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 1024px) {
  .rz-bottom-cards-row {
    grid-template-columns: 1fr;
  }
}

.rz-seeded-list {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.rz-seeded-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  background: var(--bg-surface-alt);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Bottom Feature Checkmarks */
.rz-check-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  font-size: 0.77rem;
  color: var(--text-main);
}

.rz-check-list-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rz-check-green {
  color: #16A34A;
  font-size: 12px;
  font-weight: bold;
}

/* Responsive Smart Reflow */
@media (max-width: 1200px) {
  .rz-cockpit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .rz-sidebar, .rz-sidebar-clean {
    display: none;
  }
  .rz-sidebar-clean.mobile-open {
    display: flex !important;
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 3000;
    width: 260px;
    margin-left: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: 0 0 25px rgba(0,0,0,0.3);
  }
}

/* ==========================================================================
   IMAGE 6 / S0.3 REFINED THEME & IMAGE 2-5 SUBSCRIPTIONS STYLES
   ========================================================================== */

/* Light Sidebar with Purple Active Tint */
.rz-sidebar-clean {
  width: 240px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  min-height: 100vh;
}

.rz-sidebar-clean .rz-sidebar-brand {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.rz-sidebar-clean .rz-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.rz-sidebar-clean .rz-nav-link:hover {
  background: var(--bg-surface-alt);
  color: var(--text-main);
}

.rz-sidebar-clean .rz-nav-link.parent-active {
  background: #EEF2FF;
  color: #4F46E5;
  font-weight: 600;
}

.rz-sidebar-clean .rz-subnav-link.active-purple {
  background: #E0E7FF !important;
  color: #4338CA !important;
  font-weight: 700;
}

/* 4 Top Metric Cards (Row 1) */
.rz-metrics-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .rz-metrics-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .rz-metrics-grid-4 {
    grid-template-columns: 1fr;
  }
}

.rz-metric-card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.rz-metric-icon-sq {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}

.rz-metric-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.rz-metric-val {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
}

.rz-metric-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Quick Add Templates Card */
.rz-template-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

.rz-template-item:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.rz-template-btn-use {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rz-template-btn-use:hover {
  background: #2563EB;
  color: #FFFFFF;
}

/* Morning/Evening pill boxes in Service Preview */
.rz-period-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
}

/* Quick Platform Chips for Subscriptions (Image 4) */
.rz-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}

.rz-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.rz-chip:hover, .rz-chip.active {
  background: #4F46E5;
  color: #FFFFFF;
  border-color: #4F46E5;
}

/* Modal Overlay & Dialog */
.rz-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.rz-modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.rz-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rz-modal-body {
  padding: 20px 24px;
  flex: 1;
}

.rz-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-surface-alt);
}

/* Palette Swatches (Image 5) */
.rz-swatch-list {
  display: flex;
  gap: 10px;
  margin: 10px 0 16px;
}

.rz-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease, outline 0.15s ease;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #CBD5E1;
}

.rz-swatch:hover, .rz-swatch.active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #4F46E5;
}

/* Platform Select Cards Grid (Image 2 Modal) */
.rz-platform-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 10px 0 14px;
}

@media (max-width: 600px) {
  .rz-platform-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.rz-platform-card {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: 8px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.rz-platform-card:hover {
  border-color: #6366F1;
  background: var(--bg-surface-alt);
}

.rz-platform-card.active {
  border-color: #4F46E5;
  background: #EEF2FF;
  box-shadow: 0 0 0 1px #4F46E5;
}

.rz-platform-logo-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
}

.rz-platform-card-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Charts & Breakdown Cards (Image 1 Bottom) */
.rz-chart-bar-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 120px;
  padding-top: 10px;
  border-bottom: 1px solid var(--border-color);
}

.rz-chart-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 44px;
}

.rz-chart-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.rz-chart-bar-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.rz-chart-bar-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Donut Chart representation */
.rz-donut-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.rz-donut-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: conic-gradient(#3B82F6 0% 20%, #10B981 20% 40%, #8B5CF6 40% 60%, #EF4444 60% 80%, #F59E0B 80% 100%);
}

.rz-donut-inner {
  width: 70px;
  height: 70px;
  background: var(--bg-surface);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Scenic Dashboard Banner (Image 3) */
.rz-scenic-banner {
  background: linear-gradient(135deg, #E0F2FE 0%, #EDE9FE 60%, #FEF3C7 100%);
  border-radius: 14px;
  border: 1px solid #BAE6FD;
  padding: 20px 28px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .rz-scenic-banner {
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 60%, #172554 100%);
  border-color: #334155;
}

.rz-scenic-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 2px;
}

[data-theme="dark"] .rz-scenic-title {
  color: #F8FAFC;
}

/* Chip buttons for platform selection in Image 1 and Image 2 */
.rz-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.rz-chip-btn:hover {
  border-color: #6366F1;
  background: var(--bg-surface-alt);
}

.rz-chip-btn.active {
  border-color: #4F46E5;
  background: #EEF2FF;
  color: #4F46E5;
  font-weight: 700;
  box-shadow: 0 0 0 1px #4F46E5;
}

[data-theme="dark"] .rz-chip-btn.active {
  background: #312E81;
  color: #A5B4FC;
  border-color: #6366F1;
  box-shadow: 0 0 0 1px #6366F1;
}

/* Mini dark preview cockpit widget (Image 1 Bottom Right) */
.rz-dark-preview-cockpit {
  background: #0B1120;
  border: 1px solid #1E293B;
  border-radius: 12px;
  padding: 14px 16px;
  color: #F8FAFC;
  font-size: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.rz-dark-preview-cockpit .mini-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1E293B;
}

.rz-dark-preview-cockpit .mini-card {
  background: #131E35;
  border: 1px solid #1E293B;
  border-radius: 8px;
  padding: 8px 10px;
}



