/* =============================================================================
   SHREYA INFRATECH — Design System
   Palette: Orange (#ff7a1a) / Charcoal (#1c1f26) / White / Light grey
============================================================================= */
:root{
  --orange:#ff7a1a;
  --orange-dark:#e0630a;
  --charcoal:#1c1f26;
  --charcoal-2:#262a33;
  --grey-100:#f5f6f8;
  --grey-200:#eceef2;
  --grey-400:#c3c8d1;
  --grey-600:#6b7280;
  --white:#ffffff;
  --danger:#e53946;
  --warning:#f5a524;
  --success:#22a559;
  --info:#2b8ae6;
  --radius:14px;
  --shadow: 0 2px 10px rgba(28,31,38,0.07);
  --shadow-lg: 0 8px 28px rgba(28,31,38,0.14);
}

*{box-sizing:border-box;}
body{
  background:var(--grey-100);
  color:var(--charcoal);
  font-family:'Segoe UI',-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif;
  font-size:15px;
}

a{ text-decoration:none; }

/* ---------- Layout shell ---------- */
.app-shell{ display:flex; min-height:100vh; }
.sidebar{
  width:250px; background:var(--charcoal); color:#fff; flex-shrink:0;
  position:fixed; top:0; bottom:0; left:0; overflow-y:auto; z-index:1030;
  transition:transform .2s ease;
}
.sidebar .brand{ padding:22px 20px 14px; border-bottom:1px solid rgba(255,255,255,.08); }
.sidebar .brand h1{ font-size:16px; font-weight:800; color:#fff; margin:0; letter-spacing:.3px; }
.sidebar .brand small{ color:var(--orange); font-size:11px; letter-spacing:.5px; text-transform:uppercase; }
.sidebar nav{ padding:14px 10px; }
.sidebar .nav-section{ color:var(--grey-400); font-size:11px; text-transform:uppercase; letter-spacing:.6px; padding:14px 12px 6px; }
.sidebar a.nav-link{
  color:#d7dae0; padding:10px 14px; border-radius:10px; display:flex; align-items:center; gap:10px;
  font-size:14px; margin-bottom:2px;
}
.sidebar a.nav-link:hover{ background:rgba(255,255,255,.06); color:#fff; }
.sidebar a.nav-link.active{ background:var(--orange); color:#fff; font-weight:600; }
.main-content{ margin-left:250px; flex:1; min-width:0; }
.topbar{
  background:#fff; padding:14px 24px; display:flex; align-items:center; justify-content:space-between;
  box-shadow:var(--shadow); position:sticky; top:0; z-index:1020;
}
.page-body{ padding:24px; }
.menu-toggle{ display:none; }

/* ---------- Cards ---------- */
.card{ border:none; border-radius:var(--radius); box-shadow:var(--shadow); }
.card-body{ padding:20px; }
.stat-card{
  background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); padding:18px 20px;
  display:flex; align-items:center; gap:14px; height:100%;
}
.stat-card .icon{
  width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:rgba(255,122,26,.12); color:var(--orange); font-size:20px; flex-shrink:0;
}
.stat-card .value{ font-size:22px; font-weight:800; color:var(--charcoal); line-height:1.1; }
.stat-card .label{ font-size:12.5px; color:var(--grey-600); }
.stat-card.danger .icon{ background:rgba(229,57,70,.12); color:var(--danger);}
.stat-card.warning .icon{ background:rgba(245,165,36,.14); color:var(--warning);}
.stat-card.success .icon{ background:rgba(34,165,89,.12); color:var(--success);}
.stat-card.info .icon{ background:rgba(43,138,230,.12); color:var(--info);}

/* ---------- Buttons ---------- */
.btn-orange{ background:var(--orange); border-color:var(--orange); color:#fff; font-weight:600; }
.btn-orange:hover{ background:var(--orange-dark); border-color:var(--orange-dark); color:#fff; }
.btn-charcoal{ background:var(--charcoal); border-color:var(--charcoal); color:#fff; font-weight:600; }
.btn-charcoal:hover{ background:#000; color:#fff; }
.btn-lg-touch{ padding:16px 18px; font-size:16px; border-radius:14px; }

/* ---------- Badges ---------- */
.badge{ font-weight:600; padding:6px 10px; border-radius:8px; font-size:11.5px; }
.badge-success{ background:rgba(34,165,89,.14); color:var(--success); }
.badge-warning{ background:rgba(245,165,36,.16); color:#93650a; }
.badge-danger{ background:rgba(229,57,70,.13); color:var(--danger); }
.badge-info{ background:rgba(43,138,230,.13); color:var(--info); }
.badge-secondary{ background:var(--grey-200); color:var(--grey-600); }
.badge-primary{ background:rgba(255,122,26,.14); color:var(--orange-dark); }
.badge-dark{ background:#e4e4e7; color:#3f3f46; }

/* ---------- Tables ---------- */
.table-card{ background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; }
table.data-table{ width:100%; border-collapse:collapse; font-size:14px; }
table.data-table thead th{
  background:var(--grey-100); color:var(--grey-600); text-transform:uppercase; font-size:11.5px;
  letter-spacing:.4px; padding:12px 14px; text-align:left; border-bottom:1px solid var(--grey-200);
}
table.data-table tbody td{ padding:12px 14px; border-bottom:1px solid var(--grey-200); vertical-align:middle; }
table.data-table tbody tr:hover{ background:var(--grey-100); }
table.data-table tbody tr:last-child td{ border-bottom:none; }

/* ---------- Forms ---------- */
.form-label{ font-weight:600; font-size:13.5px; color:var(--charcoal); }
.form-control, .form-select{
  border-radius:10px; border:1px solid var(--grey-400); padding:9px 12px; font-size:14.5px;
}
.form-control:focus, .form-select:focus{ border-color:var(--orange); box-shadow:0 0 0 3px rgba(255,122,26,.15); }

/* ---------- Login page ---------- */
.login-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,var(--charcoal) 0%, #33241a 100%); padding:20px; }
.login-card{ background:#fff; border-radius:20px; box-shadow:var(--shadow-lg); padding:40px 36px; width:100%; max-width:400px; }
.login-card h1{ font-size:19px; font-weight:800; margin-bottom:2px; }
.login-card .tagline{ color:var(--orange); font-size:11.5px; text-transform:uppercase; letter-spacing:.6px; font-weight:700; margin-bottom:24px; }

/* ---------- Plumber mobile home ---------- */
.mobile-home{ max-width:480px; margin:0 auto; }
.mobile-greeting{ color:#fff; background:var(--charcoal); border-radius:0 0 24px 24px; padding:24px 20px 40px; }
.mobile-greeting h2{ font-size:20px; margin:0; }
.mobile-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:-30px; padding:0 16px; }
.mobile-stat{ background:#fff; border-radius:14px; box-shadow:var(--shadow); padding:12px 8px; text-align:center; }
.mobile-stat .num{ font-size:20px; font-weight:800; color:var(--orange); }
.mobile-stat .lbl{ font-size:10.5px; color:var(--grey-600); }
.mobile-actions{ padding:20px 16px 90px; display:grid; gap:12px; }
.mobile-action-btn{
  background:#fff; border-radius:16px; box-shadow:var(--shadow); padding:18px; display:flex; align-items:center; gap:14px;
  font-weight:700; font-size:15px; color:var(--charcoal);
}
.mobile-action-btn .ic{ width:44px; height:44px; border-radius:12px; background:rgba(255,122,26,.12); color:var(--orange); display:flex; align-items:center; justify-content:center; font-size:19px; }
.bottom-nav{
  position:fixed; bottom:0; left:0; right:0; background:#fff; box-shadow:0 -2px 12px rgba(0,0,0,.08);
  display:flex; justify-content:space-around; padding:8px 0; z-index:1040;
}
.bottom-nav a{ text-align:center; color:var(--grey-600); font-size:10.5px; }
.bottom-nav a.active{ color:var(--orange); }
.bottom-nav .ic{ font-size:19px; display:block; }

/* ---------- Progress steps (connection form) ---------- */
.step-progress{ display:flex; gap:4px; margin-bottom:18px; }
.step-progress .seg{ flex:1; height:5px; border-radius:4px; background:var(--grey-200); }
.step-progress .seg.done{ background:var(--orange); }

/* ---------- Global search ---------- */
.global-search{ position:relative; width:340px; max-width:40vw; }
.global-search input{ border-radius:10px; padding:9px 14px 9px 36px; border:1px solid var(--grey-400); width:100%; }
.global-search .search-icon{ position:absolute; left:12px; top:9px; color:var(--grey-600); }
.search-results{ position:absolute; top:44px; left:0; right:0; background:#fff; border-radius:12px; box-shadow:var(--shadow-lg); max-height:360px; overflow-y:auto; z-index:2000; display:none; }
.search-results .item{ padding:10px 14px; border-bottom:1px solid var(--grey-200); font-size:13.5px; }
.search-results .item:hover{ background:var(--grey-100); }
.search-results .item small{ color:var(--grey-600); display:block; }

/* ---------- Responsive ---------- */
@media (max-width: 991px){
  .sidebar{ transform:translateX(-100%); }
  .sidebar.open{ transform:translateX(0); }
  .main-content{ margin-left:0; }
  .menu-toggle{ display:inline-flex; }
  .global-search{ width:180px; }
}

/* ---------- Print ---------- */
@media print{
  .sidebar, .topbar, .no-print, .bottom-nav{ display:none !important; }
  .main-content{ margin-left:0 !important; }
  body{ background:#fff; }
  .print-sheet{ box-shadow:none; padding:0; }
}
.print-sheet{ background:#fff; max-width:800px; margin:0 auto; padding:30px; border-radius:12px; box-shadow:var(--shadow); }
.print-sheet .doc-header{ display:flex; justify-content:space-between; align-items:flex-start; border-bottom:3px solid var(--charcoal); padding-bottom:14px; margin-bottom:16px; }
.print-sheet .doc-header h2{ margin:0; font-size:20px; }
.print-sheet table{ width:100%; border-collapse:collapse; margin:14px 0; }
.print-sheet table th, .print-sheet table td{ border:1px solid #ccc; padding:8px 10px; font-size:13px; }
.print-sheet .sign-row{ display:flex; justify-content:space-between; margin-top:50px; }
.print-sheet .sign-row div{ text-align:center; width:150px; border-top:1px solid #333; padding-top:6px; font-size:12px; }
