:root {

  --secondary: #10b981;
  --danger: #ef4444;
  --bg: var(--app-bg, #f8fafc);
  --text-main: var(--app-text, #1e293b);
  --text-muted: var(--app-muted, #64748b);
  --card-bg: var(--app-surface, #ffffff);
  --border: var(--app-border, #e2e8f0);
  --shadow: var(--app-shadow-soft, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
  --brand: var(--app-brand, #fcb900);
  --primary: var(--brand);
  --primary-hover: var(--app-brand-hover, #e0a600); /* vàng đậm hơn khi hover */
}



* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

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

.admin-manager-heading {
  justify-content: space-between;
}

.admin-manager-heading-title,
.admin-manager-heading-session {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-manager-heading-session {
  margin-left: auto;
}

.admin-manager-heading-session strong {
  color: var(--admin-text, #0f172a);
}

.admin-manager-login {
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 8px;
  padding: 16px;
  background: var(--admin-surface-soft, #f8fafc);
}

.admin-manager-login-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-manager-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-manager-login-form label,
.admin-manager-search label {
  display: grid;
  gap: 7px;
  color: var(--admin-secondary, #475569);
  font-weight: bold;
}

.admin-manager-login-form input,
.admin-manager-search input {
  margin-bottom: 0;
}

.admin-manager-workspace {
  display: grid;
  gap: 16px;
}

.admin-manager-keyword-wrap {
  position: relative;
  display: block;
}

.admin-manager-keyword-wrap input {
  padding-right: 50px;
}

.admin-manager-paste {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  color: var(--admin-brand-text, #0f766e);
  background: var(--admin-green-soft, #e6f6f3);
}

.admin-manager-results {
  overflow: hidden;
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
}

.admin-manager-result-head,
.admin-manager-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--admin-border, #e2e8f0);
}

.admin-manager-result-head span,
.admin-manager-pager span {
  color: var(--admin-muted, #64748b);
  font-size: 13px;
}

.admin-manager-table {
  min-width: 1160px;
}

.admin-manager-table th,
.admin-manager-table td {
  padding: 12px 10px;
  vertical-align: top;
}

.admin-manager-account-row td {
  background: #f8fbfb;
}

.admin-manager-account-label {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--admin-brand-text, #0f766e);
  background: var(--admin-green-soft, #e6f6f3);
  font-size: 11px;
  font-weight: bold;
}

.admin-manager-subline {
  margin-top: 4px;
  color: var(--admin-muted, #64748b);
  font-size: 12px;
}

.admin-manager-soft-button {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--admin-brand-text, #0f766e);
  background: var(--admin-green-soft, #e6f6f3);
  white-space: nowrap;
}

.admin-manager-icon-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.admin-manager-link {
  color: #0284c7;
  text-decoration: none;
}

.admin-manager-link:hover {
  text-decoration: underline;
}

.admin-manager-empty {
  padding: 34px 14px;
  color: var(--admin-muted, #64748b);
  text-align: center;
}

.admin-manager-feedback {
  min-height: 20px;
  color: var(--admin-muted, #64748b);
  font-size: 13px;
  font-weight: bold;
}

.admin-manager-feedback.error {
  color: var(--danger, #ef4444);
}

.admin-manager-feedback.success {
  color: var(--admin-brand-text, #0f766e);
}

.admin-manager-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.admin-manager-modal[hidden] {
  display: none !important;
}

.admin-manager-modal-card {
  width: min(820px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.admin-manager-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--admin-border, #e2e8f0);
  background: #fff;
}

.admin-manager-modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-secondary, #475569);
}

.admin-manager-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--admin-border, #e2e8f0);
}

.admin-manager-detail-item {
  min-height: 72px;
  padding: 13px 15px;
  background: #fff;
}

.admin-manager-detail-label {
  color: var(--admin-muted, #64748b);
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.admin-manager-detail-value {
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-weight: bold;
}

.admin-manager-mobile-results {
  display: none;
}

.admin-manager-mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 820px) {
  .admin-manager-login-form {
    grid-template-columns: 1fr;
  }

  .admin-manager-heading {
    align-items: flex-start;
  }

  .admin-manager-heading-session {
    gap: 8px;
  }

  .admin-manager-table-wrap {
    display: none;
  }

  .admin-manager-mobile-results {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .admin-manager-mobile-card,
  .admin-manager-account-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
  }

  .admin-manager-account-card {
    background: #f8fbfb;
  }

  .admin-manager-mobile-grid,
  .admin-manager-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-manager-mobile-label {
    color: var(--admin-muted, #64748b);
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
  }

  .admin-manager-mobile-value {
    overflow-wrap: anywhere;
    font-weight: bold;
  }

  .admin-manager-pager {
    justify-content: center;
    flex-wrap: wrap;
  }
}



/* ===== CONTAINER ===== */
.container {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  transition: transform 0.2s;
}

.user-files-main > .card {
  padding: 16px;
}

.card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary { background: var(--secondary); color: white; }
.btn-danger { background: #fef2f2; color: var(--danger); border: 1px solid #fee2e2; }
.btn-danger:hover { background: var(--danger); color: white; }

/* ===== INPUTS ===== */
input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fdfdfd;
  margin-bottom: 1rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== TABLE ===== */
.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}

.user-files-table {
  min-width: 800px;
  table-layout: fixed;
}

.user-files-col-number {
  width: 60px;
}

.user-files-col-name {
  width: auto;
}

.user-files-col-size {
  width: 110px;
}

.user-files-col-date {
  width: 130px;
}

.user-files-col-actions {
  width: 180px;
}

.user-file-name-cell {
  min-width: 0;
}

.user-file-name {
  display: block;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-files-table th:nth-child(n + 3),
.user-files-table td:nth-child(n + 3) {
  white-space: nowrap;
}

th {
  text-align: left;
  padding: 1rem;
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: bold;
  font-size: 0.85rem;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-action-cell {
  text-align: right;
  white-space: nowrap;
}

.admin-action-buttons {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.link-select-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: bold;
  user-select: none;
}

.link-select-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
  box-shadow: none;
}

.link-select-toggle span {
  line-height: 1;
}

/* ===== SPECIAL COMPONENTS ===== */
.code-box {
  background: #f1f5f9;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 1.5rem;
}

.code-value {
  font-family: 'Monaco', monospace;
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: 4px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .header { padding: 1rem; }
}

/* ===== PAGE CENTER ===== */
.page-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* ===== ROLE BOX ===== */
.role-box {
  background: white;
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.role-box h1 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.role-box p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ===== ROLE GRID ===== */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== ROLE CARD ===== */
.role-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 12px;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.role-icon {
  font-size: 2.5rem;
}

.role-card span {
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* ===== MOBILE FIX ===== */
@media (max-width: 360px) {
  .role-grid {
    grid-template-columns: 1fr;
  }
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-main);
}

.icon-btn:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.icon-home:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.icon-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.icon-download-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.icon-download-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}


.icon-copy {
  background: white;
  color: var(--primary);
}
.icon-copy:hover {
  border-color: var(--primary);
}




.icon-btn:active {
  transform: scale(0.95);
}



/* ===== POPUP ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#previewPopup {
  z-index: 9998;
}

#popup,
#confirmPopup {
  z-index: 10000;
}

.popup-box {
  background: white;
  padding: 24px;
  border-radius: 16px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow);
}

.popup-box.error {
  border-top: 4px solid var(--danger);
}

.popup-box.success {
  border-top: 4px solid var(--primary);
}

#popupMessage {
  margin-bottom: 16px;
  font-weight: bold;
}

.card.full-width {
  max-width: 1200px; /* hoặc 100% */
  margin: 0 auto;
}

/* Cột tên file: không tràn cột, cho xuống dòng */
.file-name {
  max-width: 360px;          /* chỉnh theo layout, 320–400 đều ổn */
  white-space: normal;       /* CHO PHÉP xuống dòng */
  word-break: break-word;    /* cắt từ nếu quá dài */
  overflow-wrap: anywhere;   /* tên dài không phá layout */
  display: block;
}

.input-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

input.input-error:focus {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}
.center-btn {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.unsupported-preview {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 220px;

  background: #000;
  border-radius: 12px;

  color: #ffffff;
  text-align: center;
}

.unsupported-preview-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 10px;
  max-width: 80%;
}

.unsupported-preview-inner .icon {
  font-size: 40px;
  opacity: 0.9;
}

.unsupported-preview-inner .text {
  font-size: 15px;
  line-height: 1.6;
}

.unsupported-preview-inner .sub {
  font-size: 14px;
  color: #e5e7eb;
}

.preview-popup-box {
  background: #ffffff;
  width: min(960px, 96vw);
  max-height: 92vh;
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.preview-popup-title {
  font-size: 0.98rem;
  font-weight: bold;
  word-break: break-word;
  padding-right: 10px;
}

.preview-popup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-content {
  padding: 14px;
  overflow: auto;
  background: #f8fafc;
  min-height: 240px;
}

.preview-media {
  width: 100%;
  max-height: 72vh;
  border-radius: 10px;
  background: #000;
}

.preview-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.55;
  background: #111827;
  color: #f9fafb;
  border-radius: 10px;
  padding: 14px;
  min-height: 220px;
}

.preview-unsupported {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 12px;
  background: #111827;
  color: #f9fafb;
  padding: 16px;
}

.preview-unsupported a {
  color: #93c5fd;
  text-decoration: underline;
}






/* ===== HOME GRID 3 CỘT (index có Admin/User/Tiện ích) ===== */
.role-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 768px) { .role-grid-3 { grid-template-columns: 1fr; } }

/* ===== HEADER giống admin (re-use) ===== */
.page-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 1.5rem 2rem;
  max-width:1000px;
  margin:auto;
}
.page-header-title{ margin:0; }

/* ===== ACCORDION ===== */
.accordion{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.acc-item{
  border:1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow:hidden;
}
.acc-summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  padding: 14px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}
.acc-item summary::-webkit-details-marker{ display:none; }

.acc-left{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  min-width:0;
}
.acc-icon{
  width:42px;height:42px;
  border-radius: 12px;
  background:#f1f5f9;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  flex: 0 0 auto;
}
.acc-text{ min-width:0; }
.acc-title{ font-weight: bold; }
.acc-desc{
  color: var(--text-muted);
  font-size: .92rem;
  margin-top: 2px;
}
.acc-chevron{
  color: var(--text-muted);
  transition: transform .2s ease;
  font-size: 18px;
}
details[open] .acc-chevron{ transform: rotate(180deg); }

.acc-body{
  border-top: 1px solid var(--border);
  padding: 14px;
}
.acc-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.acc-note{
  margin-top: 10px;
  font-size: .9rem;
  color: var(--text-muted);
}

/* ===== Mini cards (bảo hành/CK) ===== */
.mini-card{
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background:#fff;
}
.mini-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.mini-title{ font-weight: bold; }
.mini-body{ font-size: .95rem; line-height: 1.55; }

/* ===== Pill buttons (Sunmi) ===== */
.pill-row{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.pill{
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: bold;
  transition: all .15s ease;
}
.pill:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}
.pill-soft{ background: #eef2ff; }

/* ===== Panel (Sunmi) ===== */
.panel{
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow:hidden;
}
.panel-head{
  padding: 12px 12px;
  background: #f8fafc;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.panel-title{ font-weight: bold; }
.panel-body{
  padding: 12px;
  white-space: pre-line;
  color: var(--text-main);
}
.panel-actions{ padding: 0 12px 12px 12px; }

/* ===== QR ===== */
.qr-wrap{
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 12px;
  background:#fff;
}
.qr-img{
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
  display:block;
}
.qr-fallback{
  height: 200px;
  border-radius: 12px;
  background:#f8fafc;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

/* Mobile spacing */
@media (max-width: 768px){
  .page-header{ padding: 1rem 1rem; }
  .container{ margin: 1.5rem auto; padding: 0 1rem; }
}



/* ✅ DÙNG CHUNG CHO ICON FONT AWESOME */
.icon-brand {
  color: var(--brand) !important;
}

/* icon trong ô vai trò (index) */
.role-icon i {
  font-size: 2.2rem;
  color: var(--brand);
}

/* hover viền theo màu brand (nếu anh thích) */
.role-card:hover {
  border-color: var(--brand);
}


/* logo */
.logo-wrap{
  display:flex;
  justify-content:center;
  margin-bottom: 10px;
}

.posapp-logo{
  width: 168px;       /* chỉnh to/nhỏ tuỳ anh */
  max-width: 70vw;    /* không tràn màn hình điện thoại */
  height: auto;
  object-fit: contain;
}

/* ===== ADMIN LOGIN: Floating label (chỉ áp dụng trong .auth-form) ===== */
.auth-form .form-field{
  position: relative;
  margin: 14px 0;
}

.auth-form .form-field input{
  width: 100%;
  height: 52px;

  /* chừa chỗ icon trái */
  padding: 14px 14px 14px 44px;

  /* override input global để không bị margin-bottom 1rem */
  margin-bottom: 0;

  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  outline: none;

  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-form .field-icon{
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-muted);
}

/* label nằm trong ô */
.auth-form .form-field label{
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: all .15s ease;
}

/* focus -> viền màu thương hiệu */
.auth-form .form-field:focus-within input{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(252, 185, 0, 0.22);
}
.auth-form .form-field:focus-within .field-icon{
  color: var(--brand);
}

/* khi focus hoặc đã có chữ -> label nhảy lên viền */
.auth-form .form-field input:focus + label,
.auth-form .form-field input:not(:placeholder-shown) + label{
  top: -9px;
  left: 36px;
  transform: none;

  background: #fff;
  padding: 0 8px;

  font-size: 0.82rem;
  font-weight: bold;
  color: var(--brand);
}

/* ===== Link quay lại trang chủ hover màu thương hiệu ===== */
.back-home-link{
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color .15s ease;
}
.back-home-link:hover{
  color: var(--brand);
  text-decoration: underline;
}


/* Icon trong liên kết */
.acc-icon {
  color: var(--primary); /* màu thương hiệu */
  font-size: 1.4rem;
}

/* hover theo màu thương hiệu */
details[open] .acc-icon,
.acc-summary:hover .acc-icon {
  color: var(--primary-hover);
}

/* ===== ADMIN DASHBOARD ===== */
.admin-dashboard-page {
  --admin-green: #b45309;
  --admin-green-dark: #92400e;
  --admin-green-soft: #fffbeb;
  --admin-brand-text: #92400e;
  --admin-bg: #f4f7fb;
  --admin-surface: #ffffff;
  --admin-surface-soft: #fbfdff;
  --admin-surface-muted: #f8fafc;
  --admin-text: #0f172a;
  --admin-secondary: #334155;
  --admin-muted: #475569;
  --admin-muted-light: #64748b;
  --admin-border: #dbe4ef;
  --admin-border-soft: #e8eef5;
  --admin-content-gap: 18px;
  --admin-panel-padding: 16px;
  --danger: #dc2626;
  --admin-sidebar-width: 255px;
  --admin-topbar-height: 74px;
  background: var(--admin-bg);
  min-height: 100vh;
}

.admin-dashboard-page button,
.admin-dashboard-page input,
.admin-dashboard-page select {
  font: inherit;
}

.admin-dashboard {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1200;
  width: var(--admin-sidebar-width);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--admin-border);
  transition: transform .22s ease;
}

.admin-brand {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--admin-border-soft);
}

.admin-brand-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--admin-green);
  font-size: 1.05rem;
}

.admin-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-brand-copy strong {
  color: var(--admin-text);
  font-size: 1rem;
  line-height: 1.3;
}

.admin-brand-copy span,
.admin-sidebar-footer span {
  color: var(--admin-muted);
  font-size: .75rem;
}

.admin-sidebar-close {
  display: none;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 0;
  border-radius: 8px;
  color: var(--admin-muted);
  background: transparent;
  cursor: pointer;
}

.admin-nav {
  flex: 1;
  padding: 22px 12px;
}

.admin-nav-label {
  padding: 0 12px 10px;
  color: var(--admin-muted-light);
  font-size: .75rem;
  font-weight: bold;
  letter-spacing: .09em;
}

.admin-nav-item {
  position: relative;
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  margin-bottom: 5px;
  border: 0;
  border-radius: 9px;
  color: var(--admin-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.admin-nav-item i {
  width: 18px;
  color: var(--admin-muted-light);
  text-align: center;
}

.admin-nav-item:hover {
  color: var(--admin-green);
  background: var(--admin-green-soft);
}

.admin-nav-item.active {
  color: var(--admin-green);
  background: var(--admin-green-soft);
  font-weight: bold;
}

.admin-nav-item.active::after {
  position: absolute;
  inset: 7px 0 7px auto;
  width: 3px;
  border-radius: 4px 0 0 4px;
  background: var(--admin-green);
  content: "";
}

.admin-nav-item.active i {
  color: var(--admin-green);
}

.admin-nav-group {
  margin-bottom: 5px;
}

.admin-nav-group > .admin-nav-item {
  margin-bottom: 0;
}

.admin-nav-chevron {
  width: auto !important;
  margin-left: auto;
  font-size: .75rem;
  transition: transform .18s ease;
}

.admin-nav-group.open .admin-nav-chevron {
  transform: rotate(180deg);
}

.admin-nav-submenu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .2s ease, opacity .16s ease, padding .2s ease;
}

.admin-nav-group.open .admin-nav-submenu {
  max-height: 96px;
  padding-top: 4px;
  opacity: 1;
}

.admin-nav-subitem {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 43px;
  border: 0;
  border-radius: 8px;
  color: var(--admin-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.admin-nav-subitem i {
  width: 14px;
  color: var(--admin-muted-light);
  font-size: .78rem;
  text-align: center;
}

.admin-nav-subitem:hover,
.admin-nav-subitem.active {
  color: var(--admin-green);
  background: var(--admin-green-soft);
}

.admin-nav-subitem.active {
  font-weight: bold;
}

.admin-nav-subitem.active i {
  color: var(--admin-green);
}

.admin-sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid var(--admin-border-soft);
}

.admin-sidebar-account {
  min-height: 74px;
  padding-block: 10px;
  border-top: 0;
  border-bottom: 1px solid var(--admin-border-soft);
}

.admin-sidebar-user-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.admin-sidebar-footer strong {
  color: var(--admin-secondary);
  font-size: .86rem;
  line-height: 1.35;
}

.admin-sidebar-account strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--admin-green);
  background: var(--admin-green-soft);
}

.admin-sidebar-logout {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  margin-left: auto;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  color: var(--admin-muted);
  background: #fff;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.admin-sidebar-logout:hover {
  color: var(--danger);
  border-color: #fecaca;
  background: #fef2f2;
}

.admin-sidebar-account-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.admin-sidebar-account-actions .admin-sidebar-logout,
.admin-sidebar-account-actions .admin-sidebar-close {
  margin-left: 0;
}

.admin-sidebar-backdrop {
  display: none;
}

.admin-workspace {
  min-height: 100vh;
  margin-left: var(--admin-sidebar-width);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--admin-border);
  backdrop-filter: blur(10px);
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-topbar h1 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1.06rem;
  line-height: 1.35;
}

.admin-topbar p {
  margin: 2px 0 0;
  color: var(--admin-muted);
  font-size: .76rem;
  line-height: 1.3;
}

.admin-menu-button {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  color: var(--admin-secondary);
  background: #fff;
  cursor: pointer;
}

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

.admin-topbar-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  color: var(--admin-secondary);
  background: #fff;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.admin-topbar-button:hover {
  color: var(--admin-green);
  border-color: var(--admin-green);
  background: var(--admin-green-soft);
}

.admin-logout-button:hover {
  color: var(--danger);
  border-color: #fecaca;
  background: #fef2f2;
}

.admin-main {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px 34px 48px;
}

.admin-view {
  animation: adminViewIn .18s ease;
}

.admin-view[hidden] {
  display: none !important;
}

.admin-attendance-view {
  min-height: 0;
}

.admin-integrated-attendance {
  width: 100%;
  display: block;
  min-width: 0;
}

.admin-integrated-attendance [hidden] {
  display: none !important;
}

/* Attendance modules share the Admin layout rhythm and palette here. */
#adminAttendanceIntegratedRoot {
  --bg: transparent;
  --panel: var(--admin-surface);
  --line: var(--admin-border);
  --line-soft: var(--admin-border-soft);
  --text: var(--admin-text);
  --muted: var(--admin-muted);
  --primary: var(--admin-green);
  --primary-dark: var(--admin-green-dark);
}

#adminAttendanceIntegratedRoot .main {
  width: 100%;
  margin: 0;
  gap: var(--admin-content-gap);
}

#adminAttendanceIntegratedRoot .panel {
  margin-top: 0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

#adminAttendanceIntegratedRoot .panel-body {
  padding: var(--admin-panel-padding);
  white-space: normal;
  color: var(--text);
}

#adminAttendanceIntegratedRoot .status:empty {
  display: none;
}

#adminAttendanceToastStack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2147483647 !important;
  width: min(360px, calc(100vw - 36px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

#adminAttendanceToastStack .toast-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  border-left: 4px solid var(--admin-green);
  border-radius: 8px;
  background: var(--admin-surface);
  color: var(--admin-secondary);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .18);
  font-size: 14px;
  line-height: 1.4;
  animation: admin-attendance-toast-slide-in .18s ease-out;
}

#adminAttendanceToastStack .toast-message.success {
  border-left-color: #15803d;
}

#adminAttendanceToastStack .toast-message.error {
  border-left-color: var(--danger);
}

#adminAttendanceToastStack .toast-message i {
  margin-top: 2px;
  color: var(--admin-green);
}

#adminAttendanceToastStack .toast-message.success i {
  color: #15803d;
}

#adminAttendanceToastStack .toast-message.error i {
  color: var(--danger);
}

#attendanceViewIntegratedRoot {
  --bg: transparent;
  --card: var(--admin-surface);
  --card-border: var(--admin-border);
  --text: var(--admin-text);
  --muted: var(--admin-muted);
  --primary: var(--admin-green);
  --primary-strong: var(--admin-green-dark);
  --primary-soft: var(--admin-green-soft);
  --table-head: var(--admin-surface-muted);
  --row-border: var(--admin-border-soft);
}

#attendanceViewIntegratedRoot .container {
  max-width: none;
  margin: 0;
  padding: 0;
}

#attendanceViewIntegratedRoot .card {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  backdrop-filter: none;
}

@keyframes adminViewIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--admin-green);
  font-size: .75rem;
  font-weight: bold;
  letter-spacing: .1em;
}

.admin-section-heading h2 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1.45rem;
  line-height: 1.35;
}

.admin-section-heading p,
.admin-card-heading p,
.admin-file-toolbar p {
  margin: 5px 0 0;
  color: var(--admin-muted);
  font-size: .86rem;
}

.admin-status-layout {
  display: grid;
  grid-template-columns: minmax(420px, 660px) minmax(260px, 1fr);
  align-items: start;
  gap: 22px;
}

.admin-status-card,
.admin-info-card,
.admin-panel-card {
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 13px;
  box-shadow: 0 5px 22px rgba(15, 23, 42, .06);
}

.admin-status-card {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 32px;
  text-align: center;
}

.admin-status-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 22px;
  color: var(--admin-green);
  background: var(--admin-green-soft);
  font-size: 1.8rem;
}

.admin-status-badge {
  margin-bottom: 8px;
  color: var(--admin-muted-light);
  font-size: .75rem;
  font-weight: bold;
  letter-spacing: .12em;
}

.admin-status-title {
  color: var(--admin-green);
  font-size: 1.75rem;
  font-weight: bold;
}

.admin-status-description {
  max-width: 440px;
  margin: 7px 0 24px;
  color: var(--admin-muted);
  font-size: .91rem;
}

.admin-status-action {
  min-width: 180px;
}

.admin-info-card {
  display: flex;
  gap: 14px;
  padding: 22px;
}

.admin-info-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--admin-brand-text);
  background: var(--admin-green-soft);
}

