/* ======================================================
   ATOZ SERVICE HUB – ULTRA MODERN BOOKING UI
   Smooth • Compact • Premium • Mobile-first
====================================================== */

/* ===============================
   OUTFIT FONT – GLOBAL
================================ */
.hsb-center-wrap,
.hsb-center-box,
.hsb-popup-box,
.hsb-premium-login,
.hsb-premium-login * {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
  box-sizing: border-box;
}

/* ===============================
   INITIAL BOOKING FORM (RESTORED)
================================ */
.hsb-center-wrap {
  display: flex;
  justify-content: center;
  padding: 10px;
  margin: 30px 0;
  /* Added Top/Bottom Spacing */
}

.hsb-center-box {
  background: #fff;
  padding: 30px 24px;
  border-radius: 18px;
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  /* Reverted to column */
  gap: 10px;
  align-items: center;
  max-width: 380px;
  /* Reverted width */
  width: 100%;
  border: 1px solid #f1f5f9;
}

/* Inputs in the initial box */
.hsb-center-box input {
  width: 100%;
  /* Reverted to full width */
  margin-bottom: 0 !important;
  height: 46px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  transition: all 0.2s;
}

.hsb-center-box input:focus {
  border-color: #2563eb;
  outline: none;
}

.hsb-center-box .hsb-open {
  width: 100%;
  margin: 0;
  box-shadow: none;
  height: 46px;
  font-size: 15px;
}

/* Mobile Stack for this box */
@media (max-width: 600px) {
  .hsb-center-wrap {
    padding: 0 5px;
  }

  .hsb-center-box {
    flex-direction: column;
    /* Reverted to column */
    padding: 0 10px;
    gap: 12px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0;
  }

  .hsb-center-box input {
    height: 45px;
    font-size: 14px;
    margin-bottom: 0 !important;
    background: #fff !important;
    width: 100%;
    /* Reverted width */
  }

  .hsb-center-box .hsb-open {
    width: 100%;
    height: 45px;
    font-size: 15px;
  }

  /* Force white card for Success View on Mobile */
  .hsb-center-box.hsb-success-view {
    background: #fff !important;
    /* Restore white bg */
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15) !important;
    border-radius: 18px !important;
    padding: 30px 20px !important;
    /* Proper padding */
    border: 1px solid #f1f5f9 !important;
    gap: 0 !important;
  }
}

/* ===============================
   SUCCESS VIEW (Compact & Smart)
================================ */
.hsb-success-content {
  text-align: center;
  width: 100%;
  animation: hsbFadeUp 0.5s ease;
}

.hsb-success-icon {
  width: 54px;
  height: 54px;
  background: #ecfdf5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  color: #10b981;
}

.hsb-success-icon svg {
  width: 28px;
  height: 28px;
}

.hsb-success-content h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.hsb-success-content p {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 20px 0;
  line-height: 1.5;
  padding: 0 10px;
}

.hsb-success-content .hsb-btn-primary {
  max-width: 200px;
  width: 100%;
  margin: 0 auto;
  height: 42px;
  /* Compact button */
  font-size: 14px;
}


/* ===============================
   PREMIUM LOGIN PAGE (New UI)
================================ */
.hsb-premium-login {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  /* Reduced height requirement */
  padding: 15px;
}

.hsb-login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 30px 20px;
  /* Reduced padding */
  border-radius: 20px;
  text-align: center;
  box-shadow:
    0 15px 40px -10px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
  animation: hsbFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 auto;
}

@keyframes hsbFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ICON WRAPPER */
.hsb-icon-wrap {
  width: 64px;
  /* Reduced size */
  height: 64px;
  margin: 0 auto 16px auto;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.04));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hsb-icon-wrap svg {
  width: 28px;
  height: 28px;
  stroke: #2563eb;
}

