:root {
  --ink: #172033;
  --muted: #667085;
  --page: #f2f5fa;
  --card: #ffffff;
  --line: #dfe3e8;
  --primary: #3559e0;
  --primary-dark: #2846bd;
  --navy: #15254f;
  --coral: #ff7a66;
  --mint: #42c6a4;
  --danger: #c53b35;
  --success: #16794b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(53, 89, 224, .08), transparent 23rem),
    radial-gradient(circle at 92% 88%, rgba(66, 198, 164, .08), transparent 24rem),
    var(--page);
  font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}
.header-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.brand::before { content: "OT"; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; background: linear-gradient(135deg, var(--primary), #6d82ef); font-size: 10px; letter-spacing: 0; box-shadow: 0 5px 12px rgba(53,89,224,.24); }
.account-menu { display: flex; align-items: center; gap: 12px; }
.account-menu > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.header-button {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  padding: 8px 11px;
  color: #fff;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}
.header-button.light { border-color: var(--line); color: var(--ink); background: #fff; }

.card { border: 1px solid rgba(211, 218, 229, .9); border-radius: 18px; background: var(--card); box-shadow: 0 12px 34px rgba(34, 52, 92, .06); }
.access-main { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 36px 0 80px; }
.access-card { width: min(820px, 100%); display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; padding: 0; box-shadow: 0 22px 65px rgba(28, 45, 88, .14); }
.access-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; min-height: 460px; padding: 42px; color: #fff; background: linear-gradient(145deg, #152657 0%, #304fd0 65%, #4769e9 100%); }
.access-visual::before, .access-visual::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); }
.access-visual::before { width: 260px; height: 260px; right: -100px; top: -80px; box-shadow: 0 0 0 42px rgba(255,255,255,.035), 0 0 0 85px rgba(255,255,255,.025); }
.access-visual::after { width: 130px; height: 130px; left: -60px; bottom: -50px; background: rgba(66,198,164,.24); }
.visual-badge { position: relative; z-index: 1; align-self: flex-start; margin-bottom: 22px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.access-visual h1 { position: relative; z-index: 1; margin: 0; font-size: 42px; letter-spacing: -.06em; }
.access-visual p { position: relative; z-index: 1; margin: 15px 0 36px; color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.7; }
.visual-points { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.85); font-size: 11px; font-weight: 750; }
.visual-points i { width: 22px; height: 1px; background: rgba(255,255,255,.35); }
.access-form-panel { display: flex; flex-direction: column; justify-content: center; padding: 44px; background: #fff; }
.access-heading { margin-bottom: 24px; }
.access-heading > span { color: var(--primary); font-size: 11px; font-weight: 800; }
.access-heading h2 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.045em; }
.access-form { display: grid; gap: 16px; }
.selected-employee {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 9px;
  background: #f3f5f8;
  font-size: 13px;
}
.selected-employee span { color: var(--muted); }
.selected-employee button { border: 0; color: var(--primary); background: transparent; font-size: 12px; font-weight: 700; }
.pin-input { text-align: center; font-size: 25px; letter-spacing: .55em; padding-left: calc(13px + .55em); }

form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; }
label > span { font-size: 13px; font-weight: 700; }
small { color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%;
  border: 1px solid #ccd2da;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
textarea { resize: vertical; line-height: 1.5; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-label {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-content: end;
  min-height: 67px;
  padding: 11px 12px;
  border: 1px solid #ccd2da;
  border-radius: 9px;
}
.check-label input { width: 18px; height: 18px; accent-color: var(--primary); }
.optional-fields { border: 1px solid var(--line); border-radius: 9px; background: #fafbfc; }
.optional-fields summary { cursor: pointer; padding: 11px 12px; font-size: 13px; font-weight: 700; }
.optional-fields .field-grid { padding: 2px 12px 12px; }

.primary-button, .dark-button, .secondary-button, .danger-button {
  border: 0;
  border-radius: 9px;
  padding: 12px 16px;
  font-weight: 800;
}
.primary-button { color: #fff; background: var(--primary); }
.primary-button:hover { background: var(--primary-dark); }
.dark-button { color: #fff; background: var(--ink); }
.secondary-button { color: #234; background: #e9edf2; }
.danger-button { color: #fff; background: var(--danger); }
.form-message { min-height: 18px; margin: 0; color: var(--danger); font-size: 12px; line-height: 1.5; }
.success-message { color: var(--success); }

.portal-main { padding: 28px 0 70px; }
.dashboard-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; min-height: 154px; margin-bottom: 18px; padding: 30px 34px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #172a5d 0%, #2f50ce 72%, #4f6fe7 100%); box-shadow: 0 16px 35px rgba(35, 61, 150, .19); }
.dashboard-hero::after { content: ""; position: absolute; width: 300px; height: 300px; right: -90px; top: -180px; border: 55px solid rgba(255,255,255,.055); border-radius: 50%; }
.hero-kicker { font-size: 9px; font-weight: 850; letter-spacing: .18em; color: #91f0d4; }
.dashboard-hero h1 { margin: 6px 0 3px; font-size: 34px; letter-spacing: -.055em; }
.dashboard-hero p { margin: 0; color: rgba(255,255,255,.65); font-size: 12px; }
.hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 90px); border: 1px solid rgba(255,255,255,.15); border-radius: 13px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.hero-stats div { display: grid; gap: 3px; padding: 16px 13px; text-align: center; }
.hero-stats div + div { border-left: 1px solid rgba(255,255,255,.13); }
.hero-stats strong { font-size: 23px; }
.hero-stats span { color: rgba(255,255,255,.66); font-size: 10px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(460px, 1.15fr); gap: 18px; align-items: start; }
.request-card, .history-card { position: relative; padding: 24px; }
.request-card::before, .history-card::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 3px; border-radius: 0 0 5px 5px; background: linear-gradient(90deg, var(--primary), #7d91ee); }
.history-card::before { background: linear-gradient(90deg, var(--coral), #ffb29f); }
.card-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-heading > div { display: flex; align-items: center; gap: 9px; }
.card-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; }
.section-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: #fff; background: var(--primary); font-size: 9px; font-weight: 850; }
.section-number.coral { background: var(--coral); }
.count-badge { padding: 5px 9px; border-radius: 99px; color: var(--primary); background: #eef4ff; font-size: 12px; font-weight: 800; }
.compact-form { gap: 13px; }
.limit-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 16px; padding: 10px 11px; border-radius: 9px; color: #58647a; background: #f3f6fb; font-size: 10px; }
.limit-summary strong { margin-right: 3px; color: var(--navy); }
.limit-summary span { padding: 3px 6px; border-radius: 4px; background: #fff; }
.limit-alert { margin: -5px 0 14px; padding: 11px 12px; border: 1px solid #f2b9b4; border-radius: 9px; color: #a93832; background: #fff1f0; font-size: 12px; font-weight: 700; line-height: 1.5; }
.time-fields { padding: 11px; border-radius: 10px; background: #f7f9fc; }
.application-list { display: grid; gap: 10px; max-height: 680px; overflow-y: auto; padding-right: 3px; }
.application-item { border: 1px solid var(--line); border-radius: 11px; padding: 15px; background: #fff; }
.application-item:hover { border-color: #c8d3ee; box-shadow: 0 7px 18px rgba(40,63,118,.06); transform: translateY(-1px); transition: .15s ease; }
.application-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.application-topline strong { font-size: 16px; }
.application-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.application-meta span { padding: 4px 7px; border-radius: 5px; color: #495469; background: #f0f2f5; font-size: 11px; font-weight: 700; }
.application-item > p { margin: 10px 0 5px; font-size: 13px; line-height: 1.5; }
.application-item > small { display: block; margin-top: 5px; font-size: 11px; }
.admin-note { margin-top: 10px; padding: 9px 10px; border-radius: 7px; color: #41516d; background: #edf3ff; font-size: 12px; }
.application-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; padding-top: 11px; border-top: 1px solid #edf0f3; }
.application-actions code { color: #8992a3; font-size: 10px; }
.cancel-button { border: 0; padding: 5px 8px; color: var(--danger); background: transparent; font-size: 11px; font-weight: 800; }
.empty-state { padding: 52px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.status { display: inline-flex; padding: 5px 8px; border-radius: 99px; background: #e9edf1; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-승인, .status-출근완료 { color: #12633f; background: #dcf2e7; }
.status-반려, .status-미출근 { color: #9c352f; background: #f8dfdd; }
.status-신청 { color: #805f0b; background: #f8edc7; }
.status-취소 { color: #606b7d; background: #e9edf1; }

/* 관리자 화면 */
.dark-header { color: #fff; background: rgba(23, 32, 51, .98); border-bottom: 0; }
.dark-header .brand { color: #fff; }
.admin-main { padding: 48px 0 80px; }
.login-card { width: min(440px, 100%); margin: 40px auto; padding: 30px; }
.login-card h1 { margin: 0 0 8px; font-size: 32px; letter-spacing: -.045em; }
.login-card > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; }
.login-card form { margin-top: 24px; }
.eyebrow { margin: 0 0 10px; color: var(--primary); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.admin-title-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; }
.admin-title-row h1 { margin: 0; font-size: 38px; letter-spacing: -.05em; }
.summary-badge { display: flex; align-items: baseline; gap: 7px; }
.summary-badge strong { font-size: 32px; }
.summary-badge span { color: var(--muted); font-size: 13px; }
.admin-overview-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 14px; margin-bottom: 14px; }
.settings-card, .tool-card { padding: 20px; box-shadow: none; }
.panel-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.panel-title > div { display: flex; align-items: center; gap: 9px; }
.panel-title h2 { margin: 0; font-size: 17px; letter-spacing: -.035em; }
.panel-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.panel-icon { display: grid; place-items: center; min-width: 34px; height: 27px; padding: 0 7px; border-radius: 7px; color: #fff; background: var(--primary); font-size: 9px; font-weight: 850; }
.panel-icon.green { background: #17875b; }
.settings-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.unit-input { position: relative; }
.unit-input input { padding-right: 50px; }
.unit-input em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 10px; font-style: normal; }
.settings-action { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.settings-action button { padding: 9px 15px; font-size: 12px; }
.settings-action .form-message { flex: 1; }
.tool-steps { display: grid; gap: 8px; margin: 0 0 15px; padding: 0; list-style: none; color: #596579; font-size: 11px; }
.tool-steps li { display: flex; align-items: center; gap: 7px; }
.tool-steps li span { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: #fff; background: #29a577; font-size: 9px; font-weight: 800; }
.tool-download-button { width: 100%; border: 0; border-radius: 9px; padding: 11px; color: #fff; background: #16794f; font-size: 12px; font-weight: 800; }
.filter-bar { display: grid; grid-template-columns: repeat(3, 1fr) auto auto; gap: 10px; align-items: end; padding: 18px; }
.privacy-inline { margin: 15px 2px; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 1060px; }
.admin-table th { padding: 13px 11px; color: var(--muted); background: #f6f7f9; text-align: left; font-size: 11px; }
.admin-table td { padding: 14px 11px; border-top: 1px solid #eceff2; vertical-align: top; font-size: 12px; }
.admin-table td small { display: block; margin-top: 5px; }
.admin-table td:last-child { width: 215px; }
.admin-table td:last-child select, .admin-table td:last-child input { margin-bottom: 6px; padding: 7px; font-size: 11px; }
.reason-cell { max-width: 230px; line-height: 1.5; }
.small-button { border: 0; border-radius: 7px; padding: 7px 10px; color: #fff; background: var(--primary); font-weight: 800; }

@media (max-width: 900px) {
  .admin-overview-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .workspace-grid { grid-template-columns: 1fr; }
  .application-list { max-height: none; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 1120px); }
  .header-inner { height: 56px; }
  .access-main { min-height: calc(100vh - 56px); padding: 20px 0 60px; }
  .access-card { grid-template-columns: 1fr; }
  .access-visual { min-height: 205px; padding: 28px; }
  .access-visual h1 { font-size: 32px; }
  .access-visual p { margin: 8px 0 18px; }
  .access-form-panel { padding: 28px 22px; }
  .portal-main { padding-top: 23px; }
  .dashboard-hero { display: block; padding: 24px; }
  .dashboard-hero p { display: none; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); margin-top: 20px; }
  .request-card, .history-card { padding: 18px; }
  .field-grid, .filter-bar, .settings-grid { grid-template-columns: 1fr; }
  .check-label { min-height: auto; align-content: center; }
  .admin-title-row { align-items: flex-start; }
  .admin-title-row h1 { font-size: 30px; }
  .account-menu { gap: 7px; }
}
