:root {
  --bg:        #f0f2f7;
  --surface:   #ffffff;
  --s2:        #f7f8fc;
  --s3:        #eef0f6;
  --border:    #e4e7ef;
  --border2:   #d1d6e3;

  --accent:    #0c6e50;
  --accent-m:  #0f9269;
  --accent-l:  #e8f5f0;
  --accent-t:  rgba(12,110,80,.12);

  --blue:      #2563c8;
  --blue-l:    #eff3ff;
  --cyan:      #0891b2;
  --cyan-l:    #ecfeff;
  --amber:     #b45309;
  --amber-l:   #fef3e2;
  --red:       #c8332a;
  --red-l:     #fff1f0;
  --pink:      #9333ea;
  --pink-l:    #faf5ff;

  --text:      #0f1621;
  --t2:        #4a5568;
  --t3:        #8a97ad;
  --t4:        #b8c2d0;

  --shadow-sm: 0 1px 3px rgba(15,22,33,.06), 0 1px 2px rgba(15,22,33,.04);
  --shadow:    0 4px 12px rgba(15,22,33,.08), 0 2px 4px rgba(15,22,33,.04);
  --shadow-lg: 0 16px 40px rgba(15,22,33,.12), 0 4px 12px rgba(15,22,33,.06);

  --radius:    10px;
  --radius-lg: 16px;
  --sw:        272px;
  --topbar-h:  78px;

  /* type scale — bumped up across the board */
  --fs-body:    15px;
  --fs-table:   15px;
  --fs-small:   13px;
  --fs-tiny:    12px;
  --fs-h1:      26px;
  --fs-stat:    32px;
  --row-pad-y:  16px;
}

* { box-sizing:border-box; margin:0; padding:0; }
html { font-size:15px; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: var(--fs-body);
}

/* ════════════════════════════════
   LOGIN
════════════════════════════════ */
.login-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    linear-gradient(135deg, rgba(12,110,80,.10), rgba(37,99,200,.08)),
    var(--bg);
}
.login-panel {
  width: min(100%, 420px);
}
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}
.login-hd {
  margin-bottom: 24px;
}
.login-hd h1 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--text);
  justify-self: center;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 16px;
}
.login-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--t2);
  cursor: pointer;
}
.login-error {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(200, 51, 42, .22);
  border-radius: 8px;
  background: var(--red-l);
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}
.login-error.show {
  display: block;
}
.login-submit {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  font-size: 15px;
}

@media (max-width: 480px) {
  .login-page {
    align-items: flex-start;
    padding-top: 56px;
  }
  .login-card {
    padding: 24px 20px;
  }
}

/* ════════════════════════════════
   SIDEBAR
════════════════════════════════ */
.sidebar {
  width: var(--sw);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 10;
}
.sidebar::-webkit-scrollbar { width: 0; }

.logo {
  height: var(--topbar-h);
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.logo-text { font-size: 17px; font-weight: 800; letter-spacing: -0.4px; color: var(--text); margin-top: 9px; margin-left: 5px; }
.logo-text em { color: var(--t3); font-style: normal; }
.logo-sub { font-size: 11px; color: var(--t3); font-weight: 500; letter-spacing: .3px; margin-top: 2px; }

.nav { flex: 1; padding: 16px 12px; }
.nav-section { margin-bottom: 8px; }
.nav-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: var(--t4); text-transform: uppercase;
  padding: 12px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--t2);
  cursor: pointer;
  font-size: 15px; font-weight: 500;
  transition: background .12s, color .12s;
  user-select: none;
  position: relative;
  margin-bottom: 2px;
  text-decoration-line:none;
}
.nav-item:hover { background: var(--s2); color: var(--text); }
.nav-item.active {
  background: var(--accent-l);
  color: var(--accent);
  font-weight: 600;
}
.nav-item.active .nav-ico { color: var(--accent); }
.nav-ico {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
  opacity: .85;
}
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 22px; text-align: center;
  line-height: 1.4;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  position: relative;
}
.sidebar-user-card {
  width: 100%;
  min-height: 52px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 11px;
}
.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}
.sidebar-user-meta {
  min-width: 0;
  flex: 1 1 auto;
}
.sidebar-user-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-role {
  color: var(--t3);
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-menu-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--t3);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
}
.sidebar-user-menu-btn:hover {
  background: var(--s2);
  color: var(--text);
}
.account-dd {
  position: fixed;
  min-width: 180px;
}
.account-modal {
  max-width: 560px;
}
.account-profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.account-modal-name {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}
.account-modal-role {
  color: var(--t3);
  font-size: 13px;
  font-weight: 600;
  margin-top: 3px;
}
.account-section-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
}


/* ════════════════════════════════
   MAIN
════════════════════════════════ */
.main { flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:0; }

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 32px;
  gap: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}
