@import url('https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/static/pretendard.css');

/* 민원관리대장 검색필터 일반 스타일 */
.search-input-normal {
  height: 36px !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  outline: none !important;
  background: #fff !important;
}
.filter-btn-normal {
  height: 36px !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 7px 10px !important;
  box-shadow: none !important;
  outline: none !important;
  background: #fff !important;
}

/* 필터 버튼 클릭/오픈 상태 */
.filter-btn-normal:active,
.filter-btn-normal.is-open {
  background: #e5e7eb !important;
}

.filter-btn-normal:focus-visible,
.search-input-normal:focus-visible {
  outline: none !important;
}

/* Mobile: show filter dropdown as centered modal */
.fe-filter-backdrop{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(17,24,39,.45);
  z-index:999;
}
.fe-filter-backdrop.show{display:block}

@media (max-width: 640px){
  .fe-filter-dropdown{
    left:50% !important;
    top:50% !important;
    transform:translate(-50%,-50%) !important;
    width:min(92vw, 360px) !important;
    max-height:80vh;
    overflow:auto;
  }

  #dashFilters{
    justify-content:center !important;
  }
  #dashFilters > div{
    justify-content:center !important;
    max-width:100% !important;
  }
  #dashFilters input[name="q"]{
    width:min(92vw, 460px) !important;
    max-width:min(92vw, 460px) !important;
  }
}
:root{
  --primary:#2563eb;
  --red:#ef4444;
  --bg:#f5f6f8;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --shadow:0 6px 18px rgba(17,24,39,.08);
  --radius:12px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Pretendard",system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;
  color:var(--text);
  background:var(--bg);
  overflow:hidden;
}

a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}

