﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

:root {
  --bg: #121212;
  --bg-soft: #1a1a1a;
  --panel: #1a1a1a;
  --panel-2: #0f0f10;
  --line: #2a2a2d;
  --line-strong: #3a3a3f;
  --text: #ffffff;
  --muted: #9ca3af;
  --brand: #0055a4;
  --brand-press: #004488;
  --success: #22c55e;
  --danger: #ef4444;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Noto Sans KR', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: clamp(220px, 18vw, 260px) minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  background:
    radial-gradient(circle at 82% -12%, rgba(0, 85, 164, 0.2), transparent 44%),
    linear-gradient(180deg, #171717 0%, #101010 100%);
  border-right: 1px solid #2a2e34;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0 0 12px;
}

.brand span { color: var(--brand); }

.sidebar-toggle {
  min-height: 40px;
  min-width: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #2f4f73;
  background: linear-gradient(180deg, #0e2134 0%, #0d1a28 100%);
  color: #dbeafe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.sidebar-toggle:hover {
  border-color: #4f78a8;
  background: linear-gradient(180deg, #16304a 0%, #122639 100%);
}

.sidebar-toggle-icon {
  display: inline-flex;
  width: 12px;
  justify-content: center;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #e8edf8;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #2a3038;
  background: rgba(19, 23, 29, 0.86);
  font-weight: 800;
  transition: all .14s ease;
}

.sidebar form {
  margin: 0;
}

.nav-item:hover {
  background: #182130;
  border-color: #355075;
}

.nav-item.active {
  background: linear-gradient(180deg, #10263b 0%, #0f2031 100%);
  border-color: #2f5f8f;
  color: #dbeafe;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}

.nav-short {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid #2b4a6d;
  background: #0f2236;
  color: #9ecbff;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
}

.btn.full .nav-short,
.btn.full .nav-text {
  pointer-events: none;
}

.nav-text {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.nav-slot .nav-short {
  border-color: #2f6aa0;
  background: #123256;
}

.nav-settlement .nav-short {
  border-color: #3f6b57;
  background: #143125;
  color: #b3e8ca;
}

.nav-account .nav-short {
  border-color: #6a5b3f;
  background: #322816;
  color: #ead4ac;
}

.nav-guide .nav-short {
  border-color: #5c4d78;
  background: #251b3b;
  color: #d9c7ff;
}

.nav-subgroup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding: 8px 8px 10px;
  border: 1px solid #2a3038;
  border-radius: 12px;
  background: rgba(15, 19, 25, 0.78);
}

.nav-subgroup-title {
  font-size: 11px;
  font-weight: 800;
  color: #9cb7d9;
  letter-spacing: .02em;
  margin-left: 4px;
}

.nav-subitem {
  min-height: 40px;
  border-radius: 10px;
  padding-left: 10px;
  background: rgba(13, 17, 24, 0.9);
}

.sidebar-logout-btn {
  justify-content: flex-start;
  gap: 10px;
  min-height: 44px;
  border-radius: 12px;
}

.layout.layout-collapsed {
  grid-template-columns: 92px minmax(0, 1fr);
}

.layout.layout-collapsed .sidebar {
  padding: 14px 8px;
  align-items: center;
}

.layout.layout-collapsed .sidebar-top {
  width: auto;
  align-items: center;
  flex-direction: column;
  gap: 8px;
}

.layout.layout-collapsed .brand {
  font-size: 0;
  margin: 0;
  line-height: 1;
}

.layout.layout-collapsed .brand::before {
  content: "O";
  font-size: 36px;
  font-weight: 900;
  color: #f9fafb;
  letter-spacing: -0.02em;
}

.layout.layout-collapsed .brand span {
  font-size: 36px;
  margin-left: 1px;
}

.layout.layout-collapsed .sidebar-toggle-text {
  display: none;
}

.layout.layout-collapsed .sidebar-toggle {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.layout.layout-collapsed .nav-item,
.layout.layout-collapsed .btn.full {
  width: 100%;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  padding-left: 0;
  padding-right: 0;
}

.layout.layout-collapsed .nav-text {
  display: none;
}

.layout.layout-collapsed .nav-short {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 13px;
}

.layout.layout-collapsed .nav-subgroup {
  width: 100%;
  padding: 6px;
}

.layout.layout-collapsed .nav-subgroup-title {
  display: none;
}

.layout.layout-collapsed .nav-subitem {
  padding-left: 0;
}

.layout.layout-collapsed .me {
  display: none;
}

.main {
  padding: 20px;
  min-width: 0;
  background: radial-gradient(circle at 95% -10%, rgba(0,85,164,0.14), transparent 35%), #121212;
}

.hero {
  background: linear-gradient(135deg, #231f20 0%, #121212 55%, #0d2843 100%);
  color: #fff;
  border: 1px solid #26262b;
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.hero h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.slot-hero {
  background: linear-gradient(140deg, #1f2d18 0%, #132114 50%, #0f1d14 100%);
  border-color: #2c4132;
}

.stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  backdrop-filter: blur(5px);
}

.card b { font-size: 12px; font-weight: 700; color: #d1d5db; }
.card strong { font-size: 24px; font-weight: 800; }

.stats .stat-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all .16s ease;
}

.stats .stat-card:hover {
  border-color: rgba(87, 168, 255, 0.45);
  background: rgba(0, 85, 164, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
}

.stats .stat-card.active {
  border-color: rgba(87, 168, 255, 0.65);
  background: rgba(0, 85, 164, 0.24);
}

#slot-stats .stat-card {
  --status-accent: #57a8ff;
  --status-accent-soft: rgba(87, 168, 255, 0.28);
  position: relative;
  overflow: hidden;
}

#slot-stats .stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.04) 46%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}

#slot-stats .stat-card:hover::before,
#slot-stats .stat-card.active::before {
  opacity: 1;
}

#slot-stats .stat-card.active {
  transform: translateY(-3px);
  border-color: var(--status-accent);
  box-shadow:
    0 0 0 2px var(--status-accent-soft),
    0 16px 28px rgba(0, 0, 0, 0.36);
}

#slot-stats .stat-card.active b,
#slot-stats .stat-card.active strong {
  color: #f9fafb;
}

.stat-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-sub {
  font-size: 11px;
  color: #d5ddb4;
  font-weight: 700;
}

#slot-stats .stat-card[data-status-code="all"] {
  --status-accent: #90d070;
  --status-accent-soft: rgba(144, 208, 112, 0.28);
  border-color: #4d6f45;
  background: rgba(92, 145, 74, 0.2);
}

#slot-stats .stat-card[data-status-code="all"]:hover,
#slot-stats .stat-card[data-status-code="all"].active {
  border-color: #7bae66;
  background: rgba(116, 177, 94, 0.48);
}

#slot-stats .stat-card[data-status-code="ending"] {
  --status-accent: #e4c768;
  --status-accent-soft: rgba(228, 199, 104, 0.28);
  border-color: #867a3d;
  background: rgba(146, 129, 66, 0.2);
}

#slot-stats .stat-card[data-status-code="ending"]:hover,
#slot-stats .stat-card[data-status-code="ending"].active {
  border-color: #b8aa5f;
  background: rgba(176, 158, 84, 0.46);
}

#slot-stats .stat-card[data-status-code="todayend"] {
  --status-accent: #e29cc2;
  --status-accent-soft: rgba(226, 156, 194, 0.28);
  border-color: #9a5f80;
  background: rgba(182, 116, 152, 0.2);
}

