:root{
  --primary:#6d4aff;
  --dark:#1f2330;
  --text:#333;
  --muted:#6c7280;
  --bg:#f6f8fc;
}

html, body{
  height:100%;
}

body{
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

main,
.auth-wrap{
  flex:1 0 auto;
}

.navbar-brand{
  font-size:1.3rem;
  letter-spacing:.2px;
}

.brand-text{
  color:#0b5d3b !important;
  font-size:1.4rem;
  letter-spacing:.2px;
}

.hero{
  background:linear-gradient(135deg, #117671 0%, #0c071d 50%, #150b2d 100%)
}

.search-wrap{
  width:min(780px, 95%);
}

.category-tile{
  background:#fff;
  border:1px solid #e5e9f2;
  border-radius:14px;
  padding:16px 14px;
  text-align:center;
  font-weight:600;
  transition:.2s ease;
}
.category-tile:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 20px rgba(0,0,0,.06);
}

.listing-card{
  background:#fff;
  border:1px solid #e5e9f2;
  border-radius:16px;
  padding:18px;
  box-shadow:0 6px 18px rgba(19,27,54,.05);
  display:flex;
  flex-direction:column;
  height:100%;
}
.listing-card h5{
  min-height:23px;
}
.listing-card .text-secondary{
  min-height:35px;
}
.listing-card .price{
  color:var(--primary);
  font-weight:700;
}
.listing-card .d-flex.justify-content-between.align-items-center{
  margin-top:auto !important;
}
.listing-card .btn{
  min-width:120px;
}

.provider-inline{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.provider-avatar-sm{
  width:45px;
  height:45px;
  min-width:45px;
  min-height:45px;
  max-width:45px;
  max-height:45px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid #dbe3ef;
  flex:0 0 45px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.provider-avatar-fallback{
  background:#e8edf6;
  color:#334155;
  font-size:.72rem;
  font-weight:700;
}

.listing-card .provider-inline .text-muted{
  font-size:.82rem;
  line-height:1.2;
}
.listing-card h5{
  font-size:1rem;
  line-height:1.25;
  margin-bottom:.35rem;
}
.listing-card .text-secondary{
  font-size:.84rem;
  line-height:1.35;
  margin-bottom:.5rem !important;
}
.listing-description-wrap{
  margin-top: 2px;
}
.listing-description-two-lines{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.listing-description-more{
  font-size:.84rem;
  line-height:1.2;
  font-weight:600;
  color:#00674F;
  margin-top:2px;
}
.listing-description-more:hover,
.listing-description-more:focus{
  color:#005541;
}
.rating-inline-compact{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:.1rem;
}
.rating-inline-compact .stars{
  font-size:.78rem;
  line-height:1;
}
.rating-inline-compact .count{
  font-size:.75rem;
  color:#6c757d;
  white-space:nowrap;
}

.service-image-wrap {
  position: relative;
}

.service-verified-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: #198754;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 4px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.service-card-image {
  width:100%;
  height:180px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid #e5e9f2;
  background:#f3f5fa;
}
.placeholder-image{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#8892a6;
  font-size:.9rem;
  font-weight:600;
}

.step-card{
  background:#fff;
  border:1px solid #e5e9f2;
  border-radius:14px;
  padding:16px;
  font-weight:500;
}

.footer{
  background:#111827;
  color:#d1d5db;
  margin-top:auto;
  width:100%;
}

.custom-site-footer{
  background:#fff;
  border-top:1px solid #edf0f6;
  padding:48px 0 34px;
  margin-top:auto;
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  gap:24px;
}
.footer-left{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.footer-brand{
  display:inline-block;
  margin-bottom:16px;
}
.footer-tagline{
  color:#1f2937;
  font-size:34px;
  font-size:clamp(22px, 3vw, 34px);
  font-weight:500;
  line-height:1.2;
}
.footer-social{
  display:flex;
  align-items:center;
  gap:18px;
}
.footer-social a{
  text-decoration:none;
  color:#0b6b2f;
  font-weight:700;
  font-size:30px;
  line-height:1;
}
.footer-copy{
  color:#1f2937;
  font-size:31px;
  font-size:clamp(18px, 2.4vw, 31px);
  letter-spacing:.2px;
}
.footer-right{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:18px;
}
.footer-right a{
  text-decoration:none;
  color:#1f2937;
  font-size:36px;
  font-size:clamp(20px, 2.7vw, 36px);
  font-weight:500;
  line-height:1.2;
}
.footer-right a:hover{
  color:#0b5d3b;
}

@media (max-width: 992px){
  .custom-site-footer{
    padding:36px 0 24px;
  }
  .footer-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:20px;
  }
  .footer-right{
    margin-top:0;
  }
}

.modal-content{
  border:0;
  border-radius:16px;
  box-shadow:0 20px 45px rgba(0,0,0,.18);
}
#addServiceModal{
  padding: 0 !important;
}
#addServiceModal .modal-dialog{
  margin: .5rem auto;
}
#addServiceModal .modal-content{
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 1rem);
  max-height:calc(100dvh - 1rem);
}
#addServiceModal .modal-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
@supports not (height: 100dvh){
  #addServiceModal .modal-content{
    max-height:calc(100vh - 1rem);
  }
}

