/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #101828;
  --muted: #667085;
  --line: #d9e2ec;
  --primary: #1769e0;
  --primary-strong: #0b4fb4;
  --success: #137a54;
  --danger: #c63d3d;
  --shadow: 0 14px 40px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.36);
  outline-offset: 2px;
}

.console-shell {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: 260px minmax(0, 1fr);
}

.auth-loading,
.login-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}

.auth-loading {
  color: var(--muted);
  font-weight: 700;
}

.login-page {
  background: linear-gradient(135deg, #eef4ff 0%, #f7fbff 52%, #ffffff 100%);
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.login-brand h1 {
  margin: 0;
  font-size: 24px;
}

.login-form {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
}

.login-submit {
  width: 100%;
  justify-content: center;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1 1;
  background: var(--line);
}

.dingtalk-login {
  background: #f4f8ff;
  color: var(--primary);
}

.sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid var(--line);
  background: #0d1728;
  color: #ffffff;
  padding: 24px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #1f7aef;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #a8b5c7;
  font-size: 13px;
}

.nav-list {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.nav-item,
.icon-button,
.primary-button,
.ghost-button,
.table-action {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 12px;
  background: transparent;
  color: #d5deeb;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.main-panel {
  min-width: 0;
  padding: 24px;
}

.topbar,
.panel-heading,
.pagination-bar,
.toolbar,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar h1,
.panel-heading h2,
.modal-header h2 {
  margin: 0;
}

.topbar h1 {
  font-size: 28px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  place-items: center;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(198, 61, 61, 0.32);
  border-radius: 8px;
  background: #fff7f7;
  color: var(--danger);
  padding: 0 14px;
  font-weight: 700;
  transition: background 180ms ease, border-color 180ms ease;
}

.logout-button:hover {
  background: #ffecec;
  border-color: rgba(198, 61, 61, 0.48);
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
  color: var(--muted);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  padding: 18px;
}

.metric-card span {
  color: var(--muted);
  font-size: 14px;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.content-panel {
  padding: 18px;
}

.loading-pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.loading-pill {
  background: #e8f0fe;
  color: var(--primary);
}

.toolbar {
  align-items: flex-end;
  margin: 18px 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.field,
.entity-form label,
.file-field {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  color: #344054;
  font-size: 14px;
  font-weight: 650;
}

.field input,
.field select,
.entity-form input,
.entity-form select,
.entity-form textarea {
  min-height: 44px;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
}

.entity-form textarea {
  min-height: 96px;
  padding-top: 10px;
  resize: vertical;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

.file-dropzone {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  grid-gap: 12px;
  gap: 12px;
  min-height: 88px;
  border: 1px dashed #9fb4d0;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  padding: 14px;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.file-dropzone:hover,
.file-field input:focus-visible + .file-dropzone {
  border-color: var(--primary);
  background: #f2f7ff;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.file-dropzone.invalid {
  border-color: rgba(198, 61, 61, 0.58);
  background: #fff7f7;
}

.file-dropzone-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #e8f0fe;
  color: var(--primary);
}

.file-dropzone-copy {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
  min-width: 0;
}

.file-dropzone-copy strong,
.file-selected span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-dropzone-limit {
  border: 1px solid #cdd9e8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.file-selected {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  grid-gap: 8px;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: #344054;
  padding: 8px 10px;
}

.file-selected svg {
  color: var(--primary);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--primary-strong);
}

.ghost-button {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.ghost-button:hover,
.icon-button:hover {
  background: var(--surface-soft);
}

.error-banner {
  margin-bottom: 12px;
  border: 1px solid rgba(198, 61, 61, 0.28);
  border-radius: 8px;
  background: #fff2f2;
  color: var(--danger);
  padding: 12px 14px;
}

.form-error {
  border: 1px solid rgba(198, 61, 61, 0.28);
  border-radius: 8px;
  background: #fff7f7;
  color: var(--danger);
  padding: 10px 12px;
  font-weight: 700;
}

.entity-form small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-soft);
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

td {
  color: #344054;
}

tbody tr.app-store-row {
  background: #ecfdf3;
}

tbody tr.app-store-row td {
  border-bottom-color: #b7e4c7;
}

.action-cell,
.row-actions {
  min-width: 112px;
  text-align: right;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.table-action {
  display: inline-grid;
  width: 44px;
  place-items: center;
  background: #eef4ff;
  color: var(--primary);
}

.table-action.danger {
  background: #fff2f2;
  color: var(--danger);
}

.link-button {
  display: inline;
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.strong-link {
  font-weight: 800;
}

.badge.success {
  background: #e8f7ef;
  color: var(--success);
}

.badge.muted {
  background: #eef2f6;
  color: #526274;
}

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.pagination-bar {
  margin-top: 14px;
  color: var(--muted);
}

.pagination-bar div {
  display: flex;
  gap: 8px;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(13, 23, 40, 0.52);
  padding: 20px;
}

.modal {
  width: min(760px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.28);
}

.modal-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 16px 18px;
}

.device-detail-panel {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.device-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
  padding: 18px;
}

.detail-row {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.detail-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-row strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.audit-section {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 16px 18px 18px;
}

.audit-heading,
.audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.audit-heading h3 {
  margin: 0;
  font-size: 16px;
}

.audit-heading span,
.audit-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.audit-list {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.audit-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 10px 12px;
}

.audit-row div {
  display: grid;
  min-width: 0;
  grid-gap: 4px;
  gap: 4px;
}

.audit-row div:last-child {
  text-align: right;
}

.audit-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.empty-state.compact {
  padding: 18px;
}

.entity-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
  padding: 18px;
}

.full-span,
.form-actions {
  grid-column: 1 / -1;
}

.switch-row {
  min-height: 44px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.switch-row input {
  min-width: auto;
  width: 22px;
  height: 22px;
}

.qr-preview {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  padding: 18px;
}

.qr-preview-centered {
  justify-items: center;
  gap: 18px;
}

.qr-preview img {
  width: min(256px, 100%);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.qr-preview-centered img {
  width: min(420px, 100%);
  padding: 18px;
}

.qr-preview label {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  width: 100%;
  color: #344054;
  font-weight: 650;
}

.qr-expire {
  margin: 0;
  color: #344054;
  font-size: 18px;
  font-weight: 700;
}

.qr-preview textarea {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
}

.platform-api-form {
  display: grid;
  grid-gap: 24px;
  gap: 24px;
  padding: 26px 32px 22px;
}

.platform-api-form label {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  color: #475467;
  font-size: 18px;
  font-weight: 650;
}

.platform-api-form input {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 0 16px;
  font-size: 18px;
}

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

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

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

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

  .topbar,
  .panel-heading,
  .toolbar,
  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-grid,
  .entity-form {
    grid-template-columns: 1fr;
  }

  .toolbar-actions,
  .toolbar-actions button,
  .field,
  .field input,
  .field select {
    width: 100%;
  }

  .pagination-bar div {
    width: 100%;
  }

  .pagination-bar button {
    flex: 1 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

