/* build */
/*
  Forever Hardwood Floors, Inc - lightweight, responsive styles
  Stack: plain CSS, mobile‑first, no external deps
*/

:root{
  --brand: #F08731;        /* primary */
  --brand-2: #EC7411;      /* accent */
  --brand-dark: #0b0d10;   /* from logo bg */
  --ink: #1a1d23;          /* main text - darker */
  --muted: #4a5058;        /* secondary text - darker */
  --bg: #f8f9fb;           /* page background - slightly off-white */
  --bg-alt: #0f1114;       /* dark blocks */
  --surface: #ffffff;      /* cards/forms - pure white for contrast */
  --surface-alt: #f1f3f6;  /* alternate surface - slightly darker */
  --border: #d4d8de;       /* borders - more visible */
  --border-light: #e5e8ed; /* lighter borders */
  --ring: rgba(240,135,49,0.45);
  --maxw: 1100px;
    --radius: 14px;
  --section-pad: 48px;     /* unified vertical rhythm (desktop) */
  --grad: linear-gradient(135deg, var(--brand), var(--brand-2));
  --shadow-sm: 0 2px 8px rgba(16,17,20,.12);
  --shadow-md: 0 8px 25px rgba(16,17,20,.15);
  --shadow-lg: 0 12px 35px rgba(16,17,20,.18);
}

