* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans KR", sans-serif;
}

.admin-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 999px;
  background: #17202b;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transform: translate(-50%, -16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-toast--warning {
  background: #8a5b13;
}

.admin-toast--success {
  background: #0c8f68;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.employee-page,
.admin-page {
  color: #17202b;
  background:
    linear-gradient(180deg, #f7f8fa 0%, #eef1f4 100%);
}

.employee-page .hero,
.admin-page .hero {
  padding: 0 0 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 0 18px;
  border-bottom: 1px solid #d9e0e7;
}

.brandmark-link {
  display: inline-flex;
  text-decoration: none;
}

.brandmark {
  width: min(320px, 42vw);
  height: auto;
}

.hero h1 {
  margin: 0 0 2px;
  font-family: "Instrument Sans", "Noto Sans KR", sans-serif;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero__copy--light h1 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
}

.hero__badge--light {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e9eff6;
  color: #3d4a58;
  font-family: "Instrument Sans", "Noto Sans KR", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__text {
  margin: 14px 0 22px;
  color: #5f6975;
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero__text-group {
  margin: 8px 0 22px;
}

.hero__text-group .hero__text {
  margin: 0;
}

.hero__text--sub {
  margin-top: 4px;
}

.hero__meta--light {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 14px;
}

.hero__meta--light div {
  padding: 16px 18px;
  border: 1px solid #dbe3ea;
  border-radius: 18px;
  background: #ffffff;
}

.meta__label {
  display: block;
  margin-bottom: 8px;
  color: #7c8895;
  font-size: 0.82rem;
  font-weight: 600;
}

.layout--employee {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

.sidebar {
  display: grid;
  gap: 20px;
}

.intro-block {
  display: grid;
  gap: 0;
  padding-top: 8px;
}

.panel--form-sticky {
  position: sticky;
  top: 16px;
}

.employee-page .panel {
  border: 1px solid #dbe3ea;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(31, 41, 55, 0.05);
}

.admin-page .panel {
  border: 1px solid #dbe3ea;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(31, 41, 55, 0.05);
}

.admin-page .hero__content {
  display: block;
}

.panel {
  padding: 22px;
}

.panel__heading {
  margin-bottom: 16px;
}

.panel__heading h2,
.shelf__header h2 {
  margin: 0;
  font-family: "Instrument Sans", "Noto Sans KR", sans-serif;
  font-size: 1.45rem;
}

.panel__heading p,
.shelf__header p {
  margin: 8px 0 0;
  color: #66717d;
}

.vote-form {
  display: grid;
  gap: 14px;
}

.vote-form label {
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 700;
}

.form-hint {
  margin: -4px 0 2px;
  color: #66717d;
  font-size: 0.9rem;
  line-height: 1.6;
}

.bulk-upload {
  display: grid;
  gap: 16px;
}

.bulk-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.vote-form input,
.vote-form select,
.vote-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #d6dee7;
  border-radius: 14px;
  background: #f9fbfd;
  color: #15202b;
  font: inherit;
}

.vote-form textarea {
  min-height: 104px;
  padding: 12px 14px;
  resize: vertical;
}

.vote-selects {
  display: grid;
  gap: 10px;
}

.vote-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #d6dee7;
  border-radius: 14px;
  background: #f9fbfd;
  color: #15202b;
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: #00adef;
  color: #ffffff;
}

.button--ghost {
  border: 1px solid #d6dee7;
  background: #ffffff;
  color: #24303c;
}

.button--small {
  min-height: 36px;
  padding: 0 12px;
  background: #00adef;
  color: #ffffff;
}

.server-status {
  min-height: 22px;
  margin-top: 12px;
  color: #5d6975;
  font-size: 0.92rem;
}

.server-status.is-online,
.status-card.is-success {
  color: #0c8f68;
}

.server-status.is-offline,
.status-card.is-warning {
  color: #b06f12;
}

.status-card {
  min-height: 88px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f5f8fb;
  color: #5d6975;
  line-height: 1.6;
}

.status-card--centered {
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.content-rail {
  display: grid;
  gap: 24px;
  margin-top: 8px;
}


.shelf {
  display: grid;
  gap: 14px;
}

.shelf__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.video-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #dbe3ea;
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(31, 41, 55, 0.08);
}

.video-card.is-locked .video-card__media::after {
  content: "사원번호와 비밀번호 입력 후 재생 가능";
  position: absolute;
  inset: auto 14px 14px 14px;
  z-index: 1;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(9, 14, 20, 0.72);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.video-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #10151a;
}

.video-card__index-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #00adef;
  color: #ffffff;
  font-family: "Instrument Sans", "Noto Sans KR", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 173, 239, 0.24);
}

.video-card.is-playing .video-card__index-badge,
.video-card__index-badge.is-hidden {
  display: none;
}

.video-card__media iframe,
.video-card__media video {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card__launch {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  background-color: #10151a;
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

.video-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 16px;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(135deg, #5f6d7a, #2a323a);
}

.video-card__body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.video-card__topline {
  color: #8b96a2;
  font-family: "Instrument Sans", "Noto Sans KR", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-card h3 {
  margin: 0;
  font-family: "Instrument Sans", "Noto Sans KR", sans-serif;
  font-size: 1rem;
}

.video-card__description {
  margin: 0;
  color: #67727e;
  font-size: 0.92rem;
  line-height: 1.6;
  min-height: 44px;
}

.video-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.video-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 32, 0.46);
}

.modal__dialog {
  position: relative;
  width: min(640px, calc(100% - 32px));
  margin: 8vh auto 0;
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.modal__dialog--small {
  width: min(420px, calc(100% - 32px));
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #4f5d6a;
  font-size: 28px;
  cursor: pointer;
}

.modal__eyebrow {
  color: #7b8794;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal__title {
  margin: 10px 0 8px;
  font-family: "Instrument Sans", "Noto Sans KR", sans-serif;
  font-size: 1.8rem;
  color: #17202b;
}

.modal__submitter {
  margin: 0 0 18px;
  color: #5f6975;
  font-weight: 700;
}

.modal__description {
  color: #44505c;
  line-height: 1.8;
  white-space: pre-wrap;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.panel__heading--sub {
  margin-top: 22px;
}

.results-list,
.admin-video-list,
.admin-vote-log {
  display: grid;
  gap: 12px;
}

.result-item,
.admin-video-card,
.admin-vote-item,
.admin-vote-empty {
  padding: 16px 18px;
  border: 1px solid #dbe3ea;
  border-radius: 18px;
  background: #ffffff;
}

.result-item__header,
.admin-video-card,
.admin-vote-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-item__title {
  font-weight: 700;
}

.result-item__count {
  color: #00adef;
  font-family: "Instrument Sans", "Noto Sans KR", sans-serif;
  font-weight: 700;
}

.result-item__bar {
  overflow: hidden;
  height: 10px;
  margin-top: 10px;
  border-radius: 999px;
  background: #edf2f7;
}

.result-item__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00adef, #79d3f7);
}

.admin-page .layout--admin {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.admin-page .panel {
  padding: 28px;
}

.admin-page .panel--gallery {
  margin-top: 20px;
}

.admin-page .vote-form input,
.admin-page .vote-form select {
  border: 1px solid #d6dee7;
  background: #f9fbfd;
  color: #15202b;
}

.admin-page .button--primary {
  background: #00adef;
  color: #ffffff;
}

.admin-page .button--ghost {
  border: 1px solid #d6dee7;
  background: #ffffff;
  color: #24303c;
}

.admin-page .status-card {
  background: #f5f8fb;
  border: 0;
  color: #5d6975;
}

.admin-page .result-item,
.admin-page .admin-video-card,
.admin-page .admin-vote-item,
.admin-page .admin-vote-empty {
  border: 1px solid #dbe3ea;
  background: #ffffff;
}

.admin-page .result-item__title {
  color: #17202b;
}

.admin-page .result-item__count {
  color: #00adef;
}

.admin-page .result-item__bar {
  background: #edf2f7;
}

.admin-page .result-item__fill {
  background: linear-gradient(90deg, #00adef, #79d3f7);
}

.admin-video-card__actions {
  display: flex;
  gap: 10px;
}

.admin-vote-item__content {
  display: grid;
  gap: 4px;
}

.admin-vote-item__meta,
.admin-video-card__meta,
.admin-video-card__link {
  color: #66717d;
  line-height: 1.6;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.button:disabled,
.vote-form input:disabled,
.vote-form select:disabled,
.vote-form textarea:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

@media (max-width: 1080px) {
  .layout--employee,
  .admin-page .layout--admin {
    grid-template-columns: 1fr;
  }

  .bulk-upload-grid {
    grid-template-columns: 1fr;
  }

  .panel--form-sticky {
    position: static;
  }

  .content-rail {
    margin-top: 0;
  }
}

@media (max-width: 860px) {
  .topbar,
  .hero__meta--light,
  .video-grid--shelf,
  .result-item__header,
  .admin-video-card,
  .admin-vote-item {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .brandmark {
    width: min(248px, 62vw);
  }

  .video-card__actions {
    width: 100%;
    justify-content: space-between;
  }
}
