:root {
  --ink: #172022;
  --muted: #657276;
  --line: #dce6e3;
  --paper: #f3f7f5;
  --white: #ffffff;
  --teal: #0c5555;
  --teal-bright: #1f8f8b;
  --amber: #c88522;
  --lime: #b8df37;
  --navy: #0b2026;
  --danger: #a94235;
  --shadow: 0 24px 60px rgba(17, 42, 45, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

code {
  padding: 3px 7px;
  color: var(--teal);
  background: #edf5f2;
  border-radius: 5px;
  font-size: 13px;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 20px;
  color: #d8e5e7;
  background: var(--navy);
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.admin-brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--white);
  border: 1px solid currentColor;
  border-radius: 8px;
  font-size: 12px;
}

.admin-brand-logo {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
  padding: 5px 8px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
}

.admin-nav {
  display: grid;
  gap: 24px;
  min-height: 0;
  overflow-y: auto;
  margin: 34px -8px 22px 0;
  padding-right: 8px;
}

.admin-nav-group {
  display: grid;
  gap: 5px;
}

.admin-nav .admin-nav-heading {
  display: block;
  padding: 0 10px 5px;
  color: #66858a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.admin-nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  color: #a9bec2;
  border: 1px solid transparent;
  border-radius: 9px;
}

.admin-nav-code {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #8eabb0;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.admin-nav-copy {
  display: grid;
  min-width: 0;
}

.admin-nav-copy strong {
  color: inherit;
  font-size: 14px;
  line-height: 1.3;
}

.admin-nav-copy small {
  overflow: hidden;
  color: #6f8a8f;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-nav-item:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.055);
}

.admin-nav-item.is-active {
  color: #102024;
  background: var(--lime);
  border-color: rgba(255, 255, 255, 0.22);
}

.admin-nav-item.is-active .admin-nav-code {
  color: var(--white);
  background: var(--teal);
  border-color: var(--teal);
}

.admin-nav-item.is-active .admin-nav-copy small {
  color: #426036;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

.text-button {
  padding: 0;
  color: #a9bec2;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.admin-main {
  width: min(1280px, 100%);
  padding: 48px clamp(24px, 5vw, 72px) 80px;
}

.dashboard-header,
.section-heading,
.connection-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-header {
  margin-bottom: 30px;
}

.admin-eyebrow,
.panel-label {
  margin: 0 0 8px;
  color: var(--teal-bright);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
}

h2 {
  margin-bottom: 6px;
  font-size: 25px;
}

h3 {
  margin-bottom: 8px;
}

p {
  color: var(--muted);
}

.status-badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-badge.is-online {
  color: #124b32;
  background: #dff5e7;
}

.status-badge.is-offline {
  color: #7b3429;
  background: #fae3de;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stats-grid article,
.panel,
.login-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(31, 52, 55, 0.05);
}

.stats-grid article {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.stats-grid span,
.stats-grid small {
  color: var(--muted);
  font-size: 13px;
}

.stats-grid strong {
  color: var(--teal);
  font-size: 34px;
  line-height: 1;
}

.panel {
  margin-bottom: 20px;
  padding: 26px;
}

.connection-panel {
  align-items: center;
}

.connection-panel h2,
.connection-panel p,
.section-heading p {
  margin-bottom: 0;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.module-grid article {
  min-height: 160px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.module-grid article > span {
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
}

.module-grid p {
  margin-bottom: 0;
  font-size: 14px;
}

.module-action {
  display: inline-flex;
  margin-top: 18px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.module-action:hover {
  text-decoration: underline;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
}

td {
  font-size: 14px;
}

td a {
  color: var(--teal-bright);
  font-weight: 800;
}

.empty-cell {
  padding: 36px 12px;
  color: var(--muted);
  text-align: center;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 78% 20%, rgba(31, 143, 139, 0.22), transparent 30%),
    linear-gradient(145deg, #0b2026, #17363a);
}

.login-shell {
  width: min(480px, 100%);
}

.login-page.is-otp-setup .login-shell {
  width: min(780px, 100%);
}

.login-page .admin-brand {
  margin-bottom: 18px;
  color: var(--white);
}

.login-card {
  padding: clamp(28px, 6vw, 42px);
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 34px;
}

.login-description {
  margin-bottom: 26px;
}

.admin-form {
  display: grid;
  gap: 18px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.admin-form input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
}

.admin-form input:focus {
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 3px rgba(31, 143, 139, 0.12);
}

.primary-button {
  min-height: 50px;
  color: var(--white);
  background: var(--teal);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 850;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.alert {
  margin-bottom: 20px;
  padding: 12px 14px;
  color: var(--danger);
  background: #fff0ec;
  border: 1px solid #f3c9c0;
  border-radius: 7px;
  font-size: 14px;
}

.login-help {
  margin: 22px 0 0;
  font-size: 12px;
  text-align: center;
}

.login-reset-link {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.otp-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 13px 15px;
  background: #f1f7f5;
  border-radius: 8px;
  font-size: 13px;
}

.otp-account span {
  color: var(--muted);
}

.otp-account strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.otp-setup-grid {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
  padding: 22px;
  background: #f4f8f6;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.otp-qr-panel {
  display: grid;
  gap: 10px;
  justify-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.otp-qr-panel #otp-qr {
  display: block;
  width: 222px;
  height: 222px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.otp-qr-panel #otp-qr img,
.otp-qr-panel #otp-qr canvas {
  display: block;
  width: 220px;
  height: 220px;
}

.otp-steps {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--muted);
  font-size: 14px;
}

.otp-secret-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.otp-secret-box > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.otp-secret-box code {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.copy-button {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--teal);
  background: var(--white);
  border: 1px solid var(--teal);
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.otp-confirm-form {
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: end;
}

.otp-confirm-form .primary-button {
  min-height: 48px;
}

.recovery-notice {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 14px 16px;
  color: #704700;
  background: #fff5df;
  border: 1px solid #f0d49a;
  border-radius: 8px;
  font-size: 13px;
}

.recovery-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 18px;
  background: #f4f8f6;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.recovery-codes code {
  padding: 10px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-align: center;
}

.recovery-copy {
  width: 100%;
  margin-top: 10px;
}

.recovery-complete-form {
  margin-top: 22px;
}

.header-button,
.secondary-link,
.cancel-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 850;
}

.header-button {
  flex: 0 0 auto;
  color: var(--white);
  background: var(--teal);
}

.secondary-link,
.cancel-button {
  color: var(--teal);
  background: var(--white);
  border: 1px solid var(--line);
}

.flash {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
}

.flash.is-success {
  color: #145036;
  background: #e0f4e8;
  border: 1px solid #b8e2c8;
}

.flash.is-error {
  color: var(--danger);
  background: #fff0ec;
  border: 1px solid #f3c9c0;
}

.flash.is-notice {
  color: #704700;
  background: #fff5df;
  border: 1px solid #f0d49a;
}

.service-editor {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

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

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

.editor-grid-one {
  grid-template-columns: minmax(0, 1fr);
}

.service-editor label:not(.check-field) {
  display: grid;
  gap: 8px;
}

.service-editor label > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.service-editor i {
  color: var(--danger);
  font-style: normal;
}

.service-editor input:not([type="checkbox"]),
.service-editor select,
.service-editor textarea {
  width: 100%;
  padding: 11px 13px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  font: inherit;
}

.service-editor input:not([type="checkbox"]),
.service-editor select {
  min-height: 46px;
}

.service-editor textarea {
  resize: vertical;
}

.table-subcopy {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.category-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}

.category-admin-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 285px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.category-admin-card:hover,
.category-admin-card.is-editing {
  border-color: var(--teal-bright);
  box-shadow: 0 16px 34px rgba(12, 85, 85, 0.1);
  transform: translateY(-2px);
}

.category-admin-card.is-editing {
  box-shadow: 0 0 0 3px rgba(31, 143, 139, 0.12), 0 16px 34px rgba(12, 85, 85, 0.1);
}

.category-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.category-order {
  display: block;
  margin-bottom: 8px;
  color: var(--teal-bright);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.category-card-heading h3 {
  margin-bottom: 3px;
  font-size: 21px;
}

.category-card-heading p,
.category-description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.category-slug {
  justify-self: start;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--teal-dark);
  background: #edf6f3;
  font-size: 12px;
}

.category-description {
  line-height: 1.6;
}

.category-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.category-card-meta strong {
  color: var(--ink);
  font-size: 14px;
}

.category-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.category-edit-button,
.category-delete-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 850;
}

.category-edit-button {
  color: var(--white);
  background: var(--teal);
}

.category-delete-button {
  color: var(--danger);
  border: 1px solid #f0c8c0;
  background: #fff8f6;
  cursor: pointer;
}

.category-delete-button:disabled {
  color: #aaa29d;
  border-color: var(--line);
  background: #f2f1ef;
  cursor: not-allowed;
}

@media (max-width: 560px) {
  .category-admin-grid {
    grid-template-columns: 1fr;
  }

  .category-admin-card {
    min-height: auto;
    padding: 18px;
  }

  .category-card-actions {
    grid-template-columns: 1fr;
  }

  .category-delete-button {
    width: 100%;
  }
}

.service-editor input:focus,
.service-editor select:focus,
.service-editor textarea:focus {
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 3px rgba(31, 143, 139, 0.1);
}

.color-field {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 8px;
}

.color-field input[type="color"] {
  padding: 4px;
  cursor: pointer;
}

.editor-options,
.editor-actions,
.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  background: #f4f8f6;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.check-field input {
  width: 18px;
  height: 18px;
}

.compact-button {
  width: auto;
  padding: 10px 18px;
}

.management-table td {
  vertical-align: middle;
}

.management-table {
  min-width: 1320px;
}

.service-list-count {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.service-list-count strong {
  color: var(--teal);
  font-size: 30px;
  line-height: 1;
}

.service-list-count span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 12px 14px;
  background: #f1f6f4;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.bulk-selection-tools,
.bulk-action-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-selection-tools > span {
  margin-left: 5px;
  color: var(--muted);
  font-size: 12px;
}

.bulk-selection-tools > span strong {
  color: var(--teal);
}

.bulk-text-button,
.bulk-apply-button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.bulk-text-button {
  color: var(--teal);
  background: var(--white);
  border: 1px solid var(--line);
}

.bulk-action-tools select {
  min-width: 180px;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
}

.bulk-apply-button {
  color: var(--white);
  background: var(--teal);
  border: 1px solid var(--teal);
}

.service-table-wrap {
  margin-top: 12px;
}

.service-list-table {
  min-width: 0;
  table-layout: fixed;
}

.service-list-table .service-col-check {
  width: 4%;
}

.service-list-table .service-col-order {
  width: 5%;
}

.service-list-table .service-col-info {
  width: 25%;
}

.service-list-table .service-col-status {
  width: 10%;
}

.service-list-table .service-col-publish,
.service-list-table .service-col-feature {
  width: 7%;
}

.service-list-table .service-col-schedule {
  width: 14%;
}

.service-list-table .service-col-record {
  width: 10%;
}

.service-list-table .service-col-actions {
  width: 18%;
}

.service-list-table th,
.service-list-table td {
  padding-right: 8px;
  padding-left: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.service-list-table .service-info-cell,
.service-list-table .service-actions-cell {
  min-width: 0;
}

.service-list-table .service-name-cell strong,
.service-list-table .domain-link {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.service-list-table .service-schedule-list span,
.service-list-table .service-record-links a {
  white-space: normal;
}

.service-list-table .row-actions {
  flex-wrap: wrap;
}

.service-list-table .check-column {
  width: 46px;
  padding-right: 6px;
  padding-left: 6px;
  text-align: center;
}

.service-list-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}

.number-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.number-pagination a,
.number-pagination strong,
.number-pagination .page-arrow {
  display: grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  padding: 0 8px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 850;
}

.number-pagination a:hover {
  color: var(--teal);
  border-color: var(--teal-bright);
}

.number-pagination strong {
  color: var(--white);
  background: var(--teal);
  border-color: var(--teal);
}

.number-pagination .page-arrow {
  color: var(--teal);
  font-size: 17px;
}

.number-pagination .page-arrow.is-disabled {
  color: #aab7b4;
  background: #f1f4f3;
  cursor: not-allowed;
}

.page-ellipsis {
  min-width: 24px;
  color: var(--muted);
  text-align: center;
}

.service-edit-panel {
  border-top: 3px solid var(--teal-bright);
}

.service-edit-panel .section-heading i {
  color: var(--danger);
  font-style: normal;
}

.service-filter-bar {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(140px, 0.8fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin: 22px 0 10px;
  padding: 16px;
  background: #f4f8f6;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.service-filter-bar label {
  display: grid;
  gap: 6px;
}

.service-filter-bar label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.service-filter-bar input,
.service-filter-bar select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
}

.service-filter-bar select:disabled {
  color: #9aa7a5;
  background: #edf1f0;
}

.service-filter-bar .primary-button,
.service-filter-bar .cancel-button {
  min-height: 42px;
  white-space: nowrap;
}

.lifecycle-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.lifecycle-active {
  color: #145036;
  background: #e0f4e8;
}

.lifecycle-preparing {
  color: #174f70;
  background: #dff1fa;
}

.lifecycle-maintenance {
  color: #704700;
  background: #fff0cd;
}

.lifecycle-paused {
  color: var(--danger);
  background: #fff0ec;
}

.lifecycle-archived {
  color: #695f58;
  background: #ede9e5;
}

.service-admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 6px 0 0 18px;
}

.service-admin-meta span {
  color: var(--muted);
  font-size: 10px;
}

.service-admin-meta span + span::before {
  content: "·";
  margin-right: 8px;
}

.service-schedule-list {
  display: grid;
  gap: 4px;
  min-width: 105px;
}

.service-schedule-list span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.service-schedule-list span.is-soon {
  color: #9a6200;
}

.service-schedule-list span.is-overdue {
  color: var(--danger);
  font-weight: 900;
}

.service-schedule-list span.is-empty {
  color: #9aa7a5;
}

.service-manage-cell {
  display: grid;
  gap: 7px;
}

.service-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-quick-links a {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.service-management-editor {
  gap: 0;
  margin-top: 0;
}

.service-management-editor > .panel {
  margin-bottom: 20px;
}

.management-profile-panel {
  border-top: 3px solid var(--amber);
}

.internal-only-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  color: #704700;
  background: #fff0cd;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.editor-span-two {
  grid-column: span 2;
}

.management-date-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.management-date-grid label {
  display: grid;
  gap: 8px;
}

.sticky-editor-actions {
  position: sticky;
  z-index: 5;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(17, 42, 45, 0.16);
  backdrop-filter: blur(10px);
}

.sticky-editor-actions > div:first-child {
  display: grid;
}

.sticky-editor-actions > div:first-child span {
  color: var(--muted);
  font-size: 11px;
}

.sticky-editor-actions .editor-actions {
  flex-wrap: nowrap;
}

.service-name-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.service-name-cell i {
  width: 9px;
  height: 34px;
  background: var(--service-color, var(--teal));
  border-radius: 999px;
}

.domain-link {
  display: inline-block;
  margin: 3px 0 0 18px;
  font-size: 12px;
}

.table-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.table-badge.is-published {
  color: #145036;
  background: #e0f4e8;
}

.table-badge.is-hidden {
  color: #695f58;
  background: #ede9e5;
}

.row-actions {
  flex-wrap: nowrap;
  gap: 10px;
}

.row-actions a,
.row-actions button {
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.row-actions button {
  color: var(--danger);
}

.service-record-links {
  display: grid;
  gap: 4px;
}

.service-record-links a {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.service-record-links a.is-add {
  color: var(--muted);
  font-size: 11px;
}

.operation-editor-panel {
  border-top: 3px solid var(--teal-bright);
}

.operation-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.operation-service-field {
  grid-column: span 2;
}

.operation-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: start;
}

.operation-filter {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.8fr 1.5fr auto auto;
  gap: 10px;
  align-items: end;
  margin: 22px 0 28px;
  padding: 16px;
  background: #f4f8f6;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.operation-filter label {
  display: grid;
  gap: 6px;
}

.operation-filter label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.operation-filter input,
.operation-filter select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
}

.operation-filter .primary-button,
.operation-filter .cancel-button {
  min-height: 42px;
  white-space: nowrap;
}

.operation-timeline {
  position: relative;
  display: grid;
}

.operation-record {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 14px;
}

.operation-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.operation-rail::after {
  content: "";
  position: absolute;
  top: 21px;
  bottom: -1px;
  width: 2px;
  background: var(--line);
}

.operation-record:last-child .operation-rail::after {
  display: none;
}

.operation-rail span {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-top: 18px;
  background: var(--teal-bright);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--teal-bright);
}

.operation-record.priority-high .operation-rail span {
  background: var(--amber);
  box-shadow: 0 0 0 2px var(--amber);
}

.operation-record.priority-urgent .operation-rail span {
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--danger);
}

.operation-record-body {
  margin-bottom: 16px;
  padding: 20px 22px;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.operation-record-meta,
.operation-dates,
.operation-title-row,
.operation-record-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.operation-record-meta {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.operation-record-meta > a {
  color: var(--teal);
}

.operation-deleted-service {
  color: var(--muted);
  text-decoration: line-through;
}

.operation-type,
.operation-status,
.operation-priority {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.operation-type {
  color: #174f70;
  background: #e3f1f7;
}

.operation-status.status-completed {
  color: #145036;
  background: #e0f4e8;
}

.operation-status.status-planned,
.operation-status.status-in_progress {
  color: #704700;
  background: #fff0cd;
}

.operation-status.status-monitoring {
  color: #174f70;
  background: #dff1fa;
}

.operation-status.status-cancelled {
  color: #695f58;
  background: #ede9e5;
}

.operation-priority {
  color: var(--danger);
  background: #fff0ec;
}

.operation-title-row {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.operation-title-row h3 {
  margin-bottom: 0;
  font-size: 19px;
}

.operation-domain {
  margin-left: 0;
}

.operation-details {
  margin-top: 16px;
  color: #405054;
  font-size: 14px;
  line-height: 1.75;
}

.operation-files {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
  padding: 12px;
  background: #f1f6f4;
  border-radius: 7px;
}

.operation-files > span {
  margin-right: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.operation-files code {
  font-size: 11px;
}

.operation-record-footer {
  justify-content: space-between;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.operation-dates {
  color: var(--muted);
  font-size: 11px;
}

.operation-dates strong,
.operation-dates a {
  color: var(--teal);
}

.operation-empty {
  display: grid;
  gap: 6px;
  padding: 46px 20px;
  color: var(--muted);
  background: #f7faf8;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
}

.operation-empty strong {
  color: var(--ink);
}

.operation-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.operation-pagination a:last-child {
  justify-self: end;
}

.operation-pagination strong {
  color: var(--muted);
  font-size: 12px;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
}

.setting-group {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) 2fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.setting-group:first-of-type {
  border-top: 1px solid var(--line);
}

.setting-group > div:first-child p {
  margin: 5px 0 0;
  font-size: 13px;
}

.inquiry-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.inquiry-meta div {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: #f4f8f6;
  border-radius: 7px;
}

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

.inquiry-message {
  padding: 20px;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.8;
}

.status-new {
  color: #7d4a00;
  background: #fff0cd;
}

.status-reviewing {
  color: #174f70;
  background: #dff1fa;
}

.status-answered,
.status-closed {
  color: #145036;
  background: #e0f4e8;
}

.status-spam {
  color: #695f58;
  background: #ede9e5;
}

.range-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #e7efec;
  border-radius: 8px;
}

.range-tabs a {
  padding: 8px 13px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 850;
}

.range-tabs a.is-active {
  color: var(--white);
  background: var(--teal);
}

.analytics-period-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid .period-metric {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
}

.stats-grid .period-metric em {
  color: var(--muted);
  font-size: 18px;
  font-style: normal;
  font-weight: 850;
}

.analytics-site-table {
  min-width: 0;
  table-layout: fixed;
}

.analytics-site-table th,
.analytics-site-table td {
  padding-right: 9px;
  padding-left: 9px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.analytics-site-table th:first-child {
  width: 22%;
}

.analytics-site-table th:last-child {
  width: 15%;
}

.visit-count {
  color: var(--ink);
  white-space: nowrap;
}

.visit-count small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.analytics-chart {
  min-width: 720px;
  height: 260px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  overflow-x: auto;
  margin-top: 28px;
  padding: 24px 4px 0;
  border-bottom: 1px solid var(--line);
}

.chart-column {
  min-width: 18px;
  height: 100%;
  display: grid;
  grid-template-rows: 20px 1fr 24px;
  flex: 1 0 18px;
  align-items: end;
  text-align: center;
}

.chart-column span,
.chart-column small {
  color: var(--muted);
  font-size: 10px;
}

.chart-column i {
  width: min(22px, 80%);
  min-height: 3px;
  justify-self: center;
  background: linear-gradient(180deg, var(--teal-bright), var(--teal));
  border-radius: 5px 5px 0 0;
}

.analytics-columns {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.device-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.device-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: #f4f8f6;
  border-radius: 7px;
}

.device-list strong {
  color: var(--teal);
  font-size: 20px;
}

.tracking-guide {
  display: grid;
  gap: 18px;
}

.snippet-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.snippet-row code {
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  padding: 14px;
  white-space: nowrap;
}

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

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-nav {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 18px;
    margin: 22px 0 0;
    padding-bottom: 6px;
  }

  .admin-nav-group {
    display: flex;
    gap: 6px;
  }

  .admin-nav .admin-nav-heading {
    display: none;
  }

  .admin-nav-item {
    grid-template-columns: 30px auto;
    min-width: max-content;
    min-height: 48px;
  }

  .admin-nav-code {
    width: 30px;
    height: 30px;
  }

  .admin-nav-copy small {
    display: none;
  }

  .sidebar-footer {
    display: flex;
    margin-top: 22px;
  }

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

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

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

  .analytics-columns {
    grid-template-columns: 1fr;
  }

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

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

  .operation-search {
    grid-column: span 2;
  }

  .bulk-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-action-tools {
    justify-content: flex-end;
  }

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

  .service-filter-search {
    grid-column: span 2;
  }

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

@media (max-width: 620px) {
  .admin-main {
    padding: 34px 18px 60px;
  }

  .dashboard-header,
  .section-heading,
  .connection-panel {
    flex-direction: column;
  }

  .stats-grid,
  .module-grid,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .setting-group,
  .inquiry-meta {
    grid-template-columns: 1fr;
  }

  .operation-form-grid,
  .operation-detail-grid,
  .operation-filter {
    grid-template-columns: 1fr;
  }

  .operation-service-field,
  .operation-search {
    grid-column: auto;
  }

  .operation-filter .primary-button,
  .operation-filter .cancel-button {
    width: 100%;
  }

  .operation-record {
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 8px;
  }

  .operation-record-body {
    padding: 17px 15px;
  }

  .bulk-selection-tools,
  .bulk-action-tools {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .bulk-action-tools select {
    min-width: 0;
    flex: 1 1 190px;
  }

  .bulk-apply-button {
    flex: 0 0 auto;
  }

  .service-filter-bar,
  .management-date-grid {
    grid-template-columns: 1fr;
  }

  .service-filter-search,
  .editor-span-two {
    grid-column: auto;
  }

  .service-filter-bar .primary-button,
  .service-filter-bar .cancel-button {
    width: 100%;
  }

  .sticky-editor-actions {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .sticky-editor-actions .editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sticky-editor-actions .primary-button,
  .sticky-editor-actions .cancel-button {
    width: 100%;
  }

  .operation-title-row,
  .operation-record-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-button {
    width: 100%;
  }

  .section-actions {
    width: 100%;
    justify-content: space-between;
  }

  .range-tabs,
  .snippet-row {
    width: 100%;
  }

  .snippet-row {
    align-items: stretch;
    flex-direction: column;
  }

  .login-page {
    padding: 18px;
  }

  .login-card {
    padding: 26px 20px;
  }

  .otp-setup-grid,
  .otp-confirm-form {
    grid-template-columns: 1fr;
  }

  .otp-setup-grid {
    padding: 16px;
  }

  .recovery-codes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .service-list-panel {
    padding: 20px;
  }

  .service-table-wrap {
    overflow: visible;
  }

  .service-list-table,
  .service-list-table tbody,
  .service-list-table tr,
  .service-list-table td {
    display: block;
    width: 100%;
  }

  .service-list-table {
    table-layout: auto;
  }

  .service-list-table colgroup,
  .service-list-table thead {
    display: none;
  }

  .service-list-table tbody {
    display: grid;
    gap: 14px;
  }

  .service-list-table tr {
    position: relative;
    padding: 18px;
    background: #fbfdfc;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .service-list-table td {
    display: grid;
    grid-template-columns: minmax(76px, 0.28fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 9px 0;
    border-bottom: 1px solid #e8eeeb;
    white-space: normal;
  }

  .service-list-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
  }

  .service-list-table td.check-column {
    position: absolute;
    z-index: 1;
    top: 18px;
    right: 18px;
    display: block;
    width: 22px;
    padding: 0;
    border: 0;
  }

  .service-list-table .service-order-cell {
    position: absolute;
    top: 18px;
    left: 18px;
    display: inline-flex;
    width: auto;
    align-items: center;
    gap: 2px;
    padding: 3px 8px;
    color: var(--teal);
    background: #e9f3f0;
    border: 0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
  }

  .service-list-table .service-order-cell::before {
    content: "#";
    color: inherit;
    font-size: inherit;
  }

  .service-list-table .service-info-cell {
    display: block;
    padding: 36px 42px 15px 0;
  }

  .service-list-table .service-info-cell::before {
    display: none;
  }

  .service-list-table .service-name-cell {
    align-items: flex-start;
  }

  .service-list-table .service-name-cell i {
    flex: 0 0 7px;
  }

  .service-list-table .domain-link,
  .service-list-table .service-admin-meta {
    margin-left: 16px;
  }

  .service-list-table .service-schedule-list,
  .service-list-table .service-record-links,
  .service-list-table .service-manage-cell {
    min-width: 0;
  }

  .service-list-table .service-actions-cell {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .service-list-table .row-actions,
  .service-list-table .service-quick-links {
    gap: 14px;
  }

  .service-list-table .empty-cell {
    display: block;
    padding: 24px 8px;
    border: 0;
    text-align: center;
  }

  .service-list-table .empty-cell::before {
    display: none;
  }
}

@media (max-width: 620px) {
  .service-list-panel {
    padding: 16px;
  }

  .service-list-table tr {
    padding: 16px;
  }

  .service-list-table td {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .service-list-table td.check-column {
    top: 16px;
    right: 16px;
  }

  .service-list-table .service-order-cell {
    top: 16px;
    left: 16px;
  }
}

@media (max-width: 760px) {
  .analytics-site-table-wrap {
    overflow: visible;
  }

  .analytics-site-table,
  .analytics-site-table tbody,
  .analytics-site-table tr,
  .analytics-site-table td {
    display: block;
    width: 100%;
  }

  .analytics-site-table {
    table-layout: auto;
  }

  .analytics-site-table thead {
    display: none;
  }

  .analytics-site-table tbody {
    display: grid;
    gap: 12px;
  }

  .analytics-site-table tr {
    padding: 16px;
    background: #fbfdfc;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .analytics-site-table td {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid #e8eeeb;
  }

  .analytics-site-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
  }

  .analytics-site-table .analytics-site-info {
    display: block;
    padding-top: 0;
  }

  .analytics-site-table .analytics-site-info::before {
    display: none;
  }

  .analytics-site-table td:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

.service-logo-editor { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 24px; margin: 24px 0; padding: 22px; border: 1px solid #d9e2dc; border-radius: 16px; background: #f7faf6; }
.service-logo-preview { display: flex; align-items: center; justify-content: center; height: 120px; padding: 15px; border: 1px solid #e0e7df; border-radius: 12px; background: #fff; color: #627467; font-size: 12px; text-align: center; }
.service-logo-preview img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.service-logo-fields { min-width: 0; }
.service-logo-fields input[type='file'] { width: 100%; min-width: 0; padding: 10px; background: #fff; }
.service-logo-fields p { margin: 10px 0; color: #5d7062; font-size: 12px; line-height: 1.7; }
.service-logo-feedback { display: block; margin-top: 8px; color: #345b40; font-size: 12px; }
.service-logo-editor { scroll-margin-top: 120px; }
.service-logo-editor:target { outline: 2px solid #6d9b6f; outline-offset: 4px; }
.service-list-logo { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.service-list-logo-thumb { display: grid; place-items: center; width: 54px; height: 44px; flex-shrink: 0; padding: 5px; border: 1px solid #dbe4dc; border-radius: 8px; color: #728776; background: #fff; }
.service-list-logo-thumb img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.service-list-logo-thumb.is-empty { border-style: dashed; background: #f6f9f4; }
.service-list-logo-copy { display: flex; align-items: flex-start; flex-direction: column; min-width: 0; gap: 2px; }
.service-list-logo-state { color: #64776a; font-size: 10px; line-height: 1.5; }
.service-logo-edit-link { display: inline-flex; align-items: center; min-height: 32px; color: #185b42; font-size: 12px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.service-logo-edit-link:hover { color: #0e3627; }
.service-logo-edit-link:focus-visible { outline: 2px solid #246b4e; outline-offset: 3px; }
@media (max-width: 640px) {
  .service-logo-editor { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .service-logo-preview { height: 110px; }
  .service-logo-edit-link { min-height: 44px; }
}
