/* AICS FONT: Naver Barun Gothic / NanumBarunGothic preferred */
:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #6b7280;
  --line: #e5e7eb;
  --blue: #2563eb;
  --green: #16a34a;
  --orange: #f97316;
  --red: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "NanumBarunGothic", "Nanum Barun Gothic", "Naver Barun Gothic", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }

.page-shell { min-height: 100vh; display: flex; }

.sidebar {
  width: 270px;
  background: #101827;
  color: #fff;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.brand-title { font-size: 18px; font-weight: 900; }
.brand-sub { margin-top: 4px; color: #a9b4c7; font-size: 12px; }

.nav { display: flex; flex-direction: column; gap: 7px; }

.nav a {
  padding: 12px 13px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover,
.nav a.active {
  background: rgba(255,255,255,0.11);
  color: #fff;
}

.side-box {
  margin-top: 28px;
  padding: 15px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #dbeafe;
}

.side-box b { color: #fff; font-size: 13px; }

.main { flex: 1; min-width: 0; padding: 28px; }

.hero {
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
  color: #fff;
  border-radius: 26px;
  padding: 32px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow { font-size: 13px; color: #bfdbfe; font-weight: 900; }
.hero h1 { margin: 9px 0 12px; font-size: 32px; letter-spacing: -1px; }
.hero p { margin: 0; max-width: 860px; color: #dbeafe; line-height: 1.65; font-size: 15px; }

.hero-actions { display: flex; gap: 9px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  border: 0;
  background: #fff;
  color: #1d4ed8;
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.btn.ghost {
  background: rgba(255,255,255,0.13);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
}

.quick-copy {
  margin-top: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quick-copy h2 { margin: 0; font-size: 20px; }
.quick-copy p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.quick-copy button {
  border: 0;
  background: #2563eb;
  color: #fff;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 900;
  cursor: pointer;
}

.handoff-box {
  margin-top: 12px;
  width: 100%;
  min-height: 110px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  background: #ffffff;
}

.handoff-box.small { min-height: 90px; }

.grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.grid .panel { margin-top: 0; }

.panel h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  margin-top: -4px;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 11px 12px;
}

.link-item b {
  font-size: 14px;
}

.link-item a {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}

.summary-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.summary-card b {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.doc-card {
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #f8fafc;
  padding: 14px;
}

.doc-card.missing {
  background: #fff7ed;
  border-color: #fed7aa;
}

.doc-card b {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}

.doc-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.doc-card a {
  display: inline-flex;
  margin-top: 9px;
  color: #1d4ed8;
  font-weight: 900;
  font-size: 13px;
}

.footer {
  color: var(--muted);
  padding: 22px 4px 4px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .page-shell { display: block; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .grid { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .main { padding: 18px; }
  .hero, .quick-copy { flex-direction: column; align-items: stretch; }
  .doc-grid { grid-template-columns: 1fr; }
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.button-note {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.45;
}

.button-note b {
  color: #ffffff;
}

@media (max-width: 720px) {
  .hero-right {
    align-items: stretch;
  }

  .button-note {
    max-width: none;
  }
}

.handoff-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.handoff-actions button {
  border: 0;
  background: #2563eb;
  color: #fff;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 900;
  cursor: pointer;
}

#editHandoffBtn {
  background: #0f766e;
}

#saveHandoffBtn {
  background: #16a34a;
}

#cancelHandoffBtn {
  background: #fee2e2;
  color: #991b1b;
}

.handoff-box:not([readonly]) {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: #ffffff;
}

.handoff-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.handoff-title-box {
  flex: 1;
  min-width: 0;
}

.handoff-red-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-left: 5px solid #ef4444;
  border-radius: 12px;
  background: #fff1f2;
  color: #991b1b;
  font-size: 12px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.handoff-red-note b {
  color: #b91c1c;
  font-size: 13px;
}

.handoff-red-note strong {
  color: #7f1d1d;
}

/* AICS dual home links */
.aics-dual-home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 52px;
  margin: 0 0 22px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
}

.aics-home-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  color: #ffffff !important;
  line-height: 1.1;
  border-right: 1px solid rgba(255,255,255,0.18);
  background: #1d4ed8;
}

.aics-home-btn:last-child {
  border-right: 0;
}

.aics-home-btn:hover {
  color: #ffffff !important;
  background: #2563eb;
}

.aics-home-new {
  background: #0f766e;
}

.aics-home-new:hover {
  background: #0d9488;
}

.aics-home-main {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.aics-home-sub {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.92;
}


