:root {
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --border: #e2e8f0;
  --danger: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Frontend header */
header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.top-bar {
  display:flex;
  flex-wrap:wrap;
  gap:0.6rem;
  justify-content:space-between;
  align-items:center;
  padding:0.4rem 1.5rem;
  font-size:0.8rem;
  color:#e5e7eb;
  background:#0f172a;
}
.top-bar a { color:#bfdbfe; }
.top-bar-date { font-weight:500; }
nav {
  position:sticky;
  top:0;
  z-index:40;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1.5rem;
  padding:0.75rem 1.5rem;
  background:rgba(255,255,255,0.78);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  box-shadow:0 12px 30px rgba(15,23,42,0.08);
}
.site-nav-top { display:flex; align-items:center; justify-content:space-between; width:100%; }
.site-logo { display:flex; align-items:center; gap:0.5rem; }
.site-logo-img { height:32px; width:auto; object-fit:contain; }
.site-logo-text { font-weight:700; font-size:1.05rem; color:var(--text); }
.site-nav-links { display:flex; flex-wrap:nowrap; gap:1.2rem; font-size:0.92rem; }
.site-nav-links a {
  color:var(--text-muted);
  font-weight:500;
  padding:0.2rem 0.15rem;
  border-bottom:2px solid transparent;
  white-space:nowrap;
}
.site-nav-links a:hover {
  color:var(--accent);
  border-bottom-color:var(--accent-soft);
  text-decoration:none;
}
.header-note {
  padding:0.35rem 1.5rem;
  font-size:0.8rem;
  background:#eff6ff;
  border-bottom:1px solid #dbeafe;
}

main {
  padding:1.5rem;
  max-width:1140px;
  margin:0 auto;
}
.hero {
  background: radial-gradient(circle at top left, var(--accent-soft), #ffffff);
  border-radius:1.25rem;
  padding:1.8rem 1.6rem;
  box-shadow:0 18px 40px rgba(148,163,184,0.35);
  margin-bottom:1.6rem;
  border:1px solid #dbeafe;
}
.hero h1 { margin:0 0 0.5rem; font-size:1.9rem; }
.hero .content { margin-top:0.5rem; font-size:0.96rem; color:var(--text-muted); }
.meta-line { font-size:0.85rem; color:var(--text-muted); margin:0.25rem 0 0.75rem; }
.hero-actions { margin-top:0.9rem; display:flex; flex-wrap:wrap; gap:0.6rem; }

.cards {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:1rem;
  margin-top:1rem;
}
.card, .admin-card {
  background:var(--bg-card);
  border-radius:1rem;
  border:1px solid var(--border);
  padding:1rem 1.1rem;
  box-shadow:0 8px 20px rgba(15,23,42,0.08);
}
.card h2 { margin-top:0; font-size:1.05rem; }

.btn, .btn-outline, .btn-small, .btn-danger {
  display:inline-block;
  padding:0.45rem 0.9rem;
  border-radius:999px;
  border:1px solid transparent;
  font-size:0.85rem;
  cursor:pointer;
  font-weight:600;
  text-align:center;
}
.btn {
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#ffffff;
  box-shadow:0 8px 16px rgba(37,99,235,0.35);
}
.btn:hover { box-shadow:0 10px 20px rgba(37,99,235,0.45); }
.btn-outline { background:#ffffff; color:#2563eb; border-color:#2563eb; }
.btn-outline:hover { background:#eff6ff; }
.btn-small { padding:0.25rem 0.6rem; font-size:0.78rem; }
.btn-danger { background:var(--danger); color:#ffffff; }

footer {
  border-top:1px solid var(--border);
  padding:0.8rem 1.5rem;
  font-size:0.8rem;
  color:var(--text-muted);
  text-align:center;
  margin-top:1.5rem;
  background:#ffffff;
}

/* form */
form { display:flex; flex-direction:column; gap:0.4rem; margin-top:0.8rem; }
label { font-size:0.85rem; color:var(--text-muted); }
input[type=text],input[type=email],input[type=password],input[type=number],input[type=date],textarea,select{
  background:#ffffff;
  border-radius:0.5rem;
  border:1px solid #cbd5e1;
  padding:0.45rem 0.6rem;
  font-size:0.9rem;
  color:var(--text);
}
input:focus,textarea:focus,select:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 1px rgba(37,99,235,0.25);
}
textarea{ resize:vertical; min-height:80px; }

.notice{background:#eff6ff;border-left:3px solid #3b82f6;padding:0.5rem 0.8rem;border-radius:0.7rem;font-size:0.85rem;}
.success{background:#ecfdf3;border-left:3px solid #22c55e;padding:0.5rem 0.8rem;border-radius:0.7rem;font-size:0.85rem;}
.error{background:#fef2f2;border-left:3px solid #ef4444;padding:0.5rem 0.8rem;border-radius:0.7rem;font-size:0.85rem;}
.badge{display:inline-block;padding:0.12rem 0.5rem;border-radius:999px;font-size:0.72rem;border:1px solid #e2e8f0;color:#0f172a;background:#f9fafb;}
.service-icon{width:60px;height:60px;object-fit:contain;margin-bottom:0.5rem;display:block;}

/* Admin */
body.admin-area{background:#e5edf5;}
body.admin-area .admin-header{
  position:fixed;top:0.8rem;left:0.8rem;bottom:0.8rem;width:230px;
  background:#0f172a;border-radius:1.25rem;border:1px solid #020617;
  padding:1rem 1rem 1.4rem;display:flex;flex-direction:column;gap:0.75rem;
  box-shadow:0 18px 40px rgba(15,23,42,0.5);
}
.admin-logo{display:flex;align-items:center;justify-content:flex-start;gap:0.6rem;}

.admin-logo-img{max-width:100%;max-height:100%;object-fit:contain;border-radius:0.6rem;background:#ffffff;}
.admin-logo-text{display:flex;flex-direction:column;flex:1;}
.admin-logo-title{font-size:0.95rem;font-weight:600;color:#e5e7eb;}
.admin-logo-sub{font-size:0.7rem;color:#9ca3af;}
body.admin-area .admin-header h1{font-size:1rem;margin:0.3rem 0 0.5rem;color:#e5e7eb;}
body.admin-area .admin-header nav{padding:0;margin-top:0.2rem;display:flex;flex-direction:column;gap:0.2rem;}
body.admin-area .admin-header nav a{font-size:0.85rem;padding:0.35rem 0.55rem;border-radius:0.4rem;color:#e5e7eb;opacity:0.9;}
body.admin-area .admin-header nav a:hover{background:rgba(148,163,184,0.16);text-decoration:none;}
body.admin-area .admin-header nav a.active{background:#1d4ed8;color:#f9fafb;opacity:1;}
body.admin-area .admin-main{margin-left:260px;padding:1.4rem 1.8rem 2.2rem;}

body.admin-area .admin-card{margin-bottom:1.1rem;}
.admin-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:0.6rem;}
.table-wrapper{overflow-x:auto;}
.admin-table{width:100%;border-collapse:collapse;font-size:0.85rem;}
.admin-table th,.admin-table td{border-bottom:1px solid #e5e7eb;padding:0.4rem 0.5rem;text-align:left;}
.admin-table th{background:#f8fafc;}

.admin-login{display:flex;justify-content:center;align-items:center;min-height:100vh;background:radial-gradient(circle at top,#bfdbfe,#eff6ff);}
.login-form{background:#ffffff;border-radius:1rem;padding:1.6rem 1.8rem;border:1px solid var(--border);width:320px;box-shadow:0 16px 40px rgba(15,23,42,0.2);}
.login-form h1{margin-top:0;margin-bottom:0.8rem;font-size:1.15rem;}

.checkbox-inline{display:flex;align-items:center;gap:0.4rem;font-size:0.85rem;}

@media(max-width:640px){
  .top-bar{display:none;}
  nav{flex-direction:column;align-items:flex-start;gap:0.4rem;padding-inline:1rem;}
  main{padding:1rem;}
  .hero{padding:1.4rem 1.2rem;}
}
@media(max-width:768px){
  body.admin-area .admin-header{position:static;width:auto;flex-direction:column;padding:0.7rem 0.8rem 0.6rem;border-right:none;border-bottom:1px solid rgba(15,23,42,0.12);}
  body.admin-area .admin-main{margin-left:0;padding:0.9rem;}
  body.admin-area .admin-header nav{flex-direction:row;flex-wrap:wrap;gap:0.35rem;margin-top:0.4rem;}
}

.pill {
  display:inline-block;
  padding:0.15rem 0.55rem;
  border-radius:999px;
  font-size:0.72rem;
  font-weight:600;
}
.pill-success { background:#dcfce7; color:#166534; }
.pill-warning { background:#fef9c3; color:#854d0e; }
.pill-danger  { background:#fee2e2; color:#b91c1c; }


/* Updated logo style and admin layout tweaks */
.admin-logo-img {
    height: 48px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0;
    background: none;
}
.admin-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 0.5rem;
}
.admin-logo-fallback {
    font-weight: 700;
    font-size: 0.9rem;
    color: #e5e7eb;
}
body.admin-area .admin-header {
    width: 210px;
    padding: 1rem 0.9rem 1.4rem;
}
body.admin-area .admin-main {
    margin-left: 230px;
}

/* Slightly tighten admin nav spacing */
body.admin-area .admin-header nav a {
    display: block;
}

/* Force left alignment for admin sidebar menu */
body.admin-area .admin-header nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    width: 100% !important;
}

body.admin-area .admin-header nav a {
    width: 100% !important;
    text-align: left !important;
    padding-left: 0.35rem !important;
}

body.admin-area .admin-header nav a:hover {
    padding-left: 0.55rem !important;
}


footer {
  margin-top:2rem;
  padding:1rem 1.4rem 1.6rem;
  border-top:1px solid var(--border);
  font-size:0.85rem;
  color:var(--text-muted);
}
.footer-inner {
  display:flex;
  flex-direction:column;
  gap:0.4rem;
  align-items:center;
  text-align:center;
}
.footer-nav {
  display:flex;
  flex-wrap:wrap;
  gap:0.6rem;
  justify-content:center;
}
.footer-nav a {
  text-decoration:none;
  color:var(--accent);
  font-weight:500;
}
.footer-nav a:hover {
  text-decoration:underline;
}

.color-input-row{
  display:flex;
  align-items:center;
  gap:0.5rem;
}
.color-preview{
  width:28px;
  height:28px;
  border-radius:0.5rem;
  border:1px solid var(--border);
  background:#e5e7eb;
}
.appearance-row label{
  display:block;
}

/* Layout modes */
body.layout-boxed main{
  max-width:1140px;
  margin:0 auto;
}
body.layout-full main{
  max-width:none;
  margin:0;
}
body.layout-full .hero{
  border-radius:0;
}

.nav-toggle{
  display:none;
  background:transparent;
  border:none;
  cursor:pointer;
  width:32px;
  height:28px;
  padding:0;
  position:relative;
}
.nav-toggle span{
  position:absolute;
  left:0;
  right:0;
  height:2px;
  background:var(--text);
  border-radius:999px;
  transition:transform 0.18s ease, top 0.18s ease, opacity 0.18s ease;
}
.nav-toggle span:nth-child(1){ top:4px; }
.nav-toggle span:nth-child(2){ top:13px; }
.nav-toggle span:nth-child(3){ top:22px; }

body.nav-open .nav-toggle span:nth-child(1){
  top:13px;
  transform:rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2){
  opacity:0;
}
body.nav-open .nav-toggle span:nth-child(3){
  top:13px;
  transform:rotate(-45deg);
}


.desktop-nav{
  display:flex;
  flex-wrap:wrap;
  gap:0.9rem;
  font-size:0.92rem;
}

/* mobile nav base (will be hidden on desktop via media query) */

.mobile-nav-links{
  width:100%;
  height:100%;
  padding:1rem 1.2rem;
  background:rgba(255,255,255,0.96);
  display:flex;
  flex-direction:column;
  gap:0.5rem;
}
.mobile-nav-links a{
  color:var(--text);
  text-decoration:none;
  padding:0.2rem 0;
}
.mobile-nav-links a:hover{
  color:var(--accent);
}
.mobile-nav-links a{
  color:var(--text-muted);
  text-decoration:none;
  padding:0.15rem 0;
}
.mobile-nav-links a:hover{
  color:var(--accent);
}

/* Responsive nav for mobile */
@media(max-width:768px){
  .site-nav-top{
    padding:0.4rem 1.1rem;
  }
  .site-nav-links.desktop-nav{
    display:none;
  }
  .nav-toggle{
    display:inline-block;
  }
}

@media(min-width:769px){
  .nav-toggle{
    display:none !important;
  }
  
}

.nav-overlay{
  position:fixed;
  inset:0;
  background:rgba(15, 23, 42, 0.32);
  opacity:0;
  pointer-events:none;
  transition:opacity 0.18s ease;
  z-index:8;
}
body.nav-open .nav-overlay{
  opacity:1;
  pointer-events:auto;
}

/* ensure header/nav sit above overlay content */
header nav{
  position:relative;
  z-index:9;
}


/* === FIXED RIGHT-SIDE MOBILE DRAWER === */
.mobile-nav{
  position:fixed;
  top:0;
  right:0;
  height:100vh;
  width:78vw;
  max-width:320px;
  background:transparent;
  display:flex;
  justify-content:flex-end;
  transform:translateX(100%);
  opacity:0;
  pointer-events:none;
  transition:transform 0.25s ease-out, opacity 0.2s ease-out;
  z-index:1001;
}
body.nav-open .mobile-nav{
  transform:translateX(0);
  opacity:1;
  pointer-events:auto;
}
.mobile-nav-links{
  width:100%;
  height:100%;
  padding:1rem 1.2rem;
  background:rgba(255,255,255,0.96);
  display:flex;
  flex-direction:column;
  gap:0.5rem;
}
.mobile-nav-links a{
  color:var(--text);
  text-decoration:none;
  padding:0.2rem 0;
}
.mobile-nav-links a:hover{
  color:var(--accent);
}
/* Mobile Only */
@media(max-width:768px){
  .site-nav-links.desktop-nav{
    display:none;
  }
  .nav-toggle{
    display:inline-block;
  }
}
/* Desktop Only */
@media(min-width:769px){
  .nav-toggle{
    display:none !important;
  }
  .mobile-nav{
    display:none !important;
  }
}


.floating-cta {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 50;
}

.floating-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.25);
  border: none;
}

.floating-cta a.secondary {
  background: #10b981;
}

.floating-cta a span {
  margin-right: 0.4rem;
}

@media (max-width: 640px) {
  .floating-cta {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .floating-cta a span {
    display: none;
  }
}

.hero-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn-secondary {
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: #ffffff;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.btn-secondary:hover {
  background: var(--accent-soft);
}

.footer-columns{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:1.5rem;
  margin-top:1rem;
}
.footer-col h4{
  margin:0 0 0.5rem;
  font-size:1rem;
}
.footer-col p,
.footer-col li,
.footer-col a{
  font-size:0.9rem;
}
.footer-col ul{
  list-style:none;
  padding:0;
  margin:0;
}
.footer-col li + li{
  margin-top:0.25rem;
}

.nav-cta{
  padding:0.45rem 0.95rem;
  border-radius:999px;
  background:linear-gradient(135deg,var(--accent),#1d4ed8);
  color:#ffffff;
  font-size:0.88rem;
  font-weight:600;
  text-decoration:none;
  box-shadow:0 10px 25px rgba(37,99,235,0.35);
  white-space:nowrap;
}
.nav-cta:hover{
  text-decoration:none;
  filter:brightness(1.05);
  box-shadow:0 14px 30px rgba(37,99,235,0.45);
}
@media(max-width:768px){
  .nav-cta{
    display:none;
  }
}

.quote-section{
  margin-top:1rem;
}
.quote-layout{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,1.4fr);
  gap:2rem;
  align-items:flex-start;
}
.quote-info h2{
  margin-top:0;
  margin-bottom:0.5rem;
}
.quote-info ul{
  margin:0.5rem 0 0;
  padding-left:1.1rem;
  font-size:0.9rem;
}
.quote-form form{
  display:flex;
  flex-direction:column;
  gap:0.35rem;
}
@media(max-width:768px){
  .quote-layout{
    grid-template-columns:1fr;
  }
}


body.admin-area .admin-sidebar{background:rgba(10,15,30,0.95);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);}body.admin-area .admin-sidebar a{color:#e2e8f0!important;opacity:.9;}body.admin-area .admin-sidebar a:hover,body.admin-area .admin-sidebar a.active{background:#1d4ed8!important;color:#fff!important;opacity:1;}