.topbar-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--t3);
}
.logo-link { display: inline-flex; align-items: center; line-height: 0; text-decoration-line: none;}
.topbar-logo-img { display: block; width: auto; height: 34px; max-width: 150px; object-fit: contain; }
.topbar-breadcrumb .crumb { cursor: pointer; transition: color .12s; }
.topbar-breadcrumb .crumb:hover { color: var(--accent); }
.topbar-breadcrumb .sep { color: var(--t4); }
.topbar-title { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -.3px; }
.spacer { flex: 1; }
.search-box {
  display: flex; align-items: center; gap: 9px;
  background: var(--s2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  width: 280px;
  transition: border-color .15s, box-shadow .15s;
}
.search-box:focus-within {
  border-color: var(--accent-m);
  box-shadow: 0 0 0 3px var(--accent-t);
  background: var(--surface);
}
.search-box input {
  background: transparent; border: none; outline: none;
  color: var(--text); font-size: 14px; font-family: inherit; width: 100%;
}
.search-box input::placeholder { color: var(--t3); }
.search-ico { color: var(--t3); font-size: 15px; }
.topbar-search { margin: 0; }
.search-clear {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  color: var(--t3);
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
}
.search-clear:hover { background: var(--border); color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--s2);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 17px;
  transition: all .12s;
  position: relative;
}
.icon-btn:hover { background: var(--s3); border-color: var(--border2); }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--surface);
}

.content {
  flex: 1; overflow-y: auto;
  padding: 32px;
}
.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }

/* ════════════════════════════════
   COMPONENTS
════════════════════════════════ */

/* Page header */
.page-hd { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:28px; gap:16px; }
.page-hd-left .ph-title { font-size:var(--fs-h1); font-weight:800; letter-spacing:-.6px; color:var(--text); line-height:1.15; }
.page-hd-left .ph-sub { font-size:14px; color:var(--t3); margin-top:6px; font-weight:400; }
.page-hd-right { display:flex; align-items:center; gap:10px; flex-shrink:0; }

/* Stat cards */
.stat-row { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:20px; }
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px 24px 20px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
  position: relative; overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card-ico {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.sico-green  { background: var(--accent-l); }
.sico-blue   { background: var(--blue-l); }
.sico-amber  { background: var(--amber-l); }
.sico-red    { background: var(--red-l); }
.sico-purple { background: var(--pink-l); }
.sico-cyan   { background: var(--cyan-l); }
.stat-label { font-size: 13.5px; color: var(--t3); font-weight: 500; letter-spacing: .1px; margin-bottom: 8px; }
.stat-num   { font-size: var(--fs-stat); font-weight: 800; color: var(--text); letter-spacing: -1.2px; font-family: 'Plus Jakarta Sans', sans-serif; line-height: 1; }
.stat-sub   { font-size: 13px; color: var(--t3); margin-top: 10px; display:flex; align-items:center; gap:5px; }
.trend-up   { color: var(--accent); font-weight: 600; }
.trend-dn   { color: var(--red); font-weight: 600; }

/* Card */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); display:flex; align-items:center; gap:8px; letter-spacing:-.2px; }
.card-title .ct-dot { width:8px; height:8px; border-radius:50%; }
.card-actions { display:flex; align-items:center; gap:8px; }
.text-link { font-size: 13.5px; color: var(--accent); cursor: pointer; font-weight:600; background:none; border:none; font-family:inherit; }
.text-link:hover { text-decoration: underline; }