/* =====================================================
   ATOZ SERVICE HUB CUSTOMER DASHBOARD - PREMIUM DESIGN
   Matched to Technician Dashboard Style
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Colors */
  --primary: #1e40af;
  /* Deep Blue */
  --primary-light: #3b82f6;
  /* Bright Blue */
  --primary-dark: #1e3a8a;
  /* Navy */
  --accent: #f59e0b;
  /* Amber */

  /* Status Colors */
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --info: #3b82f6;
  --info-bg: #dbeafe;

  /* Neutrals */
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;

  /* Dimensions & Effects */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 50px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.hsb-dashboard-wrap {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
  color: var(--text-main);
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background: var(--bg);
  min-height: 80vh;
  border-radius: var(--radius);
}

/* Typography */
.hsb-header-card {
  text-align: center;
  margin-bottom: 24px;
  background: #fff;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.hsb-greeting {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.hsb-phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.hsb-phone-icon {
  font-size: 16px;
}

.hsb-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  text-align: center;
}

.hsb-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

/* ================= LOGIN & FORM ================= */
.hsb-login-box {
  background: var(--card-bg);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border);
}

.hsb-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 16px;
  transition: all 0.2s;
  background: #f8fafc;
}

.hsb-input:focus {
  border-color: var(--primary-light);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hsb-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.2);
}

.hsb-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 10px -2px rgba(30, 64, 175, 0.25);
}

/* ================= TABS ================= */
.hsb-tabs {
  display: flex !important;
  background: #e2e8f0;
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  gap: 4px;
}

.hsb-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid #1e293b;
  /* Dark Slate border for clear visibility */
  color: var(--text-muted);
  transition: all 0.2s;
}

.hsb-tab:hover {
  background: var(--bg);
  color: var(--text-main);
}

.hsb-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.2);
}



/* ================= CARDS ================= */
.hsb-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.hsb-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

/* Status Indicator Strip */
.hsb-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--border);
}

.hsb-card[data-status="pending"]::before {
  background: var(--warning);
}

.hsb-card[data-status="assigned"]::before {
  background: var(--primary);
}

.hsb-card[data-status="completed"]::before {
  background: var(--success);
}

.hsb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.hsb-service-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.hsb-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Status Badges */
.hsb-badge {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hsb-badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.hsb-badge.assigned {
  background: var(--info-bg);
  color: var(--info);
}

.hsb-badge.completed {
  background: var(--success-bg);
  color: var(--success);
}

/* Technician Section */
.hsb-tech-box {
  background: linear-gradient(145deg, #f8fafc 0%, #eff6ff 100%);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  border: 1px solid #dbeafe;
}

.hsb-tech-avatar {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.hsb-tech-info {
  flex: 1;
}

.hsb-tech-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  margin-bottom: 2px;
}

.hsb-tech-role {
  font-size: 11px;
  color: var(--primary-light);
  font-weight: 600;
  text-transform: uppercase;
}

.hsb-call-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  font-size: 16px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.hsb-call-btn:hover {
  background: var(--success);
  color: #fff;
  transform: scale(1.1);
}

/* Billing Section */
.hsb-bill-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.hsb-bill-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.hsb-bill-total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-weight: 700;
  color: var(--text-main);
  font-size: 16px;
}

.hsb-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text-light);
}

.hsb-empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  .hsb-dashboard-wrap {
    padding: 16px;
    border-radius: 0;
    min-height: 100vh;
  }

  .hsb-card {
    padding: 16px;
  }

  .hsb-title {
    font-size: 20px;
  }

  .hsb-tech-box {
    flex-direction: row;
    padding: 12px;
  }
}

/* TYPOGRAPHY */
.hsb-login-card h3 {
  font-size: 22px;
  /* Reduced font size */
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.hsb-login-card p {
  font-size: 14px;
  line-height: 1.5;
  color: #64748b;
  margin: 0 0 24px 0;
}

.hsb-login-card p.hsb-subtext {
  margin-bottom: 20px;
}

/* COMMON INPUTS */
.hsb-login-card input,
.hsb-popup-box input,
.hsb-popup-box select {
  width: 100%;
  height: 48px;
  /* Reduced height */
  padding: 0 14px;
  font-size: 15px;
  border: 1px solid #e2e8f0;
  /* Thinner border */
  border-radius: 10px;
  background: #fff;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  color: #1e293b;
}

.hsb-login-card input:focus,
.hsb-popup-box input:focus,
.hsb-popup-box select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* BUTTONS */
.hsb-btn-primary,
#hsb-submit,
.hsb-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  /* Reduced height */
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}