.admin-info-card h3 {
  margin: 1px 0 7px;
  color: var(--admin-secondary);
  font-size: .95rem;
}

.admin-info-card p {
  margin: 0;
  color: var(--admin-muted);
  font-size: .82rem;
  line-height: 1.65;
}

.admin-panel-card {
  margin-bottom: 22px;
  padding: 24px;
}

.admin-status-list-card {
  padding: 0;
  overflow: hidden;
}

.admin-status-item {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
}

.admin-feature-name {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--admin-secondary);
  font-weight: bold;
}

.admin-feature-index {
  min-width: 22px;
  color: var(--admin-muted);
  text-align: center;
}

.admin-feature-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--admin-green);
  background: var(--admin-green-soft);
}

.admin-feature-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-green);
  font-weight: bold;
  white-space: nowrap;
}

.admin-feature-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .15);
}

.admin-feature-status.is-closed {
  color: var(--danger);
}

.admin-feature-status.is-closed .admin-feature-status-dot {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .12);
}

.admin-status-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.admin-status-controls .admin-status-action {
  min-width: 140px;
}

.admin-card-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.admin-card-heading h3,
.admin-file-toolbar h3 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1rem;
}

.admin-card-heading-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--admin-green);
  background: var(--admin-green-soft);
}

.admin-upload-dropzone {
  border: 1.5px dashed var(--admin-border);
  border-radius: 12px;
  background: var(--admin-surface-soft);
  transition: border-color .16s ease, background .16s ease;
}