/* Table */
table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: 13.5px; font-weight: 700; color: var(--t2);
  letter-spacing: 0;
  padding: 14px 22px;
  text-align: left;
  background: var(--s2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #fafbfd; }
td { padding: var(--row-pad-y) 22px; font-size: var(--fs-table); vertical-align: middle; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 13.5px; }
.fw6 { font-weight: 600; }
.dimmed { color: var(--t3); }
.num { font-variant-numeric: tabular-nums; text-align: right; }
th.num { text-align: right; }
.unread-row td:first-child { position:relative; }
.unread-row td:first-child::before {
  content:''; position:absolute; left:0; top:0; bottom:0;
  width:4px; background: var(--red); border-radius:0 3px 3px 0;
}
tr.row-warn td:first-child::before {
  content:''; position:absolute; left:0; top:0; bottom:0;
  width:4px; background: var(--amber); border-radius:0 3px 3px 0;
}
tr.row-warn td:first-child, tr.unread-row td:first-child { position:relative; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  letter-spacing: -.1px;
}
.chip::before { content:''; width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.chip-green  { background:var(--accent-l); color:var(--accent); }
.chip-green::before  { background:var(--accent-m); }
.chip-blue   { background:var(--blue-l);   color:var(--blue); }
.chip-blue::before   { background:var(--blue); }
.chip-amber  { background:var(--amber-l);  color:var(--amber); }
.chip-amber::before  { background:var(--amber); }
.chip-red    { background:var(--red-l);    color:var(--red); }
.chip-red::before    { background:var(--red); }
.chip-purple { background:var(--pink-l);   color:var(--pink); }
.chip-purple::before { background:var(--pink); }
.chip-cyan   { background:var(--cyan-l);   color:var(--cyan); }
.chip-cyan::before   { background:var(--cyan); }
.chip-gray   { background:var(--s3);       color:var(--t2); }
.chip-gray::before   { background:var(--t3); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--t2);
  font-family: inherit;
  transition: all .13s;
  white-space: nowrap;
  letter-spacing: -.1px;
  text-decoration: none;
}
.btn:hover { background: var(--s2); border-color: var(--border2); color: var(--text); }
.btn-primary {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-m); border-color: var(--accent-m); }
.btn-danger { border-color: rgba(200,51,42,.25); color: var(--red); background: var(--red-l); }
.btn-danger:hover { background: #fde8e7; border-color: rgba(200,51,42,.4); }
.btn-warning { border-color: rgba(180,83,9,.25); color: var(--amber); background: var(--amber-l); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }

/* Toolbar */
.toolbar { display:flex; align-items:center; gap:10px; margin-bottom:18px; flex-wrap:wrap; }
.t-search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 9px 14px;
  flex:1; max-width: 340px;
  transition: border-color .15s, box-shadow .15s;
}
.t-search:focus-within { border-color: var(--accent-m); box-shadow: 0 0 0 3px var(--accent-t); }
.t-search input { background:transparent; border:none; outline:none; color:var(--text); font-size:14px; font-family:inherit; width:100%; }
.t-search input::placeholder { color:var(--t3); }
.t-search-actions { display:flex; align-items:center; gap:6px; flex:0 0 auto; }
.t-search-actions .btn { padding:9px 13px; }
@media (max-width: 720px) {
  .t-search { max-width:none; flex-basis:100%; }
  .t-search-actions { width:100%; }
  .t-search-actions .btn { flex:1; }
}
.t-select {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 9px 14px;
  font-size: 14px; font-family: inherit; color: var(--t2); font-weight:500;
  cursor:pointer; outline:none; transition: border-color .15s;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a97ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.t-select:focus { border-color: var(--accent-m); box-shadow: 0 0 0 3px var(--accent-t); }

/* Tabs */
.tabs {
  display: flex; gap: 2px;
  background: var(--s2);
  border-radius: 11px; padding: 5px;
  width: fit-content;
  margin-bottom: 22px;
  border: 1.5px solid var(--border);
}
.tab {
  border: 0;
  background: transparent;
  font-family: inherit;
  padding: 9px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  cursor: pointer; color: var(--t2);
  transition: all .15s; user-select:none;
  white-space: nowrap; display:flex; align-items:center; gap:7px;
  text-decoration-line:none;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.modal-tabs { margin-bottom: 16px; }
.tab-count {
  background: var(--red);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
  min-width: 20px; text-align:center;
}
.tab-count-amber { background: var(--amber); }

/* ========== Unified filter bar (column: 토글 위 / 검색 아래) ========== */
.filter-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.filter-row + .filter-row {
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.filter-row .t-search {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 420px;
}
.filter-row .t-search-actions { flex: 0 0 auto; }
.filter-row > .spacer { flex: 1 1 auto; }
.filter-row > .filter-divider {
  width: 1px; align-self: stretch; background: var(--border);
  margin: 2px 4px;
}

.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 100%;
  width: 100%;
}
.filter-group-label {
  width: 48px;
  flex: 0 0 48px;
  font-size: 14px;
  font-weight: 700;
  color: var(--t3);
  white-space: nowrap;
  letter-spacing: .2px;
}
.filter-toggle {
  display: inline-flex;
  gap: 2px;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  flex-wrap: wrap;
  max-width: 100%;
}
.filter-pill {
  min-height: 34px;
  padding: 7px 15px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--t2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration-line: none;
  background: transparent;
  border: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color .12s ease, background .12s ease, box-shadow .12s ease, transform .08s ease;
}
.filter-pill:hover {
  color: var(--text);
  background: var(--surface);
}
.filter-pill:active { transform: translateY(1px); }
.filter-pill.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(12, 110, 80, .28), inset 0 0 0 1px rgba(255,255,255,.08);
}
.filter-pill.active:hover { background: var(--accent-m); color: #fff; }
.filter-pill .pill-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 9px;
  background: rgba(0,0,0,.08);
  color: inherit;
  font-weight: 600;
  line-height: 1.4;
}
.filter-pill.active .pill-count { background: rgba(255,255,255,.22); }


.filter-row-date {
  align-items: center;
  gap: 8px 12px;
}
.filter-row-date .filter-group {
  flex: 0 1 auto;
  width: auto;
}
.filter-row-search {
  align-items: stretch;
}
.filter-row-search .t-search {
  flex: 0 1 440px;
  max-width: 440px;
}
.filter-row-search .t-search-actions {
  align-self: stretch;
}
.filter-row-search .t-search-actions .btn {
  min-height: 40px;
}

/* Year/month select inside filter bar */
.filter-bar .t-select {
  padding: 6px 30px 6px 12px;
  font-size: 13px;
  border-width: 1px;
  border-radius: 9px;
}

@media (max-width: 720px) {
  .filter-bar { padding: 10px; gap: 10px; }
  .filter-row .t-search { max-width: 100%; flex-basis: 100%; }
  .filter-group { width: 100%; }
}

/* Pagination */
.table-meta {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding: 13px 22px;
  background: var(--s2);
  border-bottom: 1px solid var(--border);
  color: var(--t2); font-size:14px; font-weight:600;
}
.table-meta strong { color: var(--text); font-weight:700; }
.table-meta-pill {
  display:inline-flex; align-items:center; gap:4px;
  height:28px; padding:0 11px; border-radius:999px;
  background:var(--surface); border:1px solid var(--border);
  color:var(--t2); font-size:14px; font-weight:600;
}
.table-meta-pill.search { color:var(--accent); border-color:var(--accent-t); background:var(--accent-l); }
.table-meta-pill.selected {
  color: var(--blue);
  border-color: rgba(37,99,200,.16);
  background: var(--blue-l);
}
table input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--accent);
}
table input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .45;
}
tbody tr.row-selected {
  background: var(--accent-l);
}
.pg {
  display: flex; align-items:center; justify-content:center;
  padding: 14px 22px; border-top: 1px solid var(--border);
}
.pg-info { display:none; }
.pg-btns { display:flex; justify-content:center; gap:5px; }
.pg-btn {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items:center; justify-content:center;
  cursor:pointer; font-size: 14px; font-weight:500;
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--t2); transition: all .12s;
  text-decoration-line: none;
}
.pg-btn:hover { background: var(--s2); color: var(--text); }
.pg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight:700; }