/* Match Service Details modal behavior across devices/orientations */
#serviceDetailModal .modal-dialog{
  margin:.5rem auto;
}
#serviceDetailModal .modal-content{
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 1rem);
  max-height:calc(100dvh - 1rem);
}
#serviceDetailModal .modal-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
@supports not (height: 100dvh){
  #serviceDetailModal .modal-content{
    max-height:calc(100vh - 1rem);
  }
}

@media (max-width: 991.98px){
  #addServiceModal .modal-dialog,
  #serviceDetailModal .modal-dialog{
    margin:0;
    width:100%;
    max-width:100%;
    height:100vh;
    height:100dvh;
  }
  #addServiceModal .modal-content,
  #serviceDetailModal .modal-content{
    border-radius:0;
    height:100%;
    max-height:100%;
  }
  #addServiceModal .modal-header,
  #addServiceModal .modal-footer,
  #serviceDetailModal .modal-header,
  #serviceDetailModal .modal-footer{
    position:sticky;
    z-index:2;
    background:#fff;
  }
  #addServiceModal .modal-header,
  #serviceDetailModal .modal-header{
    top:0;
  }
  #addServiceModal .modal-footer,
  #serviceDetailModal .modal-footer{
    bottom:0;
  }
}

/* Extra support for short-height / landscape devices */
@media (max-height: 700px){
  #addServiceModal .modal-dialog,
  #serviceDetailModal .modal-dialog{
    margin:0;
  }
  #addServiceModal .modal-content,
  #serviceDetailModal .modal-content{
    max-height:100vh;
    max-height:100dvh;
    border-radius:0;
  }
}

#addServiceModal .form-label,
#addServiceModal .form-check-label{
  font-weight:600;
}
.modal-header{
  border-bottom:1px solid #edf0f6;
}
.modal-footer{
  border-top:1px solid #edf0f6;
}
.form-control,
.form-select{
  border-radius:10px;
}
.btn{
  border-radius:10px;
}

.explore-btn{
  background-color:#00674F;
  border-color:#00674F;
  color:#fff;
}

.explore-btn:hover,
.explore-btn:focus{
  background-color:#005541;
  border-color:#005541;
  color:#fff;
}
.provider-fields{
  padding:12px;
  border:1px dashed #d7dded;
  border-radius:12px;
  background:#f8faff;
  margin-bottom:12px;
}
.form-check-label{
  font-size:.92rem;
}