.admin-upload-dropzone:hover {
  border-color: var(--admin-green);
  background: var(--admin-green-soft);
}

.admin-upload-dropzone.is-dragging {
  border-color: var(--admin-green);
  background: var(--admin-green-soft);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .12);
}

.admin-upload-dropzone label {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  color: var(--admin-muted);
  cursor: pointer;
}

.admin-upload-dropzone-icon {
  margin-bottom: 8px;
  color: var(--admin-green);
  font-size: 1.65rem;
}

.admin-upload-dropzone strong {
  color: var(--admin-secondary);
  font-size: .93rem;
}

.admin-upload-dropzone small {
  margin-top: 3px;
  color: var(--admin-muted-light);
  font-size: .78rem;
}

.admin-selected-files {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.admin-selected-files li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-muted);
  background: var(--admin-surface-muted);
  font-size: .82rem;
}

.admin-selected-file-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-selected-file-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.admin-selected-file-progress {
  min-width: 42px;
  text-align: right;
}

.admin-selected-file-remove {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #fecaca;
  border-radius: 7px;
  color: var(--danger);
  background: #fef2f2;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.admin-selected-file-remove:hover {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger);
}

.admin-selected-file-remove:disabled {
  color: var(--admin-muted);
  background: var(--admin-surface-muted);
  opacity: 1;
  cursor: not-allowed;
}

.admin-progress {
  margin-top: 14px;
}

.admin-progress[hidden] {
  display: none !important;
}

.admin-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--admin-border-soft);
}

.admin-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--admin-green);
}

.admin-progress-text {
  margin-top: 5px;
  color: var(--admin-muted);
  font-size: .75rem;
}

.admin-upload-button {
  width: 100%;
  margin-top: 16px;
  background: var(--admin-green);
}

.admin-upload-button:hover {
  background: var(--admin-green-dark);
}

.admin-upload-button:disabled,
.admin-upload-button:disabled:hover {
  color: var(--admin-muted);
  background: var(--admin-border);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.upload-result-popup-box {
  width: min(620px, 92vw);
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.upload-result-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.upload-result-popup-title {
  color: var(--admin-text);
  font-size: 1.08rem;
  font-weight: bold;
}

.upload-result-popup-summary {
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: .85rem;
}

.uploaded-files-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 10px;
}

.uploaded-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-surface-muted);
}

.uploaded-file-name {
  min-width: 0;
  color: var(--admin-text);
  font-size: .88rem;
  font-weight: bold;
  overflow-wrap: anywhere;
}

.uploaded-file-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--admin-green);
  font-weight: bold;
  cursor: pointer;
}

.uploaded-file-copy:hover {
  background: var(--admin-green-dark);
}

.upload-result-popup-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 560px) {
  .uploaded-file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .uploaded-file-copy {
    justify-content: center;
  }
}

.admin-link-card {
  max-width: 860px;
}

.admin-link-label {
  display: block;
  margin-bottom: 7px;
  color: var(--admin-secondary);
  font-size: .86rem;
  font-weight: bold;
}

.admin-link-input-wrap {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  color: var(--admin-muted-light);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.admin-link-input-wrap:focus-within {
  border-color: var(--admin-green);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .15);
}

.admin-link-input-wrap input {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: .9rem;
}

.admin-link-input-wrap input:focus {
  border: 0;
  box-shadow: none;
}

.admin-link-paste {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--admin-green);
  border-radius: 8px;
  color: var(--admin-green);
  background: var(--admin-green-soft);
  font-weight: bold;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.admin-link-paste:hover {
  color: #fff;
  border-color: var(--admin-green);
  background: var(--admin-green);
}

.admin-link-paste:disabled {
  color: var(--admin-muted);
  background: var(--admin-surface-muted);
  opacity: 1;
  cursor: not-allowed;
}

.admin-link-note {
  margin: 9px 0 0;
  color: var(--admin-muted);
  font-size: .78rem;
}

.admin-link-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.admin-link-save {
  background: var(--admin-green);
}

.admin-link-save:hover {
  background: var(--admin-green-dark);
}

.admin-link-clear {
  color: var(--admin-muted);
  border: 1px solid var(--admin-border);
  background: #fff;
}

.admin-link-clear:hover {
  color: var(--danger);
  border-color: #fecaca;
  background: #fef2f2;
}

.admin-link-feedback {
  min-height: 22px;
  margin-top: 12px;
  color: var(--admin-muted);
  font-size: .82rem;
}

.admin-link-feedback.success {
  color: var(--admin-green);
}

.admin-link-feedback.error {
  color: var(--danger);
}

.admin-file-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-file-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-search-box {
  min-width: 240px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  color: var(--admin-muted-light);
  background: #fff;
}

.admin-search-box input {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: .85rem;
}

.admin-search-box input:focus {
  border: 0;
  box-shadow: none;
}

.admin-file-filters select {
  height: 40px;
  min-width: 165px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  color: var(--admin-muted);
  background: #fff;
  font-size: .84rem;
  outline: 0;
}

.admin-file-table {
  margin: 0 -24px -24px;
}

.admin-file-table table {
  min-width: 780px;
}

.admin-file-table th {
  padding: 13px 16px;
  border-top: 1px solid var(--admin-border-soft);
  border-bottom: 1px solid var(--admin-border-soft);
  color: var(--admin-muted);
  background: var(--admin-surface-muted);
  font-size: .75rem;
  letter-spacing: .035em;
}

.admin-file-table td {
  padding: 14px 16px;
  color: var(--admin-muted);
  font-size: .84rem;
}

.admin-file-table tbody tr:hover {
  background: var(--admin-surface-soft);
}

.admin-dashboard-page .popup-overlay {
  z-index: 2000;
}

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

  .admin-info-card {
    max-width: 660px;
  }

  .admin-file-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-file-filters {
    width: 100%;
  }

  .admin-search-box {
    flex: 1;
  }
}

@media (max-width: 900px) {
  .admin-sidebar {
    width: min(290px, 86vw);
    transform: translateX(-102%);
    box-shadow: 16px 0 40px rgba(15, 23, 42, .12);
  }

  .admin-sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-sidebar-close,
  .admin-menu-button {
    display: grid;
    place-items: center;
  }

  .admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(15, 23, 42, .58);
    transition: opacity .2s ease, visibility .2s ease;
  }

  .admin-sidebar-open .admin-sidebar-backdrop {
    visibility: visible;
    opacity: 1;
  }

  .admin-workspace {
    margin-left: 0;
  }

  .admin-topbar {
    height: 68px;
    padding: 0 14px;
  }

  .admin-topbar p {
    display: none;
  }

  .admin-topbar-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
  }

  .admin-topbar-button span {
    display: none;
  }

  .admin-main {
    padding: 22px 14px 36px;
  }

  .admin-dashboard-page {
    --admin-content-gap: 14px;
    --admin-panel-padding: 12px;
    --admin-topbar-height: 68px;
  }

  #adminAttendanceToastStack {
    right: 14px;
    width: min(360px, calc(100vw - 28px));
  }

  .admin-section-heading h2 {
    font-size: 1.25rem;
  }

  .admin-status-card {
    min-height: 340px;
    padding: 34px 20px;
  }

  .admin-status-title {
    font-size: 1.5rem;
  }

  .admin-status-item {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .admin-status-controls {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    padding-left: 33px;
  }

  .admin-panel-card {
    padding: 18px;
  }

  .admin-status-list-card {
    padding: 0;
  }

  .admin-file-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-search-box,
  .admin-file-filters select {
    width: 100%;
    min-width: 0;
  }

  .admin-file-table {
    margin: 0 -18px -18px;
  }

  .admin-link-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-link-actions .btn {
    width: 100%;
  }
}

/* ===== ACC POSAPP MIGRATION SHELL ===== */
.acc-migration-page {
  --primary: var(--admin-green);
  --primary-hover: var(--admin-green-dark);
}

.acc-migration-page .admin-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(18px, 2vw, 32px);
}

.acc-migration-page .admin-nav {
  overflow-y: auto;
}

.acc-migration-page .admin-nav-item:disabled {
  color: var(--admin-muted);
  background: var(--admin-surface-muted);
  opacity: 1;
  cursor: not-allowed;
}

.acc-migration-page .admin-nav-item:disabled:hover {
  color: var(--admin-muted);
  background: var(--admin-surface-muted);
}

.acc-migration-page .acc-employee-nav-group.open .admin-nav-submenu {
  max-height: 190px;
}

.acc-migration-page .acc-hddt-nav-group.open .admin-nav-submenu {
  max-height: 100px;
}

.acc-migration-page .acc-product-nav-group.open .admin-nav-submenu {
  max-height: 140px;
}

.acc-migration-page .acc-employee-nav-group > .admin-nav-item.active,
.acc-migration-page .acc-hddt-nav-group > .admin-nav-item.active,
.acc-migration-page .acc-product-nav-group > .admin-nav-item.active {
  color: var(--admin-green);
  background: var(--admin-green-soft);
}

.acc-posapp-login-card {
  width: min(720px, 100%);
  max-width: 720px;
}

.acc-posapp-login-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: var(--admin-bg);
}

.acc-posapp-login-modal[hidden] {
  display: none;
}