/* Status dots */
.sys-row { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:24px; }
.sys-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 13px;
  box-shadow: var(--shadow-sm);
}
.sys-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink:0;
  position: relative;
}
.sys-dot::after {
  content:''; position:absolute; inset:-3px;
  border-radius:50%; opacity:.3;
}
.dot-ok  { background: var(--accent-m); } .dot-ok::after  { background: var(--accent-m); animation: pulse 2s infinite; }
.dot-warn{ background: var(--amber); }    .dot-warn::after{ background: var(--amber); animation: pulse 1.5s infinite; }
.dot-err { background: var(--red); }      .dot-err::after { background: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:.3;transform:scale(1)} 50%{opacity:.15;transform:scale(1.5)} }
.sys-name { font-size: 14.5px; font-weight: 600; color:var(--text); }
.sys-label{ font-size: 12.5px; color: var(--t3); margin-top:1px; }

/* Progress */
.prog-wrap { display:flex; align-items:center; gap:10px; }
.prog-bar  { flex:1; height:6px; background:var(--s3); border-radius:3px; overflow:hidden; min-width:80px; }
.prog-fill { height:100%; border-radius:3px; transition: width .3s; }
.prog-pct  { font-size:12.5px; font-family:'JetBrains Mono',monospace; color:var(--t3); width:34px; text-align:right; }

/* Chart */
.chart-wrap { padding:24px 26px 20px; display:flex; align-items:flex-end; gap:6px; height:220px; }
.bar-g { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; }
.bar {
  width:100%; border-radius:6px 6px 0 0; cursor:pointer;
  transition: opacity .15s, filter .15s;
  position:relative;
}
.bar:hover { opacity:.8; }
.bar-lbl { font-size:12px; color:var(--t3); font-weight:500; }
.bar-grn { background: linear-gradient(180deg, var(--accent) 0%, rgba(12,110,80,.3) 100%); }
.bar-blu { background: linear-gradient(180deg, var(--blue) 0%, rgba(37,99,200,.25) 100%); }

/* Grid layouts */
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:18px; }
.grid-32 { display:grid; grid-template-columns:2fr 1fr; gap:18px; }