#slot-stats .stat-card[data-status-code="todayend"]:hover,
#slot-stats .stat-card[data-status-code="todayend"].active {
  border-color: #c684a9;
  background: rgba(204, 136, 174, 0.46);
}

#slot-stats .stat-card[data-status-code="ended"] {
  --status-accent: #e98080;
  --status-accent-soft: rgba(233, 128, 128, 0.28);
  border-color: #8a3e3e;
  background: rgba(154, 70, 70, 0.22);
}

#slot-stats .stat-card[data-status-code="ended"]:hover,
#slot-stats .stat-card[data-status-code="ended"].active {
  border-color: #c45656;
  background: rgba(189, 86, 86, 0.5);
}

.panel {
  background: linear-gradient(180deg, rgba(26,26,26,0.95) 0%, rgba(17,17,17,0.95) 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.slot-panel {
  border-color: #2f3f33;
  background: linear-gradient(180deg, rgba(24, 29, 24, 0.95) 0%, rgba(15, 18, 15, 0.95) 100%);
}

.slot-panel .filters input,
.slot-panel .filters select {
  border-color: #3c4f40;
  background: #0e1310;
}

.slot-panel .filters input:focus,
.slot-panel .filters select:focus {
  border-color: #6ea66f;
  box-shadow: 0 0 0 3px rgba(110, 166, 111, 0.22);
}

.slot-panel .selected-chip {
  border-color: #3a5440;
  background: #111915;
  color: #d7f0da;
}

.btn.ghost.btn-extend {
  border-color: #4e6f4d;
  background: rgba(70, 100, 66, 0.28);
  color: #d9f5d9;
}

.btn.ghost.btn-extend:hover {
  background: rgba(84, 122, 79, 0.42);
}

.btn.ghost.btn-modify {
  border-color: #7b6f46;
  background: rgba(117, 107, 68, 0.26);
  color: #f7f1cf;
}

.btn.ghost.btn-modify:hover {
  background: rgba(139, 126, 77, 0.4);
}

.btn.ghost.btn-end {
  border-color: #7a4040;
  background: rgba(122, 64, 64, 0.28);
  color: #ffd9d9;
}

.btn.ghost.btn-end:hover {
  background: rgba(145, 74, 74, 0.42);
}

.btn.ghost.btn-report {
  border-color: #3a648d;
  background: linear-gradient(180deg, rgba(36, 70, 108, 0.42) 0%, rgba(23, 46, 74, 0.42) 100%);
  color: #e6f1ff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 10px;
}

.btn.ghost.btn-report:hover {
  background: linear-gradient(180deg, rgba(53, 92, 136, 0.5) 0%, rgba(29, 58, 89, 0.5) 100%);
}

.btn.ghost.btn-toss-excel {
  border-color: #7a6141;
  background: linear-gradient(180deg, rgba(103, 78, 46, 0.34) 0%, rgba(70, 50, 28, 0.34) 100%);
  color: #ffe8c6;
}

.btn.ghost.btn-toss-excel:hover {
  background: linear-gradient(180deg, rgba(126, 93, 54, 0.44) 0%, rgba(87, 60, 33, 0.44) 100%);
}

.btn.ghost.btn-slot-time {
  border-color: #3d6d59;
  background: linear-gradient(180deg, rgba(28, 83, 65, 0.34) 0%, rgba(18, 58, 45, 0.34) 100%);
  color: #d7ffe8;
}

.btn.ghost.btn-slot-time:hover {
  background: linear-gradient(180deg, rgba(35, 102, 79, 0.44) 0%, rgba(22, 73, 56, 0.44) 100%);
}

.btn.ghost.btn-report .report-btn-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #4f7ba9;
  background: rgba(19, 39, 61, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  color: #b9d8ff;
  flex-shrink: 0;
}

.btn.ghost.btn-report .report-btn-label {
  letter-spacing: -0.01em;
}

.btn.ghost.btn-report .report-btn-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #5f7a9a;
  background: rgba(14, 25, 38, 0.82);
  color: #d7eaff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  margin-left: 2px;
}

.btn.ghost.btn-report.is-loading {
  opacity: 0.84;
  cursor: wait;
}

.btn.ghost.btn-report.is-loading .report-btn-icon {
  animation: rank-report-spin 0.95s linear infinite;
}

.btn.ghost.btn-report.over-limit {
  border-color: #8c4f5d;
  background: linear-gradient(180deg, rgba(98, 45, 55, 0.42) 0%, rgba(58, 25, 32, 0.42) 100%);
}

.report-inline-hint {
  color: #9fb9d7;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 2px;
}

@keyframes rank-report-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.guide-hero {
  background: linear-gradient(140deg, #182215 0%, #142434 55%, #102a23 100%);
  border: 1px solid #2a3f39;
}

.guide-hero p {
  margin: 8px 0 0;
  color: #c9d8ea;
  font-size: 13px;
  font-weight: 600;
}

.guide-workflow-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-workflow-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.guide-workflow-head h3 {
  margin: 0;
  font-size: 18px;
}

.guide-workflow-head small {
  color: #9ab3cc;
  font-size: 12px;
  font-weight: 700;
}

.guide-workflow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-workflow-tab {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #2e4562;
  background: #101827;
  color: #d7e9ff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.guide-workflow-tab:hover {
  background: #13233a;
}

.guide-workflow-tab.active {
  border-color: #3d7ccd;
  background: linear-gradient(180deg, #1a4d88 0%, #1a3f6b 100%);
  color: #f5fbff;
}

.guide-workflow-body {
  border: 1px solid #28364d;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(13, 20, 32, 0.88) 0%, rgba(10, 15, 25, 0.9) 100%);
  padding: 14px;
}

.guide-workflow-item {
  display: none;
}

.guide-workflow-item.active {
  display: block;
}

.guide-workflow-item h4 {
  margin: 0;
  font-size: 18px;
}

.guide-workflow-summary {
  margin: 8px 0 0;
  color: #c6d7eb;
  font-size: 13px;
  font-weight: 600;
}

.guide-workflow-steps {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #dce9f8;
  line-height: 1.65;
  font-size: 13px;
  font-weight: 600;
}

.guide-workflow-steps li + li {
  margin-top: 4px;
}

.guide-workflow-images {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.guide-workflow-figure {
  margin: 0;
  border: 1px solid #2b3f59;
  border-radius: 12px;
  background: #0e1726;
  overflow: hidden;
}

.guide-workflow-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  background: #09111d;
}

.guide-workflow-figure figcaption {
  padding: 8px 10px;
  border-top: 1px solid #213149;
  font-size: 12px;
  color: #b9cee6;
  font-weight: 700;
}

.guide-workflow-empty {
  margin-top: 12px;
  border: 1px dashed #325277;
  border-radius: 10px;
  background: rgba(20, 33, 52, 0.55);
  color: #bfd2ea;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.guide-card {
  border: 1px solid #27384f;
  border-radius: 12px;
  background: #111a2b;
  padding: 12px;
}

.guide-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.guide-card ul {
  margin: 0;
  padding-left: 18px;
  color: #cfe0f4;
  line-height: 1.6;
  font-size: 13px;
  font-weight: 600;
}

.notice-hero {
  background: linear-gradient(140deg, #1f1827 0%, #172336 52%, #16272f 100%);
  border: 1px solid #324053;
}

.notice-hero p {
  margin: 8px 0 0;
  color: #cdd9ea;
  font-size: 13px;
  font-weight: 600;
}

.notice-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn.ghost.btn-notice-publish {
  border-color: #3a648d;
  background: rgba(36, 70, 108, 0.3);
  color: #d8ecff;
}

.btn.ghost.btn-notice-delete {
  border-color: #7a4040;
  background: rgba(122, 64, 64, 0.28);
  color: #ffd9d9;
}

.notice-table .notice-content-cell {
  white-space: pre-wrap;
  min-width: 300px;
}

.notice-table tr.is-active {
  background: rgba(29, 73, 113, 0.22);
}

.notice-state {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #425165;
  background: rgba(26, 33, 46, 0.8);
  color: #c4d3e6;
  font-size: 11px;
  font-weight: 900;
}

.notice-state.active {
  border-color: #3d6ea0;
  background: rgba(28, 62, 97, 0.78);
  color: #e7f3ff;
}

.notice-empty {
  text-align: center;
  color: #a3b7cf;
  font-weight: 700;
}

.notice-create-card {
  max-width: 620px;
}

.notice-create-form {
  border: none;
  padding: 0;
}

.notice-create-form textarea {
  min-height: 170px;
  resize: vertical;
}

.notice-result-card {
  max-width: 460px;
}

.notice-result-message {
  white-space: pre-wrap;
  color: #dbe8f6;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 4px;
}

.notice-result-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.global-notice-card {
  max-width: 640px;
}

.global-notice-meta {
  margin-top: 4px;
  color: #9fb7d3;
  font-size: 12px;
  font-weight: 800;
}

.global-notice-title {
  margin: 10px 0 0;
  font-size: 20px;
  color: #f0f7ff;
}

.global-notice-content {
  margin-top: 10px;
  border: 1px solid #2a3f5c;
  border-radius: 12px;
  background: rgba(12, 23, 38, 0.75);
  padding: 12px;
  white-space: pre-wrap;
  color: #e1ecfa;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

.global-notice-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.slot-time-policy-card {
  max-width: 520px;
}

.slot-time-policy-form {
  border: none;
  padding: 0;
}

.slot-time-policy-form .input-hint {
  margin-top: 4px;
}

#slot-time-policy-save-btn.is-loading {
  opacity: 0.85;
  cursor: wait;
}

.settlement-page .settle-hero {
  background: linear-gradient(140deg, #2a1f18 0%, #15222e 52%, #0f2f2a 100%);
  border-color: #2d3d42;
}

.settlement-page .settle-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.settlement-page .settle-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: .14em;
  color: #b3d6d0;
  font-weight: 800;
}

.settlement-page .settle-sub {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
}

.settlement-page .settle-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #4a7d74;
  background: rgba(27, 64, 58, 0.55);
  color: #d8fbf1;
  font-size: 11px;
  letter-spacing: .1em;
  font-weight: 900;
}

.settlement-page .settle-kpis {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.settlement-page .settle-kpi-card {
  border: 1px solid #30414a;
  border-radius: 12px;
  background: rgba(14, 24, 30, 0.68);
  padding: 10px 12px;
}

.settlement-page .settle-kpi-card span {
  display: block;
  color: #9db6c7;
  font-size: 12px;
  font-weight: 700;
}

.settlement-page .settle-kpi-card strong {
  display: block;
  margin-top: 4px;
  color: #f8fafc;
  font-size: 25px;
  font-weight: 900;
}

.settlement-page .settle-panel {
  border-color: #2a333a;
  background: linear-gradient(180deg, rgba(23, 26, 30, 0.96) 0%, rgba(16, 18, 21, 0.96) 100%);
}

.settlement-page .settle-sum {
  border: 1px solid #2f3d4a;
  border-radius: 12px;
  background: #111820;
  padding: 10px 12px;
  color: #cbd5e1;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
input, select, button, textarea { font: inherit; }

.filters > * {
  min-width: 0;
}

.filters input,
.filters select {
  flex: 1 1 170px;
}

.filters .date-input-wrap {
  flex: 1 1 300px;
}

.filters .btn,
.filters a.btn {
  flex: 0 0 auto;
}

input, select, textarea {
  border: 1px solid #3a3a3f;
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 40px;
  background: #0f0f10;
  color: #fff;
}

input { min-width: 180px; }

input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,85,164,0.25);
}

input::placeholder, textarea::placeholder { color: #6b7280; }

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: all .15s ease;
}

.btn:hover { background: var(--brand-press); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn.ghost {
  background: #17171a;
  border-color: #36363b;
  color: #e5e7eb;
}

.btn.ghost:hover { background: #202026; }
.btn.sm { min-height: 32px; font-size: 12px; padding: 0 10px; }
.btn.full { width: 100%; }

.date-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-input-wrap label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 700;
}

.date-input-box {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.date-text-input {
  min-width: 148px;
}

.native-date-proxy {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  border: 0;
}

.date-picker-btn {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #36363b;
  background: #17171a;
  color: #e5e7eb;
  cursor: pointer;
  font-weight: 700;
}

.date-picker-btn:hover {
  background: #202026;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255,255,255,0.03);
}
.form-card label { font-weight: 700; color: #d1d5db; }
.form-card h3 { margin: 0 0 8px; }
.form-card p { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.form-card .input-hint {
  margin-top: -2px;
  font-size: 12px;
  color: #9fb3c8;
  font-weight: 600;
}
.form-card .input-hint.error {
  color: #fca5a5;
}

.sub-keyword-query-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.sub-keyword-query-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.sub-keyword-check-btn {
  min-width: 72px;
  white-space: nowrap;
}

.sub-keyword-rank-results {
  border: 1px solid #2f3d4f;
  border-radius: 10px;
  background: #0f141b;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.sub-keyword-rank-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #121922;
  border: 1px solid #263447;
}

.sub-keyword-rank-label {
  font-size: 13px;
  font-weight: 700;
  color: #e5e7eb;
  word-break: break-word;
}

.sub-keyword-rank-value {
  font-size: 13px;
  font-weight: 900;
  min-width: 46px;
  text-align: right;
}

.sub-keyword-rank-value.ok {
  color: #22c55e;
}

.sub-keyword-rank-value.bad {
  color: #ef4444;
}

.sub-keyword-rank-value.loading {
  color: #93a3b8;
}
.assigned-user-field {
  position: relative;
}
.assigned-user-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  border: 1px solid #2f3d4f;
  border-radius: 10px;
  background: #0f141b;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45);
  overflow: auto;
  max-height: 220px;
  z-index: 30;
}
.assigned-user-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #1e2a39;
  background: transparent;
  color: #e5e7eb;
  text-align: left;
  padding: 9px 11px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.assigned-user-item:last-child {
  border-bottom: 0;
}
.assigned-user-item:hover {
  background: #162231;
}
.assigned-user-item small {
  color: #93a3b8;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  max-width: 56%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

.action-row, .meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.action-group, .inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}
.meta-row { margin-bottom: 8px; }
.meta-left, .meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.meta-right {
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.meta-text { color: var(--muted); font-weight: 600; }
.selected-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #2f3b4d;
  background: #121922;
  color: #dbeafe;
  font-weight: 800;
  font-size: 12px;
}
.drag-select-tip {
  color: #90a2bc;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.page-size-form label {
  color: #d1d5db;
  font-size: 12px;
  font-weight: 700;
}
#page-size {
  min-width: 86px;
}
.pager-row {
  --pager-btn-w: 78px;
  --pager-btn-gap: 78px;
  display: grid;
  grid-template-columns: repeat(4, var(--pager-btn-w));
  column-gap: var(--pager-btn-gap);
  row-gap: 0;
  margin-top: 10px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}

.pager-row .pager-btn {
  width: var(--pager-btn-w);
  min-width: var(--pager-btn-w);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.pager-row .pager-btn.is-disabled {
  pointer-events: none;
  opacity: 0.38;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #121215;
  max-width: 100%;
}

.table-wrap.no-scroll {
  overflow: visible;
  max-height: none;
}

table { width: 100%; border-collapse: collapse; min-width: 1080px; }
th, td {
  border-bottom: 1px solid #232326;
  padding: 10px 8px;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
  color: #f3f4f6;
}

/* 슬롯 리스트 칼럼 구분선: 너무 밝지 않은 회색 톤 */
#bulk-form .table-wrap table {
  border: 1px solid #232833;
}

#bulk-form .table-wrap th:not(:last-child),
#bulk-form .table-wrap td:not(:last-child) {
  border-right: 1px solid #202632;
}

.slot-panel .table-wrap {
  border-color: #2c3b2f;
  background: #101411;
}

.slot-panel th {
  background: #1a211b;
}

th {
  background: #1c1c20;
  position: sticky;
  top: 0;
  z-index: 2;
  font-weight: 700;
}

.col-sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.col-sort-link.active {
  color: #8ec7ff;
}

th:first-child, td:first-child {
  width: 44px;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

tbody tr:nth-child(even) td { background: #141418; }
tr:hover td { background: #1d1d22; }

.rank-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  width: 100%;
  white-space: nowrap;
}

.rank-value {
  font-weight: 800;
  color: #f9fafb;
  min-width: 18px;
  text-align: right;
}

.rank-history-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #3a4554;
  border-radius: 999px;
  background: linear-gradient(180deg, #151b24 0%, #10161e 100%);
  color: #87c5ff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

th.col-current_rank,
td.col-current_rank {
  width: 126px;
  min-width: 126px;
  text-align: left;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 8px;
}

.rank-history-btn:hover {
  border-color: #0a63b8;
  color: #57a8ff;
  background: linear-gradient(180deg, #1a2533 0%, #121d2a 100%);
}

.slot-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #2f3540;
  background: #0f131a;
}

th.col-sub_keywords,
td.col-sub_keywords {
  min-width: 260px;
  max-width: 360px;
}

td.col-sub_keywords {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
  color: #d2e7ff;
}

td.col-remaining_days.remaining-days-alert {
  color: #ff6b6b;
  font-weight: 900;
}

.rank-history-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.rank-history-table th,
.rank-history-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-history-table th:nth-child(1),
.rank-history-table td:nth-child(1) { width: 38%; }
.rank-history-table th:nth-child(2),
.rank-history-table td:nth-child(2) { width: 28%; text-align: center; }
.rank-history-table th:nth-child(3),
.rank-history-table td:nth-child(3) { width: 34%; }

.rank-history-rank-cell {
  display: inline-grid;
  grid-template-columns: 30px 56px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 98px;
  line-height: 1;
}

.rank-history-rank-main {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  font-weight: 800;
  color: #f4f7ff;
  min-width: 30px;
  text-align: right;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.rank-history-rank-delta {
  display: inline-grid;
  grid-template-columns: 10px 24px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  min-width: 56px;
  text-align: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  column-gap: 2px;
}

.rank-history-rank-delta.up {
  color: #ff6b6b;
}

.rank-history-rank-delta.down {
  color: #62a8ff;
}

.rank-history-rank-delta.keep {
  color: #4ade80;
  justify-content: center;
}

.rank-history-rank-delta .delta-arrow {
  display: inline-block;
  width: 10px;
  text-align: center;
  font-size: 10px;
  line-height: 1;
}

.rank-history-rank-delta .delta-num {
  display: inline-block;
  min-width: 24px;
  text-align: left;
  line-height: 1;
}

.rank-history-rank-delta .delta-arrow.placeholder {
  visibility: hidden;
}

.rank-history-table td[colspan] {
  text-align: center;
}

.rank-history-chart-panel {
  margin-top: 12px;
  border: 1px solid #2e3642;
  border-radius: 12px;
  background: #11161d;
  padding: 10px 12px 12px;
}

.rank-history-chart-meta {
  font-size: 12px;
  font-weight: 700;
  color: #c4d5ea;
  margin-bottom: 8px;
}

#rank-history-chart-canvas {
  width: 100%;
  height: 220px;
  background: linear-gradient(180deg, #10141b 0%, #0f1318 100%);
  border: 1px solid #283241;
  border-radius: 10px;
}

.rank-history-chart-empty {
  margin-top: 8px;
  font-size: 12px;
  color: #8ea1b7;
}

.rank-clock-icon {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.rank-slot-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #355075;
  background: #121922;
  color: #b5dcff;
  font-size: 12px;
  font-weight: 800;
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 8px;
  border: 1px solid #4b5563;
  border-radius: 3px;
  background: #0f131a;
  margin: 0;
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  transition: all .12s ease;
}

input[type="checkbox"]:hover {
  border-color: #0a63b8;
}

input[type="checkbox"]:checked {
  border-color: #0a63b8;
  background: #0055a4;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 2px;
  height: 4px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform .1s ease;
}

input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

.flash-wrap { margin-bottom: 10px; }
.flash {
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 6px;
  font-size: 13px;
  border: 1px solid transparent;
}
.flash.error { background: rgba(239,68,68,.14); color: #fecaca; border-color: rgba(239,68,68,.35); }
.flash.ok { background: rgba(34,197,94,.14); color: #bbf7d0; border-color: rgba(34,197,94,.35); }

.me {
  margin-top: auto;
  padding: 12px 12px 14px;
  border: 1px solid #2c4157;
  border-radius: 14px;
  background:
    radial-gradient(circle at 88% -20%, rgba(0, 142, 255, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(17, 25, 34, 0.96), rgba(13, 18, 24, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.me-label {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  color: #9cb4c9;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.me-user {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
  color: #f8fbff;
  letter-spacing: -0.01em;
}

.me-role {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #3b5f82;
  background: rgba(0, 85, 164, 0.24);
  color: #d8e9ff;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

.sum { margin: 8px 0 12px; color: var(--muted); }
.hidden { display: none !important; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.66);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
}

.modal-card {
  width: min(580px, 96vw);
  max-height: calc(100vh - 32px);
  background: rgba(24,24,28,0.95);
  border: 1px solid #33363d;
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  margin: auto 0;
}

#slot-create-modal .modal-card {
  width: min(620px, 96vw);
}

.excel-upload-card {
  width: min(860px, 96vw);
}

.toss-excel-card {
  width: min(560px, 96vw);
}

.toss-excel-form {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  gap: 10px;
}

.toss-excel-form .input-hint {
  margin-top: -2px;
}

.date-input-wrap {
  position: relative;
}

.date-input-wrap input[type="date"] {
  padding-right: 62px;
}

.date-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: none;
}

.date-picker-btn {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid #2e4f74;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(15, 32, 50, 0.96) 0%, rgba(10, 23, 36, 0.96) 100%);
  color: #cfe5ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.date-picker-btn:hover {
  background: linear-gradient(180deg, rgba(24, 49, 76, 0.98) 0%, rgba(16, 35, 53, 0.98) 100%);
  border-color: #4f78a8;
  color: #ffffff;
}

.date-picker-btn svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.date-picker-btn-strong {
  width: 38px;
  height: 38px;
  border-width: 1.5px;
}

.date-picker-btn-strong svg {
  width: 24px;
  height: 24px;
}

.date-picker-icon-static {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 1.5px solid #2e4f74;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(15, 32, 50, 0.96) 0%, rgba(10, 23, 36, 0.96) 100%);
  color: #bfd6f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.date-picker-icon-static svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.date-picker-btn-icon {
  padding: 0;
  min-width: 38px;
}

.date-picker-btn-icon span {
  display: none;
}

.date-input-box .date-text-input {
  padding-right: 62px;
}

/* Slot create: force start-date picker button to exactly match end-date icon */
#slot-start-date-picker-btn {
  width: 38px;
  height: 38px;
  min-height: 38px;
  min-width: 38px;
  padding: 0;
  border: 1.5px solid #2e4f74;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(15, 32, 50, 0.96) 0%, rgba(10, 23, 36, 0.96) 100%);
  color: #bfd6f0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

#slot-start-date-picker-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

#slot-start-date-picker-btn:hover {
  border-color: #4f78a8;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(24, 49, 76, 0.98) 0%, rgba(16, 35, 53, 0.98) 100%);
}

.toss-excel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

#toss-excel-generate-btn .btn-loading {
  display: none;
}

#toss-excel-generate-btn.is-loading {
  opacity: 0.88;
  cursor: wait;
}

#toss-excel-generate-btn.is-loading .btn-label {
  display: none;
}

#toss-excel-generate-btn.is-loading .btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#toss-excel-generate-btn.is-loading .btn-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #ffffff;
  animation: toss-excel-spin 0.9s linear infinite;
}

@keyframes toss-excel-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.excel-upload-help {
  margin-bottom: 10px;
  color: #d1d5db;
}

.excel-upload-help p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.excel-upload-help ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #9fb3c8;
  font-size: 12px;
}

.excel-dropzone {
  border: 1px dashed #3d4f67;
  border-radius: 12px;
  background: #0f151e;
  padding: 16px;
  display: grid;
  gap: 8px;
  justify-items: start;
  margin-bottom: 10px;
  transition: all .12s ease;
}

.excel-dropzone strong {
  color: #e5eefc;
  font-size: 14px;
}

.excel-dropzone span {
  color: #9fb3c8;
  font-size: 12px;
  word-break: break-all;
}

.excel-dropzone.dragover {
  border-color: #0a63b8;
  background: #132133;
  box-shadow: 0 0 0 3px rgba(10, 99, 184, 0.2);
}

.excel-upload-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.excel-validate-summary {
  border: 1px solid rgba(34, 197, 94, .36);
  border-radius: 10px;
  background: rgba(34, 197, 94, .12);
  color: #bbf7d0;
  font-size: 12px;
  padding: 8px 10px;
  white-space: pre-wrap;
  margin-bottom: 10px;
}

.excel-validate-summary.error {
  border-color: rgba(239, 68, 68, .36);
  background: rgba(239, 68, 68, .12);
  color: #fecaca;
}

.excel-preview-wrap {
  max-height: 320px;
}

.excel-preview-table {
  min-width: 760px;
}

.excel-preview-row.ok td:nth-child(3) {
  color: #4ade80;
  font-weight: 800;
}

.excel-preview-row.error td:nth-child(3) {
  color: #f87171;
  font-weight: 800;
}

.excel-preview-row.skip td:nth-child(3) {
  color: #facc15;
  font-weight: 800;
}

#slot-columns-modal .modal-card {
  width: min(900px, calc(100vw - 24px));
  box-sizing: border-box;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, rgba(26,26,26,0.98) 0%, rgba(17,17,17,0.98) 100%);
  border: 1px solid #2d3138;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.52);
}

#slot-columns-modal .modal-head {
  margin-bottom: 14px;
}

#slot-columns-modal .modal-head h3 {
  margin: 0;
  color: #f9fafb;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

#slot-columns-modal .slot-columns-form {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

#slot-columns-modal .slot-columns-role-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid #2b313b;
  border-radius: 12px;
  background: #12151a;
}

#slot-columns-modal .slot-role-tab {
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid #2f3743;
  background: #171b22;
  color: #d1d5db;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

#slot-columns-modal .slot-role-tab:hover {
  background: #1d2430;
  border-color: #355075;
}

#slot-columns-modal .slot-role-tab.active {
  background: #0055a4;
  border-color: #0a63b8;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 85, 164, 0.35);
}