.acc-posapp-login-modal .acc-posapp-login-card {
  margin: 0;
}

.acc-posapp-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 14px;
}

.acc-field {
  display: grid;
  gap: 7px;
  color: var(--admin-secondary);
  font-size: .82rem;
  font-weight: bold;
}

.acc-field input {
  height: 44px;
  border-color: var(--admin-border);
  border-radius: 9px;
  background: #fff;
  color: var(--admin-text);
}

.acc-field textarea,
.acc-field select {
  width: 100%;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
}

.acc-field textarea {
  min-height: 118px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.5;
}

.acc-field textarea:focus,
.acc-field select:focus {
  outline: none;
  border-color: var(--admin-green);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .14);
}

.acc-field input:focus {
  outline: none;
  border-color: var(--admin-green);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .14);
}

.acc-migration-page input::placeholder,
.acc-migration-page textarea::placeholder {
  color: var(--admin-muted-light);
  opacity: 1;
}

.acc-login-submit {
  min-height: 44px;
  white-space: nowrap;
}

.acc-feedback {
  min-height: 20px;
  margin-top: 14px;
  color: var(--admin-muted);
  font-size: .82rem;
}

.acc-feedback.is-error {
  color: var(--danger);
}

.acc-feedback.is-success {
  color: #15803d;
}

.acc-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 7px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 9px;
  color: #15803d;
  background: #f0fdf4;
  font-family: inherit;
  font-size: .78rem;
  font-weight: bold;
  cursor: pointer;
}

.acc-session-pill:hover,
.acc-session-pill:focus-visible {
  border-color: #16a34a;
  background: #dcfce7;
}

.acc-session-pill:focus-visible {
  outline: 3px solid rgba(22, 163, 74, .18);
  outline-offset: 2px;
}

.acc-session-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-session-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}

.acc-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(8px);
}

.acc-auth-gate[hidden] {
  display: none;
}

.acc-auth-card {
  width: min(390px, 100%);
  padding: 24px;
  border: 1px solid var(--admin-border);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.acc-auth-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.acc-auth-heading h1 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1.08rem;
}

.acc-auth-heading p {
  margin: 3px 0 0;
  color: var(--admin-muted);
  font-size: .78rem;
}

.acc-auth-pin {
  height: 48px;
  margin-bottom: 12px;
  border-color: var(--admin-border);
  border-radius: 9px;
  background: var(--admin-surface-muted);
  color: var(--admin-text);
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: .16em;
  text-align: center;
}

.acc-auth-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.acc-auth-key {
  aspect-ratio: 1.5;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  color: var(--admin-secondary);
  background: #fff;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}

.acc-auth-key:hover {
  border-color: var(--admin-green);
  color: var(--admin-green);
  background: var(--admin-green-soft);
}

.acc-auth-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
}

.acc-shop-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .58);
}

.acc-shop-modal[hidden] {
  display: none;
}

.acc-shop-modal-card {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.acc-shop-modal-head,
.acc-shop-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.acc-shop-modal-head {
  border-bottom: 1px solid var(--admin-border);
}

.acc-shop-modal-head h2 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1rem;
}

.acc-shop-modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--admin-border);
}

.acc-shop-list {
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  overflow-y: auto;
}

.acc-shop-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 36px;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.acc-shop-option:has(input:checked) {
  border-color: var(--admin-green);
  background: var(--admin-green-soft);
}

.acc-shop-option > label {
  min-width: 0;
  cursor: pointer;
}

.acc-shop-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--admin-green);
}

.acc-shop-option strong,
.acc-shop-option span {
  display: block;
}

.acc-shop-copy {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  color: var(--admin-muted);
  background: #fff;
  cursor: pointer;
}

.acc-shop-copy:hover,
.acc-shop-copy.is-copied {
  color: var(--admin-green);
  border-color: var(--admin-green);
  background: var(--admin-green-soft);
}

.acc-shop-option span {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-shop-info-card {
  width: min(560px, 100%);
}

.acc-shop-info-card .acc-shop-modal-actions {
  justify-content: space-between;
}

.acc-shop-info-list {
  display: grid;
  gap: 1px;
  margin: 18px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-border);
}

.acc-shop-info-row {
  display: grid;
  grid-template-columns: minmax(130px, 38%) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 14px 16px;
  background: #fff;
}

.acc-shop-info-row span {
  color: var(--admin-muted);
  font-size: .78rem;
  font-weight: bold;
}

.acc-shop-info-row strong {
  overflow-wrap: anywhere;
  color: var(--admin-text);
  font-size: .9rem;
}

.acc-feature-card {
  width: 100%;
  margin-bottom: 0;
}

.acc-employee-view > .acc-feature-card + .acc-feature-card {
  margin-top: 18px;
}

.acc-feature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.acc-feature-head h2 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1rem;
}

.acc-feature-head p {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: .8rem;
}

.acc-feature-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.acc-feature-actions .btn,
.acc-quick-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
}

.acc-feature-status {
  min-height: 20px;
  color: var(--admin-muted);
  font-size: .8rem;
}

.acc-feature-status.is-success {
  color: #15803d;
}

.acc-feature-status.is-warning {
  color: #a16207;
}

.acc-feature-status.is-error,
.acc-cell-error {
  color: var(--danger);
}

.acc-selection-count {
  color: var(--admin-muted);
  font-size: .78rem;
  font-weight: bold;
  white-space: nowrap;
}

.acc-role-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.acc-role-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-role-item > i {
  color: var(--admin-green);
}

.acc-role-item span,
.acc-role-item strong,
.acc-role-item small {
  min-width: 0;
  display: block;
}

.acc-role-item strong {
  overflow: hidden;
  color: var(--admin-text);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-role-item small {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-table-wrap,
.acc-quick-table-wrap {
  width: 100%;
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: var(--admin-secondary);
  font-size: .8rem;
}

.acc-data-table th,
.acc-data-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--admin-border-soft);
  text-align: left;
  vertical-align: middle;
}

.acc-data-table th {
  color: var(--admin-muted);
  background: var(--admin-surface-muted);
  font-size: .75rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.acc-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.acc-data-table tbody tr:hover td {
  background: #f8fafc;
}

.acc-data-table strong {
  color: var(--admin-text);
}

.acc-data-table code {
  color: #1d4ed8;
  font-family: Consolas, monospace;
  font-size: .78rem;
}

.acc-check-column,
.acc-action-column {
  width: 50px;
  text-align: center !important;
}

.acc-check-column input,
.acc-table-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--admin-green);
}

.acc-mini-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.acc-mini-switch input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.acc-mini-switch-track {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
  transition: background .2s ease;
}

.acc-mini-switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .2);
  content: "";
  transition: transform .2s ease;
}

.acc-mini-switch input:checked + .acc-mini-switch-track {
  background: #31bf57;
}

.acc-mini-switch input:checked + .acc-mini-switch-track::after {
  transform: translateX(20px);
}

.acc-mini-switch:focus-within .acc-mini-switch-track {
  outline: 3px solid rgba(49, 191, 87, .18);
  outline-offset: 2px;
}

.acc-pin-button {
  width: 64px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-muted);
  background: #fff;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.acc-pin-button.is-active {
  color: #fff;
  border-color: #15803d;
  background: #15803d;
  box-shadow: 0 5px 14px rgba(22, 163, 74, .2);
}

.acc-pin-button:disabled {
  color: var(--admin-muted);
  border-color: var(--admin-border);
  background: #f1f5f9;
  opacity: 1;
  cursor: not-allowed;
}

.acc-table-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  color: #166534;
  background: #dcfce7;
  font-size: .75rem;
  font-weight: bold;
}

.acc-icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-muted);
  background: #fff;
  cursor: pointer;
}

.acc-icon-button.is-danger:hover {
  color: var(--danger);
  border-color: #fecaca;
  background: #fef2f2;
}

.acc-empty-state {
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--admin-muted);
  font-size: .82rem;
  text-align: center;
}

.acc-group-create-card {
  width: min(560px, 100%);
}

.acc-guide-card {
  width: min(680px, 100%);
}

.acc-guide-content {
  padding: 18px 22px;
  overflow-y: auto;
  color: var(--admin-secondary);
  font-size: .84rem;
  line-height: 1.55;
}

.acc-guide-content ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.acc-guide-content strong {
  color: var(--admin-text);
}

.acc-guide-content code {
  padding: 2px 5px;
  border-radius: 5px;
  color: #1d4ed8;
  background: #eff6ff;
  font-family: Consolas, monospace;
}

.acc-confirm-card {
  width: min(480px, 100%);
}

#accConfirmModal {
  z-index: 2800;
}

.acc-confirm-content {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 22px;
}

.acc-confirm-content p {
  margin: 0;
  color: var(--admin-secondary);
  font-size: .88rem;
  line-height: 1.55;
}

.acc-confirm-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #b91c1c;
  background: #fef2f2;
  font-size: 1.05rem;
}

.acc-confirm-icon.is-primary {
  color: #a16207;
  background: #fffbeb;
}

.acc-group-create-body {
  padding: 18px;
}

.acc-group-create-body .acc-feature-status {
  margin-top: 10px;
}

.acc-quick-grid {
  display: grid;
  gap: 18px;
}

.acc-quick-source-field {
  margin-top: 2px;
}

.acc-quick-editor {
  margin-top: 16px;
}

.acc-quick-editor[hidden] {
  display: none;
}

.acc-quick-row-list {
  display: grid;
  gap: 9px;
  padding: 1px;
  overflow: visible;
}

.acc-quick-editor-head {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) 48px minmax(210px, 240px) 48px 64px minmax(140px, 1fr) minmax(160px, 1.1fr);
  align-items: end;
  gap: 12px;
  min-width: 930px;
  padding: 0 12px 7px;
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
  line-height: 1.25;
  text-transform: uppercase;
}

.acc-quick-editor-head span:nth-child(2),
.acc-quick-editor-head span:nth-child(4),
.acc-quick-editor-head span:nth-child(5) {
  text-align: center;
}

.acc-quick-compact-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) 48px minmax(210px, 240px) 48px 64px minmax(140px, 1fr) minmax(160px, 1.1fr);
  align-items: center;
  gap: 12px;
  min-width: 930px;
  padding: 10px 12px;
  border: 1px solid #e8e1d5;
  border-radius: 8px;
  background: #fffcf7;
}

.acc-quick-compact-row:focus-within {
  border-color: #a7d7c9;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .08);
}

.acc-quick-compact-row .acc-quick-name-cell {
  min-width: 0;
}

.acc-quick-compact-row .acc-quick-name-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  outline: 0;
  color: var(--admin-text);
  background: transparent;
  font: inherit;
  font-weight: bold;
  text-overflow: ellipsis;
  font-size: 16px; 
}

.acc-quick-compact-row .acc-quick-name-input:focus {
  color: #0f766e;
}

.acc-quick-switch {
  justify-self: center;
}

.acc-quick-device-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-quick-device-option {
  height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #665f55;
  background: transparent;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.acc-quick-device-option.is-cashier:hover:not(:disabled) {
  color: #065f46;
  background: #ecfdf5;
}

.acc-quick-device-option.is-order:hover:not(:disabled) {
  color: #713f12;
  background: #fef9c3;
}

.acc-quick-device-option.is-cashier.is-active {
  color: #fff;
  border-color: #087f5b;
  background: #087f5b;
  box-shadow: 0 4px 10px rgba(8, 127, 91, .2);
}

.acc-quick-device-option.is-order.is-active {
  color: #422006;
  border-color: #eab308;
  background: #facc15;
  box-shadow: 0 4px 10px rgba(234, 179, 8, .2);
}

.acc-quick-device-option:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .2);
  outline-offset: 2px;
}