.app-shell{min-height:100vh;height:100vh;display:flex;flex-direction:column;overflow:hidden}
/* topbar styles retained intentionally (currently unused) */
.topbar{
  height:56px;
  background:#fff;
  display:none;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  border-bottom:1px solid #e5e7eb;
  position:sticky;
  top:0;
  z-index:40;
}
.topbar-left{display:flex;align-items:center;gap:10px;min-width:0}
.topbar-menu-btn{width:40px;height:40px;border:1px solid #e5e7eb;background:#fff;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.topbar-menu-btn svg{width:20px;height:20px;display:block;fill:none;stroke:#111827;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.brand{font-weight:700}
.topbar-right{display:flex;gap:12px;align-items:center}
.user{display:flex;gap:8px;align-items:center}
.user-name{font-weight:600}
.role-badge{
  font-size:12px;
  padding:3px 8px;
  border-radius:999px;
  background:#f3f4f6;
  color:#111827;
}

.main{display:flex;flex:1;min-height:0;overflow:hidden}
.sidebar-backdrop{position:fixed;inset:0;background:rgba(17,24,39,.45);display:none;z-index:55}
.sidebar-backdrop.show{display:block}
.sidebar{
  width:190px;
  background:#1f2937;
  border-right:1px solid #111827;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  height:100%;
  overflow:hidden;
}
.sidebar-brand{
  font-weight:800;
  padding:8px 10px 14px 10px;
  font-size:18px;
  color:#f9fafb;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:12px;
}
.menu{display:flex;flex-direction:column;gap:6px}
.menu-item{
  padding:8px 10px;
  border-radius:10px;
  color:#e5e7eb;
  font-weight:500;
  display:flex;
  align-items:center;
  gap:10px;
}
.menu-icon{width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;color:#9ca3af;flex:0 0 16px}
.menu-icon svg{width:16px;height:16px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.menu-label{display:inline-block;min-width:0}
.menu-item:hover{background:rgba(255,255,255,.08);text-decoration:none}

.menu-group{display:flex;flex-direction:column;gap:6px}
.menu-group-title{padding:8px 10px;color:#9ca3af;font-size:12px;font-weight:600}
.menu-sub{display:flex;flex-direction:column;gap:6px}
.menu-item-sub{padding-left:18px}

.sidebar-footer{
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.08);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.sidebar-user{display:flex;flex-direction:column;gap:2px;padding:0 10px}
.sidebar-user-name{font-weight:700;font-size:13px;color:#f3f4f6}
.sidebar-user-role{color:var(--muted);font-size:12px}
.btn-block{width:100%}

.content{flex:1;overflow:auto;height:100%}
.content-inner{max-width:1400px;padding:10px 18px;margin:0 auto}
.page-dashboard .content-inner{padding:10px 10px}

.page-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0 12px 0}
.page-header-left{display:flex;align-items:center;gap:10px;min-width:0}
.page-header .header-filters{margin:0;align-items:center}
.actions{display:flex;gap:8px;align-items:center}
.title-note{color:var(--muted);font-size:12px;white-space:nowrap;margin-top:4px}
.title-note.seq-note{font-size:14px;margin-left:14px}
.h1{font-size:20px;margin:0;font-weight:700}
.page-users .page-header .h1{padding-right:10px}
.h2{font-size:16px;margin:0 0 12px 0;font-weight:700}

/* Users header: desktop one-row layout via grid */
.page-users .page-header-users{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  grid-template-areas:"title filters actions";
  align-items:center;
  column-gap:10px;
  row-gap:10px;
}
.page-users .page-header-users .page-header-left{grid-area:title}
.page-users .page-header-users .header-filters{grid-area:filters;min-width:0}
.page-users .page-header-users .actions{grid-area:actions}
.page-users .page-header-users .filter-actions{flex:0 0 auto}
.page-users .page-header-users .filter-actions .btn{white-space:nowrap;flex:0 0 auto}

.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:12px 14px;
  margin-bottom:12px;
}
.card-lg{width:min(420px, 92vw)}
.card-title{font-size:18px;margin:0 0 12px 0;font-weight:700}
.card-title-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.clickable{cursor:pointer}

.page-error{min-height:100vh;background:radial-gradient(circle at top,#eef6ff 0%,#f8fafc 42%,#eef2f7 100%)}
.app-message-page{min-height:calc(100vh - 160px);display:flex;align-items:center;justify-content:center;padding:24px 16px}
.app-message-page--standalone{min-height:100vh;padding:28px 16px}
.app-message-card{position:relative;width:min(620px,100%);padding:30px 28px;border:1px solid rgba(148,163,184,.18);border-radius:22px;box-shadow:0 24px 70px rgba(15,23,42,.12);background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);overflow:hidden}
.app-message-card::before{content:'';position:absolute;inset:auto auto -60px -40px;width:180px;height:180px;border-radius:999px;background:radial-gradient(circle,rgba(59,130,246,.14) 0%,rgba(59,130,246,0) 72%);pointer-events:none}
.app-message-card::after{content:'';position:absolute;top:-70px;right:-40px;width:180px;height:180px;border-radius:999px;background:radial-gradient(circle,rgba(14,165,233,.12) 0%,rgba(14,165,233,0) 72%);pointer-events:none}
.app-message-card--login::before{background:radial-gradient(circle,rgba(16,185,129,.16) 0%,rgba(16,185,129,0) 72%)}
.app-message-card--403::before{background:radial-gradient(circle,rgba(245,158,11,.16) 0%,rgba(245,158,11,0) 72%)}
.app-message-card--404::before{background:radial-gradient(circle,rgba(59,130,246,.16) 0%,rgba(59,130,246,0) 72%)}
.app-message-card--500::before{background:radial-gradient(circle,rgba(239,68,68,.16) 0%,rgba(239,68,68,0) 72%)}
.app-message-hero{position:relative;display:flex;align-items:center;gap:12px;margin-bottom:14px;z-index:1}
.app-message-badge{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:18px;background:linear-gradient(135deg,#2563eb 0%,#0ea5e9 100%);color:#fff;font-size:18px;font-weight:900;letter-spacing:.02em;box-shadow:0 14px 28px rgba(37,99,235,.24)}
.app-message-card--login .app-message-badge{background:linear-gradient(135deg,#10b981 0%,#06b6d4 100%);box-shadow:0 14px 28px rgba(16,185,129,.24)}
.app-message-card--403 .app-message-badge{background:linear-gradient(135deg,#f59e0b 0%,#f97316 100%);box-shadow:0 14px 28px rgba(245,158,11,.24)}
.app-message-card--500 .app-message-badge{background:linear-gradient(135deg,#ef4444 0%,#f97316 100%);box-shadow:0 14px 28px rgba(239,68,68,.24)}
.app-message-code{display:inline-flex;align-items:center;min-height:30px;padding:0 12px;border-radius:999px;background:rgba(255,255,255,.86);border:1px solid rgba(148,163,184,.22);color:#334155;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.app-message-card .card-title{position:relative;z-index:1;margin-bottom:10px;font-size:30px;letter-spacing:-.03em;color:#0f172a}
.app-message-text{position:relative;z-index:1;margin-bottom:16px;line-height:1.7;font-size:15px;color:#475569}
.app-message-url{position:relative;z-index:1;padding:10px 12px;border-radius:12px;background:rgba(241,245,249,.9);border:1px solid rgba(203,213,225,.9);font-size:12px;word-break:break-all;margin-bottom:16px}
.app-message-actions{position:relative;z-index:1;display:flex;gap:10px;flex-wrap:wrap}

@media (max-width: 640px){
  .app-message-page{min-height:calc(100vh - 110px);padding:18px 12px}
  .app-message-page--standalone{min-height:100vh;padding:18px 12px}
  .app-message-card{padding:22px 18px;border-radius:18px}
  .app-message-hero{gap:10px;margin-bottom:12px}
  .app-message-badge{width:48px;height:48px;border-radius:14px;font-size:16px}
  .app-message-card .card-title{font-size:24px}
  .app-message-actions{flex-direction:column}
  .app-message-actions .btn{width:100%}
  .list-toolbar-left{max-width:100%}
  .list-search-wrap{max-width:none}
  .list-search-input{max-width:none}
}

/* Access settings */
.access-settings-wrap{width:50%;max-width:760px;margin:0}
.access-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.access-settings-group{padding:10px 12px;border-radius:10px;background:#f9fafb}
.access-settings-note{margin:-2px 0 10px 0;font-size:12px}

.notification-sms-page{width:min(820px,100%);margin:0}
.notification-sms-header{width:100%;max-width:760px;align-items:flex-start;margin-bottom:16px}
.notification-sms-header-left{align-items:flex-start;gap:12px;flex-wrap:wrap}
.notification-sms-header-copy{margin-top:4px}
.notification-sms-header-actions{margin-left:0}
.notification-sms-layout{display:flex;flex-direction:column;gap:16px;align-items:flex-start}
.notification-sms-card{width:100%;max-width:760px;padding:18px 20px;border:1px solid rgba(15,23,42,.06)}
.notification-sms-form-card{max-width:760px}
.notification-sms-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.notification-sms-section-copy{margin-top:4px;line-height:1.5}
.notification-sms-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
.notification-sms-meta{margin-top:10px}
.notification-sms-links{display:flex;gap:14px;flex-wrap:wrap;margin-top:10px}
.notification-sms-form{display:flex;flex-direction:column;align-items:flex-start;gap:14px}
.notification-sms-notice{width:100%;padding:14px 16px;border:1px solid #dbeafe;border-radius:12px;background:linear-gradient(180deg,#f8fbff 0%,#f0f7ff 100%)}
.notification-sms-notice-title{font-size:13px;font-weight:800;color:#1d4ed8;margin-bottom:6px}
.notification-sms-notice-text{font-size:13px;line-height:1.5;color:#475569}
.notification-sms-notice-text + .notification-sms-notice-text{margin-top:4px}
.notification-sms-field{width:100%;max-width:760px}
.notification-sms-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0 10px 0}
.notification-sms-toolbar .input{flex:1 1 280px;min-width:220px}
.notification-sms-summary{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:10px;font-size:13px}
.notification-sms-summary-count{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;background:#f1f5f9;color:#0f172a;font-weight:700}
.notification-sms-recipient-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;max-height:420px;overflow:auto;padding:2px}
.notification-sms-recipient-item{display:flex;gap:10px;align-items:flex-start;padding:14px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;cursor:pointer;transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease}
.notification-sms-recipient-item:hover{border-color:#93c5fd;background:#f8fbff;box-shadow:0 8px 20px rgba(37,99,235,.08)}
.notification-sms-recipient-item input{margin-top:3px}
.notification-sms-recipient-item:has(input:checked){border-color:#60a5fa;background:#eff6ff;box-shadow:0 10px 24px rgba(37,99,235,.12)}
.notification-sms-recipient-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.notification-sms-recipient-meta strong{font-size:14px;color:#111827}
.notification-sms-recipient-meta span{font-size:12px;color:#6b7280;word-break:break-all}
.notification-sms-error{margin-top:2px}
.notification-sms-actions{width:100%;display:flex;justify-content:flex-start;gap:8px;padding-top:4px}

@media (max-width: 900px){
  .notification-sms-page{width:min(100%, 760px)}
  .notification-sms-card,.notification-sms-form-card,.notification-sms-field{max-width:none}
}

@media (max-width: 640px){
  .notification-sms-header{flex-direction:column;align-items:stretch}
  .notification-sms-header-actions{width:100%}
  .notification-sms-header-actions .btn{width:100%}
  .notification-sms-card{padding:16px 14px;border-radius:14px}
  .notification-sms-status-grid{grid-template-columns:1fr}
  .notification-sms-toolbar{flex-direction:column;align-items:stretch}
  .notification-sms-toolbar .input,.notification-sms-toolbar .btn{width:100%}
  .notification-sms-summary{flex-direction:column;align-items:flex-start}
  .notification-sms-recipient-list{grid-template-columns:1fr;max-height:none}
  .notification-sms-actions .btn{width:100%}
}

.grid{display:grid;gap:12px}
.grid-2{grid-template-columns:repeat(2, minmax(0, 1fr))}

/* Form radio label text */
.complaint-form-wrap .fe-radio-group label span{color:#374151;font-size:12px !important;line-height:1.2}

.dashboard-page{display:flex;justify-content:center;padding:18px 16px}
/* Keep header container the same width as the 2x2 card grid */
.dashboard-inner{width:min(520px, 96vw)}
.dashboard-header{justify-content:space-between;margin:0 0 28px 0}
.dashboard-title{font-size:34px;letter-spacing:-0.5px}
.btn.btn-danger-flat{background:var(--red);border-color:var(--red);color:#fff;border-radius:0;padding:10px 14px;font-weight:800;line-height:1}
.dashboard-grid{display:grid;grid-template-columns:repeat(2, 240px);justify-content:center;gap:36px 54px;margin-top:0}
.dashboard-grid .card{margin-bottom:0;padding:18px 16px;aspect-ratio:1 / 1;display:flex;flex-direction:column;justify-content:center;gap:12px}
.dashboard-grid .card.dash-card-tight{padding-left:12px;padding-right:12px}
.dashboard-grid .card .card-title-row{margin-bottom:8px;justify-content:center}
.dashboard-grid .card .card-title-row .h2{width:100%;text-align:center}
.dashboard-grid .h2{margin:0}

.dashboard-grid .dash-center-count{margin:-4px 0 2px 0;text-align:center;font-weight:600;font-size:15px}

.dash-body{padding:6px 14px}
.dash-list{display:flex;flex-direction:column;gap:10px}
.dash-item{display:flex;flex-direction:column;gap:4px;padding-bottom:8px}
.dash-item:last-child{padding-bottom:0}
.dash-bullet{font-weight:800;color:#0f766e}
.dash-bullet::before{content:'•';margin-right:8px;color:#0f766e}
.dash-sub{font-size:15px;line-height:1.35}
.dash-line{display:flex;align-items:center;justify-content:space-between;font-size:15px}
.dash-line::before{content:'•';margin-right:8px;color:#0f766e}
.dash-line span{flex:1;font-weight:600}
.dash-line b{font-weight:800}

.dash-badge-wrap{display:flex;justify-content:center;margin-top:4px}
.badge-wide{display:inline-flex;width:100%;align-items:center;justify-content:center;gap:6px;white-space:nowrap;box-sizing:border-box}
.dashboard-grid .badge-wide{font-size:15px;padding:8px 10px;line-height:1.15}
.dashboard-grid .card.dash-card-tight .dash-body{padding-left:8px;padding-right:8px}
.dashboard-grid .card.dash-card-tight .badge-wide{padding:8px 6px;font-size:14px;white-space:normal;text-align:center}
.badge-red.badge-wide,.badge-ok.badge-wide{border-radius:0}
.dashboard-grid .metrics-list{gap:12px}
.dashboard-grid .metric-row{font-size:15px}

/* Dashboard v2 (image-like layout) */
.page-dashboard .content-inner{max-width:1400px;padding:14px 18px;display:flex;justify-content:center}
.page-dashboard .dashboard-page{display:none}

.dash2{
  width:min(980px, 100%);
  border-radius:14px;
  padding:22px 18px 26px 18px;
  background:transparent;
  box-shadow:none;
  border:0;
}

.dash2-top{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap:12px;
  padding:22px 16px 22px 16px;
  border-bottom:0;
  background:transparent;
  border-radius:12px;
}

.dash2-brand{display:flex;align-items:center;gap:10px;min-width:0}
.dash2-brand-text{font-weight:800;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash2-mark{position:relative;width:22px;height:22px;flex:0 0 22px}
.dash2-mark-dot{position:absolute;left:7px;top:7px;width:8px;height:8px;border-radius:999px;background:#2563eb}
.dash2-mark-ring{position:absolute;inset:0;border-radius:999px;border:2px solid #2563eb;opacity:.45}

.dash2-title{
  text-align:center;
  font-weight:900;
  letter-spacing:-0.4px;
  color:#111827;
  font-size:30px;
}

.dash2-month{display:flex;justify-content:flex-end}
.dash2-month-select{
  height:40px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid rgba(17,24,39,.15);
  background:#fff;
  font-weight:700;
  color:#374151;
  box-shadow:none;
}

.dash2-section{padding:34px 10px 0 10px}
.dash2-section-title{
  font-weight:900;
  color:#374151;
  font-size:20px;
  margin:0 0 18px 0;
}

.dash2-kpis{display:grid;gap:14px}
.dash2-kpis-3{grid-template-columns:repeat(3, minmax(0, 1fr))}
.dash2-kpis-4{grid-template-columns:repeat(4, minmax(0, 1fr))}

.dash2-kpi{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:58px;
  border-radius:10px;
  border:0;
  box-shadow:none;
  text-decoration:none;
}
.dash2-kpi:hover{text-decoration:none;filter:none}
.dash2-kpi:active{transform:translateY(1px)}
.dash2-kpi-text{font-weight:900;color:#111827;font-size:18px;letter-spacing:-0.2px;text-align:center;line-height:1.05}
.dash2-kpi-num{font-weight:900}
.dash2-kpi-num b{font-weight:900;font-size:28px;letter-spacing:-0.4px}

.dash2-kpi-yellow{background:#fed23f}
.dash2-kpi-orange{background:#fe9739}
.dash2-kpi-red{background:#fb2b33; color:#ffffff}
.dash2-kpi-red .dash2-kpi-text{color:#ffffff}

.dash2-sep{
  height:1px;
  background:#d1d5db;
  margin:28px 10px 24px 10px;
}

.dash2-actions{
  padding:0 10px 14px 10px;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}
.dash2-action{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:56px;
  border-radius:10px;
  background:#5b9bd5;
  border:0;
  box-shadow:none;
  color:#0b1a36;
  font-weight:900;
  font-size:18px;
  text-decoration:none;
}
.dash2-action:hover{text-decoration:none;filter:none}
.dash2-action:active{transform:translateY(1px)}

.dash2-kpi-softblue{background:#e4eefb}
.dash2-kpi-softyellow{background:#fedb91}
.dash2-kpi-softgreen{background:#e0f2cd}
.dash2-kpi-softgray{background:#edecf3}

/* Result tile text colors (as requested) */
.dash2-kpi-softblue .dash2-kpi-text{color:#0e4175}
.dash2-kpi-softyellow .dash2-kpi-text{color:#4c280f}
.dash2-kpi-softgreen .dash2-kpi-text{color:#20572c}
.dash2-kpi-softgray .dash2-kpi-text{color:#45464e}

@media (max-width: 900px){
  .dash2-top{grid-template-columns:1fr;justify-items:center}
  .dash2-month{justify-content:center}
  .dash2-brand{justify-content:center}
  .dash2-kpis-3{grid-template-columns:1fr}
  .dash2-kpis-4{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .dash2-actions{grid-template-columns:1fr}
}

/* Filter bars: add a little space between label and control */
.filterbar-row .filter .label{margin-bottom:4px}
.filterbar-row.compact .filter .label{margin-bottom:5px}

.form{display:flex;flex-direction:column;gap:12px}
.grid-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.field{display:flex;flex-direction:column;gap:6px}
.field-span{grid-column:1 / -1}
.label{font-size:12px;color:var(--muted)}
.label-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.text-link{font-size:12px;font-weight:400;color:var(--muted);text-decoration:underline}
.text-link:hover{color:var(--text);text-decoration:underline}
.field-row{display:grid;grid-template-columns:170px minmax(0,1fr);gap:12px;align-items:center}
.field-row .label{font-size:13px;color:var(--text);font-weight:700}
.field-row.field-row-top{align-items:start}
.field-row.field-row-top .label{padding-top:10px}
.complaint-form-wrap{width:50%;max-width:760px;margin:0}
.complaint-form-wrap .field-row{grid-template-columns:150px minmax(0,1fr)}
.profile-wrap{width:44%;max-width:640px;margin:0}
.complaint-form-actions{display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:center;justify-content:flex-end}
.complaint-form-actions .error{flex:1 1 100%}
.btn-save{min-width:120px;padding:9px 16px}

.table-compact th,.table-compact td{padding:6px 8px;font-size:12px}
.action-link{font-size:12px}
.page-users .action-link{color:#374151;font-weight:600}
.page-users .action-link:hover{color:#111827}

.badge-sm{padding:3px 8px;font-size:11px}
.input,.select,.textarea{
  width:100%;
  border:1px solid #d1d5db;
  border-radius:10px;
  padding:10px 12px;
  font-size:14px;
  background:#fff;
}
.input-sm{padding:8px 10px;font-size:13px;border-radius:9px}
.textarea{resize:vertical}
.error{color:var(--red);font-size:13px}
.muted{color:var(--muted);font-size:13px}

.btn{
  border:1px solid transparent;
  border-radius:10px;
  padding:9px 12px;
  font-size:14px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.btn-primary{background:#374151;border-color:#374151;color:#fff}
.btn-primary:hover{background:#111827;border-color:#111827;text-decoration:none}
.btn-outline{background:#fff;color:var(--text);border-color:#d1d5db}
.btn-sm{padding:6px 10px;font-size:13px;border-radius:9px}

.filterbar-row{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.filter{min-width:150px}
.filter-actions{min-width:auto;display:flex;gap:8px;align-items:flex-end}

.filterbar-row.compact{flex-wrap:nowrap;gap:8px;overflow-x:auto;padding-bottom:2px}
.filterbar-row.compact .filter{min-width:120px}
.filterbar-row.compact .label{font-size:11px}
.filterbar-row.compact .filter-actions{gap:6px}

.list-toolbar-wrap{padding:0;margin-bottom:18px}
.list-toolbar{background:none !important;box-shadow:none !important;padding:0 !important;gap:0 !important;align-items:flex-start !important;display:flex;justify-content:space-between}
.list-toolbar-left{display:flex;align-items:center;gap:8px;flex:1;max-width:420px}
.list-search-wrap{position:relative;display:inline-block;width:100%;max-width:320px}
.list-search-input{width:100% !important;min-width:180px;max-width:320px;padding-left:32px !important;font-size:15px !important;font-weight:400 !important}
.list-search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);pointer-events:none}
.list-filter-btn{margin-left:8px;padding:7px 10px !important;display:flex;align-items:center;justify-content:center}
.list-filter-dropdown{display:none;position:fixed;z-index:1000;background:#fff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 4px 24px rgba(0,0,0,.08);padding:18px 22px;min-width:240px}
.list-filter-field-date{min-width:130px;margin-bottom:16px}
.list-filter-field{margin-bottom:16px}

.table-wrap{
  overflow:auto;
  background:#fff;
  border-radius:12px;
  box-shadow:none;
  border:0;
}
.table-wrap{-webkit-overflow-scrolling:touch}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table th,.table td{border-bottom:1px solid #e5e7eb;padding:8px 10px;font-size:13px;vertical-align:top}
.table th{position:sticky;top:0;background:#fff;z-index:1;text-align:left}
.table-nowrap th,.table-nowrap td{white-space:nowrap}
.table-wide{min-width:1820px}
.page-complaints #ledgerTable,
.page-agency_inquiries #ledgerTable{
  width:1820px;
  table-layout:fixed;
}
.page-complaints #ledgerTable th:first-child,
.page-complaints #ledgerTable td:first-child,
.page-agency_inquiries #ledgerTable th:first-child,
.page-agency_inquiries #ledgerTable td:first-child{
  width:32px;
  min-width:32px;
  max-width:32px;
  padding-left:6px;
  padding-right:6px;
}
.page-complaints #ledgerTable th[data-field="seq_no"],
.page-complaints #ledgerTable td.cell-seq-no,
.page-agency_inquiries #ledgerTable th[data-field="seq_no"],
.page-agency_inquiries #ledgerTable td.cell-seq-no{
  width:54px;
  min-width:54px;
  max-width:54px;
  padding-left:6px;
  padding-right:6px;
  font-variant-numeric:tabular-nums;
}
.page-complaints #ledgerTable th[data-field="insurance_company"],
.page-agency_inquiries #ledgerTable th[data-field="insurance_company"]{width:64px;min-width:64px;max-width:64px}
.page-complaints #ledgerTable th[data-field="received_date"],
.page-agency_inquiries #ledgerTable th[data-field="received_date"]{width:88px;min-width:88px;max-width:88px}
.page-complaints #ledgerTable th[data-field="contract_no"],
.page-agency_inquiries #ledgerTable th[data-field="contract_no"]{width:118px;min-width:118px;max-width:118px}
.page-complaints #ledgerTable th[data-field="complainant"],
.page-agency_inquiries #ledgerTable th[data-field="complainant"]{width:88px;min-width:88px;max-width:88px}
.page-complaints #ledgerTable th[data-field="complaint_type"]{width:72px;min-width:72px;max-width:72px}
.page-complaints #ledgerTable th[data-field="is_new"],
.page-complaints #ledgerTable th[data-field="is_repeat"],
.page-complaints #ledgerTable th[data-field="delegate"],
.page-complaints #ledgerTable th[data-field="received_round"],
.page-agency_inquiries #ledgerTable th[data-field="is_new"],
.page-agency_inquiries #ledgerTable th[data-field="is_repeat"],
.page-agency_inquiries #ledgerTable th[data-field="delegate"],
.page-agency_inquiries #ledgerTable th[data-field="received_round"]{width:58px;min-width:58px;max-width:58px}
.page-complaints #ledgerTable th[data-field="contract_date"],
.page-complaints #ledgerTable th[data-field="premium_amount"],
.page-complaints #ledgerTable th[data-field="deadline_date"],
.page-agency_inquiries #ledgerTable th[data-field="contract_date"],
.page-agency_inquiries #ledgerTable th[data-field="premium_amount"],
.page-agency_inquiries #ledgerTable th[data-field="deadline_date"]{width:92px;min-width:92px;max-width:92px}
.page-complaints #ledgerTable th[data-field="recruiter"],
.page-complaints #ledgerTable th[data-field="result_type"],
.page-agency_inquiries #ledgerTable th[data-field="recruiter"],
.page-agency_inquiries #ledgerTable th[data-field="result_type"]{width:72px;min-width:72px;max-width:72px}
.page-complaints #ledgerTable th[data-field="complaint_content"],
.page-agency_inquiries #ledgerTable th[data-field="complaint_content"]{width:180px;min-width:180px;max-width:180px}
.page-complaints #ledgerTable th[data-field="memo_primary"],
.page-complaints #ledgerTable td.cell-memo-primary,
.page-agency_inquiries #ledgerTable th[data-field="memo_primary"],
.page-agency_inquiries #ledgerTable td.cell-memo-primary{
  width:140px;
  min-width:140px;
  max-width:140px;
}
.row-click{cursor:pointer}
.row-click:hover{background:#f9fafb}

 .page-complaints .table th,
 .page-complaints .table td,
 .page-prevention_inbox .table th,
 .page-prevention_inbox .table td,
 .page-ie_inbox .table th,
 .page-ie_inbox .table td{padding:6px 8px}

.ellipsis{max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.page-complaints #ledgerTable td.cell-complaint-content.ellipsis,
.page-agency_inquiries #ledgerTable td.cell-complaint-content.ellipsis{max-width:180px}
.prewrap{white-space:pre-wrap;word-break:break-word}

.pager{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:8px}
.pager-info{font-size:13px;color:var(--muted)}

/* Pager buttons: light gray, no border */
.pager .btn.btn-outline{background:#f3f4f6;border:0}
.pager .btn.btn-outline:hover{background:#e5e7eb;text-decoration:none}
.pager .btn:disabled{opacity:.55;cursor:not-allowed}

/* Back-to-list button: no border */
.btn.btn-outline.btn-back{border:0;background:#f3f4f6}
.btn.btn-outline.btn-back:hover{background:#e5e7eb;text-decoration:none}

.blank-center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:12px}

/* Login page */
.page-login .login-title{font-size:28px;text-align:center;margin:0 0 6px 0;font-weight:800}
.page-login .login-subtitle{text-align:center;margin:0 0 32px 0} /* 시스템로그인 텍스트 아래 여백 증가 */

/* 로그인폼(card) 여백 */
.page-login .card.card-lg {
  padding: 36px 32px !important;
}

/* 로그인 버튼 위 여백 */
#loginForm .btn {
  margin-top: 28px;
}

.kv{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:10px}
.kv div{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;border:1px solid #eef2f7;border-radius:10px;background:#fbfdff}
.kv span{color:var(--muted);font-size:12px}
.kv b{font-weight:700}

.metric-groups{display:flex;flex-direction:column;gap:10px}
.metric-group{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.group-label{font-weight:700;color:#374151}
.metrics{display:flex;gap:12px}
.metric{display:flex;gap:8px;align-items:baseline}
.metric span{color:var(--muted);font-size:12px}
.metric b{font-size:18px}

.metrics-list{display:flex;flex-direction:column;gap:10px}
.metric-row{display:flex;align-items:center;justify-content:space-between}
.badge-row{display:flex;align-items:center;justify-content:space-between}
.badge-red{background:var(--red);color:#fff;border-radius:999px;padding:4px 10px;font-weight:700;text-decoration:none}
.badge-ok{background:#e5f8ed;color:#065f46;border-radius:999px;padding:4px 10px;font-weight:700;font-size:12px}
.badge-red.badge-sm,.badge-ok.badge-sm{padding:2px 8px;font-size:11px;line-height:1.2}

.upload-row{display:flex;gap:10px;align-items:center;margin-bottom:12px}
.list{display:flex;flex-direction:column;gap:8px}
.list-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px;border:1px solid #eef2f7;border-radius:10px;background:#fff}

.action-form{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:12px}
.select-sm{padding:6px 8px;border-radius:9px}

/* Complaint detail: actions list (mobile cards) */
.actions-mobile-list{display:none}
.action-card{border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;background:#fff}
.action-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.action-card-meta{display:flex;gap:10px;align-items:baseline;min-width:0}
.action-card-date{font-weight:800;color:#111827;white-space:nowrap}
.action-card-time{color:var(--muted);font-size:12px;white-space:nowrap}
.action-card-note{font-size:13px;line-height:1.35}

.kv-table th{position:static;top:auto;z-index:auto;background:#fff;width:140px;color:#111827}
.kv-table td{background:#fff}

.modal-backdrop{position:fixed;inset:0;background:rgba(17,24,39,.45);display:none;align-items:center;justify-content:center;z-index:50;padding:12px}
.modal-backdrop.show{display:flex}
.modal{width:min(760px, 96vw);background:#fff;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.25);overflow:hidden}
.modal.modal-sm{width:min(560px, 96vw)}
.modal-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid #e5e7eb}
.modal-title{font-weight:800}
.modal-body{padding:12px 14px}
.modal-footer{display:flex;justify-content:flex-end;gap:8px;padding:12px 14px;border-top:1px solid #e5e7eb}

/* Global busy overlay (saving/uploading) */
.fe-busy-backdrop{position:fixed;inset:0;background:rgba(17,24,39,.45);display:none;align-items:center;justify-content:center;z-index:80;padding:12px}
.fe-busy-backdrop.show{display:flex}
.fe-busy{width:min(420px, 92vw);background:#fff;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.25);padding:16px}
.fe-busy-row{display:flex;gap:12px;align-items:center}
.fe-spinner{width:20px;height:20px;border-radius:50%;border:3px solid #e5e7eb;border-top-color:var(--primary);animation:fe-spin 1s linear infinite}
@keyframes fe-spin{to{transform:rotate(360deg)}}
.fe-busy-msg{font-weight:800}
.fe-busy-sub{margin-top:4px;color:var(--muted);font-size:13px}
.fe-busy-progress{margin-top:12px;height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden}
.fe-busy-progress > i{display:block;height:100%;background:var(--primary);width:0%}

/* Bulk delete bottom overlay bar (ledger) */
.bulkbar{
  position:fixed;
  left:50%;
  bottom:16px;
  transform:translateX(-50%);
  z-index:60;
  width:min(720px, calc(100vw - 24px));
}
.bulkbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  background:#fff;
  border:3px solid #1f2937;
  border-radius:12px;
  box-shadow:0 18px 50px rgba(17,24,39,.18);
  white-space:nowrap;
}
.bulkbar-left{font-size:14px}
.bulkbar-left b{font-weight:800}
.bulkbar-actions{display:flex;gap:8px;align-items:center}

@media (max-width: 980px){
  .grid-2{grid-template-columns:1fr}
  .sidebar{width:180px}
  .kv{grid-template-columns:1fr}
  .grid-form{grid-template-columns:1fr}
  .complaint-form-wrap{width:100%;max-width:100%}
  .profile-wrap{width:100%;max-width:100%}
  .access-settings-wrap{width:100%;max-width:100%}
  .access-settings-grid{grid-template-columns:1fr}
  .dashboard-page{padding:14px 12px}
  .dashboard-title{font-size:28px}
  .dashboard-grid{grid-template-columns:1fr;gap:14px}
  .dashboard-grid .card{aspect-ratio:auto}
}

@media (max-width: 560px){
  .dashboard-grid{grid-template-columns:1fr}
}

@media (max-width: 720px){
  .topbar{display:flex}
  .main{position:relative}

  /* Off-canvas sidebar */
  .sidebar{
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    height:auto;
    width:min(72vw, 240px);
    z-index:60;
    transform:translateX(-110%);
    transition:transform .18s ease;
    box-shadow:0 20px 60px rgba(0,0,0,.35);
  }
  .sidebar.is-open{transform:translateX(0)}

  .content{width:100%}
  .content-inner{padding:12px 10px}

  /* Dashboard mobile tweaks */
  .dashboard-inner{width:100%}
  .dashboard-header{flex-direction:column;align-items:flex-start;gap:10px;margin:0 0 16px 0}
  .dashboard-title{font-size:24px}
  .dashboard-grid{gap:12px}
  .dashboard-grid .card{padding:14px 12px}

  /* Detail pages: keep action header usable on mobile */
  .page-complaint_detail .card-title-row-actions,
  .page-agency_inquiry_detail .card-title-row-actions{gap:10px;align-items:flex-start}
  .page-complaint_detail .card-title-row-actions .h2,
  .page-agency_inquiry_detail .card-title-row-actions .h2{min-width:0;flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  /* Detail pages: switch action list to card layout on mobile */
  .page-complaint_detail .actions-table-wrap,
  .page-agency_inquiry_detail .actions-table-wrap{display:none}
  .page-complaint_detail .actions-mobile-list,
  .page-agency_inquiry_detail .actions-mobile-list{display:flex;flex-direction:column;gap:10px}
  .page-agency_inquiry_detail .action-card{padding:12px}
  .page-agency_inquiry_detail .action-card-head{align-items:flex-start;flex-wrap:wrap}
  .page-agency_inquiry_detail .action-card-meta{flex-wrap:wrap;row-gap:4px}
  .page-agency_inquiry_detail .action-link{flex:0 0 auto}

  /* Inbox lists: enable horizontal scroll inside table-wrap */
  .page-prevention_inbox #prevTable{min-width:720px}
  .page-ie_inbox #ieTable{min-width:780px}

  /* Users page: header layout (title+create button, then filters) */
  .page-users .page-header-users{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "title actions"
      "filters filters";
    align-items:start;
  }
  .page-users .page-header-users .header-filters{margin-top:8px}

  /* Users page: enable horizontal scroll for list table */
  .page-users #usersTable{min-width:980px}
}