.hsb-btn-primary:hover,
#hsb-submit:hover,
.hsb-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.4);
}

.hsb-btn-primary:active,
#hsb-submit:active {
  transform: translateY(0);
}

/* FOOTER LINKS */
.hsb-login-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  color: #64748b;
}

.hsb-login-footer a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  margin-left: 5px;
}

/* BOOKING LIST TABLE */
#hsb-booking-list .hsb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}


/* ===============================
   BOOKING POPUP (Refined Compact)
================================ */
#hsb-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 10px;
  /* Slight padding from edges */
}

#hsb-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.hsb-popup-box {
  width: 100%;
  max-width: 440px;
  /* More compact width */
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  /* Reduced padding */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

#hsb-popup-overlay.active .hsb-popup-box {
  transform: translateY(0);
}

/* Close Button */
#hsb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#hsb-close:hover {
  background: #e2e8f0;
  color: #ef4444;
}

.hsb-popup-box h3 {
  font-size: 20px;
  /* Reduced size */
  margin-top: 0;
  margin-bottom: 20px;
  color: #0f172a;
}

/* FORM GRID */
.hsb-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.hsb-field {
  flex: 1;
  position: relative;
}

.hsb-field label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
  display: block;
  margin-left: 2px;
}

/* FORM ACTIONS */
.hsb-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.hsb-actions button {
  flex: 1;
  height: 46px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

#hsb-close {
  background: #ef4444;
  color: #fff;
  /* Square button for X - Reduced */
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#hsb-close:hover {
  background: #dc2626;
  color: #fff;
}

#hsb-submit {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

#hsb-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.4);
}

/* TEXTAREA */
#hsb-address {
  width: 100%;
  height: 70px;
  /* Reduced */
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  margin-bottom: 12px;
}

textarea#hsb-address:focus {
  border-color: #2563eb;
  outline: none;
}


/* Google Map */
#hsb-map-wrap {
  width: 100%;
  height: 180px;
  /* Reduced */
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  position: relative;
}

#hsb-map {
  width: 100%;
  height: 100%;
}


/* ===============================
   MOBILE RESPONSIVENESS
================================ */
@media (max-width: 480px) {
  .hsb-center-wrap {
    padding: 10px;
  }

  .hsb-center-box {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .hsb-premium-login {
    padding: 15px;
    justify-content: center;
    /* Center vertically on mobile too */
  }

  .hsb-login-card {
    padding: 24px 16px;
    border-radius: 20px;
  }

  .hsb-icon-wrap {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
  }

  .hsb-popup-box {
    padding: 20px;
    width: 95%;
    max-height: 85vh;
  }

  /* Keep Date/Time Row side-by-side but perhaps tighten gap */
  .hsb-row {
    flex-direction: row !important;
    /* FORCE ROW with !important */
    gap: 8px;
    /* Tighter gap */
    margin-bottom: 10px;
  }

  .hsb-actions {
    margin-top: 15px;
  }
}

/* ===============================
   DASHBOARD TABS & CARDS
================================ */
.hsb-tabs {
  transition: all 0.3s ease;
}

.hsb-tab {
  transition: all 0.2s ease;
}

.hsb-tab:hover {
  color: #334155 !important;
}

.hsb-card {
  transition: transform 0.2s;
}

.hsb-card:hover {
  transform: translateY(-2px);
}

.hsb-greeting {
  font-size: 18px !important;
  font-weight: 700;

}

/* REVIEWS & ANIMATIONS */
.hsb-note-pending {
  background: #fffbeb;
  color: #b45309;
  font-size: 13px;
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
  border: 1px solid #fcd34d;
  line-height: 1.4;
}

.hsb-working-anim {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e40af;
  font-size: 14px;
  font-weight: 500;
}

.hsb-gear-icon {
  animation: hsb-spin 3s linear infinite;
  color: #2563eb;
}

@keyframes hsb-spin {
  100% {
    transform: rotate(360deg);
  }
}