#slot-columns-modal .slot-columns-table-wrap {
  border: 1px solid #2f3540;
  border-radius: 14px;
  background: #12151a;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  overflow-x: hidden;
}

#slot-columns-modal .slot-columns-table {
  min-width: 100% !important;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

#slot-columns-modal th,
#slot-columns-modal td {
  color: #f3f4f6;
  background: transparent;
  border-bottom: 1px solid #262c35;
  padding: 10px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#slot-columns-modal td:first-child {
  font-size: 13px;
  font-weight: 700;
}

#slot-columns-modal th {
  position: static;
  background: #1a1f27;
  font-size: 13px;
  font-weight: 800;
}

#slot-columns-modal td {
  background: #141920;
  font-size: 14px;
}

#slot-columns-modal tr:hover td {
  background: #19202a;
}

#slot-columns-modal th:first-child,
#slot-columns-modal td:first-child {
  width: auto;
  text-align: left;
  padding-left: 12px;
  padding-right: 12px;
}

#slot-columns-modal th:nth-child(2),
#slot-columns-modal th:nth-child(3),
#slot-columns-modal th:nth-child(4),
#slot-columns-modal td:nth-child(2),
#slot-columns-modal td:nth-child(3),
#slot-columns-modal td:nth-child(4) {
  text-align: center;
}