#loginModal .input-group .password-toggle-inline{
  min-width:46px;
  max-width:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-left:0;
  font-size:1rem;
  line-height:1;
  padding:0;
}
#loginModal .input-group .form-control{
  border-right:0;
}
#loginModal .input-group .form-control:focus{
  box-shadow:none;
}
#loginModal .input-group:focus-within{
  box-shadow:0 0 0 .2rem rgba(13,110,253,.15);
  border-radius:10px;
}

@media (max-width:576px){
  .brand-text{
    font-size:1.2rem;
  }
}

.provider-dashboard-body{
  background:linear-gradient(180deg,#f6f8fc 0%, #eef2ff 100%);
}

.provider-dashboard-body.provider-add-service-page{
  background:#fff;
}
.provider-topbar{
  background:#fff;
  border-bottom:1px solid #e8ecf4;
}
.provider-hero{
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:18px;
  padding:22px;
  box-shadow:0 10px 28px rgba(15,23,42,.05);
}
.provider-kicker{
  color:#667085;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.74rem;
}
.provider-title{
  font-size:1.5rem;
  font-weight:700;
}
.provider-alert{
  border-radius:12px;
  border:0;
}
.provider-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.stat-box{
  position:relative;
  overflow:hidden;
  background:linear-gradient(140deg, rgba(255,255,255,.92) 0%, rgba(246,255,252,.96) 100%);
  border:1px solid rgba(0,103,79,.12);
  border-radius:16px;
  padding:16px;
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  backdrop-filter:blur(4px);
}

.stat-box::before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at top right, rgba(0,103,79,.12), transparent 48%);
  pointer-events:none;
}

.stat-box p{
  position:relative;
  margin:0;
  color:#4b5563;
  font-size:.82rem;
  font-weight:600;
  letter-spacing:.02em;
  text-transform:uppercase;
}

.stat-box h3{
  position:relative;
  margin:.42rem 0 0;
  font-size:1.5rem;
  font-weight:800;
  line-height:1.1;
  color:#0f172a;
}

.stat-box.active h3{ color:#0f9f6e; text-shadow:0 0 14px rgba(15,159,110,.22); }
.stat-box.paused h3{ color:#f59e0b; text-shadow:0 0 14px rgba(245,158,11,.2); }

@media (max-width:768px){
  .provider-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }

  .stat-box{
    padding:14px;
  }

  .stat-box h3{
    font-size:1.28rem;
  }
}

.provider-panel{
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:18px;
  padding:22px;
  box-shadow:0 10px 28px rgba(15,23,42,.05);
}
.panel-head h2{
  margin:0 0 .2rem;
  font-size:1.15rem;
  font-weight:700;
}
.panel-head p{
  margin:0 0 1rem;
  color:#6b7280;
  font-size:.92rem;
}

.empty-state{
  border:1px dashed #d7deed;
  border-radius:14px;
  padding:20px;
  text-align:center;
  color:#6b7280;
  background:#fafbff;
}

.provider-services-table th,
.provider-services-table td{
  vertical-align:middle;
}

.provider-service-detail-modal{
  border-radius:14px;
  max-width:460px;
  margin-left:auto;
  margin-right:auto;
}

.provider-service-detail-card{
  border:1px solid #e6ebf5;
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}

.provider-service-detail-media{
  position:relative;
}

.provider-service-detail-image{
  width:100%;
  height:130px;
  object-fit:cover;
  background:#f3f5fa;
  display:block;
}

.provider-service-detail-image-fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#7b8598;
  font-weight:600;
}

.provider-service-detail-badge{
  position:absolute;
  top:10px;
  right:10px;
  padding:4px 10px;
  border-radius:999px;
  font-size:.75rem;
  font-weight:700;
  text-transform:capitalize;
}
.provider-service-detail-badge.active{
  background:rgba(16,185,129,.16);
  color:#047857;
}
.provider-service-detail-badge.paused{
  background:rgba(245,158,11,.16);
  color:#b45309;
}