/* Accessibility utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Helvetica,Arial,sans-serif; color:var(--ink); background:var(--bg);
}
.container{max-width:var(--maxw); margin:0 auto; padding:0 20px}
.section{padding:var(--section-pad) 0}
.section > *:first-child{margin-top:0}
.section + .section{padding-top:0}
.section > *:last-child{margin-bottom:0}
/* Tighter, uniform spacing on small screens */
@media (max-width: 820px){
  .section{padding:40px 0}
}
/* Normalize inter-section spacing: prevent extra bottom margins leaking out */
.section > *:last-child{margin-bottom:0}
.section-header h2{margin:0 0 8px; position:relative; display:inline-block}
.section-header h2::after{content:""; position:absolute; left:0; bottom:-12px; width:100%; height:6px; border-radius:6px; background:linear-gradient(90deg,var(--brand),var(--brand-2)); box-shadow:0 2px 6px rgba(240,135,49,.22)}
.section-header p{margin:16px 0 0; color:var(--muted)}
/* Add spacing after section-header when it's the only child or followed by content */
.section-header{margin-bottom:20px}
.section-header + *{margin-top:0} /* Reset margin on immediate following element */
.skip-link{position:absolute;left:-999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{left:16px;top:16px;width:auto;height:auto;background:#fff;color:#000;padding:8px 12px;border-radius:8px;z-index:999}

/* Header / Nav */
.site-header{position:sticky; top:0; background:rgba(255,255,255,.95); -webkit-backdrop-filter:saturate(180%) blur(8px); backdrop-filter:saturate(180%) blur(8px); border-bottom:1px solid var(--border-light); z-index:50; overflow:visible; padding-top:calc(env(safe-area-inset-top,0) + 26px); padding-bottom:6px; box-shadow:0 2px 12px rgba(16,17,20,.08)}
.site-header .nav{display:flex; align-items:center; justify-content:space-between; height:64px; padding:0; box-sizing:border-box}
.brand{display:flex; gap:10px; align-items:center; color:inherit; text-decoration:none; font-weight:700}
.brand img{display:block; width:46px; height:46px; border-radius:8px; -ms-flex:0 0 auto; flex:0 0 auto; object-fit:contain}
/* Make brand text next to logo slightly larger */
.brand span{font-size:1.1rem}
@media (min-width: 900px){
  .brand span{font-size:1.15rem}
}
/* Tighter baseline so text centers with the logo */
@media (max-width: 820px){
  .brand span{display:block; line-height:1; position:relative; top:1px}
  .nav-toggle{align-self:center}
}
.nav .links{display:flex; gap:18px; align-items:center}
.nav .links a{color:var(--ink); text-decoration:none; font-weight:600}
.nav .links a:not(.primary):hover{color:var(--brand)}

.btn{display:inline-block; padding:10px 14px; border-radius:10px; border:1px solid var(--border); text-decoration:none; color:var(--ink); font-weight:650; box-shadow:var(--shadow-sm); transition:border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease, filter .2s ease}
.btn:hover{border-color:var(--brand); color:var(--brand); box-shadow:var(--shadow-md); transform:translateY(-1px)}
.btn.primary{background:var(--grad); border:none; color:var(--ink); box-shadow:var(--shadow-md)}
.btn.primary:hover{filter:brightness(1.06); box-shadow:var(--shadow-lg); transform:translateY(-2px)}
.btn.ghost{background:transparent}

.nav-toggle{display:none; background:none; border:0; padding:8px; border-radius:10px}
.nav-toggle span{display:block; width:24px; height:2px; background:var(--ink); margin:5px 0; transition:.2s}

@media (max-width: 820px){
  .nav .links{position:fixed; inset:64px 0 auto 0; background:var(--surface); border-bottom:1px solid var(--border-light); padding:14px 20px; display:-ms-grid; display:grid; -ms-grid-columns:1fr; grid-template-columns:1fr; gap:10px; transform:translateY(-120%); transition:transform .25s ease; box-shadow:var(--shadow-md)}
  .nav-toggle{display:inline-block}
  .site-header.open .links{transform:translateY(0)}
}

/* Hero */
.hero{display:block; padding:var(--section-pad) 0}
.hero .hero-content > *:first-child{margin-top:0}
.hero :is(h1,h2,h3,p,ul,ol){margin-block-start:0}
.hero > *:last-child{margin-bottom:0}
.hero + .section{padding-top:var(--section-pad)}
.hero{background:linear-gradient(180deg, rgba(240,135,49,.12), rgba(236,116,17,.05)); border-bottom:1px solid var(--border-light); box-shadow:inset 0 -1px 0 rgba(255,255,255,.5)}
.hero .subtitle{color:var(--muted)}
.hero .cta-row{display:flex; gap:12px; flex-wrap:wrap; margin:16px 0}
.badges{display:flex; gap:16px; flex-wrap:wrap; padding:0; margin:16px 0 0; list-style:none; color:var(--ink)}
.badges li{background:var(--surface); padding:6px 10px; border-radius:10px; border:1px solid var(--border); box-shadow:var(--shadow-sm)}
@media (max-width: 820px){
  :root{ --section-pad: 32px }
}

/* Cards */
.cards{margin-top:24px; display:-ms-grid; display:grid; -ms-grid-columns:1fr 16px 1fr 16px 1fr 16px 1fr 16px 1fr; grid-template-columns:repeat(5,1fr); gap:16px}
.card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow-sm); transition:transform .2s ease, box-shadow .2s ease}
.card:hover{transform:translateY(-3px); box-shadow:var(--shadow-md)}
.card h3{margin:0 0 6px; color:var(--ink)}
.card p{margin:0; color:var(--muted)}
@media (max-width: 1100px){.cards{grid-template-columns:repeat(3,1fr)}}
@media (max-width: 680px){.cards{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 460px){.cards{grid-template-columns:1fr}}

/* Two column */
.two-col{display:-ms-grid; display:grid; -ms-grid-columns:1fr 24px 1fr; grid-template-columns:1fr 1fr; gap:24px; align-items:start}
@media (max-width: 820px){.two-col{grid-template-columns:1fr}}

/* Quotes */
.quotes{display:-ms-grid; display:grid; -ms-grid-columns:1fr 16px 1fr 16px 1fr; grid-template-columns:1fr 1fr 1fr; gap:16px}
.stars{color:#F5A524; font-weight:700; letter-spacing:1px; margin:0 0 6px}
.read-toggle{background:none; border:0; color:var(--brand); font-weight:700; cursor:pointer; padding:0; margin-top:6px}
.read-toggle:hover{color:var(--brand-2)}
/* Interactive rating stars */
.stars-input{display:inline-flex; gap:6px; align-items:center}
.stars-input .star{background:none; border:0; padding:0; margin:0; font-size:1.3rem; line-height:1; cursor:pointer; color:#c7cbd4}
.stars-input .star.active{color:#F5A524}
.stars-input .star:focus{outline:3px solid var(--ring); outline-offset:2px; border-radius:6px}
.quotes figure{margin:0; padding:18px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); transition:transform .2s ease, box-shadow .2s ease}
.quotes figure:hover{transform:translateY(-2px); box-shadow:var(--shadow-md)}
.quotes blockquote{margin:0 0 8px; color:var(--ink)}
.quotes figcaption{color:var(--muted); font-weight:600}
@media (max-width: 1100px){.quotes{grid-template-columns:1fr 1fr}}
@media (max-width: 680px){.quotes{grid-template-columns:1fr}}

/* Gallery */
.gallery-grid{margin-top:18px; display:-ms-grid; display:grid; -ms-grid-columns:1fr 12px 1fr 12px 1fr 12px 1fr; grid-template-columns:repeat(4,1fr); gap:12px}
.gallery-grid img{width:100%; height:160px; object-fit:cover; border-radius:12px; background:linear-gradient(135deg,var(--surface-alt),var(--border-light)); border:1px solid var(--border); box-shadow:var(--shadow-sm); transition:transform .2s ease, box-shadow .2s ease}
.gallery-grid img:hover{transform:translateY(-2px); box-shadow:var(--shadow-md)}
/* before/after labels */
.ba{position:relative}
.ba figcaption{position:absolute; left:10px; top:10px; background:rgba(11,13,16,.85); color:#fff; font-weight:700; padding:4px 8px; border-radius:999px; font-size:.8rem; border:1px solid rgba(255,255,255,.3); box-shadow:0 2px 8px rgba(0,0,0,.25)}

/* thumb links */
.thumb{display:block; position:relative; transition:transform .2s ease, filter .2s ease}
.thumb:hover{transform:translateY(-3px)}
.thumb:hover img{filter:brightness(1.06)}
.thumb .label{position:absolute; right:8px; bottom:8px; background:rgba(16,17,20,.8); color:#fff; padding:4px 8px; border-radius:999px; font-weight:700; font-size:.78rem; border:1px solid rgba(255,255,255,.35); box-shadow:0 2px 8px rgba(0,0,0,.3)}
.view-all-row{margin:10px 0 0}
.subhead{margin:28px 0 6px}
@media (max-width: 1100px){.gallery-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width: 700px){.gallery-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 520px){.gallery-grid{grid-template-columns:1fr}}

/* Contact */
.contact .contact-grid{display:-ms-grid; display:grid; -ms-grid-columns:1fr 16px 1fr 16px 1fr; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:12px}
.contact-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow-sm); transition:transform .2s ease, box-shadow .2s ease}
.contact-card:hover{transform:translateY(-2px); box-shadow:var(--shadow-md)}
.contact-card h3{margin:0 0 6px; color:var(--ink)}
.contact-card p {
  display: flex;
  -ms-flex-direction: column; /* IE 10+ */
  flex-direction: column;
  gap: 0.5rem;
}

.contact-card .btn {
  width: 100%;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tel{font-size:1.3rem; font-weight:800; color:var(--brand-2); text-decoration:none}
.legal{margin-top:18px; color:var(--muted)}
@media (max-width: 820px){.contact .contact-grid{grid-template-columns:1fr}}

/* Contact form + map */
.contact-flex{display:-ms-grid; display:grid; -ms-grid-columns:1.1fr 18px .9fr; grid-template-columns:1.1fr .9fr; gap:18px; margin-top:18px}
@media (max-width: 980px){.contact-flex{grid-template-columns:1fr}}
.form-card,.map-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow-sm)}
.review-form-card{margin-top:16px}
.form .field{display:flex; -ms-flex-direction:column; flex-direction:column; gap:6px; margin:10px 0}
.form input,.form select,.form textarea{padding:10px 12px; border:1px solid var(--border); border-radius:10px; font:inherit; background:var(--surface); transition:border-color .2s ease, box-shadow .2s ease}
.form input:focus,.form select:focus,.form textarea:focus{outline:3px solid var(--ring); outline-offset:2px; border-color:var(--brand); box-shadow:var(--shadow-sm)}
.form .actions{margin-top:8px}
.hide{position:absolute; left:-9999px}
.help{color:var(--muted); margin:4px 0 10px}
.notice{padding:10px 12px; border-radius:10px; margin:10px 0; font-weight:600; box-shadow:var(--shadow-sm)}
.notice.success{background:linear-gradient(135deg,rgba(240,135,49,.15),rgba(236,116,17,.1)); border:1px solid rgba(240,135,49,.4); color:var(--ink)}
.notice.error{background:linear-gradient(135deg,rgba(220,38,38,.1),rgba(185,28,28,.05)); border:1px solid rgba(220,38,38,.3); color:#7a0a1a}

/* Google Business Listing */
.google-business-section{margin:16px 0 24px}

/* Custom Google Business Widget */
.google-business-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--ink);
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.google-business-widget:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.business-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  text-align: left;
}

.business-details h4 {
  margin: 0 0 6px 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
}

.business-details p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.business-stats {
  display: -ms-grid; /* IE 10+ */
  display: grid;
  -ms-grid-columns: 1fr 12px 1fr 12px 1fr 12px 1fr; /* IE fallback */
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  background: var(--surface-alt);
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.stat {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--brand);
}

.business-actions-widget {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0 8px 0;
}

.business-actions-widget .btn {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.business-actions-widget .btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.business-actions-widget .btn-icon {
  font-size: 1rem;
  opacity: 0.9;
}

.btn-icon {
  font-size: 1rem;
  opacity: 0.9;
}

.business-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.business-note .help {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  text-align: center;
  font-style: italic;
}

@media (max-width: 520px){
  .business-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .business-actions-widget {
    -ms-flex-direction: column; /* IE 10+ */
    flex-direction: column;
    gap: 6px;
  }
  
  .business-actions-widget .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Footer */
.site-footer{padding:28px 0; border-top:1px solid var(--border-light); color:var(--muted); background:var(--surface-alt); text-align:center}

/* Content links accent */
.section a:not(.btn){color:var(--brand); text-decoration-color: rgba(240,135,49,.45); text-underline-offset: 2px}
.section a:not(.btn):hover{color:var(--brand-2); text-decoration-color: rgba(236,116,17,.6)}

/* Focus ring */
:where(a,button).focus,
:where(a,button):focus-visible{outline:3px solid var(--ring); outline-offset:2px; border-radius:10px}

/* Form Enhancements */
.required-indicator {
  color: var(--brand);
  font-weight: 700;
}

.required {
  color: #d32f2f;
  font-weight: 700;
}

.required-or {
  color: var(--brand);
  font-weight: 700;
}

.field-help {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.contact-requirement {
  background: rgba(240, 135, 49, 0.1);
  border: 1px solid rgba(240, 135, 49, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0;
}

.requirement-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink);
}

.requirement-note strong {
  color: var(--brand);
}

.field.error input,
.field.error select,
.field.error textarea {
  border-color: #d32f2f;
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2);
}

.field.success input,
.field.success select,
.field.success textarea {
  border-color: #2e7d32;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

/* Simple reveal animation */
.reveal{opacity:0; transform:translateY(10px); transition:opacity .45s ease, transform .45s ease}
.reveal.visible{opacity:1; transform:none}

/* Admin page styles */
.admin-grid {
  display: -ms-grid; /* IE 10+ */
  display: grid;
  -ms-grid-columns: 1fr; /* IE fallback */
  grid-template-columns: 1fr;
  gap: 18px;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.admin-card table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.admin-card th {
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-card td {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.admin-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-token {
  width: 360px;
  max-width: 100%;
}

.admin-pill {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 0.8rem;
  box-shadow: var(--shadow-sm);
}

.admin-status {
  font-size: 0.9rem;
}

.status-ok {
  color: #1a7f37;
}

.status-warn {
  color: #a15c00;
}

.status-err {
  color: #b80d22;
}

/* Admin gate overlay */
.admin-gate {
  position: fixed;
  inset: 0;
  background: rgba(248, 249, 251, 0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  place-items: center;
  z-index: 1000;
}

.admin-gate .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  width: min(520px, 92vw);
  box-shadow: var(--shadow-lg);
}

.admin-gate .admin-inline {
  margin-top: 10px;
}

/* Header actions */
.header-actions {
  margin-left: auto;
}

.signout-btn {
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: var(--shadow-sm);
}

.signout-btn:hover {
  background: #b91c1c;
}

/* Admin section styles */
.admin-section-header {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.admin-section-header.danger {
  color: #dc2626;
}

.admin-section-header.success {
  color: #059669;
}

.admin-actions {
  margin-bottom: 15px;
}

.admin-actions.hidden {
  display: none;
}

.admin-btn-danger {
  background: #dc2626;
}

.admin-btn-success {
  background: #059669;
}

.admin-btn-secondary {
  background-color: #6b7280;
  margin-left: 10px;
}

.admin-btn-primary {
  background-color: #16a085;
  margin-left: 10px;
}

.admin-selected-count {
  margin-left: 10px;
}

.admin-load-status {
  margin-left: 10px;
}

.admin-upload-section {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
}

.admin-upload-section.hidden {
  display: none;
}

.beforeafter-upload {
  margin-bottom: 10px;
  border: 1px solid #007cba;
  border-radius: 5px;
  padding: 10px;
  background: #f0f8ff;
}

.beforeafter-upload.hidden {
  display: none;
}

.beforeafter-header {
  color: #007cba;
  margin: 0 0 10px 0;
}

.beforeafter-tips {
  margin-bottom: 10px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.08));
  border-left: 3px solid #ffc107;
  font-size: 13px;
  border-radius: 4px;
}

.beforeafter-inputs {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.beforeafter-input {
  -ms-flex: 1; /* IE 10+ */
  flex: 1;
}

.beforeafter-input label {
  font-weight: bold;
}

.beforeafter-input input[type="file"] {
  margin-top: 5px;
  width: 100%;
}

.beforeafter-help {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.beforeafter-preview {
  margin-top: 8px;
}

.beforeafter-btn {
  margin-top: 10px;
  background-color: #007cba;
}

.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.preview-image {
  max-width: 150px;
  max-height: 150px;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}

/* Gallery actions */
.gallery-actions {
  margin-bottom: 15px;
}

.gallery-actions.hidden {
  display: none;
}

.gallery-help {
  margin-left: 20px;
  color: #666;
  font-size: 0.9rem;
}

.photos-selected-count {
  margin-left: 10px;
}

/* Admin test button colors */
.admin-test-btn-telegram {
  background: #06b6d4;
  color: white;
}

.admin-test-btn-review {
  background: #84cc16;
  color: white;
}

.admin-test-btn-quote {
  background: #f97316;
  color: white;
}

.admin-test-btn-danger {
  background: #ef4444;
  color: white;
}

.admin-test-btn-purple {
  background: #6366f1;
  color: white;
}

.admin-test-btn-success {
  background: #10b981;
  color: white;
}

.admin-test-btn-warning {
  background: #f59e0b;
  color: white;
}

.admin-test-btn-blue {
  background: #3b82f6;
  color: white;
}

.admin-test-btn-indigo {
  background: #7c3aed;
  color: white;
}

.admin-test-btn-violet {
  background: #8b5cf6;
  color: white;
}

/* Admin form controls */
.admin-email-input {
  margin-top: 5px;
  width: 200px;
  padding: 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9em;
}

.admin-email-label {
  margin-top: 5px;
  display: block;
  font-size: 0.9em;
  font-weight: normal;
}

.admin-checkbox-label {
  margin-top: 5px;
  display: block;
  font-size: 0.9em;
}

.admin-checkbox {
  margin-right: 5px;
}

.admin-help-text {
  color: #6b7280;
}

.admin-status-muted {
  color: #6b7280;
}

/* Admin analytics section */
.admin-analytics-section {
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 15px;
  background: #f9fafb;
}

.admin-analytics-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

/* Admin form fields */
.admin-field-label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.admin-number-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.admin-checkbox-large {
  transform: scale(1.2);
}

/* Override image-preview for admin page with specific grid layout */
.admin-card .image-preview {
  display: -ms-grid; /* IE 10+ */
  display: grid;
  -ms-grid-columns: 1fr 8px 1fr 8px 1fr 8px 1fr; /* IE fallback */
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin: 8px 0;
  max-height: 200px;
  overflow-y: auto;
}

.admin-card .preview-image {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.preview-info {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-top: 2px;
}

/* Admin guidelines section */
.admin-guidelines {
  margin-bottom: 15px;
  padding: 10px;
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  border-radius: 4px;
}

.admin-guidelines-header {
  margin: 0 0 8px 0;
  color: #1976d2;
  font-size: 14px;
}

.admin-guidelines-list {
  margin: 5px 0;
  padding-left: 20px;
  font-size: 13px;
  color: #333;
}

/* Admin category selector */
.admin-category-selector {
  margin-bottom: 10px;
}

.admin-category-select {
  margin-left: 10px;
  padding: 5px;
}

/* Regular upload section */
.admin-regular-upload {
  margin-bottom: 10px;
}

.admin-file-label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.admin-file-input {
  margin-bottom: 10px;
}

.admin-file-help {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

/* Page-specific styles */
.privacy-page main {
  min-height: 60vh;
  display: -ms-grid; /* IE 10+ */
  display: grid;
  -ms-grid-columns: 1fr; /* IE fallback */
  place-items: start;
  padding-top: 24px;
}

.privacy-page .prose p {
  margin: 10px 0;
}

.privacy-page .prose h2 {
  margin: 20px 0 8px;
}

.thanks-page main {
  min-height: 60vh;
  display: -ms-grid; /* IE 10+ */
  display: grid;
  -ms-grid-columns: 1fr; /* IE fallback */
  place-items: center;
  text-align: center;
}

.thanks-card {
  max-width: 640px;
}

.thanks-actions {
  margin: 2rem 0;
}

.thanks-actions:last-child {
  margin: 1.5rem 0;
}

/* Maintenance page styles */
.maintenance-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.maintenance-container {
  text-align: center;
  max-width: 500px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.maintenance-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.maintenance-logo img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.maintenance-page h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.maintenance-page p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
}

.maintenance-status {
  background: rgba(255, 255, 255, 0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.maintenance-contact {
  font-size: 1rem;
  opacity: 0.8;
  margin-top: 2rem;
}

.maintenance-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.maintenance-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  font-weight: 500;
}

.maintenance-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.pulse {
  animation: pulse 2s infinite;
}

@media (max-width: 480px) {
  .maintenance-buttons {
    -ms-flex-direction: column; /* IE 10+ */
    flex-direction: column;
    align-items: center;
  }
  
  .maintenance-btn {
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    min-width: 120px;
    justify-content: center;
  }
}

.maintenance-btn .btn-icon {
  font-size: 1.2em;
}

/* Bandwidth monitor styles */
.bandwidth-monitor {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f5f5f5;
}

.bandwidth-container {
  max-width: 1200px;
  margin: 0 auto;
}

.bandwidth-header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.bandwidth-dashboard {
  display: -ms-grid; /* IE 10+ */
  display: grid;
  -ms-grid-columns: 1fr 20px 1fr; /* IE fallback */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.bandwidth-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bandwidth-card h3 {
  margin-top: 0;
  color: #333;
}

.bandwidth-metric {
  font-size: 24px;
  font-weight: bold;
  margin: 10px 0;
}

.bandwidth-metric.danger {
  color: #dc3545;
}

.bandwidth-metric.warning {
  color: #ffc107;
}

.bandwidth-metric.success {
  color: #28a745;
}

.bandwidth-progress {
  width: 100%;
  height: 20px;
  background-color: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
}

.bandwidth-progress-bar {
  height: 100%;
  transition: width 0.3s ease;
}

.bandwidth-progress-bar.danger {
  background-color: #dc3545;
}

.bandwidth-progress-bar.warning {
  background-color: #ffc107;
}

.bandwidth-progress-bar.success {
  background-color: #28a745;
}

/* ALTCHA IE Compatibility Overrides */
.altcha {
  -ms-flex-direction: column !important; /* IE 10+ */
  flex-direction: column !important;
}

.altcha-label {
  -ms-flex-positive: 1 !important; /* IE 10+ */
  flex-grow: 1 !important;
}