#slot-columns-modal th:nth-child(1),
#slot-columns-modal td:nth-child(1) { width: 58%; }
#slot-columns-modal th:nth-child(2),
#slot-columns-modal td:nth-child(2) { width: 14%; }
#slot-columns-modal th:nth-child(3),
#slot-columns-modal td:nth-child(3) { width: 14%; }
#slot-columns-modal th:nth-child(4),
#slot-columns-modal td:nth-child(4) { width: 14%; }

#slot-columns-modal th:last-child,
#slot-columns-modal td:last-child {
  min-width: 76px;
  width: 76px;
  text-align: center;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

#slot-columns-modal input[type="checkbox"] {
  width: 8px;
  height: 8px;
}

#slot-columns-modal input[name^="display_order__"] {
  display: none !important;
}

.modal-close-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #0a63b8;
  background: #121922;
  color: #57a8ff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close-icon:hover {
  background: #1c2633;
}

#slot-columns-sortable tr.dragging {
  opacity: 0.35;
}

#slot-columns-sortable tr.drag-over-before td {
  box-shadow: inset 0 2px 0 #0a63b8;
}

#slot-columns-sortable tr.drag-over-after td {
  box-shadow: inset 0 -2px 0 #0a63b8;
}

.drag-handle {
  width: 34px;
  height: 34px;
  appearance: none;
  border: 1px solid #394657;
  background: #111720;
  border-radius: 8px;
  cursor: grab;
  display: inline-grid;
  place-items: center;
  color: #7dc0ff;
  flex-shrink: 0;
}