/* Pending action card — dashboard hero */
.action-hero {
  display:grid; grid-template-columns: repeat(6, 1fr); gap:14px;
  margin-bottom:24px;
}
.action-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  cursor: pointer;
  position: relative;
  transition: all .15s;
  display:flex; flex-direction:column; gap:6px;
  text-align:left;
  font-family: inherit;
}
.action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.action-card.urgent {
  border-color: rgba(200,51,42,.35);
  background: linear-gradient(180deg, #fff8f7 0%, var(--surface) 60%);
}
.action-card.warn {
  border-color: rgba(180,83,9,.3);
  background: linear-gradient(180deg, #fffaf2 0%, var(--surface) 60%);
}
.action-card .ac-label {
  font-size: 13px; color: var(--t2); font-weight: 600;
  display:flex; align-items:center; gap:6px;
}
.action-card .ac-num {
  font-size: 28px; font-weight: 800; color: var(--text);
  letter-spacing: -.8px; line-height: 1.05; font-variant-numeric: tabular-nums;
  display:flex; align-items:baseline; gap:5px;
}
.action-card .ac-num small { font-size:14px; color:var(--t3); font-weight:600; }
.action-card.urgent .ac-num { color: var(--red); }
.action-card.warn .ac-num   { color: var(--amber); }
.action-card .ac-arrow {
  position:absolute; top:14px; right:14px;
  color: var(--t4); font-size:14px;
  transition: color .15s, transform .15s;
}
.action-card:hover .ac-arrow { color: var(--accent); transform: translateX(2px); }
.action-card .ac-foot {
  font-size: 12px; color: var(--t3); margin-top:4px;
}

/* Greeting strip */
.greet {
  display:flex; align-items:start; justify-content:space-between;
  margin-bottom:24px; gap:16px;
}
.greet-l .greet-title { font-size: 26px; font-weight:800; letter-spacing:-.6px; color:var(--text); line-height:1.2; }
.greet-l .greet-sub { font-size: 14px; color: var(--t3); margin-top:6px; font-weight:500; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.greet-l .greet-sub .live-dot {
  width:7px; height:7px; border-radius:50%; background:var(--accent-m); position:relative;
}
.greet-l .greet-sub .live-dot::after {
  content:''; position:absolute; inset:-3px; border-radius:50%; background:var(--accent-m); opacity:.3; animation:pulse 2s infinite;
}
.greet-r { display:flex; align-items:center; gap:10px; flex-shrink:0; }

/* Section header within page */
.sec-hd {
  display:flex; align-items:center; gap:10px; margin: 8px 0 14px;
}
.sec-hd h3 {
  font-size: 14px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: 1.2px;
}
.sec-hd .sec-dot { width:6px; height:6px; border-radius:50%; background:var(--accent); }
.sec-hd::after { content:''; flex:1; height:1px; background:var(--border); }

/* Page show/hide */
.page { display:none; }
.page.active { display:block; animation: pgIn .18s ease; }
@keyframes pgIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }

/* ════════════════════════════════
   MODAL
════════════════════════════════ */
.overlay {
  display:none; position:fixed; inset:0;
  background: rgba(15,22,33,.25);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 24px;
}
.overlay.open { display:flex; animation: ov-in .18s ease; }
@keyframes ov-in { from{opacity:0} to{opacity:1} }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: 100%; max-height: 88vh;
  display: flex; flex-direction:column;
  animation: mo-in .2s ease;
  overflow: hidden;
}
@keyframes mo-in { from{transform:translateY(14px);opacity:0} to{transform:none;opacity:1} }
.modal-hd {
  display:flex; align-items:center; justify-content:space-between;
  padding: 20px 26px;
  border-bottom: 1px solid var(--border);
  flex-shrink:0;
}
.modal-title { font-size:19px; font-weight:800; letter-spacing:-.4px; }
.modal-sub { font-size:13.5px; color:var(--t3); margin-top:3px; }
.modal-close {
  width:30px; height:30px;
  border-radius:8px; background:var(--s2);
  border:1.5px solid var(--border);
  color:var(--t2); cursor:pointer; font-size:14px;
  display:flex; align-items:center; justify-content:center;
  transition:all .12s;
}
.modal-close:hover { background:var(--s3); color:var(--text); }
.modal-body { padding:24px 26px; overflow-y:auto; flex:1; }
.modal-body::-webkit-scrollbar { width:4px; }
.modal-body::-webkit-scrollbar-thumb { background:var(--border2); border-radius:4px; }
.modal-ft {
  padding:16px 26px;
  border-top:1px solid var(--border);
  display:flex; justify-content:flex-end; gap:8px;
  background: var(--s2); flex-shrink:0;
}

.document-preview-modal { max-width: 980px; height: 88vh; }
.document-preview-body { padding: 0; background: #eef2f7; overflow: hidden; }
.document-preview-body iframe { width: 100%; height: 100%; border: 0; background: #fff; display: block; }

/* Report download modal */
.rp-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.rp-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s;
  background: var(--surface);
}
.rp-card:hover {
  border-color: var(--border2);
  background: var(--s2);
}
.rp-card.active {
  border-color: var(--accent);
  background: var(--accent-l);
  box-shadow: 0 0 0 3px var(--accent-t);
}
.rp-card .rp-ico {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex: 0 0 auto;
}
.rp-card .rp-tt {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.rp-card .rp-sub {
  font-size: 12px;
  color: var(--t3);
  margin-top: 2px;
  line-height: 1.35;
}
.rp-period {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.rp-pchip {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--t2);
  cursor: pointer;
  transition: border-color .1s, background .1s, color .1s;
  font-family: inherit;
}
.rp-pchip:hover {
  border-color: var(--border2);
  color: var(--text);
}
.rp-pchip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.rp-custom {
  display: none;
  gap: 10px;
  margin-top: 10px;
}
.rp-custom .finput {
  flex: 1;
}
.rp-include-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 6px;
  font-size: 14px;
}
.rp-include-grid label,
.rp-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--t2);
  font-weight: 600;
}

/* Form fields */
.field { display:flex; flex-direction:column; gap:7px; }
.field label { font-size:13px; font-weight:700; color:var(--t2); letter-spacing:.1px; }
.field-row { display:flex; gap:18px; margin-bottom:18px; }
.field-row .field { flex:1; }
.field-sep { border:none; border-top:1px solid var(--border); margin:18px 0; }
.form-hint {
  margin-top: 2px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--s2);
  color: var(--t2);
  font-size: 13px;
  line-height: 1.45;
}
.finput {
  background:var(--s2); border:1.5px solid var(--border);
  border-radius:10px; padding:11px 14px;
  color:var(--text); font-size:14.5px; font-family:inherit;
  width:100%; outline:none; resize:vertical;
  transition:border-color .15s, box-shadow .15s;
}
.finput:focus { border-color:var(--accent-m); box-shadow:0 0 0 3px var(--accent-t); background:var(--surface); }
.finput option { background:var(--surface); }
.fval { font-size:15px; color:var(--text); padding:2px 0; font-weight:500; }
.req { color:var(--red); }

