:root{
  --bg:#f6f1ea;
  --bg2:#efe6da;
  --card:#ffffff;
  --line:#d9d0c6;
  --text:#2b2621;
  --muted:#7b6f63;
  --primary:#7a5a43;
  --primary-dark:#5f4432;
  --success-bg:#e8f6ee;
  --success-text:#1f5c3c;
  --error-bg:#fde7e7;
  --error-text:#8a2d2d;
  --radius:18px;
  --shadow:0 12px 35px rgba(0,0,0,.08);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;
  background:linear-gradient(180deg,var(--bg) 0%,var(--bg2) 100%);
  color:var(--text);
}

a{color:inherit;text-decoration:none}

.container{
  max-width:1180px;
  margin:auto;
  padding:0 20px;
}

.site-header{
  position:sticky;
  top:0;
  background:rgba(246,241,234,.94);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(8px);
  z-index:20;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:78px;
  gap:20px;
}

.brand-wrap{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand-wrap strong{display:block}
.brand-wrap small{color:var(--muted);font-size:.85rem}

.brand-mark{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:linear-gradient(135deg,var(--primary),var(--primary-dark));
  color:#fff;
  font-weight:800;
}

.header-nav{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}

.header-nav a{
  color:var(--muted);
  font-weight:600;
}

.header-nav a:hover{color:var(--text)}

.page-wrap{
  padding:28px 0 42px;
  display:grid;
  gap:24px;
}

.hero{
  background:linear-gradient(135deg,var(--primary),var(--primary-dark));
  color:#fff;
  border-radius:28px;
  padding:34px;
  box-shadow:var(--shadow);
}

.hero h1,
.hero h2{
  margin:0 0 12px;
  color:#fff;
}

.hero p{
  color:rgba(255,255,255,.9);
}

.hero-grid{
  display:grid;
  grid-template-columns:1.35fr .95fr;
  gap:24px;
  align-items:stretch;
}

.feature-list{
  display:grid;
  gap:12px;
  margin-top:18px;
}

.feature-item{
  padding:14px;
  border-radius:16px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
}

.card{
  background:var(--card);
  border-radius:22px;
  padding:24px;
  border:1px solid rgba(0,0,0,.05);
  box-shadow:var(--shadow);
}

.card h2{
  margin-top:0;
}

.login-card{
  background:#fff;
}

.login-form{
  display:grid;
  gap:16px;
}

.field{
  display:grid;
  gap:8px;
}

.field label{
  color:var(--text) !important;
  font-weight:800;
  font-size:.96rem;
  opacity:1 !important;
  visibility:visible !important;
}

.field input,
.field select,
.field textarea{
  width:100%;
  padding:13px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  font:inherit;
  outline:none;
}

.field input::placeholder,
.field textarea::placeholder{
  color:#9b8f83;
}

.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(122,90,67,.12);
}

.password-field{
  display:flex;
  gap:10px;
  align-items:center;
}

.password-field input{
  flex:1;
}

.password-toggle{
  min-width:96px;
  white-space:nowrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  font-weight:700;
  cursor:pointer;
}

.btn.primary{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
}

.btn.primary:hover{
  background:var(--primary-dark);
}

.btn.small{
  padding:8px 12px;
  font-size:.9rem;
}

.btns{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.small-link{
  color:var(--muted);
  font-size:.9rem;
}

.small-link:hover{
  text-decoration:underline;
}

.flash-error{
  background:var(--error-bg);
  color:var(--error-text);
  padding:12px 14px;
  border-radius:12px;
  font-weight:600;
}

.flash-ok{
  background:var(--success-bg);
  color:var(--success-text);
  padding:12px 14px;
  border-radius:12px;
  font-weight:600;
}

.table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:16px;
}

table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
}

th,td{
  padding:12px 14px;
  border-bottom:1px solid #eee;
  text-align:left;
}

th{
  background:#faf8f5;
  font-size:.92rem;
}

.badge{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  font-size:.84rem;
  font-weight:700;
}

.badge.ok{
  background:var(--success-bg);
  color:var(--success-text);
}

.badge.no{
  background:#eee;
  color:#555;
}

.grid-2,.grid-3,.grid-4{
  display:grid;
  gap:16px;
}

.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}

.toggle-line{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
}

.mini-toggle{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  font-weight:500;
  cursor:pointer;
  width:auto;
  max-width:100%;
}

.mini-toggle input{
  width:16px;
  height:16px;
  margin:0;
  accent-color: var(--primary);
}

.mini-toggle span{
  line-height:1.2;
  color:var(--text);
}
.service-toggles{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:8px;
}

.service-toggle{
  min-width:260px;
  justify-content:flex-start;
}

.mini-toggle-service{
  margin-top:30px;
}

@media (max-width: 980px){
  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .stats{
    grid-template-columns:1fr;
  }

  .header-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }

  .password-field{
    flex-direction:column;
    align-items:stretch;
  }

  .password-toggle{
    width:100%;
  }

  .mini-toggle{
    width:100%;
    justify-content:flex-start;
  }

  .service-toggles{
    flex-direction:column;
    align-items:stretch;
  }

  .service-toggle{
    min-width:unset;
    width:100%;
  }
}

.stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.stat-box{
  padding:18px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#faf8f5;
}

.stat-box strong{
  display:block;
  font-size:1.8rem;
  margin-top:8px;
}

.muted{
  color:var(--muted);
}

.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.dashboard-actions,
.row-actions,
.helper-actions,
.contact-stack{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.contact-stack{
  display:grid;
  gap:6px;
}

@media (max-width: 980px){
  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .stats{
    grid-template-columns:1fr;
  }

  .header-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }

  .password-field{
    flex-direction:column;
    align-items:stretch;
  }

  .password-toggle{
    width:100%;
  }

  .mini-toggle{
    width:100%;
    justify-content:flex-start;
  }
}