/*
 * AMC SHG shared interface layer.
 * Purpose: keep SHG visually aligned with the AMC Dogs civic portal without changing business logic.
 */
:root{
  /* Dogs-family palette with SHG/Bachat-Gat application */
  --shg-orange:#f97316;
  --shg-orange-2:#ea580c;
  --shg-deep:#9a3412;
  --shg-green:#16a34a;
  --shg-green-2:#0f766e;
  --shg-blue:#2563eb;
  --shg-navy:#1e3a8a;
  --shg-bg:#fff7ed;
  --shg-ink:#1f2937;
  --shg-muted:#64748b;
  --shg-line:#fed7aa;
  --shg-soft:#fff7ed;
  --shg-soft-2:#eef6ff;
  --shg-success:#166534;
  --shg-warning:#92400e;
  --shg-danger:#991b1b;
  --shg-card-shadow:0 14px 34px rgba(15,23,42,.10);
  --shg-card-shadow-soft:0 8px 22px rgba(15,23,42,.06);
  --shg-radius-lg:26px;
  --shg-radius-md:18px;
  --shg-radius-sm:12px;
  --shg-page-pad:24px;
}

html,body{min-height:100%;max-width:100%;overflow-x:hidden}
*,*::before,*::after{box-sizing:border-box}
body{
  color:var(--shg-ink);
  background:linear-gradient(140deg,#fff7ed 0,#ffffff 42%,#eef6ff 100%);
}
h1,h2,h3,.display-title{color:var(--shg-deep);line-height:1.2}
.display-title{
  font-size:clamp(2rem,3vw,2.85rem);
  font-weight:900;
  line-height:1.08;
  letter-spacing:-.035em;
}
.lead{color:#475569}

.portal-topbar .container,
.portal-footer .container,
.container.portal-shell,
.portal-shell.container,
.portal-shell.container-fluid{
  max-width:none !important;
  width:100% !important;
  box-sizing:border-box;
}
.portal-topbar .container,
.portal-footer .container,
.portal-shell{
  padding-left:var(--shg-page-pad) !important;
  padding-right:var(--shg-page-pad) !important;
}
.portal-hero,.portal-section,.stat-grid,.shg-public-band,.table-card,.section-card,.portal-card{max-width:100%}

.portal-topbar{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(255,255,255,.90);
  border-bottom:1px solid rgba(249,115,22,.16);
  backdrop-filter:blur(14px);
  box-shadow:0 10px 26px rgba(15,23,42,.08);
}
.portal-brand{display:inline-flex;align-items:center;gap:.78rem;color:var(--shg-deep);text-decoration:none;min-width:0}
.portal-brand:hover,.portal-brand:focus{color:var(--shg-orange);text-decoration:none}
.portal-brand-mark{flex:0 0 auto;width:46px;height:46px;display:inline-flex;align-items:center;justify-content:center;border-radius:16px;background:#111827;box-shadow:0 10px 22px rgba(15,23,42,.12);overflow:hidden}
.portal-brand-mark img{display:block;width:42px;height:42px;object-fit:contain}
.portal-brand-copy{display:block;min-width:0}
.portal-brand-copy .fw-bold{display:block;line-height:1.12}
.portal-brand small{display:block;color:#64748b}
.portal-nav-toggle{display:none;align-items:center;justify-content:center;gap:.65rem;min-width:48px;min-height:48px;padding:0 .95rem;border:1px solid #fed7aa;border-radius:14px;background:#fff7ed;color:var(--shg-deep);font-weight:900;cursor:pointer;transition:background .2s ease,border-color .2s ease}
.portal-nav-toggle:hover,.portal-nav-toggle:focus{background:#ffedd5;border-color:#fdba74}
.portal-nav-toggle-label{font-size:.9rem;line-height:1}
.portal-nav-toggle-icon{position:relative;width:18px;height:14px;display:inline-block}
.portal-nav-toggle-icon::before,.portal-nav-toggle-icon::after,.portal-nav-toggle-icon span{content:"";position:absolute;left:0;width:100%;height:2px;border-radius:999px;background:currentColor;transition:transform .2s ease,opacity .2s ease,top .2s ease}
.portal-nav-toggle-icon::before{top:0}.portal-nav-toggle-icon span{top:6px}.portal-nav-toggle-icon::after{top:12px}
.portal-nav a{color:#334155;text-decoration:none;font-weight:800;padding:.55rem .85rem;border-radius:12px}
.portal-nav a:hover,.portal-nav a:focus{background:#fff7ed;color:var(--shg-orange)}

.portal-shell{padding-bottom:2rem}
.portal-section{margin:0 0 2rem;overflow-x:hidden}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin:0 0 1.25rem}
.page-head .lead{max-width:760px;color:#64748b}
.action-btns{display:flex;flex-wrap:wrap;gap:.65rem;align-items:center;justify-content:flex-end}

.portal-card,.section-card,.table-card,.stat-card,.directory-card,.empty-state{border:1px solid rgba(15,23,42,.08);background:#fff;border-radius:var(--shg-radius-lg);box-shadow:var(--shg-card-shadow-soft)}
.portal-card,.section-card,.table-card{padding:1.25rem}
.section-card + .section-card{margin-top:1rem}
.shell-card{border:0;border-radius:22px;background:#fff;box-shadow:var(--shg-card-shadow)}
.section-title{font-weight:900;letter-spacing:-.02em;color:var(--shg-deep)}
.section-subtitle,.helper{color:var(--shg-muted)}
.helper{font-size:.92rem;line-height:1.55}

.section-kicker,.eyebrow{display:inline-flex;align-items:center;gap:.45rem;width:max-content;max-width:100%;padding:.38rem .75rem;border-radius:999px;background:#ffedd5;color:var(--shg-deep);text-transform:uppercase;letter-spacing:.08em;font-size:.74rem;font-weight:900}

.portal-hero{isolation:isolate;position:relative;overflow:hidden;border-radius:34px;padding:34px;background:linear-gradient(135deg,#fff,#fff7ed);color:var(--shg-ink);border:1px solid rgba(249,115,22,.18);box-shadow:var(--shg-card-shadow)}
.portal-hero::after{content:"";position:absolute;right:-80px;top:-60px;width:220px;height:220px;border-radius:999px;background:radial-gradient(circle,rgba(249,115,22,.12),rgba(249,115,22,0));pointer-events:none}
.portal-hero .lead,.portal-hero p{color:#475569}
.portal-hero h1,.portal-hero h2,.portal-hero h3,.portal-hero .display-title,.portal-hero .section-title{color:var(--shg-deep)}
.portal-hero .section-kicker{background:#ffedd5;color:var(--shg-deep)}
.portal-btn-soft{background:#fff;color:var(--shg-deep);border:1px solid #fed7aa;font-weight:900}
.portal-btn-soft:hover{background:#ffedd5;color:#7c2d12}

.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}
.stat-card{padding:1rem;min-width:0}
.stat-card .stat-label{font-size:.82rem;color:var(--shg-muted);font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.stat-card .stat-value{font-size:clamp(1.45rem,2vw,2.15rem);font-weight:900;line-height:1.1;color:var(--shg-deep)}
.stat-card .stat-note{font-size:.9rem;color:var(--shg-muted);margin-top:.25rem}

.chip,.status-pill{display:inline-flex;align-items:center;gap:.35rem;min-height:28px;padding:.28rem .65rem;border-radius:999px;background:#f1f5f9;color:#334155;font-size:.78rem;font-weight:800;line-height:1;white-space:nowrap}
.chip.success,.status-pill.success{background:#dcfce7;color:#166534}.chip.warning,.status-pill.warning{background:#fef3c7;color:#92400e}.chip.danger,.status-pill.danger{background:#fee2e2;color:#991b1b}.chip.info,.status-pill.info{background:#dbeafe;color:#1d4ed8}.chip.accent,.status-pill.accent{background:#ffedd5;color:var(--shg-deep)}

.directory-filter{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:.8rem;align-items:end}
.directory-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.directory-card{padding:1rem;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;min-width:0}
.directory-card:hover{transform:translateY(-2px);border-color:#fdba74;box-shadow:var(--shg-card-shadow)}
.directory-card-title{font-weight:900;font-size:1.05rem;color:var(--shg-deep);margin-bottom:.25rem}.directory-card-meta{color:var(--shg-muted);font-size:.92rem}

.table-card{overflow:hidden}.table-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:end;gap:.85rem;margin-bottom:1rem}.table-responsive{border-radius:var(--shg-radius-md)}.table-card table{margin-bottom:0}.table-card thead th{color:#334155;font-size:.78rem;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap}.table-card tbody td{vertical-align:middle}

.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.form-grid .full{grid-column:1 / -1}.form-label{font-weight:800;color:#374151}.form-control,.form-select{min-height:44px;border-radius:14px;border-color:#fed7aa;background:#fff}.form-control:focus,.form-select:focus{border-color:#f97316;box-shadow:0 0 0 .25rem rgba(249,115,22,.16)}

.empty-state{padding:2rem;text-align:center;color:var(--shg-muted);border-style:dashed;border-color:#fdba74;background:#fff}.empty-state strong{display:block;color:var(--shg-deep);font-size:1.1rem;margin-bottom:.35rem}

.btn{border-radius:999px;font-weight:850;min-height:42px}.btn-primary{background:linear-gradient(135deg,#ea580c,#f97316);border-color:#f97316;color:#fff}.btn-primary:hover,.btn-primary:focus{background:linear-gradient(135deg,#c2410c,#ea580c);border-color:#ea580c;color:#fff}.btn-outline-primary{color:var(--shg-deep);border-color:#fed7aa;background:#fff}.btn-outline-primary:hover,.btn-outline-primary:focus{background:#ffedd5;border-color:#fdba74;color:#7c2d12}

.portal-footer{margin-top:4rem;padding:2rem 0 3rem;color:#64748b;text-align:center}.portal-footer .footer-shell{border-top:1px solid #fed7aa;padding-top:1.5rem}.portal-footer a{color:var(--shg-deep);text-decoration:none}.portal-footer a:hover{color:var(--shg-orange);text-decoration:underline}

.mobile-bottom-nav{position:sticky;bottom:0;z-index:900;display:none;gap:.5rem;padding:.7rem;margin:1rem -.75rem -.75rem;background:rgba(255,255,255,.96);border-top:1px solid #fed7aa;backdrop-filter:blur(12px)}.mobile-bottom-nav a,.mobile-bottom-nav button{flex:1}

@media (max-width: 991.98px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.directory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.directory-filter{grid-template-columns:1fr 1fr}}
@media (max-width: 767.98px){:root{--shg-page-pad:14px}.portal-header-inner{position:relative;display:grid !important;grid-template-columns:minmax(0,1fr) auto;align-items:start !important;gap:.75rem .85rem !important}.portal-brand{gap:.62rem}.portal-brand-mark{width:42px;height:42px;border-radius:14px}.portal-brand-mark img{width:38px;height:38px}.portal-brand-copy .fw-bold{font-size:1rem;line-height:1.15}.portal-brand small{margin-top:.15rem;font-size:.72rem;line-height:1.35}.portal-nav-toggle{display:inline-flex;margin-left:0;align-self:start}.portal-nav{grid-column:1 / -1;width:100%;display:none !important;flex-direction:column;align-items:stretch !important;gap:.65rem !important;padding:1rem;border-radius:18px;background:rgba(255,255,255,.98);border:1px solid #fed7aa;box-shadow:0 18px 36px rgba(15,23,42,.14)}.portal-header-inner[data-nav-open="true"] .portal-nav{display:flex !important}.portal-header-inner[data-nav-open="true"] .portal-nav-toggle-icon::before{top:6px;transform:rotate(45deg)}.portal-header-inner[data-nav-open="true"] .portal-nav-toggle-icon span{opacity:0}.portal-header-inner[data-nav-open="true"] .portal-nav-toggle-icon::after{top:6px;transform:rotate(-45deg)}.portal-nav a{width:100%;padding:.8rem .95rem;border-radius:14px;background:#fff7ed}.page-head{display:block}.action-btns{justify-content:stretch;margin-top:1rem}.action-btns .btn,.action-btns a{width:100%}.portal-card,.section-card,.table-card{padding:1rem;border-radius:20px}.portal-hero{padding:22px;border-radius:26px}.stat-grid,.directory-grid,.directory-filter,.form-grid{grid-template-columns:1fr}.mobile-bottom-nav{display:flex}}
