/* ════════════════════════════════════════════════════════════════════
   admin.css — 내부 행정포털 / AI 심사포털 전용 컴포넌트
   ─ portal_admin_login.html  (.adm-*)
   ─ portal_admin_dashboard.html (.ad-*)
   ─ portal.css 를 보완(브랜드 변수·폰트는 portal.css 의존)
   ════════════════════════════════════════════════════════════════════ */


/* ╔══════════════════════════════════════════════════════════════════╗
   ║ 1. portal_admin_login.html — .adm-*                              ║
   ╚══════════════════════════════════════════════════════════════════╝ */

body.adm-body {
  min-height: 100vh;
  margin: 0;
  background: #f1f5f9;
  font-family: "SUIT", system-ui, sans-serif;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
}
.adm-wrap {
  width: 100%;
  max-width: 760px;
  position: relative;
  z-index: 1;
}
.adm-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  padding: 44px 52px;
  max-width: 480px;
  margin: 0 auto;
}
.adm-logo {
  text-align: center;
  margin: 0 0 24px;
}
.adm-logo img {
  height: 44px;
  width: auto;
  display: inline-block;
}
.adm-card__title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  color: #0f172a;
}
.adm-card__sub {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin: 0 0 28px;
}
.adm-field { margin-bottom: 14px; }
.adm-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}
.adm-input-wrap {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 12px;
  height: 44px;
}
.adm-input-wrap:focus-within {
  border-color: var(--brand);
  background: #fff;
}
.adm-input-wrap .icon {
  color: #94a3b8;
  font-size: 18px;
  margin-right: 8px;
}
.adm-input-wrap input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #0f172a;
  height: 100%;
}
.adm-input-wrap input::placeholder { color: #94a3b8; }
.adm-input-wrap button.toggle {
  background: transparent; border: 0; cursor: pointer;
  color: #94a3b8; padding: 4px;
}
.adm-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: #64748b;
  margin-top: 12px; margin-bottom: 16px;
}
.adm-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.adm-row a { color: var(--brand-700); text-decoration: none; font-weight: 600; }
.adm-submit {
  width: 100%;
  height: 46px;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.adm-submit:hover { background: var(--brand-600); }

.adm-divider {
  margin: 36px auto 20px;
  text-align: center;
  position: relative;
  max-width: 700px;
}
.adm-divider::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: #cbd5e1;
}
.adm-divider span {
  position: relative;
  background: #f1f5f9;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.adm-systems {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.adm-systems__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: not-allowed;
}
.adm-systems__btn .icon {
  font-size: 18px;
  color: #94a3b8;
}
.adm-systems__btn-ico {
  width: 22px; height: 22px;
  display: inline-block; vertical-align: middle;
  border-radius: 50%; background: #fff;
}
.adm-systems__btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(26, 107, 255, 0.28);
  font-weight: 700;
  padding: 12px 26px;
  transition: background 0.15s, transform 0.15s;
}
.adm-systems__btn--primary .icon { color: #fff; }
.adm-systems__btn--primary:hover {
  background: var(--brand-600);
  transform: translateY(-2px);
}

.adm-foot {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

@media (max-width: 600px) {
  .adm-card { padding: 32px 24px; }
  .adm-systems { flex-direction: column; }
  .adm-systems__btn { justify-content: center; }
}


/* ╔══════════════════════════════════════════════════════════════════╗
   ║ 2. portal_admin_dashboard.html — .ad-*                           ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* ─── Admin shell ─── */
.ad-body {
  background: #f1f5f9;
  min-height: 100vh;
  font-family: "SUIT", system-ui, sans-serif;
  color: var(--text);
}
.ad-shell { display: grid; grid-template-columns: 240px 1fr 320px; min-height: 100vh; transition: grid-template-columns 0.2s ease; }
.ad-shell--collapsed { grid-template-columns: 240px 1fr; }
.ad-shell--side-collapsed { grid-template-columns: 0 1fr 320px; }
.ad-shell--side-collapsed.ad-shell--collapsed { grid-template-columns: 0 1fr; }
.ad-shell--side-collapsed .ad-side { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.ad-side { transition: transform 0.2s ease, opacity 0.2s ease; overflow: hidden; }

/* ─── Top bar ─── */
.ad-top {
  position: sticky; top: 0; z-index: 30;
  grid-column: 1 / -1;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--s4);
  padding: 0 var(--s5);
}
.ad-top__menu {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: #fff; border-radius: var(--r-md);
  cursor: pointer;
}
.ad-top__brand { display: flex; align-items: center; gap: var(--s2); font-weight: 800; }
.ad-top__brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #0c2254);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
}
.ad-top__title { font-size: 17px; font-weight: 900; letter-spacing: -0.3px; }
.ad-top__chip {
  font-size: var(--fs-xs); font-weight: 600;
  background: #eef4ff; color: var(--brand-700);
  border-radius: var(--r-pill); padding: 4px 10px;
  margin-left: var(--s2);
}
.ad-top__spacer { flex: 1; }
.ad-top__user { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-sm); color: var(--muted); }
.ad-top__user b { color: var(--text); }
.ad-top__icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: #fff; border-radius: var(--r-md);
  cursor: pointer; position: relative;
}
.ad-top__icon-btn .dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-rose);
  border: 2px solid #fff;
  box-sizing: content-box;
}
.ad-top__icon-btn.is-open { background: #eef4ff; border-color: var(--brand); color: var(--brand); }

/* ─── Dropdown popovers ─── */
.ad-pop {
  position: absolute; top: 52px; right: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
  z-index: 50; display: none;
  overflow: hidden;
}
.ad-pop.is-open { display: block; }
.ad-top__icon-wrap { position: relative; }

/* 사용자 메뉴 */
.ad-pop--user { width: 280px; }
.ad-pop__user-head {
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
}
.ad-pop__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; margin-bottom: 8px;
}
.ad-pop__user-name { font-size: 15px; font-weight: 800; }
.ad-pop__user-meta { font-size: 11px; opacity: 0.85; margin-top: 2px; }
.ad-pop__list { padding: 6px 0; }
.ad-pop__item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: 13px; color: var(--text);
  text-decoration: none; cursor: pointer; border: 0; background: transparent; width: 100%;
  font-family: inherit; text-align: left;
}
.ad-pop__item:hover { background: #f1f5f9; }
.ad-pop__item .icon { font-size: 18px; color: var(--muted); }
.ad-pop__item--danger { color: var(--accent-rose); }
.ad-pop__item--danger .icon { color: var(--accent-rose); }
.ad-pop__sep { height: 1px; background: var(--border); margin: 4px 0; }

/* 알림 */
.ad-pop--noti { width: 360px; }
.ad-pop__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.ad-pop__head h4 { margin: 0; font-size: 14px; font-weight: 800; }
.ad-pop__head h4 .count {
  background: var(--accent-rose); color: #fff;
  border-radius: 10px; font-size: 11px; padding: 1px 7px; margin-left: 6px;
}
.ad-pop__head a { font-size: 11px; color: var(--brand-700); text-decoration: none; font-weight: 600; }
.ad-noti-list { max-height: 380px; overflow-y: auto; }
.ad-noti-item {
  display: flex; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background var(--d-base);
}
.ad-noti-item:hover { background: #f8fafc; }
.ad-noti-item:last-child { border-bottom: 0; }
.ad-noti-item.is-new { background: #f0f7ff; }
.ad-noti-item.is-new:hover { background: #e6f0ff; }
.ad-noti-item__icon {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%;
  background: #eef4ff; color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
}
.ad-noti-item__icon .icon { font-size: 16px; }
.ad-noti-item__icon--urgent { background: #fee2e2; color: var(--accent-rose); }
.ad-noti-item__icon--ok { background: #dcfce7; color: #15803d; }
.ad-noti-item__icon--warn { background: #fef3c7; color: #b45309; }
.ad-noti-item__body { flex: 1; min-width: 0; }
.ad-noti-item__title { font-size: 13px; font-weight: 700; color: var(--text); }
.ad-noti-item__title .new-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-rose); margin-left: 6px; vertical-align: middle;
}
.ad-noti-item__desc { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.ad-noti-item__time { font-size: 10px; color: #94a3b8; margin-top: 4px; }
.ad-pop__foot {
  padding: 10px 16px; text-align: center;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted); cursor: pointer;
}
.ad-pop__foot:hover { color: var(--brand); }

/* ─── Sidebar ─── */
.ad-side {
  background: #fff; border-right: 1px solid var(--border);
  padding: var(--s4) var(--s2);
  display: flex; flex-direction: column; gap: var(--s2);
  min-height: calc(100vh - 56px);
}
.ad-side__group { margin-top: var(--s3); }
.ad-side__label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  color: #94a3b8; padding: 6px var(--s3); text-transform: uppercase;
}
.ad-side__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px var(--s3); border-radius: var(--r-md);
  font-size: var(--fs-sm); color: var(--text); text-decoration: none;
  position: relative;
}
.ad-side__item .icon { font-size: 18px; color: var(--muted); }
.ad-side__item:hover { background: #f1f5f9; }
.ad-side__item.is-active { background: #eef4ff; color: var(--brand-700); font-weight: 700; }
.ad-side__item.is-active .icon { color: var(--brand); }
.ad-side__item .star {
  margin-left: auto; font-size: 14px; color: #cbd5e1;
}
.ad-side__item .star.is-on { color: var(--accent-amber); }
.ad-side__item .badge {
  margin-left: auto;
  border: 0;
  background: #0f172a; color: #fff;
  font-size: 11px; font-weight: 700;
  border-radius: 10px; padding: 1px 7px;
}

/* ─── Main ─── */
.ad-main { padding: var(--s5) var(--s5) 60px; min-width: 0; }
.ad-crumb { color: var(--muted); font-size: var(--fs-xs); margin-bottom: var(--s2); }
.ad-page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4);
  margin-bottom: var(--s5);
}
.ad-page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.6px; margin: 0; }
.ad-page-head__tools { display: flex; gap: var(--s2); }
.ad-toggle {
  display: inline-flex; background: #fff; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px;
}
.ad-toggle button {
  border: 0; background: transparent; padding: 5px 14px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--muted); border-radius: var(--r-pill);
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.ad-toggle button.is-on { background: #f1f5f9; color: var(--text); }
.ad-btn-primary {
  background: var(--brand); color: #fff; border: 0; border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: 700; padding: 8px 14px;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.ad-btn-primary:hover { background: var(--brand-600); }

/* ─── Section title ─── */
.ad-section-title {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 var(--s3);
}
.ad-section-title h2 { font-size: 18px; font-weight: 800; margin: 0; }
.ad-section-title small { color: var(--muted); font-size: var(--fs-xs); }
.ad-section-title .filter-pill {
  margin-left: auto;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-pill);
  font-size: var(--fs-xs); padding: 4px 10px; color: var(--muted);
}
.ad-section-title .filter-pill b { color: var(--text); }

/* ─── Status cards ─── */
.ad-status-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s3);
  margin-bottom: var(--s4);
}
.ad-stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s4); position: relative; cursor: pointer;
  transition: border-color var(--d-base), box-shadow var(--d-base);
}
.ad-stat-card:hover { border-color: var(--brand); box-shadow: var(--sh-2); }
.ad-stat-card.is-active { border: 2px solid var(--brand); padding: calc(var(--s4) - 1px); background: #f8faff; }
.ad-stat-card__label { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.ad-stat-card__icon {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.ad-stat-card__icon--all { background: #eef4ff; color: var(--brand); }
.ad-stat-card__icon--in { background: #dbeafe; color: var(--brand-700); }
.ad-stat-card__icon--prog { background: #fef3c7; color: #b45309; }
.ad-stat-card__icon--reject { background: #fee2e2; color: #b91c1c; }
.ad-stat-card__icon--done { background: #dcfce7; color: #15803d; }
.ad-stat-card__num { font-size: 30px; font-weight: 800; margin-top: var(--s2); letter-spacing: -1px; }
.ad-stat-card__sub { font-size: var(--fs-xs); color: var(--muted); }

/* ─── Review list (table) ─── */
.ad-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s4); }
.ad-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s3); }
.ad-card__head h3 { font-size: 15px; font-weight: 800; margin: 0; }
.ad-rev-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }
.ad-rev-table thead th {
  background: #f8fafc; padding: 10px 12px; text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
  color: var(--muted); text-transform: uppercase;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ad-rev-table thead th.col-name { text-align: left; }
.ad-rev-table thead th:first-child { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.ad-rev-table thead th:last-child  { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.ad-rev-table tbody td {
  padding: 12px; border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text); text-align: center;
}
.ad-rev-table tbody td.col-name { text-align: left; }
.ad-rev-table tbody tr { cursor: pointer; transition: background var(--d-base); }
.ad-rev-table tbody tr:hover { background: #f8fafc; }
.ad-rev-table tbody tr.is-hidden { display: none; }
.ad-rev-table .col-no    { width: 40px; color: var(--muted); font-weight: 600; }
.ad-rev-table .col-name  { font-weight: 700; min-width: 240px; }
.ad-rev-table .col-name small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-top: 2px; letter-spacing: 0.1px; }
.ad-rev-table .col-name small code { font-family: inherit; color: var(--brand-700); font-weight: 600; }
.ad-rev-table .col-cls   { width: 80px; }
.ad-rev-table .col-item  { color: var(--muted); }
.ad-rev-table .col-stat  { width: 84px; }
.ad-rev-table .col-ai    { width: 130px; }
.ad-rev-table .col-date  { width: 96px; color: var(--muted); white-space: nowrap; }
.ad-rev-table .col-d     { width: 64px; }

.ad-pill {
  display: inline-block;
  background: #f1f5f9; color: #475569; border-radius: var(--r-pill);
  padding: 2px 8px; font-weight: 600; font-size: 11px; white-space: nowrap;
}
.ad-pill--prog { background: #fef3c7; color: #92400e; }
.ad-pill--in   { background: #dbeafe; color: #1d4ed8; }
.ad-pill--done { background: #dcfce7; color: #166534; }
.ad-pill--reject { background: #fee2e2; color: #991b1b; }
.ad-aitag {
  display: inline-block;
  background: #eef4ff; color: var(--brand-700); font-weight: 700;
  border-radius: var(--r-pill); padding: 2px 8px; font-size: 10px; letter-spacing: 0.3px; white-space: nowrap;
}
.ad-dday {
  display: inline-block; font-weight: 800; color: var(--brand-700);
  background: #eef4ff; border-radius: var(--r-md); padding: 4px 8px; font-size: 11px;
}
.ad-dday--urgent { color: var(--accent-rose); background: #fee2e2; }
.ad-dday--done   { color: #15803d; background: #dcfce7; }
.ad-dday--rej    { color: var(--muted); background: #f1f5f9; }

.ad-card__more {
  text-align: center; padding-top: var(--s3); margin-top: var(--s2);
  color: var(--muted); font-size: var(--fs-sm); cursor: pointer;
}
.ad-card__more:hover { color: var(--brand); }

/* ─── Tool sections ─── */
.ad-tools-grid {
  display: grid; grid-template-columns: 3fr 2fr; gap: var(--s4); margin-top: var(--s5);
  align-items: stretch;
}
.ad-tools-section { display: flex; flex-direction: column; min-height: 0; }
.ad-tools-section .ad-tools-list { flex: 1; }
.ad-tools-section h2 { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 800; margin: 0 0 var(--s3); }
.ad-tools-section h2 .icon { color: var(--brand); }
.ad-tools-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.ad-tools-list--stack { grid-template-columns: 1fr 1fr; gap: 10px; }
.ad-tools-list--six { grid-template-columns: repeat(6, 1fr); }
.ad-tools-list--six .ad-tool-card { min-height: 130px; padding: var(--s3) 8px; }
.ad-tools-list--six .ad-tool-card .icon { font-size: 30px; }
.ad-tools-list--six .ad-tool-card__name { font-size: 14px; }
.ad-tools-list--six .ad-tool-card__desc { font-size: 11px; line-height: 1.35; }
.ad-tool-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s4) var(--s3); text-align: center; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color var(--d-base), transform var(--d-base);
  min-height: 110px; justify-content: center;
}
.ad-tool-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.ad-tool-card .icon { font-size: 24px; color: var(--brand); }
.ad-tool-card__name { font-weight: 700; font-size: var(--fs-md); }
.ad-tool-card__desc { font-size: 11px; color: var(--muted); }
.ad-tool-card--row {
  flex-direction: row; text-align: left; justify-content: flex-start; min-height: 64px; padding: var(--s3) var(--s4); gap: var(--s3);
  align-items: center;
}
.ad-tools-list--stack .ad-tool-card { min-height: 60px; padding: 12px 14px; flex: 1 1 0; }
.ad-tools-list--stack .ad-tool-card .ad-tool-card__name { display: block; font-size: 13px; }
.ad-tools-list--stack .ad-tool-card .ad-tool-card__desc { display: block; font-size: 10px; margin-top: 2px; }
.ad-tool-card--row .ad-tool-card__name { font-size: 14px; }
.ad-tool-card--row .ad-tool-card__desc { font-size: 11px; color: var(--muted); }
.ad-tools-list--stack { gap: 10px; }
.ad-tool-card--featured {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff; border-color: transparent;
}
.ad-tool-card--featured .ad-tool-card__desc { color: rgba(255,255,255,0.85); }
.ad-tool-card--featured .icon, .ad-tool-card--featured .ad-tool-card__desc { color: rgba(255,255,255,0.9); }
.ad-tool-card--row .ad-tool-card__icon-wrap {
  width: 38px; height: 38px; border-radius: 10px; background: #eef4ff;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.ad-tool-card--featured .ad-tool-card__icon-wrap { background: rgba(255,255,255,0.16); }
.ad-tool-card--featured .icon { color: #fff; }

/* ─── Right panel ─── */
.ad-right {
  background: #fff; border-left: 1px solid var(--border);
  padding: var(--s5) var(--s4) var(--s5);
  display: flex; flex-direction: column; gap: var(--s5);
  min-height: calc(100vh - 56px);
}
.ad-right__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: -8px; }
.ad-right__head h3 { font-size: 16px; font-weight: 800; margin: 0; }
.ad-right__close {
  width: 26px; height: 26px; border: 0; background: transparent; cursor: pointer; color: var(--muted);
}
.ad-mini-block h4 { margin: 0 0 6px; font-size: 14px; font-weight: 800; }
.ad-mini-block p.sub { margin: 0 0 var(--s3); font-size: 11px; color: var(--muted); line-height: 1.5; }
.ad-mini-block + .ad-mini-block {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-top: 6px;
}
.ad-bar { display: flex; flex-direction: column; gap: 10px; }
.ad-bar__row { font-size: var(--fs-xs); }
.ad-bar__top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.ad-bar__top b { font-weight: 800; }
.ad-bar__track { height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.ad-bar__fill { height: 100%; border-radius: 3px; }
.ad-bar__fill--in   { background: var(--brand-700); }
.ad-bar__fill--prog { background: #f59e0b; }
.ad-bar__fill--rej  { background: #ef4444; }
.ad-bar__fill--done { background: #22c55e; }

.ad-trend { height: 110px; }
.ad-trend svg { width: 100%; height: 100%; }
.ad-legend { display: flex; gap: var(--s3); font-size: 11px; color: var(--muted); }
.ad-legend span::before {
  content: ""; display: inline-block; width: 8px; height: 2px; background: currentColor; vertical-align: middle; margin-right: 4px;
}
.ad-legend span.done { color: var(--brand); }
.ad-legend span.new  { color: #94a3b8; }

.ad-donut-wrap { display: flex; align-items: center; gap: var(--s3); }
.ad-donut {
  width: 130px; height: 130px; border-radius: 50%;
  background:
    conic-gradient(
      var(--brand-700)        0    22.2%,
      #fbbf24                22.2% 42.8%,
      #ef4444                42.8% 60.3%,
      #1a6bff                60.3% 100%
    );
  position: relative; flex: 0 0 130px;
}
.ad-donut::after {
  content: ""; position: absolute; inset: 18px; background: #fff; border-radius: 50%;
}
.ad-donut__num {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800;
}
.ad-donut__num em { font-style: normal; font-size: 24px; }
.ad-donut__num small { font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.ad-donut-legend { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.ad-donut-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; vertical-align: middle; }

/* 우측 추가 카드 */
.ad-urgent-list { display: flex; flex-direction: column; gap: 8px; margin-top: -2px; }
.ad-urgent-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: #fafafa; border: 1px solid var(--border);
  border-radius: var(--r-md); font-size: 11px; cursor: pointer;
}
.ad-urgent-item:hover { border-color: var(--brand); }
.ad-urgent-item__d {
  flex: 0 0 auto; font-weight: 800; font-size: 11px;
  background: #fee2e2; color: var(--accent-rose);
  border-radius: 4px; padding: 2px 6px;
}
.ad-urgent-item__d--soon { background: #fef3c7; color: #b45309; }
.ad-urgent-item__name { flex: 1; min-width: 0; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ad-activity-list { display: flex; flex-direction: column; gap: 10px; margin-top: -2px; }
.ad-activity-item { display: flex; gap: 8px; font-size: 11px; }
.ad-activity-item__icon {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
  background: #eef4ff; color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
}
.ad-activity-item__icon .icon { font-size: 14px; }
.ad-activity-item__icon--ok { background: #dcfce7; color: #15803d; }
.ad-activity-item__icon--warn { background: #fef3c7; color: #b45309; }
.ad-activity-item__body { flex: 1; min-width: 0; }
.ad-activity-item__body strong { font-weight: 700; color: var(--text); }
.ad-activity-item__body em { font-style: normal; color: var(--muted); font-size: 10px; display: block; margin-top: 2px; }

@media (max-width: 1280px) {
  .ad-shell { grid-template-columns: 220px 1fr; }
  .ad-right { display: none; }
  .ad-status-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 960px) {
  .ad-shell { grid-template-columns: 1fr; }
  .ad-side { display: none; }
  .ad-status-grid { grid-template-columns: repeat(2, 1fr); }
  .ad-tools-grid { grid-template-columns: 1fr; }
}