.acc-quick-device-option:disabled {
  color: var(--admin-muted);
  border-color: var(--admin-border-soft);
  background: #f1f5f9;
  opacity: 1;
  cursor: not-allowed;
}

.acc-quick-select {
  min-width: 0;
  height: 40px;
}

.acc-quick-table-wrap {
  max-height: 440px;
  margin-top: 0;
}

.acc-quick-table {
  min-width: 1120px;
}

.acc-quick-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.acc-table-input,
.acc-table-select {
  width: 100%;
  min-width: 118px;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  color: var(--admin-text);
  background: #fff;
  font: inherit;
}

.acc-table-input:focus,
.acc-table-select:focus {
  outline: none;
  border-color: var(--admin-green);
}

.acc-quick-name-cell {
  min-width: 170px;
  display: grid;
  gap: 4px;
}

.acc-quick-name-input {
  min-width: 170px;
  color: var(--admin-text);
  font-weight: bold;
}

.acc-quick-name-cell small {
  display: block;
  overflow: hidden;
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-table-select:disabled {
  color: var(--admin-muted);
  border-color: var(--admin-border);
  background: #f1f5f9;
  opacity: 1;
}

.acc-table-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.acc-quick-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.acc-quick-errors {
  max-height: 180px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  background: #fef2f2;
  font-size: .76rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.acc-cell-error {
  display: block;
  margin-top: 4px;
  font-size: .75rem;
  line-height: 1.35;
}

.acc-compact-field {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-muted);
  background: #fff;
  font-size: .75rem;
  font-weight: bold;
  white-space: nowrap;
}

.acc-compact-field select {
  align-self: stretch;
  min-width: 104px;
  padding: 0 28px 0 9px;
  border: 0;
  border-left: 1px solid var(--admin-border);
  border-radius: 0 8px 8px 0;
  color: var(--admin-text);
  background: #fff;
  font: inherit;
}

.acc-product-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-muted);
}

.acc-product-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}

.acc-product-stats:empty {
  display: none;
}

.acc-product-stat {
  min-width: 120px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 1px 8px;
  padding: 9px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
}

.acc-product-stat i {
  grid-row: 1 / 3;
  color: var(--admin-green);
  text-align: center;
}

.acc-product-stat span {
  overflow: hidden;
  color: var(--admin-muted);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-product-stat strong {
  color: var(--admin-text);
  font-size: .8rem;
}

.acc-product-filters,
.acc-product-bulk-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.acc-product-filters {
  min-width: 0;
  flex: 1 1 auto;
}

.acc-product-filters .acc-compact-field,
.acc-product-bulk-actions .acc-compact-field {
  min-height: 57px;
  display: grid;
  grid-template-rows: 14px 38px;
  align-content: end;
  padding-left: 0;
  gap: 5px;
  margin: 0;
  border: 0;
  background: transparent;
}

.acc-product-filters .acc-compact-field > span,
.acc-product-bulk-actions .acc-compact-field > span {
  height: 14px;
  display: flex;
  align-items: center;
  padding-left: 1px;
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
  line-height: 1;
}

.acc-product-filters input[type="search"],
.acc-product-filters select,
.acc-product-bulk-actions select {
  min-width: 150px;
  min-height: 38px;
  padding: 7px 32px 7px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background-color: #fff;
  font-size: .78rem;
  margin: 0;
}

.acc-product-filters input[type="search"] {
  width: min(240px, 100%);
  padding-right: 10px;
}

.acc-product-category {
  position: relative;
  height: 38px;
  min-width: 170px;
  white-space: normal;
}

.acc-product-category-trigger {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  color: var(--admin-text);
  background: #fff;
  cursor: pointer;
  font-size: .78rem;
}

.acc-product-category-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-product-category-menu,
.acc-product-column-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 5px);
  right: 0;
  max-height: 260px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
}

.acc-product-category-menu {
  right: auto;
  left: 0;
  width: min(280px, calc(100vw - 32px));
  min-width: 240px;
}

.acc-product-column-menu {
  width: 160px;
  min-width: 160px;
}

.acc-product-category-menu[hidden],
.acc-product-column-menu[hidden] {
  display: none;
}

.acc-product-category-menu label,
.acc-product-column-menu label {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 5px;
  color: var(--admin-secondary);
  cursor: pointer;
  font-size: .75rem;
  text-transform: none;
  white-space: normal;
}

.acc-product-category-menu label span,
.acc-product-column-menu label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-product-category-menu label:hover,
.acc-product-column-menu label:hover {
  background: var(--admin-surface-muted);
}

.acc-product-category-menu input,
.acc-product-column-menu input {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--admin-green);
}

.acc-product-bulk-actions {
  padding-left: 12px;
  border-left: 1px solid var(--admin-border);
}

.acc-product-bulk-actions .btn {
  align-self: end;
  min-width: 72px;
  height: 38px;
}

.acc-product-on {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.acc-product-on:hover {
  color: #fff;
  border-color: #15803d;
  background: #15803d;
}

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

.acc-product-table {
  min-width: 1120px;
}

.acc-product-id {
  display: block;
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
}

.acc-product-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  color: var(--admin-muted);
  background: #fff;
  font-size: .75rem;
  font-weight: bold;
  white-space: nowrap;
}

.acc-product-state.is-on {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.acc-product-state.is-off {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.acc-chain-shop-picker {
  position: relative;
  z-index: 20;
  margin-top: 12px;
  overflow: visible;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-chain-shop-head {
  position: relative;
  z-index: 22;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-surface-muted);
  font-size: .75rem;
}

.acc-chain-shop-head label,
.acc-chain-shop {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.acc-chain-shop-head > label,
.acc-chain-shop-controls {
  min-height: 32px;
}

.acc-chain-shop-head > label {
  flex: 0 0 auto;
  margin: 0;
  line-height: 1;
}

.acc-chain-shop-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  line-height: 1;
}

.acc-product-head-button {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  color: var(--admin-secondary);
  background: #fff;
  cursor: pointer;
  font-size: .75rem;
  font-weight: bold;
}

.acc-product-column-settings {
  position: relative;
}

.acc-chain-shop-head input,
.acc-chain-shop input,
.acc-product-table input[type="checkbox"],
.acc-chain-table input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--admin-green);
}

.acc-chain-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1px;
  background: var(--admin-border-soft);
}

.acc-chain-shop-grid.is-collapsed {
  display: none;
}

.acc-chain-shop {
  min-width: 0;
  min-height: 56px;
  padding: 9px 12px;
  background: #fff;
}

.acc-chain-shop.is-selected {
  background: var(--admin-green-soft);
}

.acc-chain-shop span,
.acc-chain-shop strong,
.acc-chain-shop small {
  min-width: 0;
  display: block;
}

.acc-chain-shop strong {
  overflow: hidden;
  color: var(--admin-text);
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-chain-shop small {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-chain-table {
  min-width: max(1180px, 100%);
}

.acc-chain-state-cell {
  min-width: 130px;
}

.acc-chain-state-cell .acc-product-state {
  margin: 2px 3px 2px 0;
}

.acc-chain-table thead {
  position: sticky;
  top: 0;
  z-index: 4;
}

.acc-chain-table thead tr:nth-child(2) th {
  top: 39px;
}

.acc-chain-table thead tr:first-child > th:nth-child(1),
.acc-chain-table td:nth-child(1),
.acc-chain-table thead tr:first-child > th:nth-child(2),
.acc-chain-table td:nth-child(2),
.acc-chain-table thead tr:first-child > th:nth-child(3),
.acc-chain-table td:nth-child(3) {
  position: sticky;
  z-index: 3;
  background: #fff;
}

.acc-chain-table thead tr:first-child > th:nth-child(1),
.acc-chain-table td:nth-child(1) { left: 0; min-width: 50px; width: 50px; }
.acc-chain-table thead tr:first-child > th:nth-child(2),
.acc-chain-table td:nth-child(2) { left: 50px; min-width: 50px; width: 50px; }
.acc-chain-table thead tr:first-child > th:nth-child(3),
.acc-chain-table td:nth-child(3) { left: 100px; min-width: 180px; width: 180px; box-shadow: 2px 0 0 rgba(20, 108, 87, .14); }
.acc-chain-table thead tr:first-child > th:nth-child(-n+3) { z-index: 6; background: var(--admin-surface-muted); }

.acc-chain-table .acc-chain-optional-sticky {
  position: sticky;
  z-index: 3;
  background: #fff;
}

.acc-chain-table thead .acc-chain-optional-sticky {
  z-index: 6;
  background: var(--admin-surface-muted);
}

.acc-chain-table .acc-chain-optional-sticky:last-of-type {
  box-shadow: 2px 0 0 rgba(20, 108, 87, .14);
}

.acc-chain-shop-heading {
  color: var(--admin-text) !important;
  text-align: center !important;
  border-left: 2px solid var(--admin-border) !important;
}

.acc-product-progress-card {
  width: min(680px, 100%);
}

.acc-product-progress-card .acc-shop-modal-head > div {
  min-width: 0;
}

.acc-product-progress-card .acc-shop-modal-head p {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-product-progress-list {
  display: grid;
  gap: 7px;
  padding: 14px 18px;
  overflow-y: auto;
}

.acc-product-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
}

.acc-product-progress-row strong,
.acc-product-progress-row small {
  display: block;
}

.acc-product-progress-row strong {
  color: var(--admin-text);
  font-size: .78rem;
}

.acc-product-progress-row small {
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-product-progress-row > span {
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
  white-space: nowrap;
}

.acc-product-progress-row.is-success > span { color: #15803d; }
.acc-product-progress-row.is-error > span { color: #b91c1c; }
.acc-product-progress-row.is-running > span { color: #0369a1; }

.acc-hddt-shop-picker,
.acc-einvoice-picker {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-hddt-picker-head,
.acc-einvoice-picker-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-surface-muted);
  color: var(--admin-secondary);
  font-size: .76rem;
}

.acc-hddt-picker-head label,
.acc-einvoice-picker-head label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  cursor: pointer;
}

.acc-hddt-picker-head input,
.acc-hddt-shop-item input,
.acc-einvoice-picker-head input,
.acc-einvoice-shop input,
.acc-einvoice-detail-actions input,
.acc-einvoice-order-select input,
.acc-einvoice-customer-kind input,
.acc-einvoice-send-email input {
  width: 16px;
  height: 16px;
  accent-color: var(--admin-green);
}

.acc-hddt-shop-list,
.acc-einvoice-shop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  padding: 11px;
}

.acc-hddt-shop-item,
.acc-einvoice-shop {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.acc-hddt-shop-item.is-active,
.acc-einvoice-shop.is-active {
  border-color: #86efac;
  background: #f0fdf4;
}

.acc-hddt-shop-item strong,
.acc-hddt-shop-item small,
.acc-einvoice-shop strong,
.acc-einvoice-shop small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-hddt-shop-item strong,
.acc-einvoice-shop strong {
  color: var(--admin-text);
  font-size: .79rem;
}

.acc-hddt-shop-item small,
.acc-einvoice-shop small {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-hddt-provider-filters {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-muted);
}

.acc-hddt-provider-filters[hidden] {
  display: none;
}

.acc-hddt-filter {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--admin-secondary);
  background: transparent;
  font: inherit;
  font-size: .75rem;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
}

.acc-hddt-filter strong {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 6px;
  color: var(--admin-muted);
  background: #fff;
  font-size: .75rem;
}

.acc-hddt-filter.is-active {
  border-color: var(--admin-green);
  color: var(--admin-green);
  background: #fff;
}

.acc-hddt-filter.is-active strong {
  color: #fff;
  background: var(--admin-green);
}

.acc-hddt-results,
.acc-einvoice-results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.acc-hddt-results > .acc-empty-state,
.acc-einvoice-results > .acc-empty-state,
.acc-einvoice-content > .acc-empty-state {
  border: 1px dashed var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-muted);
}

.acc-hddt-result {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 1.2fr) minmax(130px, .6fr);
  align-items: center;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-hddt-result.is-running {
  border-color: #93c5fd;
}

.acc-hddt-result.is-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.acc-hddt-result-shop strong,
.acc-hddt-result-shop small {
  display: block;
}

.acc-hddt-result-shop strong {
  color: var(--admin-text);
  font-size: .8rem;
}

.acc-hddt-result-shop small,
.acc-hddt-result-status {
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-hddt-provider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-muted);
  font-size: .76rem;
  font-weight: bold;
}

.acc-hddt-provider.is-connected {
  color: #15803d;
}

.acc-einvoice-content {
  margin-top: 14px;
}

.acc-einvoice-result {
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-einvoice-result.is-error {
  border-color: #fecaca;
}

.acc-einvoice-result > header,
.acc-einvoice-result > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--admin-surface-muted);
}