.drag-handle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.drag-handle:hover {
  border-color: #0a63b8;
  color: #57a8ff;
}

.drag-handle:active {
  cursor: grabbing;
}

.slot-columns-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.slot-columns-actions .btn {
  min-width: 108px;
  min-height: 42px;
}

.slot-columns-cancel {
  background: #191e26 !important;
  border-color: #3a4554 !important;
  color: #e5e7eb !important;
}

.slot-columns-cancel:hover {
  background: #232b37 !important;
}

.slot-columns-save {
  background: #0055a4 !important;
  border-color: #0a63b8 !important;
}

.slot-columns-save:hover {
  background: #0a63b8 !important;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-head h3 { margin: 0; font-size: 24px; font-weight: 800; }

#rank-history-modal .modal-card {
  width: min(760px, 96vw);
}

#rank-history-modal .table-wrap {
  overflow-x: hidden;
}

.oreo-dialog-card {
  width: min(460px, 92vw);
}

.oreo-dialog-message {
  margin: 0;
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.oreo-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* Login layout copied from example tone */
.login-body {
  min-height: 100vh;
  background: #121212;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
  background: linear-gradient(135deg, #231f20 0%, #0a0a0a 100%);
  overflow: hidden;
}

.login-visual::before,
.login-visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
}

.login-visual::before {
  width: 340px;
  height: 340px;
  background: rgba(0, 85, 164, 0.35);
  left: -120px;
  top: -100px;
}

.login-visual::after {
  width: 280px;
  height: 280px;
  background: rgba(255, 255, 255, 0.18);
  right: -60px;
  bottom: -80px;
}

.login-brand {
  position: relative;
  z-index: 1;
  text-align: center;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(48px, 11vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 900;
  background: linear-gradient(180deg, #ffffff 0%, #8f96a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand h1 span {
  -webkit-text-fill-color: #0055a4;
}

.login-brand p {
  margin-top: 12px;
  color: #9ca3af;
  font-size: 15px;
}

.login-cookie {
  display: block;
  width: min(360px, 72vw);
  margin: 26px auto 0;
  animation: cookieFloat 3.8s ease-in-out infinite;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(2px);
}

.login-card {
  width: min(460px, 96vw);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.login-card h2 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
}

.login-card p {
  margin: 0 0 18px;
  color: #9ca3af;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-card input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #374151;
  color: #fff;
}

.login-card .btn {
  margin-top: 6px;
  min-height: 44px;
}

.login-hint {
  margin-top: 12px;
  color: #6b7280;
  font-size: 12px;
}

@keyframes cookieFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual,
  .login-panel {
    min-height: auto;
  }
}

@media (max-width: 1360px) {
  .main {
    padding: 16px;
  }

  .hero h2 {
    font-size: clamp(28px, 2.5vw, 32px);
  }

  .filters input,
  .filters select {
    min-width: 150px;
  }
}

@media (max-width: 1200px) {
  .action-row,
  .meta-row {
    align-items: flex-start;
  }

  .meta-left,
  .meta-right {
    width: 100%;
  }

  .meta-right {
    justify-content: space-between;
  }

  .settlement-page .date-input-box {
    flex-wrap: wrap;
  }

  .settlement-page .date-text-input {
    min-width: 0;
    flex: 1 1 170px;
  }
}

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .layout.layout-collapsed { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    align-items: center;
    gap: 8px;
  }
  .sidebar-toggle {
    display: none;
  }
  .layout.layout-collapsed .sidebar {
    align-items: stretch;
    padding: 20px 14px;
  }
  .layout.layout-collapsed .sidebar-top {
    width: auto;
    flex-direction: row;
    justify-content: space-between;
  }
  .layout.layout-collapsed .brand {
    font-size: 28px;
  }
  .layout.layout-collapsed .nav-item,
  .layout.layout-collapsed .btn.full {
    padding-left: 12px;
    padding-right: 12px;
    text-align: left;
    justify-content: flex-start;
  }
  .layout.layout-collapsed .nav-text {
    display: inline;
  }
  .layout.layout-collapsed .nav-short {
    display: none;
  }
  .layout.layout-collapsed .me {
    display: block;
  }
  .brand { font-size: 28px; margin: 0; grid-column: 1 / -1; }
  .sidebar .nav-item,
  .sidebar form,
  .sidebar .btn.full {
    width: 100%;
  }
  .me {
    grid-column: 1 / -1;
    margin-top: 2px;
  }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .main {
    padding: 12px;
  }

  .filters input,
  .filters select,
  .filters .date-input-wrap {
    flex: 1 1 100%;
  }

  .filters .btn,
  .filters a.btn {
    width: 100%;
  }

  .action-group {
    width: 100%;
  }

  .action-group .btn,
  .action-group a.btn {
    flex: 1 1 calc(50% - 4px);
  }

  .report-inline-hint {
    width: 100%;
    min-height: 20px;
    padding: 2px 0 0;
  }

  .sub-keyword-query-row {
    flex-wrap: wrap;
  }

  .sub-keyword-check-btn {
    width: 100%;
  }
}