/* Toggle */
.toggle-wrap { display:flex; align-items:center; gap:10px; cursor:pointer; }
.toggle-wrap input { display:none; }
.toggle-track {
  width:40px; height:22px; border-radius:11px;
  background:var(--s3); border:1.5px solid var(--border2);
  position:relative; transition:all .2s;
}
.toggle-thumb {
  position:absolute; top:2px; left:2px;
  width:16px; height:16px; border-radius:50%;
  background:var(--t3); transition:all .2s;
  box-shadow:0 1px 3px rgba(0,0,0,.15);
}
.toggle-wrap input:checked ~ .toggle-track { background:var(--accent); border-color:var(--accent); }
.toggle-wrap input:checked ~ .toggle-track .toggle-thumb { transform:translateX(18px); background:#fff; }
.toggle-lbl { font-size:13px; color:var(--t2); font-weight:500; }

/* Editor toolbar */
.ed-toolbar {
  display:flex; align-items:center; gap:2px;
  background:var(--surface); border:1.5px solid var(--border);
  border-bottom:none; border-radius:9px 9px 0 0; padding:5px 8px;
}
.ed-toolbar+.finput { border-radius:0 0 9px 9px; }
.ed-btn {
  background:none; border:none; color:var(--t2); cursor:pointer;
  padding:4px 8px; border-radius:5px; font-size:13px; font-family:inherit; font-weight:700;
  transition: background .1s;
}
.ed-btn:hover { background:var(--s3); color:var(--text); }
.ed-sep { width:1px; height:14px; background:var(--border); margin:0 3px; }

/* ════════════════════════════════
   INQUIRY THREAD
════════════════════════════════ */
.thread {
  display:flex; flex-direction:column; gap:14px;
  padding: 4px 0 16px;
  max-height: 320px; overflow-y:auto;
}
.thread::-webkit-scrollbar { width:4px; }
.thread::-webkit-scrollbar-thumb { background:var(--border2); border-radius:4px; }
.th-msg { display:flex; flex-direction:column; max-width:82%; }
.th-msg.user  { align-self:flex-start; }
.th-msg.admin { align-self:flex-end; }
.th-bubble {
  padding:11px 15px; border-radius:14px;
  font-size:13.5px; line-height:1.65; color:var(--text);
}
.th-msg.user .th-bubble {
  background:var(--s2); border:1.5px solid var(--border);
  border-radius:4px 14px 14px 14px;
}
.th-msg.admin .th-bubble {
  background:var(--accent-l); border:1.5px solid rgba(12,110,80,.15);
  border-radius:14px 4px 14px 14px;
}
.th-meta { font-size:11px; color:var(--t3); margin-top:4px; }
.th-msg.admin .th-meta { text-align:right; }
.th-divider {
  display:flex; align-items:center; gap:10px; color:var(--t3);
  font-size:11px; margin:2px 0;
}
.th-divider::before,.th-divider::after { content:''; flex:1; height:1px; background:var(--border); }

.th-reply-box {
  border-top:1px solid var(--border);
  padding-top:16px;
  margin-top:4px;
}
.th-actions { display:flex; align-items:center; gap:8px; margin-top:10px; justify-content:space-between; }
.th-hint { font-size:11.5px; color:var(--t3); }

/* Unread indicator */
.unread-pip {
  display:inline-block; width:7px; height:7px;
  border-radius:50%; background:var(--red);
  box-shadow:0 0 0 2px var(--red-l);
}

/* Dashboard pending card */
.pending-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0; border-bottom:1px solid var(--border);
}
.pending-row:last-child { border-bottom:none; }
.pending-label { font-size:14.5px; color:var(--t2); display:flex; align-items:center; gap:10px; font-weight:500; }
.pending-count { font-size:16px; font-weight:700; }