.acc-einvoice-result > header {
  border-bottom: 1px solid var(--admin-border-soft);
}

.acc-einvoice-result > footer {
  border-top: 1px solid var(--admin-border-soft);
}

.acc-einvoice-result header strong,
.acc-einvoice-result header small {
  display: block;
}

.acc-einvoice-result header strong {
  color: var(--admin-text);
  font-size: .81rem;
}

.acc-einvoice-result header small,
.acc-einvoice-result header > span,
.acc-einvoice-result footer small {
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-einvoice-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--admin-border-soft);
}

.acc-einvoice-count {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 11px;
  color: var(--admin-secondary);
  background: #fff;
  font-size: .75rem;
  font-weight: bold;
}

.acc-einvoice-count b {
  min-width: 27px;
  padding: 2px 6px;
  border-radius: 6px;
  color: #166534;
  background: #dcfce7;
  text-align: center;
}

.acc-einvoice-count.is-not_issued b {
  color: #a16207;
  background: #fef3c7;
}

.acc-einvoice-count.is-issue_error b {
  color: #b91c1c;
  background: #fee2e2;
}

.acc-einvoice-detail-card {
  width: min(1180px, 100%);
  height: min(860px, calc(100vh - 40px));
}

.acc-einvoice-detail-card .acc-shop-modal-head > div {
  min-width: 0;
}

.acc-einvoice-detail-card .acc-shop-modal-head p,
.acc-einvoice-custom-card .acc-shop-modal-head p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--admin-muted);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-einvoice-detail-body {
  min-height: 0;
  padding: 14px 16px;
  overflow: auto;
}

.acc-einvoice-detail-filters,
.acc-einvoice-detail-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.acc-einvoice-detail-filter {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  color: var(--admin-secondary);
  background: #fff;
  font: inherit;
  font-size: .75rem;
  font-weight: bold;
  cursor: pointer;
}

.acc-einvoice-detail-filter strong {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--admin-surface-muted);
  text-align: center;
}

.acc-einvoice-detail-filter.is-active {
  color: var(--admin-green);
  border-color: var(--admin-green);
  background: var(--admin-green-soft);
}

.acc-einvoice-detail-filter.is-error {
  color: #b91c1c;
}

.acc-einvoice-detail-actions {
  margin: 10px 0;
  padding: 9px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-muted);
}

.acc-einvoice-detail-actions > label,
.acc-einvoice-customer-kind label,
.acc-einvoice-send-email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--admin-secondary);
  font-size: .75rem;
  font-weight: bold;
  cursor: pointer;
}

.acc-einvoice-detail-actions .btn {
  min-height: 34px;
}

.acc-einvoice-order-list {
  display: grid;
  gap: 7px;
}

.acc-einvoice-order {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(230px, 1fr) minmax(130px, .55fr) minmax(150px, .7fr);
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-einvoice-order.is-cancelled {
  opacity: 1;
  background: var(--admin-surface-muted);
}

.acc-einvoice-order-main strong,
.acc-einvoice-order-main small,
.acc-einvoice-order-main span,
.acc-einvoice-order-status small {
  display: block;
}

.acc-einvoice-order-main strong {
  color: var(--admin-text);
  font-size: .78rem;
}

.acc-einvoice-order-main small,
.acc-einvoice-order-main span,
.acc-einvoice-order-status small {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-einvoice-order-status small.is-success {
  color: #15803d;
}

.acc-einvoice-order-status small.is-error {
  color: #b91c1c;
}

.acc-einvoice-status-badge {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 6px;
  color: #475569;
  background: #e2e8f0;
  font-size: .75rem;
  font-weight: bold;
}

.acc-einvoice-status-badge.is-official_issued,
.acc-einvoice-status-badge.is-draft_issued {
  color: #166534;
  background: #dcfce7;
}

.acc-einvoice-status-badge.is-not_issued,
.acc-einvoice-status-badge.is-issue_later {
  color: #a16207;
  background: #fef3c7;
}

.acc-einvoice-status-badge.is-issue_error {
  color: #b91c1c;
  background: #fee2e2;
}

.acc-einvoice-order-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.acc-einvoice-order-actions details {
  position: relative;
}

.acc-einvoice-order-actions summary {
  padding: 6px 8px;
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
  cursor: pointer;
}

.acc-einvoice-order-actions pre {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 3;
  width: min(520px, 75vw);
  max-height: 320px;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: #dbeafe;
  background: #172033;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .2);
  font-size: .75rem;
  white-space: pre-wrap;
}

.acc-einvoice-custom-card {
  width: min(720px, 100%);
}

.acc-einvoice-custom-form {
  padding: 16px 18px;
  overflow-y: auto;
}

.acc-einvoice-customer-kind {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
}

.acc-einvoice-custom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.acc-einvoice-custom-grid .is-wide {
  grid-column: 1 / -1;
}

.acc-einvoice-send-email {
  margin-top: 14px;
}

.acc-einvoice-custom-form .acc-feature-status {
  margin-top: 10px;
}

.acc-expiry-actions {
  align-items: center;
}

.acc-expiry-filter {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-secondary);
  background: var(--admin-surface-muted);
  font-size: .76rem;
  font-weight: bold;
  cursor: pointer;
}

.acc-expiry-filter .acc-mini-switch {
  transform: scale(.82);
  transform-origin: right center;
}

.acc-expiry-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.acc-expiry-list > .acc-empty-state {
  border: 1px dashed var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-muted);
}

.acc-expiry-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(130px, .65fr) minmax(140px, .65fr) 36px;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 11px 13px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-expiry-row.is-urgent {
  border-color: #fdba74;
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.acc-expiry-row.is-expired {
  border-color: #fecaca;
  background: #fff7f7;
  box-shadow: inset 3px 0 0 #ef4444;
}

.acc-expiry-shop,
.acc-expiry-value {
  min-width: 0;
}

.acc-expiry-shop strong,
.acc-expiry-shop small,
.acc-expiry-value strong {
  display: block;
}

.acc-expiry-shop strong {
  overflow: hidden;
  color: var(--admin-text);
  font-size: .83rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-expiry-shop small {
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-expiry-value strong {
  color: var(--admin-secondary);
  font-size: .8rem;
}

.acc-expiry-days strong {
  color: #15803d;
}

.acc-expiry-row.is-urgent .acc-expiry-days strong {
  color: #b45309;
}

.acc-expiry-row.is-expired .acc-expiry-days strong {
  color: #b91c1c;
}

.acc-grab-shop-picker {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-grab-picker-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-surface-muted);
}

.acc-grab-picker-head > strong {
  color: var(--admin-secondary);
  font-size: .76rem;
  white-space: nowrap;
}

.acc-grab-check-all,
.acc-grab-shop-item {
  cursor: pointer;
}

.acc-grab-check-all {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--admin-text);
  font-size: .8rem;
  font-weight: bold;
}

.acc-grab-check-all input,
.acc-grab-shop-item input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  accent-color: var(--admin-green);
}

.acc-grab-shop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  padding: 12px;
}

.acc-grab-shop-item {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-grab-shop-item.is-active {
  border-color: #86efac;
  background: #f0fdf4;
}

.acc-grab-shop-item strong,
.acc-grab-shop-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-grab-shop-item strong {
  color: var(--admin-text);
  font-size: .8rem;
}

.acc-grab-shop-item small {
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-grab-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 8px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-muted);
}

.acc-grab-filters[hidden] {
  display: none;
}

.acc-grab-filter-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
  white-space: nowrap;
}

.acc-grab-filter-tabs {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
}

.acc-grab-filter {
  min-width: 92px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 10px;
  border: 0;
  border-right: 1px solid var(--admin-border);
  border-radius: 0;
  color: var(--admin-secondary);
  background: #fff;
  font: inherit;
  font-size: .78rem;
  font-weight: bold;
  cursor: pointer;
}

.acc-grab-filter:last-child {
  border-right: 0;
}

.acc-grab-filter strong {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--admin-muted);
  background: var(--admin-surface-muted);
  font-size: .75rem;
  line-height: 1.55;
}

.acc-grab-filter:hover,
.acc-grab-filter.is-active {
  color: var(--admin-green);
  background: var(--admin-green-soft);
}

.acc-grab-filter.is-active strong {
  color: #fff;
  background: var(--admin-green);
}

.acc-grab-filter:disabled,
.acc-grab-policy-button:disabled {
  color: var(--admin-muted);
  background: #f1f5f9;
  cursor: not-allowed;
  opacity: 1;
}

.acc-grab-policy-button {
  min-height: 34px;
  margin-left: auto;
  white-space: nowrap;
}

.acc-grab-results {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.acc-grab-results > .acc-empty-state {
  border: 1px dashed var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-muted);
}

.acc-grab-result {
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.acc-grab-result.is-running {
  border-color: #93c5fd;
}

.acc-grab-result.is-error {
  border-color: #fecaca;
}

.acc-grab-result-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--admin-border-soft);
  background: var(--admin-surface-muted);
}

.acc-grab-result-head strong,
.acc-grab-result-head small {
  display: block;
}

.acc-grab-shop-identity {
  min-width: 0;
}

.acc-grab-result-head strong {
  color: var(--admin-text);
  font-size: .85rem;
}

.acc-grab-result-head small {
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: .75rem;
}

.acc-grab-result-head .acc-grab-partner-id {
  color: #166534;
  overflow-wrap: anywhere;
}

.acc-grab-result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.acc-grab-result-actions .btn {
  min-height: 34px;
}

.acc-grab-row-status {
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
  white-space: nowrap;
}

.acc-grab-integration-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.acc-grab-integration {
  min-width: 0;
  padding: 13px;
}

.acc-grab-integration + .acc-grab-integration {
  border-left: 1px solid var(--admin-border-soft);
}

.acc-grab-integration-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.acc-grab-integration-line strong {
  min-width: 0;
  overflow: hidden;
  color: var(--admin-text);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-grab-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 6px;
  color: #64748b;
  background: #e2e8f0;
  font-size: .75rem;
  font-weight: bold;
}

.acc-grab-badge.is-connected {
  color: #166534;
  background: #dcfce7;
}

.acc-grab-policy-state {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  color: var(--admin-muted);
  font-size: .75rem;
  line-height: 1.4;
}

.acc-grab-policy-state.is-on {
  color: #15803d;
}

.acc-grab-policy-state.is-off {
  color: #b91c1c;
}

.acc-grab-policy-state.is-unknown {
  color: #a16207;
}

