body{margin:0;background:#f4f6f8;color:#1f2937;font-family:Pretendard,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}a{color:#166534;text-decoration:none}.admin-wrap{max-width:1180px;margin:0 auto;padding:28px 20px 60px}.admin-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:22px;box-shadow:0 10px 24px rgba(15,23,42,.06)}.admin-header{background:#07101d;color:#fff}.admin-header-inner{max-width:1180px;margin:0 auto;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:20px}.admin-nav{display:flex;gap:16px;flex-wrap:wrap}.admin-nav a{color:rgba(255,255,255,.88);font-weight:700;font-size:14px}h1{margin:0 0 20px;font-size:28px;letter-spacing:-.04em}h2{margin:0 0 14px;font-size:20px}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}.stat{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:18px}.stat span{display:block;font-size:13px;color:#64748b;font-weight:700}.stat strong{display:block;margin-top:8px;font-size:30px;color:#0f172a}.form-row{margin-bottom:14px}label{display:block;margin-bottom:7px;font-weight:800;font-size:14px}input,select,textarea{width:100%;box-sizing:border-box;border:1px solid #d1d5db;border-radius:10px;padding:11px 12px;font:inherit;background:#fff}button,.button{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:10px;padding:11px 16px;background:#16a34a;color:#fff;font-weight:900;cursor:pointer;text-decoration:none}.notice{margin-bottom:16px;padding:13px 15px;border-radius:10px;background:#ecfdf5;border:1px solid #bbf7d0;color:#14532d;font-weight:700}.error{margin-bottom:16px;padding:13px 15px;border-radius:10px;background:#fef2f2;border:1px solid #fecaca;color:#991b1b;font-weight:700}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;background:#fff}th,td{border-bottom:1px solid #e5e7eb;padding:11px 10px;text-align:left;font-size:14px;white-space:nowrap}th{background:#f8fafc;color:#475569;font-weight:900}.badge{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:900}.badge.valid{background:#dcfce7;color:#166534}.badge.expired{background:#fee2e2;color:#991b1b}.small{color:#64748b;font-size:13px;line-height:1.6}.login-wrap{max-width:430px;margin:8vh auto;padding:0 20px}@media(max-width:860px){.grid{grid-template-columns:repeat(2,1fr)}.admin-header-inner{align-items:flex-start;flex-direction:column}}@media(max-width:520px){.grid{grid-template-columns:1fr}}


/* v6: 담당회사 카드 / 검색 폼 / 메일 발송 화면 */
.company-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.company-stat-card { min-height: 106px; padding: 18px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.company-stat-card span { display: block; color: #334155; font-size: 14px; font-weight: 800; }
.company-stat-card strong { display: block; margin-top: 10px; color: #0f172a; font-size: 34px; font-weight: 950; line-height: 1; }
.company-stat-card p { margin: 12px 0 0; color: #64748b; font-size: 13px; font-weight: 650; line-height: 1.45; }
.warranty-search-form { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; align-items: stretch; }
.warranty-search-form input { min-height: 58px; }
.warranty-search-form button { width: 96px; min-height: 58px; padding-left: 0; padding-right: 0; white-space: nowrap; word-break: keep-all; }
.mail-test-form { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 10px; align-items: stretch; }
.mail-test-form select, .mail-test-form button { min-height: 52px; }
.badge.neutral { background: #e2e8f0; color: #334155; }
.badge.warning { background: #fef3c7; color: #92400e; }
@media (max-width: 860px) { .company-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mail-test-form { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .company-stat-grid, .warranty-search-form { grid-template-columns: 1fr; } .warranty-search-form button { width: 100%; } }

/* =========================================================
   v3.8 관리자 레이아웃 안정화
   - 메뉴 간 이동 시 페이지 폭이 미세하게 변하는 현상 방지
   - 세로 스크롤바 영역 상시 확보
   - 관리자 공통 컨테이너의 실제 외곽 폭 고정
   - 활성 메뉴 표시가 메뉴 높이/폭에 영향을 주지 않도록 절대 배치
   ========================================================= */
html{
  overflow-y:scroll;
  scrollbar-gutter:stable;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
html,body{
  width:100%;
  min-width:320px;
}
body{
  overflow-x:hidden;
}
.admin-header{
  width:100%;
}
.admin-header-inner,
.admin-wrap{
  width:100%;
  max-width:1220px; /* 기존 1180px 콘텐츠 + 좌우 20px 패딩을 외곽폭으로 고정 */
  box-sizing:border-box;
}
.admin-header-inner{
  min-height:64px;
}
.admin-nav{
  align-items:stretch;
  flex-wrap:nowrap;
  min-height:28px;
}
.admin-nav a{
  position:relative;
  display:inline-flex;
  align-items:center;
  min-height:28px;
  box-sizing:border-box;
  white-space:nowrap;
  line-height:1.2;
}
.admin-nav a.active{
  color:#8bff55;
  box-shadow:none !important;
}
.admin-nav a.active::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-18px;
  height:2px;
  background:#70e53d;
  pointer-events:none;
}
@media(max-width:860px){
  .admin-nav{
    flex-wrap:wrap;
  }
  .admin-nav a.active::after{
    bottom:-4px;
  }
}


/* =========================================================
   v3.9 관리자 프레임 고정
   - 짧은 페이지/긴 페이지 간 세로 스크롤바 유무로 발생하는
     10~17px 가로폭 변화를 강제로 제거
   - CSS 캐시는 _header.php의 filemtime 쿼리로 자동 무효화
   ========================================================= */
html{
  overflow-y:scroll!important;
  scrollbar-gutter:stable!important;
}
body{
  min-height:calc(100vh + 1px)!important;
  overflow-x:hidden!important;
}
.admin-header-inner,
.admin-wrap{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:1220px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
@supports (scrollbar-gutter: stable){
  html{scrollbar-gutter:stable!important;}
}

/* =========================================================
   v22.1 iframe scrollbar visual hide
   - 스크롤 동작은 유지
   - iframe 내부 우측 스크롤바만 보이지 않게 처리
   ========================================================= */
html,
body{
  -ms-overflow-style:none!important;
  scrollbar-width:none!important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar{
  width:0!important;
  height:0!important;
  display:none!important;
}