/* Category row */
.cat-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:9px 12px; background:var(--s2);
  border-radius:8px; margin-bottom:6px; font-size:13px; font-weight:500;
  gap:8px;
  transition: box-shadow .15s, background .15s, opacity .15s;
}
.cat-row[draggable="true"] .cat-row__handle {
  cursor: grab;
  user-select: none;
  color: var(--t3, #94a3b8);
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  flex-shrink: 0;
}
.cat-row[draggable="true"]:hover .cat-row__handle { color: var(--t2, #475569); }
.cat-row[draggable="true"]:active .cat-row__handle { cursor: grabbing; }
.cat-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-row__actions { flex-shrink: 0; }
.cat-row.is-dragging {
  opacity: .55;
  background: var(--s2);
  box-shadow: 0 0 0 2px var(--accent, #5b8b3f) inset;
}
.cat-list { min-height: 8px; }

/* Toast */
.toast {
  position:fixed; bottom:28px; right:28px;
  background:var(--text); color:#fff;
  border-radius:10px; padding:12px 18px;
  font-size:13px; font-weight:500;
  display:flex; align-items:center; gap:8px;
  box-shadow:var(--shadow-lg);
  animation:t-in .25s ease;
  z-index:999; max-width:320px;
}
@keyframes t-in { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.toast-dot { width:6px; height:6px; border-radius:50%; background:var(--accent-m); flex-shrink:0; }

/* Complete banner */
.complete-banner {
  position: fixed;
  top: 16px;
  left: calc(var(--sw) + 35%);
  transform: translate(-50%, -12px);
  min-width: 280px;
  max-width: min(560px, calc(100vw - var(--sw) - 48px));
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 1000;
}
.complete-banner.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.complete-banner.error {
  background: var(--red);
}
.complete-banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  flex: 0 0 auto;
}

/* Helper */
.mb16 { margin-bottom:16px; }
.mb20 { margin-bottom:20px; }
.mt12 { margin-top:12px; }
.gap-8 { display:flex; gap:8px; }

/* Section divider */
.section-div {
  display:flex; align-items:center; gap:12px;
  margin-bottom:16px;
}
.section-div h2 { font-size:14px; font-weight:700; color:var(--text); white-space:nowrap; }
.section-div::after { content:''; flex:1; height:1px; background:var(--border); }

/* Company avatar */
.co-avatar {
  width: 36px; height: 36px;
  border-radius: 9px;
  display:inline-flex; align-items:center; justify-content:center;
  font-size: 13.5px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -.3px;
}
.co-cell { display:flex; align-items:center; gap:11px; }
.co-cell .co-name { font-weight: 600; font-size: 15px; color: var(--text); }
.co-cell .co-meta { font-size: 12.5px; color: var(--t3); margin-top: 2px; }

/* Tweaks panel */
.tweaks-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--text); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-lg);
  z-index: 150;
  transition: transform .15s;
}
.tweaks-fab:hover { transform: scale(1.05); }
.tweaks-panel {
  position: fixed; bottom: 84px; right: 24px;
  width: 280px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  z-index: 149;
  display: none;
}
.tweaks-panel.open { display: block; animation: t-in .2s ease; }
.tweaks-panel h4 {
  font-size: 14px; font-weight: 800; letter-spacing: -.2px;
  margin-bottom: 14px; display:flex; align-items:center; justify-content:space-between;
}
.tweaks-panel h4 .x {
  cursor: pointer; color: var(--t3); font-weight: 400; font-size: 16px;
}
.tweak-row { margin-bottom: 14px; }
.tweak-row:last-child { margin-bottom: 0; }
.tweak-row .tw-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--t2);
  margin-bottom: 8px;
}
.tweak-row .tw-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--accent); font-weight: 700;
}
.tweak-row input[type=range] {
  width: 100%; -webkit-appearance: none; height: 6px;
  background: var(--s3); border-radius: 3px; outline: none;
}
.tweak-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
  box-shadow: 0 2px 6px rgba(12,110,80,.4);
}
.tweak-row .tw-segment {
  display: flex; gap: 4px;
  background: var(--s2); border-radius: 8px; padding: 3px;
  border: 1.5px solid var(--border);
}
.tweak-row .tw-segment button {
  flex: 1; border: none; background: transparent;
  padding: 7px 8px; border-radius: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--t2);
  cursor: pointer; font-family: inherit;
}
.tweak-row .tw-segment button.active {
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* Dropdown menus */
.dropdown {
  position: absolute;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 6px;
  z-index: 200;
  display: none;
  animation: dd-in .14s ease;
}
.dropdown.open { display: block; }
.dropdown.account-dd {
  position: fixed;
  min-width: 180px;
  z-index: 260;
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--t2);
  cursor: pointer; user-select: none;
  transition: background .1s;
}
.dd-item:hover { background: var(--s2); color: var(--text); }
.dd-item .dd-ico { width: 18px; text-align: center; font-size: 16px; flex-shrink: 0; }
.dd-item.danger { color: var(--red); }
.dd-item.danger:hover { background: var(--red-l); }
.dd-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.dd-hd {
  padding: 12px 14px 8px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.dd-hd .dd-title { font-size: 14px; font-weight: 800; color: var(--text); }
.dd-hd .dd-link { font-size: 12px; color: var(--accent); cursor: pointer; font-weight: 600; }

/* Notification dropdown */
.notif-dd { width: 360px; padding: 0; }
.notif-list { max-height: 400px; overflow-y: auto; padding: 4px; }
.notif-item {
  display: flex; gap: 11px; padding: 12px 14px;
  border-radius: 8px; cursor: pointer;
  transition: background .1s;
}
.notif-item:hover { background: var(--s2); }
.notif-item.unread { background: #fff8f7; }
.notif-item.unread:hover { background: #ffeeed; }
.notif-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notif-desc { font-size: 12.5px; color: var(--t3); line-height: 1.4; }
.notif-time { font-size: 11.5px; color: var(--t4); margin-top: 4px; font-family: 'JetBrains Mono', monospace; }
.notif-ft { padding: 10px 14px; border-top: 1px solid var(--border); text-align: center; }
.notif-ft .text-link { font-size: 13px; }
.notif-empty { padding: 32px; text-align: center; color: var(--t3); font-size: 13px; }

/* Common confirm modal */
.confirm-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--accent-l);
  color: var(--accent);
  flex: 0 0 auto;
}
.confirm-target {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  word-break: keep-all;
}
.confirm-warn {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(200,51,42,.2);
  border-radius: 8px;
  background: var(--red-l);
  color: var(--red);
  font-size: 13px;
}
@media (max-width: 520px) {
  .complete-banner {
    left: 16px;
    right: 16px;
    max-width: none;
    min-width: 0;
    transform: translateY(-12px);
  }
  .complete-banner.show {
    transform: translateY(0);
  }
  .rp-type-grid,
  .rp-include-grid {
    grid-template-columns: 1fr;
  }
  .rp-custom {
    flex-direction: column;
  }
  .confirm-summary {
    align-items: stretch;
    flex-direction: column;
  }
  .confirm-icon {
    margin: 0 auto;
  }
}

.date-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.date-filter-group .finput {
  width: 148px;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
}
.date-filter-sep {
  color: var(--t3);
  font-weight: 700;
}
@media (max-width: 720px) {
  .date-filter-group { width: 100%; }
  .date-filter-group .finput { flex: 1 1 130px; width: auto; }
}

.service-request-detail-grid {
  display: grid;
  gap: 18px;
}
.service-request-detail-grid section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--s2);
}
.service-request-detail-grid h4 {
  margin: 0 0 10px;
  font-size: 14px;
}
.service-request-detail-grid ul {
  margin: 0;
  padding-left: 18px;
}
.service-request-doc {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
}
.service-request-doc + .service-request-doc { margin-top: 10px; }
.service-request-doc p { margin: 0; color: var(--t2); line-height: 1.55; }