.acc-grab-message,
.acc-grab-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-top: 1px solid var(--admin-border-soft);
  font-size: .76rem;
}

.acc-grab-message {
  color: #166534;
  background: #f0fdf4;
}

.acc-grab-error {
  color: #991b1b;
  background: #fef2f2;
}

.acc-price-policy-card {
  overflow: hidden;
}

.acc-price-policy-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-top: 1px solid var(--admin-border-soft);
  border-bottom: 1px solid var(--admin-border-soft);
  background: #f8fafc;
}

.acc-price-policy-search {
  box-sizing: border-box;
  width: min(560px, 100%);
  min-height: 42px;
  flex: 1 1 420px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
  color: var(--admin-muted);
}

.acc-price-policy-search:focus-within {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

.acc-price-policy-search input {
  height: 40px;
  min-width: 0;
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--admin-text);
  font: inherit;
  font-size: .8rem;
  line-height: 1;
  vertical-align: middle;
}

.acc-price-policy-segments {
  box-sizing: border-box;
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  padding: 3px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
  flex-shrink: 0;
}

.acc-price-policy-segments button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--admin-secondary);
  font: inherit;
  font-size: .75rem;
  font-weight: bold;
  white-space: nowrap;
}

.acc-price-policy-segments button.is-active {
  color: #166534;
  background: #dcfce7;
}

.acc-price-policy-table {
  min-width: 860px;
}

.acc-price-policy-name {
  color: var(--admin-text);
  font-weight: bold;
}

.acc-price-policy-type,
.acc-price-policy-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: bold;
  white-space: nowrap;
}

.acc-price-policy-type.is-type-3 {
  color: #166534;
  background: #dcfce7;
}

.acc-price-policy-type.is-type-4 {
  color: #1d4ed8;
  background: #dbeafe;
}

.acc-price-policy-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.acc-price-policy-status.is-active {
  color: #15803d;
  background: #f0fdf4;
}

.acc-price-policy-status.is-inactive {
  color: #64748b;
  background: #f1f5f9;
}

.acc-price-policy-view-button {
  color: #2563eb;
  background: #eff6ff;
}

.acc-price-policy-view-button:hover {
  background: #dbeafe;
}

.price-policy-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(6px);
}

.price-policy-edit-modal[hidden] {
  display: none !important;
}

.price-policy-edit-card {
  width: min(1440px, 100%);
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .3);
}

.price-policy-edit-head,
.price-policy-edit-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--admin-border);
  background: #fff;
}

.price-policy-edit-head h3 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1rem;
}

.price-policy-edit-head p {
  margin: 3px 0 0;
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
}

.price-policy-edit-title-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.price-policy-type-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 8px;
  color: #166534;
  background: #dcfce7;
}

.price-policy-edit-foot {
  justify-content: space-between;
  border-top: 1px solid var(--admin-border);
  border-bottom: 0;
  background: var(--admin-surface-muted);
}

.price-policy-edit-foot > div {
  display: flex;
  gap: 9px;
}

.price-policy-save-status {
  color: #b45309;
  font-size: .75rem;
  font-weight: bold;
}

.price-policy-edit-body {
  overflow: auto;
  padding: 0;
}

.price-policy-section {
  padding: 18px;
  border-bottom: 1px solid var(--admin-border-soft);
}

.price-policy-section:last-child {
  border-bottom: 0;
}

.price-policy-section-head {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.price-policy-section-head h4 {
  margin: 0;
  color: var(--admin-text);
  font-size: .86rem;
}

.price-policy-section-head p {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: .75rem;
  line-height: 1.45;
}

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

.price-policy-form-label,
.price-policy-admin-field span {
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.price-policy-radio-row,
.price-policy-channel-row,
.price-policy-switch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.price-policy-radio-row {
  margin-top: 8px;
}

.price-policy-channel-row {
  padding: 13px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-muted);
}

.price-policy-check,
.price-policy-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--admin-secondary);
  font-size: .78rem;
  font-weight: bold;
}

.price-policy-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--admin-green);
}

.price-policy-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.price-policy-switch-mark {
  position: relative;
  width: 36px;
  height: 18px;
  border-radius: 999px;
  background: #cbd5e1;
}

.price-policy-switch-mark::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .22);
}

.price-policy-switch input:checked + .price-policy-switch-mark {
  background: var(--admin-green);
}

.price-policy-switch input:checked + .price-policy-switch-mark::after {
  transform: translateX(18px);
}

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

.price-policy-admin-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.price-policy-admin-field.is-wide,
.price-policy-scope-field {
  grid-column: 1 / -1;
}

.price-policy-admin-field.is-double {
  grid-column: span 2;
}

.price-policy-scope-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.price-policy-scope-row .price-policy-check {
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: var(--admin-surface-muted);
  line-height: 1.35;
}

.price-policy-admin-field input,
.price-policy-admin-field textarea,
.price-policy-admin-field select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: .8rem;
}

.price-policy-admin-field input:focus,
.price-policy-admin-field textarea:focus,
.price-policy-admin-field select:focus,
.price-policy-product-input:focus,
.price-policy-product-select:focus {
  border-color: #16a34a;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .1);
}

.price-policy-admin-field select[multiple] {
  min-height: 104px;
  padding: 4px;
}

.price-policy-admin-field select[multiple] option {
  padding: 6px 7px;
  border-radius: 4px;
}

.price-policy-admin-field small {
  color: var(--admin-muted);
  font-size: .75rem;
}

.price-policy-admin-field textarea {
  min-height: 38px;
  resize: vertical;
}

.price-policy-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.price-policy-checkbox-dropdown {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.price-policy-dropdown-label {
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.price-policy-dropdown-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: .8rem;
  text-align: left;
}

.price-policy-dropdown-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-policy-dropdown-trigger .is-placeholder {
  color: var(--admin-muted);
}

.price-policy-dropdown-trigger i {
  color: var(--admin-muted);
  font-size: .7rem;
  transition: transform .15s ease;
}

.price-policy-checkbox-dropdown.is-open .price-policy-dropdown-trigger {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .1);
}

.price-policy-checkbox-dropdown.is-open .price-policy-dropdown-trigger i {
  transform: rotate(180deg);
}

.price-policy-dropdown-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.price-policy-dropdown-all {
  width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  border: 0;
  border-bottom: 1px solid var(--admin-border-soft);
  background: transparent;
  color: var(--admin-green);
  font-size: .75rem;
  font-weight: bold;
  text-align: left;
}

.price-policy-dropdown-option {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 5px;
  color: var(--admin-text);
  font-size: .76rem;
}

.price-policy-dropdown-option:hover {
  background: #f8fafc;
}

.price-policy-dropdown-option input {
  position: absolute;
  opacity: 0;
}

.price-policy-dropdown-check {
  width: 18px;
  height: 18px;
  display: grid;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: transparent;
  background: #fff;
  font-size: 9px;
}

.price-policy-dropdown-option input:checked + .price-policy-dropdown-check {
  border-color: #16a34a;
  color: #fff;
  background: #16a34a;
}

.price-policy-dropdown-option > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.price-policy-dropdown-option strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-policy-dropdown-option small,
.price-policy-dropdown-empty {
  color: var(--admin-muted);
  font-size: .72rem;
}

.price-policy-dropdown-empty {
  padding: 12px 9px;
}

.price-policy-settings-group {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #f8fafc;
}

.price-policy-settings-head {
  margin-bottom: 9px;
  color: var(--admin-text);
  font-size: .78rem;
}

.price-policy-toggle-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.price-policy-settings-group .price-policy-toggle-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.price-policy-setting-toggle {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #f8fafc;
}

.price-policy-settings-group .price-policy-setting-toggle {
  background: #fff;
}

.price-policy-setting-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.price-policy-setting-toggle > span:last-child {
  display: grid;
  gap: 2px;
}

.price-policy-setting-toggle strong {
  color: var(--admin-text);
  font-size: .76rem;
}

.price-policy-setting-toggle small {
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
}

.price-policy-setting-toggle input:checked + .price-policy-switch-mark {
  background: var(--admin-green);
}

.price-policy-setting-toggle input:checked + .price-policy-switch-mark::after {
  transform: translateX(18px);
}

.price-policy-scope-option {
  min-width: 0;
}

.price-policy-channel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.price-policy-channel-panel {
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.price-policy-channel-head {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 11px;
  border-bottom: 1px solid var(--admin-border-soft);
  background: #f8fafc;
  color: var(--admin-text);
  font-size: .76rem;
}

.price-policy-channel-head span {
  color: var(--admin-muted);
  font-size: .72rem;
  font-weight: bold;
}

.price-policy-channel-panel .price-policy-channel-grid {
  padding: 9px;
}

.price-policy-channel-option {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  color: var(--admin-secondary);
  background: #fff;
  font-size: .75rem;
  font-weight: bold;
}

.price-policy-channel-option:has(input:checked) {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.price-policy-channel-option input {
  position: absolute;
  opacity: 0;
}

.price-policy-channel-check {
  width: 18px;
  height: 18px;
  display: grid;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: transparent;
  background: #fff;
  font-size: 9px;
}

.price-policy-channel-option input:checked + .price-policy-channel-check {
  border-color: #16a34a;
  color: #fff;
  background: #16a34a;
}

.price-policy-product-section {
  margin-top: 0;
}

.price-policy-product-finder {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #f8fafc;
}

.price-policy-product-finder[hidden] {
  display: none !important;
}

.price-policy-product-tools {
  display: block;
}

.price-policy-excel-panel {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--admin-border-soft);
}

.price-policy-excel-panel > .btn {
  min-height: 42px;
  white-space: nowrap;
}

.price-policy-file-picker {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 4px 4px 4px 11px;
  border: 1px dashed #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: var(--admin-muted);
}

.price-policy-file-picker.has-file {
  border-style: solid;
  border-color: #86efac;
  color: #15803d;
  background: #f0fdf4;
}

.price-policy-file-picker > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.price-policy-file-picker strong,
.price-policy-file-picker small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-policy-file-picker strong {
  color: var(--admin-secondary);
  font-size: .75rem;
}

.price-policy-file-picker small {
  color: var(--admin-muted);
  font-size: .68rem;
}

.price-policy-file-picker button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: #fff;
  color: var(--admin-secondary);
  font-size: .74rem;
  font-weight: bold;
  white-space: nowrap;
}

.price-policy-import-input {
  display: none;
}

.price-policy-product-search-box {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 3px 0 12px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
}

.price-policy-product-search-box:focus-within {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

.price-policy-product-search-box > i {
  color: var(--admin-muted);
}

.price-policy-product-search-box input {
  min-width: 0;
  height: 40px;
  flex: 1;
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: .78rem;
}

.price-policy-product-search-box .btn {
  min-height: 34px;
  flex: 0 0 auto;
}

.price-policy-product-results {
  max-height: 230px;
  display: grid;
  gap: 6px;
  overflow: auto;
  margin-top: 10px;
}

.price-policy-product-result {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid var(--admin-border-soft);
  border-radius: 6px;
  background: #fff;
  color: var(--admin-text);
  text-align: left;
}

.price-policy-product-result:hover {
  border-color: #86efac;
  background: #f0fdf4;
}

.price-policy-product-result > span {
  display: grid;
  gap: 2px;
}

.price-policy-product-result > span:last-child {
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
  color: #166534;
  font-size: .75rem;
  font-weight: bold;
}

.price-policy-product-result strong {
  font-size: .76rem;
}

.price-policy-product-result small,
.price-policy-product-code {
  display: block;
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: .75rem;
  font-weight: bold;
}

.price-policy-money,
.price-policy-final-price {
  white-space: nowrap;
}

.price-policy-final-price {
  color: #166534;
}

.price-policy-product-section h4 {
  margin: 0;
  color: var(--admin-text);
  font-size: .86rem;
}

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

.price-policy-product-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
}

