/* 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;
}

.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);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-top: 22px;
}

.summary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

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

.summary-card b {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  letter-spacing: -0.5px;
  word-break: break-all;
}

.db-layout {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.table-panel,
.data-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table-panel {
  padding: 18px;
  height: calc(100vh - 330px);
  overflow: auto;
}

.data-panel {
  padding: 22px;
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

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

.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.table-btn {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 13px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.table-btn:hover,
.table-btn.active {
  background: #dbeafe;
  border-color: #93c5fd;
}

.table-btn b {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}

.table-btn span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.data-head {
  align-items: flex-start;
}

.search-box {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-box input {
  width: 220px;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 10px;
  outline: none;
}

.search-box button {
  height: 36px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  cursor: pointer;
}

.description-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #2563eb;
  border-radius: 14px;
  padding: 14px 15px;
  margin-bottom: 16px;
}

.description-box b {
  display: block;
  margin-bottom: 6px;
}

.description-box span {
  display: block;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}

.sub-panel {
  margin-top: 18px;
}

.sub-panel h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.column-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.column-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid #dbe3ee;
  background: #ffffff;
  border-radius: 12px;
  padding: 9px 11px;
  min-width: 150px;
}

.column-chip b {
  font-size: 13px;
}

.column-chip span {
  color: var(--muted);
  font-size: 12px;
}

.data-box {
  overflow: auto;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 900px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #edf2f7;
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table th {
  background: #f8fafc;
  color: #334155;
  position: sticky;
  top: 0;
  z-index: 1;
}

.empty {
  color: var(--muted);
  padding: 24px;
  text-align: center;
  background: #f8fafc;
  border-radius: 14px;
}

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

@media (max-width: 1100px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .db-layout {
    grid-template-columns: 1fr;
  }

  .table-panel {
    height: auto;
    max-height: 480px;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .page-shell {
    display: block;
  }
}

/* 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;
}