/* 신청 상세 모달 — 공통 요약 + 파일 목록 보강 */
#m-service-request-detail .modal { max-width: 920px !important; }
.service-request-detail-toprow {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
  gap: 18px;
  align-items: start;
  overflow-x: auto;
}
.service-request-summary { background: var(--s2, #f7f8fc); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.service-request-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.service-request-summary dt { color: var(--t3); font-size: 12px; align-self: start; }
.service-request-summary dd { margin: 0; color: var(--t1); font-size: 13px; line-height: 1.5; word-break: normal; overflow-wrap: anywhere; }
.service-request-contact dl {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-request-contact dl > div {
  min-width: 0;
}
.service-request-contact dt {
  margin-bottom: 2px;
}
.service-request-contact dd {
  display: block;
}
.service-request-nowrap {
  display: inline-block;
  max-width: none;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  overflow: visible;
  text-overflow: clip;
}
.service-request-file-list { list-style: none; margin: 0; padding: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.service-request-file-list a { color: var(--accent); text-decoration: none; }
.service-request-file-list a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .service-request-detail-toprow { grid-template-columns: 1fr; }
}

.inquiry-guest-summary{border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:14px;margin-bottom:14px}
.inq-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}
.inq-summary-grid div{display:flex;flex-direction:column;gap:4px;min-width:0}
.inq-summary-grid b{font-size:11.5px;color:var(--t3)}
.inq-summary-grid span,.inq-summary-grid a{font-size:13px;color:var(--t1);word-break:break-all;text-decoration:none}
.inq-attachments{display:flex;flex-direction:column;gap:6px;margin-top:10px;padding-top:10px;border-top:1px solid rgba(15,23,42,.08)}
.inq-attachment{display:inline-flex;align-items:center;width:max-content;max-width:100%;padding:6px 9px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--t2);font-size:12px;text-decoration:none;word-break:break-all}
.inq-attachment:hover{border-color:var(--accent);color:var(--accent)}
@media (max-width:720px){.inq-summary-grid{grid-template-columns:1fr}}
/* Notice 모달 양식 삽입 바 */
.notice-snippet-bar {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:10px 12px;
  background:var(--s2, #f4f6fa);
  border:1.5px solid var(--border, #e5e9ef);
  border-bottom:none;
  border-radius:9px 9px 0 0;
  margin-top:12px;
}
.notice-snippet-bar__label { font-size:12px; color:var(--t2); font-weight:600; margin-right:4px; }
.notice-snippet-bar__hint { font-size:11px; color:var(--t3); margin-left:auto; }
.notice-snippet-bar + .finput { border-top-left-radius:0; border-top-right-radius:0; margin-top:0; font-family:'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size:13px; line-height:1.6; }

/* 서비스 옵션 첨부 업로드는 운영 정책상 비활성화. root 소유 모달 원본에 남아도 화면에서는 숨긴다. */
#m-service-option-form .field:has(#service-option-file) {
  display: none !important;
}