.price-policy-product-table th,
.price-policy-product-table td {
  padding: 12px;
  border-bottom: 1px solid var(--admin-border-soft);
  font-size: .75rem;
  text-align: left;
  vertical-align: middle;
}

.price-policy-product-table th {
  color: var(--admin-muted);
  background: var(--admin-surface-muted);
  font-size: .75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.price-policy-product-table tbody tr.is-group-even > td {
  background: #f8fafc;
}

.price-policy-product-table tbody tr.is-group-start:not(:first-child) > td {
  border-top: 2px solid #dbe3ec;
}

.price-policy-product-group-cell {
  min-width: 210px;
  border-right: 1px solid var(--admin-border-soft);
  vertical-align: top !important;
}

.price-policy-product-unit-count {
  display: block;
  margin-top: 7px;
  color: var(--admin-green);
  font-size: .68rem;
  font-weight: bold;
}

.price-policy-product-index {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 34px;
  color: var(--admin-muted);
}

.price-policy-product-name {
  color: var(--admin-text);
  font-weight: bold;
}

.price-policy-product-select,
.price-policy-product-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: .78rem;
}

.price-policy-product-select:disabled,
.price-policy-product-input:read-only {
  opacity: 1;
}

.price-policy-product-amount {
  background: var(--admin-surface-muted);
}

.price-policy-discount-group {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 40px 40px;
  align-items: stretch;
  gap: 0;
}

.price-policy-discount-group .price-policy-product-input {
  box-sizing: border-box;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.price-policy-discount-mode {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 40px;
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--admin-border);
  border-left: 0;
  background: var(--admin-surface-muted);
  color: var(--admin-muted);
  font: inherit;
  font-size: .75rem;
  font-weight: bold;
  line-height: 1;
}

.price-policy-discount-mode.is-active {
  color: var(--admin-green);
  background: #fff;
  box-shadow: inset 0 -2px 0 var(--admin-green);
}

.price-policy-product-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.price-policy-product-add,
.price-policy-product-delete {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
}

.price-policy-product-add {
  color: #2563eb;
}

.price-policy-product-delete {
  color: #dc2626;
}

.acc-toast-stack {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  z-index: 4000;
  width: min(420px, calc(100% - 28px));
  display: grid;
  gap: 8px;
  pointer-events: none;
  transform: translateX(-50%);
}

.acc-toast {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e3a8a;
  background: #eff6ff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
  font-size: .84rem;
  font-weight: bold;
  animation: acc-toast-in .18s ease-out;
}

.acc-toast.is-success {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.acc-toast.is-error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fef2f2;
}

.acc-toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
}

@keyframes acc-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 900px) {
  .acc-posapp-form {
    grid-template-columns: 1fr;
  }

  .acc-migration-page .admin-main {
    padding: 22px 14px 36px;
  }

  .acc-session-pill {
    max-width: 150px;
  }

  .acc-shop-info-row {
    grid-template-columns: minmax(110px, 40%) minmax(0, 1fr);
  }

  .acc-feature-head,
  .acc-quick-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .acc-quick-row-list {
    overflow: visible;
  }

  .acc-quick-editor-head {
    display: none;
  }

  .acc-quick-compact-row {
    grid-template-columns: 48px minmax(0, 1fr) 64px;
    gap: 10px;
    min-width: 0;
    padding: 12px;
  }

  .acc-quick-compact-row .acc-quick-name-cell {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .acc-quick-compact-row > .acc-quick-switch:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .acc-quick-device-options {
    grid-column: 2 / -1;
    grid-row: 2;
    min-width: 0;
  }

  .acc-quick-device-option {
    padding: 0 8px;
  }

  .acc-quick-compact-row > .acc-quick-switch:nth-child(4) {
    grid-column: 1;
    grid-row: 3;
  }

  .acc-quick-compact-row > .acc-pin-button {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }

  .acc-quick-compact-row .acc-quick-select {
    grid-column: 1 / -1;
  }

  .acc-quick-compact-row .acc-quick-select:nth-child(6) {
    grid-row: 4;
  }

  .acc-quick-compact-row .acc-quick-select:nth-child(7) {
    grid-row: 5;
  }

  .acc-feature-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .acc-feature-actions .btn {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    white-space: normal;
  }

  .acc-product-toolbar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .acc-product-filters {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
  }

  .acc-product-filters .acc-compact-field,
  .acc-product-filters input[type="search"],
  .acc-product-filters select,
  .acc-product-bulk-actions .acc-compact-field,
  .acc-product-bulk-actions select {
    width: 100%;
    min-width: 0;
  }

  .acc-product-bulk-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 0 0;
    border-top: 1px solid var(--admin-border);
    border-left: 0;
  }

  .acc-product-bulk-actions .acc-compact-field {
    grid-column: 1 / -1;
  }

  .acc-product-bulk-actions .btn {
    width: 100%;
  }

  .acc-chain-shop-grid {
    grid-template-columns: 1fr;
  }

  .acc-product-stats {
    grid-template-columns: repeat(5, minmax(145px, 1fr));
  }

  .acc-product-category {
    width: 100%;
    min-width: 0;
  }

  .acc-chain-shop-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .acc-chain-shop-controls {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    justify-content: stretch;
  }

  .acc-chain-shop-controls > strong {
    align-self: center;
    min-width: 0;
  }

  .acc-quick-actions .btn {
    width: 100%;
  }

  .acc-quick-table-wrap,
  #accQuickResult.acc-table-wrap {
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .acc-quick-table,
  #accQuickResult .acc-data-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: block;
  }

  .acc-quick-table thead,
  #accQuickResult .acc-data-table thead {
    display: none;
  }

  .acc-quick-table tbody,
  #accQuickResult .acc-data-table tbody {
    width: 100%;
    max-width: 100%;
    display: grid;
    gap: 12px;
  }

  .acc-quick-table tr,
  #accQuickResult .acc-data-table tr {
    width: 100%;
    max-width: 100%;
    display: block;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
  }

  .acc-quick-table td,
  #accQuickResult .acc-data-table td {
    width: 100%;
    max-width: 100%;
    display: grid;
    box-sizing: border-box;
    grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--admin-border-soft);
    background: transparent !important;
  }

  .acc-quick-table td:last-child,
  #accQuickResult .acc-data-table td:last-child {
    border-bottom: 0;
  }

  .acc-quick-table td::before,
  #accQuickResult .acc-data-table td::before {
    color: var(--admin-muted);
    font-size: .75rem;
    font-weight: bold;
    text-transform: uppercase;
    content: attr(data-label);
  }

  .acc-quick-name-cell,
  .acc-quick-name-input,
  .acc-table-input,
  .acc-table-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .acc-mini-switch,
  .acc-pin-button {
    justify-self: start;
  }

  #accQuickResult .acc-data-table code,
  #accQuickResult .acc-data-table strong,
  #accQuickResult .acc-data-table td > :not(.acc-cell-error) {
    overflow-wrap: anywhere;
  }

  .acc-grab-shop-list,
  .acc-grab-integration-list {
    grid-template-columns: 1fr;
  }

  .acc-grab-result-head,
  .acc-grab-result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .acc-grab-result-actions .btn {
    width: 100%;
  }

  .acc-grab-filters {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .acc-grab-filter-label {
    width: 100%;
  }

  .acc-grab-filter-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-grab-filter {
    min-width: 0;
    border-right: 1px solid var(--admin-border);
    border-bottom: 1px solid var(--admin-border);
  }

  .acc-grab-filter:nth-child(2n) {
    border-right: 0;
  }

  .acc-grab-filter:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .acc-grab-policy-button {
    width: 100%;
    margin-left: 0;
  }

  .acc-grab-result-actions {
    width: 100%;
  }

  .acc-grab-result-head {
    padding: 12px;
  }

  .acc-grab-row-status {
    white-space: normal;
  }

  .acc-grab-integration + .acc-grab-integration {
    border-top: 1px solid var(--admin-border-soft);
    border-left: 0;
  }

  .acc-einvoice-head-actions .acc-compact-field,
  .acc-einvoice-head-actions .btn {
    width: 100%;
  }

  .acc-compact-field {
    justify-content: space-between;
  }

  .acc-hddt-shop-list,
  .acc-einvoice-shop-list,
  .acc-hddt-result {
    grid-template-columns: 1fr;
  }

  .acc-hddt-result {
    gap: 8px;
  }

  .acc-einvoice-result > header,
  .acc-einvoice-result > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .acc-einvoice-result > footer .btn {
    width: 100%;
  }

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

  .acc-einvoice-detail-card {
    width: 100%;
    height: calc(100vh - 20px);
  }

  .acc-einvoice-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .acc-einvoice-detail-actions .btn,
  .acc-einvoice-detail-actions > label {
    width: 100%;
  }

  .acc-einvoice-order {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .acc-einvoice-order-main {
    grid-column: 2;
  }

  .acc-einvoice-order-status,
  .acc-einvoice-order-actions {
    grid-column: 1 / -1;
  }

  .acc-einvoice-order-actions {
    justify-content: flex-start;
  }

  .acc-einvoice-custom-grid {
    grid-template-columns: 1fr;
  }

  .acc-einvoice-custom-grid .is-wide {
    grid-column: auto;
  }

  .acc-expiry-actions,
  .acc-expiry-filter {
    width: 100%;
  }

  .acc-expiry-filter {
    justify-content: space-between;
  }

  .acc-expiry-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 36px;
    gap: 10px;
    padding: 12px;
  }

  .acc-expiry-shop {
    grid-column: 1 / 3;
  }

  .acc-expiry-row > .acc-icon-button {
    grid-column: 3;
    grid-row: 1;
  }

  .acc-expiry-days {
    grid-column: 2 / 4;
  }

  .price-policy-edit-head,
  .price-policy-edit-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .acc-price-policy-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .acc-price-policy-search {
    width: 100%;
  }

  .acc-price-policy-segments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .acc-price-policy-segments button {
    padding: 0 7px;
    white-space: normal;
  }

  .price-policy-edit-head .btn,
  .price-policy-edit-foot .btn {
    width: 100%;
  }

  .price-policy-edit-foot > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-policy-admin-grid {
    grid-template-columns: 1fr;
  }

  .price-policy-admin-field.is-double {
    grid-column: auto;
  }

  .price-policy-option-grid,
  .price-policy-toggle-strip {
    grid-template-columns: 1fr;
  }

  .price-policy-settings-group .price-policy-toggle-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .price-policy-excel-panel {
    grid-template-columns: 1fr;
  }

  .price-policy-excel-panel > .btn {
    width: 100%;
  }

  .price-policy-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .price-policy-section-head .btn {
    width: 100%;
  }

  .price-policy-scope-row {
    grid-template-columns: 1fr;
  }

  .price-policy-radio-row,
  .price-policy-channel-row,
  .price-policy-switch-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .price-policy-settings-group .price-policy-toggle-strip {
    grid-template-columns: 1fr;
  }

  .price-policy-file-picker button span {
    display: none;
  }

  .acc-migration-page .admin-main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .acc-quick-table td,
  #accQuickResult .acc-data-table td {
    grid-template-columns: minmax(92px, 37%) minmax(0, 1fr);
    gap: 8px;
  }

  .admin-status-controls {
    align-items: stretch;
    flex-direction: column;
    padding-left: 33px;
  }

  .admin-status-controls .admin-status-action {
    width: 100%;
  }
}
