:root {
  --font: "Noto Sans KR", sans-serif;
  --navy: #0f2a4a;
  --green: #2f6b3a;
  --blue: #2e75b5;
  --blue-soft: #5b9bd5;
  --orange: #ed7d31;
  --peach: #f8cbad;
  --cream: #fff2cc;
  --mint: #c6e0b4;
  --sky: #bdd7ee;
  --gray: #d0d0d0;
  --bg: #e8eef4;
  --panel: #ffffff;
  --line: #c5d0dc;
  --text: #1a2332;
  --muted: #5a6a7a;
  --shadow: 0 10px 28px rgba(15, 42, 74, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: var(--font);
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(91, 155, 213, 0.28), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(112, 173, 71, 0.18), transparent 55%),
    linear-gradient(180deg, #d9e6f2 0%, var(--bg) 40%, #dfe7ef 100%);
}

body {
  min-height: 100vh;
  font-weight: 400;
}

button,
input,
select,
textarea,
a {
  font-family: var(--font);
}

.app {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 20px 28px;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: rise 0.55s ease both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: inherit;
  width: 220px;
  max-width: 220px;
  min-width: 0;
  overflow: hidden;
}

.brand img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 42px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: left center;
  background: transparent;
  background-color: transparent;
}

.brand-text {
  display: none;
}

.ext-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: linear-gradient(180deg, #3d6ea8 0%, #1f4f86 100%);
  box-shadow: 0 2px 6px rgba(15, 42, 74, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ext:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 42, 74, 0.22);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.user-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7dff9a;
  box-shadow: 0 0 0 3px rgba(125, 255, 154, 0.25);
}

.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.menu-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  box-shadow: var(--shadow);
  animation: rise 0.65s ease 0.05s both;
}

.dept-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border-radius: 12px;
}

.dept-acc { background: linear-gradient(90deg, rgba(189, 215, 238, 0.55), rgba(189, 215, 238, 0.12)); }
.dept-eng { background: linear-gradient(90deg, rgba(255, 242, 204, 0.7), rgba(255, 242, 204, 0.12)); }
.dept-site { background: linear-gradient(90deg, rgba(198, 224, 180, 0.55), rgba(198, 224, 180, 0.12)); }
.dept-hr { background: linear-gradient(90deg, rgba(248, 203, 173, 0.55), rgba(248, 203, 173, 0.12)); }
.dept-hq { background: linear-gradient(90deg, rgba(208, 208, 208, 0.55), rgba(208, 208, 208, 0.12)); }

.dept,
.menus button {
  appearance: none;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 48px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}

.dept:hover,
.menus button:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.03);
  box-shadow: 0 8px 16px rgba(15, 42, 74, 0.16);
}

.dept:focus-visible,
.menus button:focus-visible {
  outline: 3px solid var(--blue-soft);
  outline-offset: 2px;
}

.dept-acc .dept,
.dept-acc .menus button { background: var(--sky); }

.dept-eng .dept,
.dept-eng .menus button { background: var(--cream); }

.dept-site .dept,
.dept-site .menus button { background: var(--mint); }

.dept-hr .dept,
.dept-hr .menus button { background: var(--peach); }

.dept-hq .dept,
.dept-hq .menus button { background: var(--gray); }

.menus {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: rise 0.7s ease 0.1s both;
}

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

.panel h2 {
  margin: 0 0 12px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy);
  border-left: 4px solid var(--blue);
  padding-left: 8px;
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.stat-grid.secondary {
  margin-top: 8px;
}

.stat {
  text-align: center;
  padding: 8px 4px;
  border-radius: 10px;
  background: #f3f7fb;
  border: 1px solid #e2ebf3;
}

.stat .label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 4px;
  white-space: nowrap;
}

.stat strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.stat.warn strong {
  color: var(--orange);
}

.req-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.req-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f7fafc;
  border: 1px solid #e8eef4;
  font-size: 12px;
  font-weight: 500;
}

.req-list li span {
  white-space: nowrap;
}

.req-list em {
  font-style: normal;
  font-weight: 700;
  color: var(--blue);
  min-width: 1.2em;
  text-align: right;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.tabs span {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 0;
  border-radius: 8px;
  background: #eef3f8;
  color: var(--muted);
  white-space: nowrap;
}

.tabs .ok { background: #e8f6ea; color: var(--green); }
.tabs .no { background: #fdecea; color: #c0392b; }

.ticket {
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px dashed #b7c8da;
  background: linear-gradient(180deg, #f8fbfe, #eef5fb);
  margin-bottom: 8px;
}

.ticket:last-child { margin-bottom: 0; }

.ticket .site {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket .meta {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.foot {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.foot p {
  margin: 0;
  white-space: nowrap;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

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

@media (max-width: 980px) {
  .main {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .ext-links {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .dept-row {
    grid-template-columns: 1fr;
  }

  .menus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-text,
  .foot p {
    white-space: normal;
  }
}