.provider-service-detail-body{
  padding:12px 14px;
}

@media (max-width:576px){
  .provider-service-detail-image{
    height:110px;
  }
  .hero .search-wrap.hero-search{
    width:min(340px, 96%);
    padding:10px !important;
    border-radius:12px !important;
    box-shadow:0 10px 24px rgba(0,0,0,.18) !important;
  }

  .hero .hero-search .input-group{
    display:flex;
    flex-direction:column;
    gap:0;
  }

  .hero .hero-search #searchCategory,
  .hero .hero-search #searchDistrict,
  .hero .hero-search #searchInput,
  .hero .hero-search #searchBtn{
    width:100%;
    border-radius:0 !important;
    min-height:52px;
    font-size:17px !important;
  }

  .hero .hero-search #searchCategory{
    border-bottom:1px solid #d8dee8 !important;
    padding-left:14px;
    padding-right:14px;
    color:#111827;
  }

  .hero .hero-search #searchDistrict{
    border-bottom:1px solid #d8dee8 !important;
    padding-left:14px;
    padding-right:14px;
    color:#111827;
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    background-color:#fff;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='%23111827' d='M4.47 6.97a.75.75 0 0 1 1.06 0L8 9.44l2.47-2.47a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 14px center;
    background-size:18px 18px;
    padding-right:36px;
  }

  .hero .hero-search #searchInput{
    border-bottom:1px solid #d8dee8 !important;
    padding-left:14px;
    padding-right:14px;
    color:#1f2937;
  }

  .hero .hero-search #searchInput::placeholder{
    color:#475467;
    opacity:1;
  }

  .hero .hero-search #searchBtn{
    margin-top:10px;
    border-radius:8px !important;
    background:#00674F !important;
    border-color:#00674F !important;
    color:#fff !important;
    font-weight:700;
  }
}

/* Admin KPI - modern horizontal layout */
.admin-kpi-grid{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:stretch;
}

.admin-kpi-card{
  flex:1 1 180px;
  min-width:170px;
  background:linear-gradient(135deg, #00674F 0%, #0a7f63 100%);
  color:#ffffff;
  border:1px solid rgba(255,255,255,.18);
  border-radius:16px;
  padding:16px 18px;
  box-shadow:0 10px 24px rgba(0,103,79,.22);
  transition:transform .18s ease, box-shadow .18s ease;
}

.admin-kpi-card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 28px rgba(0,103,79,.28);
}

.admin-kpi-card p{
  margin:0;
  font-size:.82rem;
  font-weight:600;
  letter-spacing:.02em;
  opacity:.92;
}

.admin-kpi-card h3{
  margin:.35rem 0 0;
  font-size:1.45rem;
  font-weight:800;
  line-height:1.15;
  color:#fff;
}

.admin-kpi-card.highlight{
  background:linear-gradient(135deg, #005844 0%, #00674F 55%, #139a77 100%);
  border-color:rgba(255,255,255,.26);
}

@media (max-width:768px){
  .admin-kpi-card{
    flex:1 1 calc(50% - 14px);
    min-width:unset;
  }
}

@media (max-width:480px){
  .admin-kpi-card{
    flex:1 1 100%;
  }
}

.admin-orders-badge{
  font-size:.68rem;
  min-width:18px;
  height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 5px;
}

.admin-side-toast{
  position:fixed;
  right:16px;
  top:88px;
  z-index:1080;
  background:#0f172a;
  color:#fff;
  border-left:4px solid #00674F;
  border-radius:10px;
  box-shadow:0 10px 24px rgba(0,0,0,.22);
  padding:10px 14px;
  font-size:.9rem;
  opacity:0;
  transform:translateX(20px);
  transition:opacity .8s ease, transform .8s ease;
  pointer-events:none;
}
.admin-side-toast.show{
  opacity:1;
  transform:translateX(0);
}
