:root {
  --bg: #eef1f5;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #d8dee6;
  --brand: #1673ff;
  --sidebar-bg: #343b45;
  --sidebar-fg: #bcc4cf;
  --sidebar-hover: #3d4550;
  --font-ui: "Inter", "Sarabun", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Inter", "Sarabun", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-ui);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-width: 360px;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-ui);
  font-weight: 400;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
}

.app-sidebar {
  background: linear-gradient(180deg, #343b45 0%, #303740 100%);
  color: var(--sidebar-fg);
  border-right: 1px solid #29303a;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(190, 201, 216, 0.48) transparent;
}

.app-sidebar::-webkit-scrollbar {
  width: 8px;
}

.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(190, 201, 216, 0.42);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(220, 228, 240, 0.62);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.sidebar-header {
  padding: 0.4rem 0.45rem 0.85rem;
}

.brand-anchor {
  text-decoration: none;
  color: #f3f7fc;
  min-height: 44px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 42px;
  object-fit: cover;
  border-radius: 10px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #ffd75f;
  box-shadow: 0 0 0 5px rgba(255, 215, 95, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.055em;
  line-height: 0.9;
  white-space: nowrap;
  color: #ffffff;
  text-transform: uppercase;
}

.sidebar-caption {
  margin-top: 0.58rem;
  color: #8f9baa;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
}

.module-tabs {
  display: grid;
  gap: 0.18rem;
  padding: 0 0.2rem;
}

.module-tab-btn {
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--sidebar-fg);
  display: flex;
  align-items: center;
  gap: 0.58rem;
  padding: 0.56rem 0.64rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 140ms ease, color 140ms ease;
}

.module-tab-btn .menu-title {
  flex: 1;
  text-align: left;
}

.module-tab-btn .menu-sub {
  display: none;
}

.module-icon {
  font-size: 0.92rem;
  opacity: 0.95;
}

.module-arrow {
  font-size: 0.62rem;
  opacity: 0.55;
  transform: translateX(0);
  transition: transform 140ms ease, opacity 140ms ease;
}

.module-tab-btn:hover {
  color: #f0f4fa;
  background: var(--sidebar-hover);
}

.module-tab-btn.active {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 6px 18px rgba(22, 115, 255, 0.32);
}

.module-tab-btn.active .module-arrow {
  opacity: 0.9;
  transform: translateX(2px);
}

.utility-tabs {
  margin-top: 0.32rem;
}

.module-tab-link {
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--sidebar-fg);
  display: flex;
  align-items: center;
  gap: 0.58rem;
  padding: 0.54rem 0.64rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.module-tab-link .menu-title {
  flex: 1;
  text-align: left;
}

.module-tab-link:hover {
  color: #f0f4fa;
  background: var(--sidebar-hover);
}

.module-tab-link.active {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 6px 18px rgba(22, 115, 255, 0.32);
}

.module-tab-action {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.sidebar-session {
  margin-top: auto;
  padding: 0.7rem 0.2rem 0.15rem;
}

.sidebar-account {
  position: relative;
  display: block;
  min-width: 0;
}

.sidebar-account-toggle {
  width: 100%;
  border: 1px solid #c8d0db;
  border-radius: 10px;
  background: #f4f6fa;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.46rem 0.56rem;
  text-align: left;
  min-width: 0;
}

.sidebar-account-toggle:hover,
.sidebar-account-toggle:focus {
  background: #ffffff;
  border-color: #aeb7c5;
}

.sidebar-account-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #df3648;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  flex: 0 0 auto;
}

.sidebar-account-avatar-lg {
  width: 42px;
  height: 42px;
  font-size: 1.08rem;
}

.sidebar-account-name {
  color: #0f172a;
  font-weight: 500;
  font-size: 0.92rem;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-caret {
  margin-left: auto;
  font-size: 0.72rem;
  color: #1f2937;
}

.sidebar-account-menu {
  width: 100%;
  max-width: none;
  min-width: 0;
  position: absolute !important;
  inset: auto 0 calc(100% + 0.5rem) 0 !important;
  transform: none !important;
  margin: 0 !important;
  border-radius: 12px;
  border: 1px solid #d6dde7;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.sidebar-account-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e5e9f0;
  background: #ffffff;
  min-width: 0;
}

.sidebar-account-meta {
  min-width: 0;
}

.sidebar-account-fullname {
  margin: 0 0 0.12rem;
  color: #1f2937;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.15;
}

.sidebar-account-email {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-item {
  display: flex;
  align-items: center;
  gap: 0.54rem;
  padding: 0.74rem 1rem;
  color: #1f2937;
  font-size: 0.92rem;
}

.sidebar-account-item + .sidebar-account-item {
  border-top: 1px solid #e5e9f0;
}

.sidebar-account-item i {
  color: #6b7280;
  font-size: 0.96rem;
}

.sidebar-account-item.active {
  background: #eef2ff;
  color: #0f172a;
  font-weight: 600;
}

.sidebar-account-item.active i {
  color: #374151;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem;
  border: 1px solid #d8dee6;
  border-radius: 12px;
  background: #f9fbff;
}

.profile-summary-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #df3648;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.profile-summary-name {
  margin: 0;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.profile-summary-email {
  margin: 0.1rem 0 0;
  color: #6b7280;
}

.app-content {
  padding: 0.75rem;
  min-width: 0;
}

.app-toolbar {
  border: 1px solid var(--line);
}

body[data-page-type="list"] .app-toolbar {
  display: none;
}

body[data-page-type="dashboard"] .app-toolbar {
  display: none;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.48rem;
}

body:not(.auth-page) .top-actions {
  display: none !important;
}

.workspace-subtitle {
  color: var(--muted);
  font-size: 0.94rem;
}

.mobile-sidebar-toggle-wrap,
.mobile-sidebar-close,
.mobile-sidebar-backdrop {
  display: none;
}

.mobile-sidebar-toggle-wrap {
  margin-bottom: 0.75rem;
}

.mobile-sidebar-toggle {
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.82rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.mobile-sidebar-toggle:hover,
.mobile-sidebar-toggle:focus {
  background: #f8fbff;
  border-color: #c1d2ea;
}

.mobile-sidebar-toggle i {
  font-size: 1rem;
}

.mobile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 1040;
}

.app-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.form-label-sm {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
  background: #125cd1;
  border-color: #125cd1;
}

body[data-page-type="list"] #listViewSection.app-card {
  border: 0;
  box-shadow: none;
  background: transparent;
  min-height: 0;
}

body[data-page-type="list"] #listViewSection > .card-body {
  padding: 0;
}

.list-toolbar-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
  padding: 0.1rem 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.list-toolbar-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.list-toolbar-cluster-left {
  flex: 0 0 auto;
}

.list-toolbar-cluster-right {
  flex: 1 1 420px;
  justify-content: flex-end;
}

.list-limit-inline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #475569;
  font-size: 0.94rem;
  font-weight: 500;
  white-space: nowrap;
}

.list-limit-inline .form-select {
  width: 82px;
  min-width: 82px;
  padding-right: 2rem;
}

.list-limit-copy {
  color: #475569;
}

.list-toolbar-search-inline {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.list-toolbar-search-inline .form-label {
  flex: 0 0 auto;
}

.list-toolbar-modern .form-label {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.list-toolbar-modern .form-control,
.list-toolbar-modern .form-select {
  height: 38px;
  border-radius: 12px;
  border-color: #d2dce9;
  background: #ffffff;
  padding-inline: 0.82rem;
}

.list-toolbar-modern #searchInput {
  width: min(100%, 260px);
  min-width: 180px;
  padding-left: 0.82rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 0.85rem) center;
  background-size: 0.92rem 0.92rem;
}

.list-toolbar-modern .form-control:focus,
.list-toolbar-modern .form-select:focus {
  border-color: #87adff;
  box-shadow: 0 0 0 0.18rem rgba(22, 115, 255, 0.14);
}

.list-toolbar-modern .list-create-btn {
  min-width: 88px;
  height: 38px;
  border-radius: 10px;
  padding-inline: 0.85rem;
  font-weight: 700;
  box-shadow: none;
}

.list-toolbar-modern .list-reset-btn {
  min-width: 92px;
  height: 38px;
  border-radius: 12px;
  padding-inline: 0.9rem;
  font-weight: 700;
}

.list-filter-toggle-btn {
  min-width: 96px;
  height: 38px;
  border-radius: 10px;
  padding-inline: 0.85rem;
  font-weight: 700;
}

.list-filter-count {
  margin-left: 0.18rem;
  min-width: 1.35rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.list-toolbar-meta {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.list-filter-offcanvas {
  width: min(90vw, 360px);
}

.list-filter-offcanvas .offcanvas-header {
  padding: 0.8rem 0.9rem 0.68rem;
  border-bottom: 1px solid #e2e8f0;
}

.list-filter-offcanvas .offcanvas-title {
  margin: 0;
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 800;
}

.list-filter-offcanvas-copy {
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.78rem;
}

.list-filter-offcanvas .offcanvas-body {
  padding: 0.85rem 0.9rem;
}

.list-filter-offcanvas-form {
  display: grid;
  gap: 0.78rem;
}

.list-filter-offcanvas .form-label {
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
}

.list-filter-offcanvas .form-control,
.list-filter-offcanvas .form-select {
  min-height: 38px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.list-sort-panel {
  margin-top: 0.1rem;
  padding-top: 0.78rem;
  border-top: 1px solid #e2e8f0;
}

.list-sort-head {
  margin-bottom: 0.5rem;
}

.list-sort-title {
  margin: 0;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
}

.list-sort-copy {
  margin-top: 0.18rem;
  color: #64748b;
  font-size: 0.76rem;
}

.list-sort-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.68rem;
}

.list-sort-order-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.list-sort-order-btn {
  min-height: 36px;
  border: 1px solid #d2dce9;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

.list-sort-order-btn.is-active {
  border-color: #60a5fa;
  background: rgba(219, 234, 254, 0.75);
  color: #1d4ed8;
}

.list-filter-grid-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.68rem;
}

.list-filter-offcanvas .list-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.68rem;
  align-items: stretch;
}

.list-filter-offcanvas-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.58rem;
  padding: 0.75rem 0.9rem 0.85rem;
  border-top: 1px solid #e2e8f0;
}

.list-filter-offcanvas-footer .btn {
  min-width: 96px;
  min-height: 38px;
  font-size: 0.9rem;
}

.log-list-toolbar {
  align-items: center;
}

.log-toolbar-search-inline .log-search-control {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.log-toolbar-search-inline .form-label {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.log-toolbar-search-inline .form-control {
  width: min(100%, 280px);
  min-width: 190px;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 0.85rem) center;
  background-size: 0.92rem 0.92rem;
}

.list-simple-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: end;
  padding: 0.95rem 1rem;
  border: 1px solid #d8e3f0;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.05);
}

.list-control-block {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  min-width: 0;
}

.list-filter-block {
  padding-left: 1rem;
  border-left: 1px solid #e1e8f0;
}

.list-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.list-control-title {
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.list-control-copy {
  display: none;
}

.list-search-wrap {
  min-width: 0;
  position: relative;
}

.list-search-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.72rem;
  align-items: end;
}

.list-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 0.65rem;
  align-items: end;
}

.list-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  align-items: end;
}

.list-limit-grid {
  min-width: 0;
}

.list-create-btn {
  min-width: 104px;
  height: 46px;
  border-radius: 14px;
  padding-inline: 1rem;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(22, 115, 255, 0.16);
}

.list-reset-btn {
  min-width: 94px;
  height: 46px;
  border-radius: 14px;
  padding-inline: 0.9rem;
  font-weight: 700;
}

.list-simple-controls .form-label {
  margin-bottom: 0.34rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.list-simple-controls .form-control {
  height: 46px;
  border-radius: 14px;
  border-color: #d2dce9;
  background: #ffffff;
  padding-inline: 0.92rem;
}

.list-simple-controls .form-select {
  height: 46px;
  border-radius: 14px;
  border-color: #d2dce9;
  background: #ffffff;
  padding-inline: 0.92rem;
}

.list-search-wrap .form-control {
  padding-left: 2.7rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.95rem center;
  background-size: 1rem 1rem;
}

.list-simple-controls .form-control:focus {
  border-color: #87adff;
  box-shadow: 0 0 0 0.18rem rgba(22, 115, 255, 0.14);
}

.list-simple-controls .form-select:focus {
  border-color: #87adff;
  box-shadow: 0 0 0 0.18rem rgba(22, 115, 255, 0.14);
}

@media (max-width: 991.98px) {
  .list-toolbar-modern {
    align-items: stretch;
  }

  .list-toolbar-cluster-left,
  .list-toolbar-cluster-right {
    width: 100%;
  }

  .list-toolbar-cluster-right {
    justify-content: space-between;
  }

  .list-toolbar-search-inline {
    flex: 1 1 auto;
  }

  .list-simple-controls {
    grid-template-columns: 1fr;
    padding: 0.9rem;
  }

  .list-search-toolbar,
  .list-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .list-filter-block {
    padding-left: 0;
    padding-top: 0.8rem;
    border-left: 0;
    border-top: 1px solid #e1e8f0;
  }

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

  .list-limit-grid {
    max-width: 220px;
  }
}

.form-control[readonly],
.form-select.is-readonly {
  background: #f8fafc;
  color: #475569;
}

.form-select.is-readonly {
  opacity: 1;
}

body[data-page-type="list"] .table-shell {
  border-radius: 10px;
  overflow: auto;
  background: #ffffff;
  scrollbar-color: #cbd5e1 #ffffff;
  scrollbar-width: thin;
}

@media (min-width: 992px) {
  body[data-page-type="list"] {
    overflow: hidden;
  }

  body[data-page-type="list"] .app-shell {
    height: 100vh;
  }

  body[data-page-type="list"] .app-content {
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body[data-page-type="list"] #listViewSection {
    flex: 1 1 auto;
    min-height: 0;
  }

  body[data-page-type="list"] #listViewSection > .card-body {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  body[data-page-type="list"] .table-shell {
    flex: 1 1 auto;
    min-height: 0;
  }
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.detail-actions-bottom {
  padding-top: 0.35rem;
  border-top: 1px dashed #d9e0e8;
}

#deleteDetailBtn,
#deleteDetailBtnBottom,
#deleteConfirmModal {
  display: none !important;
}

.detail-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.28rem;
}

.table-shell {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  overflow-x: auto;
  overflow-y: auto;
  box-shadow: inset 0 0 0 1px rgba(219, 228, 238, 0.85);
  scrollbar-color: #cbd5e1 #ffffff;
  scrollbar-width: thin;
}

.table-shell::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-shell::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 999px;
}

.table-shell::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border: 2px solid #ffffff;
  border-radius: 999px;
}

.table-shell::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.table {
  margin-bottom: 0;
  min-width: 1080px;
}

.app-data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.app-data-table > :not(caption) > * > * {
  border-color: #dce5ef;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.68rem;
  font-weight: 700;
  color: #5f7088;
  background: #f1f5fa;
  padding: 0.62rem 0.72rem;
  white-space: nowrap;
}

.table thead th.has-column-menu {
  overflow: visible;
  padding-right: 0.42rem;
}

.table thead th.has-column-menu,
.table thead th.has-column-menu.is-sorted {
  z-index: 4;
}

.table-column-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.table-column-label {
  display: inline;
}

.table-column-menu-toggle {
  min-height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #5f7088;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  padding: 0 0.12rem;
  font-size: 0.58rem;
  line-height: 1;
  text-decoration: none;
}

.table-column-menu-toggle:hover,
.table-column-menu-toggle:focus,
.table thead th.is-sorted .table-column-menu-toggle {
  background: #e2e8f0;
  color: #475569;
  outline: none;
}

.table-column-menu-toggle i {
  color: #94a3b8;
}

.table-column-menu-toggle:hover i,
.table-column-menu-toggle:focus i,
.table thead th.is-sorted .table-column-menu-toggle i {
  color: #475569;
}

.table-column-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.45rem);
  z-index: 20;
  min-width: 190px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
  text-transform: none;
  letter-spacing: 0;
}

.table-column-menu-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  color: #0f172a;
  display: block;
  padding: 0.76rem 1.05rem;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.table-column-menu-item:last-child {
  border-bottom: 0;
}

.table-column-menu-item:hover,
.table-column-menu-item:focus,
.table-column-menu-item.is-active {
  background: #f8fafc;
  color: #1d4ed8;
  outline: none;
}

.table tbody td {
  white-space: nowrap;
  vertical-align: middle;
  font-size: 0.86rem;
  line-height: 1.28;
  padding: 0.64rem 0.72rem;
  color: #0f172a;
  background: #fcfdff;
}

.app-data-table th.col-display-date,
.app-data-table th.col-display-datetime,
.app-data-table td.col-display-date,
.app-data-table td.col-display-datetime {
  text-align: center;
}

.table-datetime {
  display: inline-grid;
  gap: 0.12rem;
  white-space: normal;
  line-height: 1.1;
  text-align: center;
}

.table-datetime-date {
  display: block;
  color: #1e293b;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.table-datetime-time {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.table tbody tr {
  cursor: pointer;
}

.table tbody tr:hover {
  background: transparent;
}

.table tbody tr:hover td {
  background: #fcfdff;
}

.row-link {
  color: #0f172a;
  font-weight: 650;
  text-decoration: none;
}

.app-data-table td.col-key-invoicenumber .row-link {
  color: #0f172a;
  font-weight: 720;
}

.table-file-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.table-file-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 0.15rem 0.36rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.table-file-count.is-ready {
  background: #dcfce7;
  color: #166534;
}

.table-file-count.is-pending {
  background: #fff7ed;
  color: #9a3412;
}

.table-file-count.is-muted {
  background: #e5e7eb;
  color: #374151;
}

.table-file-label {
  color: #475569;
  font-size: 0.76rem;
  font-weight: 600;
}

.table-file-flag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.38rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.table-doc-file-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 48px;
  min-height: 28px;
  padding: 0.28rem 0.56rem;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

button.table-doc-file-chip {
  cursor: pointer;
}

.table-doc-file-chip.is-linked {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
}

.table-doc-file-chip.is-linked:hover,
.table-doc-file-chip.is-linked:focus {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1d4ed8;
  outline: none;
}

.table-doc-file-chip.is-empty {
  border-style: dashed;
  background: #f8fafc;
  color: #cbd5e1;
}

.app-data-table th.col-display-billing-file-link,
.app-data-table td.col-display-billing-file-link {
  min-width: 64px;
  text-align: center;
}

.table-mail-actions {
  min-width: 200px;
  display: grid;
  gap: 0.4rem;
}

.table-mail-btn-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  align-items: stretch;
}

.table-mail-btn {
  width: 100%;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  padding: 0.34rem 0.58rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 1px 0 rgba(37, 99, 235, 0.06);
}

.table-mail-btn-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.46rem;
  width: 100%;
}

.table-mail-btn-icon {
  font-size: 0.76rem;
}

.table-mail-btn-label {
  white-space: nowrap;
}

.table-mail-btn:hover,
.table-mail-btn:focus {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #60a5fa;
}

.table-mail-btn.is-receipt {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  color: #2563eb;
}

.table-mail-btn.is-disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: default;
}

.table-mail-btn.is-disabled:hover,
.table-mail-btn.is-disabled:focus {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.table-mail-btn.is-pending {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
  color: #1d4ed8;
  cursor: progress;
}

.table-mail-meta {
  color: #64748b;
  font-size: 0.73rem;
  line-height: 1.25;
  grid-column: 1 / -1;
  text-align: center;
}

.table-mail-meta.is-alert {
  color: #9a3412;
}

.app-data-table th.col-display-billing-etax-action,
.app-data-table td.col-display-billing-etax-action {
  min-width: 132px;
  text-align: center;
}

.table-etax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  width: 100%;
  min-width: 112px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
  padding: 0.36rem 0.62rem;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.table-etax-btn:hover,
.table-etax-btn:focus {
  border-color: #fb923c;
  background: linear-gradient(180deg, #ffedd5 0%, #fed7aa 100%);
}

.table-etax-btn:disabled {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  cursor: progress;
}

.detail-check-card {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 58px;
  width: fit-content;
  padding: 0.75rem 0.9rem;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

.detail-check-card:hover,
.detail-check-card:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.detail-check-card.is-checked {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.detail-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.detail-check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: transparent;
  font-size: 0.86rem;
}

.detail-check-input:checked + .detail-check-mark {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.detail-check-text {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.detail-check-title {
  color: #111827;
  font-weight: 700;
  line-height: 1.2;
}

.detail-check-copy {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.25;
}

.detail-switch-control {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 34px;
  cursor: pointer;
  user-select: none;
}

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

.detail-switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: #cbd5e1;
  transition:
    background-color 0.16s ease,
    box-shadow 0.16s ease;
}

.detail-switch-thumb {
  position: absolute;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.24);
  transition: transform 0.16s ease;
}

.detail-switch-control.is-checked .detail-switch-track {
  background: #2563eb;
}

.detail-switch-control.is-checked .detail-switch-thumb {
  transform: translateX(12px);
}

.detail-switch-control:hover .detail-switch-track,
.detail-switch-control:focus-within .detail-switch-track {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.detail-switch-title {
  color: #334155;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
}

.table-option-badge-row {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: wrap;
  min-width: 150px;
}

.table-option-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.table-option-badge.is-on {
  background: #dbeafe;
  color: #1d4ed8;
}

.table-option-badge.is-off {
  background: #f1f5f9;
  color: #64748b;
}

.app-data-table th.col-key-billingperiod,
.app-data-table td.col-key-billingperiod,
.app-data-table th.col-key-id,
.app-data-table td.col-key-id,
.app-data-table th.col-key-status,
.app-data-table td.col-key-status,
.app-data-table th.col-key-paymentstatus,
.app-data-table td.col-key-paymentstatus,
.app-data-table th.col-key-billingsendmailactions,
.app-data-table td.col-key-billingsendmailactions,
.app-data-table th.col-key-billingfilessummary,
.app-data-table td.col-key-billingfilessummary {
  text-align: center;
}

.app-data-table th.col-key-id,
.app-data-table td.col-key-id {
  width: 62px;
  min-width: 62px;
  max-width: 72px;
}

.app-data-table th.col-key-companyname,
.app-data-table td.col-key-companyname {
  min-width: 240px;
}

.app-data-table td.col-key-companyname,
.app-data-table td.col-key-pbxdisplay {
  white-space: normal;
}

.app-data-table th.col-key-pbxdisplay,
.app-data-table td.col-key-pbxdisplay {
  min-width: 160px;
}

.app-data-table th.col-key-invoicenumber,
.app-data-table td.col-key-invoicenumber,
.app-data-table th.col-key-taxnumber,
.app-data-table td.col-key-taxnumber,
.app-data-table th.col-key-receiptnumber,
.app-data-table td.col-key-receiptnumber {
  min-width: 150px;
}

.app-data-table th.col-key-createdat,
.app-data-table td.col-key-createdat,
.app-data-table th.col-key-updatedat,
.app-data-table td.col-key-updatedat {
  min-width: 120px;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.28rem 0.54rem;
  border-radius: 999px;
  border: 1px solid #d7e1ec;
  background: #eef3f8;
  color: #334155;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.03);
}

.badge-status.active,
.badge-status.available,
.badge-status.ready,
.badge-status.complete,
.badge-status.complate,
.badge-status.paid,
.badge-status.success,
.badge-status.true {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.badge-status.open {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.badge-status.process,
.badge-status.pending,
.badge-status.padding,
.badge-status.warnig,
.badge-status.warning {
  background: #ffedd5;
  border-color: #fdba74;
  color: #c2410c;
}

.badge-status.inactive,
.badge-status.disable,
.badge-status.disabled,
.badge-status.cancel,
.badge-status.overdue,
.badge-status.exprice,
.badge-status.expired,
.badge-status.unpaid,
.badge-status.failed,
.badge-status.false {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.badge-status.not-available {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.detail-inline-tabs .nav-link {
  font-weight: 700;
  color: #64748b;
}

.detail-inline-tabs .nav-link.active {
  color: #0f172a;
}

.voice-remote-subtitle {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.tenant-users-search {
  width: min(100%, 320px);
}

.badge-remote-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d7e1ec;
  background: #eef2f7;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 800;
}

.badge-remote-status.synced {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.badge-remote-status.failed {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.badge-remote-status.syncing {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.table-remote-sync-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 30px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.32rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.table-remote-sync-btn:hover,
.table-remote-sync-btn:focus {
  background: #dbeafe;
  border-color: #93c5fd;
  outline: none;
}

.table-remote-sync-btn.is-failed {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.badge-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  background: #eef2f7;
  color: #334155;
}

.badge-type.edited {
  background: #fff7ed;
  color: #c2410c;
}

.badge-type.draft {
  background: #f1f5f9;
  color: #475569;
}

.badge-type.pending {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-type.main {
  background: #e0e7ff;
  color: #4338ca;
}

.badge-type.sub {
  background: #ccfbf1;
  color: #0f766e;
}

.badge-type.generic {
  background: #eef2f7;
  color: #334155;
}

.pagination .page-link {
  color: #334155;
}

.pagination .page-item.active .page-link {
  border-color: var(--brand);
  background: var(--brand);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.42);
}

.section-title {
  margin: 0.4rem 0 0.08rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  font-weight: 700;
}

.field-hint {
  color: var(--muted);
  font-size: 0.74rem;
}

.field-featured {
  padding: 0.82rem 0.9rem 0.9rem;
  border: 1px solid #d8e3f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.field-featured .form-label {
  margin-bottom: 0.55rem;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 700;
}

.field-featured .form-control,
.field-featured .form-select {
  min-height: 46px;
  border-color: #bfd0ec;
  background-color: #ffffff;
}

.field-featured .form-control[type="number"] {
  color: #0f172a;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.coc-pbx-hero-card {
  border: 1px solid #d7e1ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.82rem 0.88rem 0.88rem;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.coc-pbx-hero-head {
  margin-bottom: 0.72rem;
}

.coc-pbx-hero-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.coc-pbx-hero-copy {
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.4;
}

.coc-pbx-hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.coc-pbx-hero-stat {
  min-width: 0;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.74rem 0.8rem;
  position: relative;
  overflow: hidden;
}

.coc-pbx-hero-stat.is-compact {
  padding: 0.68rem 0.74rem;
}

.coc-pbx-hero-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #cbd5e1;
}

.coc-pbx-hero-stat.tone-blue::before {
  background: #2563eb;
}

.coc-pbx-hero-stat.tone-cyan::before {
  background: #0891b2;
}

.coc-pbx-hero-stat.tone-amber::before {
  background: #ea580c;
}

.coc-pbx-hero-stat.tone-slate::before {
  background: #475569;
}

.coc-pbx-hero-stat-label {
  margin: 0 0 0.24rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.coc-pbx-hero-stat-value {
  margin: 0;
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
  word-break: break-word;
}

.coc-pbx-hero-stat.is-compact .coc-pbx-hero-stat-value {
  font-size: 0.88rem;
}

.coc-pbx-hero-stat-meta {
  margin-top: 0.34rem;
  padding-top: 0.34rem;
  border-top: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.coc-pbx-hero-stat.is-compact .coc-pbx-hero-stat-meta {
  margin-top: 0.28rem;
  padding-top: 0.28rem;
}

.coc-pbx-hero-stat-meta + .coc-pbx-hero-stat-meta {
  margin-top: 0.28rem;
}

.coc-pbx-hero-stat-meta-label {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.coc-pbx-hero-stat-meta-value {
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
}

.date-field-control {
  position: relative;
}

.date-display-input {
  padding-right: 2.9rem;
}

.date-picker-trigger {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #334155;
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.date-picker-trigger:hover {
  background: #eef4ff;
  color: #2563eb;
}

.date-picker-native {
  position: absolute;
  inset: auto;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 991.98px) {
  .coc-pbx-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .coc-pbx-hero-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-hero-card {
  overflow: hidden;
  border: 1px solid #dbe6f0;
  border-radius: 24px;
}

.dashboard-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.15rem;
  margin-bottom: 1.2rem;
}

.dashboard-hero-copy {
  min-width: 0;
}

.dashboard-hero-kicker {
  margin: 0 0 0.32rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.72rem;
  font-weight: 800;
  line-height: 1.05;
}

.dashboard-hero-text {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 0.95rem;
  max-width: 620px;
}

.dashboard-control-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
}

.dashboard-controls-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 180px));
  gap: 1rem;
  align-items: end;
}

.dashboard-control-field {
  min-width: 0;
}

.dashboard-refresh-btn {
  min-height: 50px;
  min-width: 188px;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.dashboard-meta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.68rem 0.88rem;
  border: 1px solid #dbe6f0;
  border-radius: 14px;
  background: #f8fbff;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}

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

.overview-card {
  background: #ffffff;
  border: 1px solid #dbe6f0;
  border-radius: 20px;
  padding: 1.15rem 1.15rem 1.05rem 1.22rem;
  min-height: 214px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 1rem;
}

.dashboard-admin-card {
  color: inherit;
  text-decoration: none;
}

.dashboard-admin-card:hover,
.dashboard-admin-card:focus {
  color: inherit;
  text-decoration: none;
  border-color: #bfdbfe;
}

.overview-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 20px 0 0 20px;
  background: #cbd5e1;
}

.overview-card.tone-blue::before {
  background: #2563eb;
}

.overview-card.tone-coral::before {
  background: #f97362;
}

.overview-card.tone-teal::before {
  background: #0f766e;
}

.overview-card.tone-teal-soft::before {
  background: #14b8a6;
}

.overview-card-main {
  display: grid;
  gap: 0.34rem;
  align-content: start;
}

.overview-card-title {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-card-lead {
  margin: 0;
  color: #0f172a;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
}

.overview-card-detail {
  margin: 0.12rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.overview-card-stats {
  display: grid;
  gap: 0.48rem;
  margin-top: auto;
}

.overview-card-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.58rem;
  border-top: 1px solid #e8eef5;
}

.overview-card-stat-label {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.overview-card-stat-value {
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 700;
}

.dashboard-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-chip-card {
  border: 1px solid #dbe6f0;
  border-radius: 18px;
  background: #ffffff;
  padding: 1rem 1.05rem;
  display: grid;
  gap: 0.42rem;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.dashboard-chip-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-chip-value {
  color: #0f172a;
  font-size: 1.65rem;
  line-height: 1.05;
}

.dashboard-chip-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dashboard-chip-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  color: #64748b;
  font-size: 0.86rem;
}

.dashboard-chip-stat-label {
  color: #64748b;
  font-weight: 600;
}

.dashboard-chip-stat-value {
  color: #0f172a;
  font-weight: 700;
}

.dashboard-panel {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #dbe6f0;
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.95rem;
}

.dashboard-panel-kicker {
  margin: 0 0 0.22rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-panel-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 800;
}

.dashboard-table-wrap {
  border: 1px solid #e5edf5;
  border-radius: 18px;
  overflow: hidden;
}

.dashboard-billing-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-billing-table thead th {
  background: #f8fbff;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e5edf5;
}

.dashboard-billing-table tbody td {
  padding: 1rem;
  border-top: 1px solid #edf2f7;
  color: #0f172a;
  font-size: 0.95rem;
  vertical-align: middle;
}

.dashboard-billing-row {
  cursor: pointer;
}

.dashboard-billing-row:hover {
  background: #fbfdff;
}

.dashboard-billing-link {
  color: #0ea5e9;
  font-weight: 700;
}

.dashboard-billing-company {
  display: inline-block;
  color: #0f172a;
  font-weight: 600;
  white-space: normal;
}

.dashboard-billing-payment,
.dashboard-billing-date {
  color: #1e293b;
  font-weight: 700;
}

.dashboard-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 0.3rem 0.56rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

.dashboard-state-badge.tone-paid {
  background: #dcfce7;
  color: #166534;
}

.dashboard-state-badge.tone-pending {
  background: #fff7ed;
  color: #c2410c;
}

.dashboard-state-badge.tone-overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.trend-chart {
  display: grid;
  gap: 0.85rem;
}

.trend-row {
  display: grid;
  gap: 0.38rem;
}

.trend-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.trend-row-label {
  color: #334155;
  font-size: 0.92rem;
  font-weight: 700;
}

.trend-row-total {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
}

.trend-row-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef6;
}

.trend-row-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1673ff 0%, #2dd4bf 100%);
}

.trend-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  color: #64748b;
  font-size: 0.84rem;
}

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

.dashboard-empty {
  color: #94a3b8;
  font-size: 0.92rem;
}

.dashboard-skeleton-card,
.dashboard-skeleton-chip,
.dashboard-skeleton-line {
  background: linear-gradient(90deg, #eef3f8 25%, #e4eaf3 37%, #eef3f8 63%);
  background-size: 400% 100%;
  animation: dashboard-shimmer 1.2s ease-in-out infinite;
}

.dashboard-skeleton-card {
  min-height: 196px;
  border-radius: 18px;
}

.dashboard-skeleton-chip {
  min-height: 88px;
  border-radius: 16px;
}

.dashboard-skeleton-table {
  display: grid;
  gap: 0.75rem;
}

.dashboard-skeleton-line {
  min-height: 14px;
  border-radius: 999px;
}

@keyframes dashboard-shimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

.billing-sync-panel,
.billing-sync-toolbar {
  border: 1px solid #d7deea;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
  padding: 0.95rem 1rem;
}

.billing-sync-head,
.billing-sync-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.billing-sync-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.billing-sync-copy,
.billing-sync-progress {
  color: #64748b;
  font-size: 0.82rem;
}

.billing-sync-actions,
.billing-sync-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.billing-sync-note {
  margin-top: 0.8rem;
  color: #475569;
  font-size: 0.82rem;
}

.billing-sync-note.is-warning {
  color: #9a3412;
}

.billing-sync-note.is-ready {
  color: #166534;
}

.billing-sync-fields {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.billing-sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d7deea;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
}

.billing-sync-chip.is-missing {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.billing-sync-chip.is-success {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.billing-sync-toolbar-copy {
  min-width: 0;
}

.sync-filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) repeat(3, minmax(0, 0.7fr));
  gap: 0.7rem;
}

.sync-filter-grid .form-control,
.sync-filter-grid .form-select {
  min-height: 44px;
  border-color: #ccd6e4;
  border-radius: 10px;
}

.sync-filter-grid .form-control:focus,
.sync-filter-grid .form-select:focus {
  border-color: #87adff;
  box-shadow: 0 0 0 0.15rem rgba(22, 115, 255, 0.14);
}

.monthly-mail-head,
.monthly-mail-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.monthly-mail-actions,
.monthly-mail-mini-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.monthly-mail-filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.8fr) repeat(4, minmax(120px, 0.7fr));
  gap: 0.7rem;
}

.monthly-mail-filter-grid .form-control,
.monthly-mail-filter-grid .form-select {
  min-height: 44px;
  border-color: #ccd6e4;
  border-radius: 10px;
}

.monthly-mail-filter-grid .form-control:focus,
.monthly-mail-filter-grid .form-select:focus {
  border-color: #87adff;
  box-shadow: 0 0 0 0.15rem rgba(22, 115, 255, 0.14);
}

.monthly-mail-options {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: #334155;
  font-size: 0.9rem;
}

.monthly-mail-options .form-check {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin: 0;
}

.monthly-mail-options .form-check-input {
  margin: 0;
}

.monthly-mail-test-recipient {
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: end;
  padding: 0.72rem 0.82rem;
  border: 1px dashed #bfd1ea;
  border-radius: 12px;
  background: #f8fbff;
}

.monthly-mail-test-recipient .form-control {
  min-height: 42px;
  border-color: #ccd6e4;
  border-radius: 10px;
}

.monthly-mail-test-recipient p {
  font-size: 0.84rem;
  line-height: 1.45;
}

.monthly-mail-table {
  min-width: 1180px;
}

.monthly-mail-select-col {
  width: 44px;
  text-align: center;
}

.monthly-mail-recipient,
.monthly-mail-reason {
  display: grid;
  gap: 0.16rem;
  max-width: 280px;
}

.monthly-mail-recipient strong {
  color: #0f172a;
  font-weight: 800;
  line-height: 1.2;
}

.monthly-mail-recipient span,
.monthly-mail-reason span {
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-mail-section-title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.monthly-mail-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.65rem;
}

.monthly-mail-summary-card {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.72rem 0.8rem;
}

.monthly-mail-summary-card span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.monthly-mail-summary-card strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
}

.monthly-mail-result-table {
  min-width: 980px;
}

.legacy-sync-table {
  min-width: 1040px;
}

.number-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.number-import-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.number-import-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.45fr) minmax(260px, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.number-import-input-block {
  display: grid;
  gap: 0.35rem;
}

.number-import-options .form-control:focus,
.number-import-options .form-select:focus {
  border-color: #87adff;
  box-shadow: 0 0 0 0.15rem rgba(22, 115, 255, 0.14);
}

.number-import-file-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.95rem;
  border: 1px dashed #b8c8df;
  border-radius: 14px;
  background: #f8fbff;
}

.number-import-file-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9f1ff;
  color: #2563eb;
  font-size: 1.35rem;
}

.number-import-file-copy {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.number-import-file-copy strong {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
}

.number-import-file-copy span {
  color: #64748b;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.number-import-file-card .form-control {
  grid-column: 1 / -1;
  min-height: 42px;
  border-color: #ccd6e4;
  border-radius: 10px;
  background: #ffffff;
}

.number-import-file-card .form-control:focus {
  border-color: #87adff;
  box-shadow: 0 0 0 0.15rem rgba(22, 115, 255, 0.14);
}

.number-import-help {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.number-import-options {
  display: grid;
  gap: 0.75rem;
  padding: 0.82rem;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fbff;
}

.number-import-options .form-control,
.number-import-options .form-select {
  min-height: 42px;
  border-color: #ccd6e4;
  border-radius: 10px;
}

.number-import-note {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px dashed #bfd1ea;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.number-import-note strong {
  color: #0f172a;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.number-import-table {
  min-width: 960px;
}

.billing-sync-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 164px));
  gap: 0.65rem;
  max-width: 360px;
}

.billing-sync-filter-field .form-label {
  margin-bottom: 0.28rem;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.billing-sync-filter-field .form-select,
.billing-sync-filter-field .form-control {
  min-height: 38px;
  border-color: #cfd8e6;
  font-size: 0.88rem;
}

.billing-sync-filter-field .form-select:focus,
.billing-sync-filter-field .form-control:focus {
  border-color: #9bb5f7;
  box-shadow: 0 0 0 0.14rem rgba(59, 130, 246, 0.14);
}

.etax-panel {
  border: 1px solid #d7deea;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
  padding: 0.95rem 1rem;
}

.etax-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.etax-panel-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.etax-panel-copy {
  color: #64748b;
  font-size: 0.82rem;
}

.etax-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.etax-mode-select {
  min-width: 122px;
}

.etax-check {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin: 0;
  padding: 0.42rem 0.65rem;
  border: 1px solid #d7deea;
  border-radius: 999px;
  background: #ffffff;
}

.etax-check .form-check-input {
  float: none;
  margin: 0;
}

.etax-check .form-check-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.etax-panel-note {
  margin: 0.78rem 0 0;
  color: #475569;
  font-size: 0.82rem;
}

.etax-panel-note.is-warning {
  color: #9a3412;
}

.etax-panel-note.is-ready {
  color: #166534;
}

.etax-summary-grid {
  margin-top: 0.82rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.etax-summary-card {
  border: 1px solid #d7deea;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.8rem 0.85rem;
}

.etax-summary-label {
  margin: 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.etax-summary-title {
  margin: 0.2rem 0 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
}

.etax-summary-meta {
  margin: 0.26rem 0 0;
  color: #64748b;
  font-size: 0.79rem;
  line-height: 1.45;
}

.file-ref-card {
  border: 1px solid #d7deea;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.82rem 0.88rem;
}

.billing-files-quick {
  border: 1px solid #d7deea;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
  padding: 0.95rem 1rem;
}

.billing-files-quick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.billing-files-quick-copy {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
}

.billing-files-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.35fr);
  gap: 1rem;
  align-items: start;
}

.billing-payment-upload-card,
.billing-source-files-card {
  border: 1px solid #d7deea;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.95rem 1rem;
}

.billing-payment-upload-card {
  background: linear-gradient(180deg, #fdfefe 0%, #f7fbff 100%);
}

.billing-payment-upload-card.is-linked {
  border-color: #bfd4ff;
  box-shadow: 0 0 0 1px rgba(191, 212, 255, 0.45);
}

.billing-payment-upload-head,
.billing-source-files-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.billing-payment-upload-kicker {
  margin: 0 0 0.2rem;
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.billing-payment-upload-title {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}

.billing-payment-upload-copy {
  margin: 0.28rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.billing-payment-upload-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.56rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.billing-payment-upload-badge.is-linked {
  background: #dcfce7;
  color: #166534;
}

.billing-payment-upload-badge.is-empty {
  background: #e5e7eb;
  color: #374151;
}

.billing-payment-upload-body {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.78rem;
}

.billing-payment-upload-main {
  display: grid;
  gap: 0.2rem;
}

.billing-payment-upload-empty {
  margin: 0;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 600;
}

.billing-payment-upload-meta {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.billing-payment-upload-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.billing-source-files-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.billing-source-file-row {
  display: grid;
  gap: 0.18rem;
  padding-bottom: 0.52rem;
  border-bottom: 1px solid #edf2f7;
}

.billing-source-file-row:last-child,
.billing-source-file-row:nth-last-child(2):nth-child(odd) {
  border-bottom: 0;
}

.billing-source-file-label {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.billing-source-file-copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.billing-source-file-main {
  display: flex;
  align-items: baseline;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.billing-source-file-meta {
  color: #94a3b8;
  font-size: 0.76rem;
  line-height: 1.35;
}

.billing-source-file-warning {
  margin: 0;
  color: #9a3412;
  font-size: 0.76rem;
  line-height: 1.4;
}

.billing-file-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

.billing-file-link-row {
  display: grid;
  gap: 0.18rem;
  padding: 0.12rem 0 0.28rem;
  border-bottom: 1px solid #edf2f7;
}

.billing-file-link-row:last-child,
.billing-file-link-row:nth-last-child(2):nth-child(odd) {
  border-bottom: 0;
}

.billing-file-link-copy {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.billing-file-link-label {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.billing-file-link-actions-inline {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.billing-file-link-subline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.billing-file-link-meta {
  color: #94a3b8;
  font-size: 0.76rem;
  line-height: 1.35;
}

.billing-file-open-link,
.billing-file-download-link {
  color: #2563eb;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.billing-file-open-link:hover,
.billing-file-download-link:hover,
.billing-file-open-link:focus,
.billing-file-download-link:focus {
  color: #1d4ed8;
  text-decoration: underline;
}

.billing-file-download-link {
  font-size: 0.82rem;
  font-weight: 600;
}

.billing-file-link-muted {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.35;
}

.billing-file-link-separator {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1;
}

.billing-file-inline-warning {
  grid-column: 1 / -1;
  margin: -0.08rem 0 0;
  color: #9a3412;
  font-size: 0.76rem;
  line-height: 1.4;
}

.file-ref-card.is-linked {
  background: #f7fbff;
  border-color: #bfd4ff;
}

.billing-file-card {
  height: 100%;
  border: 1px solid #d7deea;
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.85rem 0.9rem;
}

.billing-file-card.is-linked {
  border-color: #bfd4ff;
  background: #f7fbff;
}

.billing-file-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.billing-file-card-copy {
  min-width: 0;
}

.billing-file-card-label {
  margin: 0;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.billing-file-card-name {
  margin: 0.2rem 0 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.billing-file-card-help {
  margin: 0.62rem 0 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.billing-file-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.52rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.billing-file-state-badge.is-linked {
  background: #dcfce7;
  color: #166534;
}

.billing-file-state-badge.is-empty {
  background: #e5e7eb;
  color: #374151;
}

.billing-file-chip-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.72rem;
}

.billing-file-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.2rem 0.46rem;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  word-break: break-word;
}

.billing-file-chip.is-name {
  background: #e8efff;
  color: #2357c7;
}

.billing-file-card-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.78rem;
}

.billing-file-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.billing-file-doc-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.billing-files-compact-head {
  margin-bottom: 0.65rem;
}

.billing-file-quick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #d7deea;
  border-radius: 12px;
  background: #ffffff;
}

.billing-file-doc-chip {
  min-height: 58px;
  padding: 0.55rem 0.62rem;
}

.billing-file-quick-item.is-linked {
  border-color: #bfd4ff;
  background: #f7fbff;
}

.billing-file-quick-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.billing-file-quick-label {
  color: #0f172a;
  font-size: 0.83rem;
  font-weight: 700;
}

.billing-file-quick-value {
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.35;
  word-break: break-word;
}

.billing-file-quick-actions {
  display: flex;
  gap: 0.34rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.billing-file-quick-actions .btn {
  padding: 0.22rem 0.48rem;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
}

.billing-file-mini-empty {
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 800;
}

.billing-payment-mini {
  margin-top: 0.58rem;
  border: 1px solid #d7deea;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.52rem 0.62rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.billing-payment-mini.is-linked {
  border-color: #bfd4ff;
  background: #f7fbff;
}

.billing-file-preview-modal .modal-dialog {
  max-width: min(1120px, calc(100vw - 1.5rem));
}

.billing-file-preview-modal .modal-content {
  overflow: hidden;
}

.billing-file-preview-heading {
  min-width: 0;
}

.billing-file-preview-heading .modal-title {
  max-width: min(760px, 72vw);
  overflow-wrap: anywhere;
}

.billing-file-preview-meta {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.billing-file-preview-modal .modal-body {
  padding: 0;
}

.billing-file-preview-body {
  min-height: 420px;
  background: #f8fafc;
}

.billing-file-preview-frame {
  display: block;
  width: 100%;
  height: min(72vh, 680px);
  border: 0;
  background: #ffffff;
}

.billing-file-preview-image-wrap {
  height: min(72vh, 680px);
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #f8fafc;
}

.billing-file-preview-image {
  display: block;
  max-width: 100%;
  max-height: calc(min(72vh, 680px) - 2rem);
  object-fit: contain;
}

.billing-file-preview-text {
  height: min(72vh, 680px);
  margin: 0;
  overflow: auto;
  padding: 1rem;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.billing-file-preview-empty {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem;
  color: #64748b;
  font-size: 0.95rem;
  text-align: center;
}

.file-ref-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.file-ref-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e8efff;
  color: #2357c7;
  font-size: 1rem;
  flex: 0 0 auto;
}

.file-ref-copy {
  min-width: 0;
}

.file-ref-state {
  margin: 0;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
}

.file-ref-caption {
  margin: 0.12rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.file-ref-meta {
  margin-top: 0.78rem;
  padding-top: 0.68rem;
  border-top: 1px dashed #d7deea;
}

.file-ref-meta-grid {
  display: grid;
  gap: 0.55rem;
}

.file-ref-actions {
  margin-top: 0.74rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.file-ref-meta-label {
  display: block;
  margin-bottom: 0.24rem;
  color: #64748b;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.file-ref-id {
  display: inline-block;
  max-width: 100%;
  padding: 0.18rem 0.4rem;
  border-radius: 8px;
  background: #eef2f7;
  color: #334155;
  font-size: 0.78rem;
  white-space: normal;
  word-break: break-word;
}

.billing-files-warning {
  margin-top: 0.72rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 0.79rem;
}

.phone-map-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.8rem;
}

.phone-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.phone-map-head-copy {
  display: grid;
  gap: 0.12rem;
}

.phone-map-head-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.phone-map-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}

.phone-map-copy {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.phone-map-summary-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: #e8eef7;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.phone-map-empty {
  padding: 0.95rem 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: grid;
  gap: 0.22rem;
}

.phone-map-table {
  min-width: 680px;
}

.phone-map-table-busy {
  pointer-events: none;
  opacity: 0.72;
}

.phone-map-table th,
.phone-map-table td {
  white-space: nowrap;
  font-size: 0.86rem;
  padding: 0.52rem 0.62rem;
}

.phone-map-row {
  cursor: default;
}

.phone-map-phone-cell,
.phone-map-period {
  display: grid;
  gap: 0.14rem;
}

.phone-map-phone {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.phone-map-phone-meta {
  color: #94a3b8;
  font-size: 0.76rem;
  line-height: 1.35;
}

.phone-map-type-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 0.26rem 0.52rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.phone-map-period-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.35;
}

.phone-map-period-label {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.phone-map-remove-btn {
  min-width: 82px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.phone-map-available-table .phone-map-row,
.phone-map-available-table tr[data-available-row-id] {
  cursor: pointer;
}

.phone-map-available-table tr.table-row-selected {
  background: #e8f1ff;
}

.phone-map-panel .table-shell {
  max-height: 340px;
  overflow: auto;
}

.detail-subsection {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 1rem;
}

.detail-subsection-quiet {
  background: #fbfcfe;
  border-color: #e7edf5;
}

.detail-subsection-quiet .section-title:first-child {
  margin-top: 0;
}

.detail-subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.detail-subsection-title {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

.detail-section-card {
  height: 100%;
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.95rem;
  position: relative;
  overflow: visible;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.detail-section-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #94a3b8;
}

.detail-section-card-blue::before,
.detail-section-card-cyan::before,
.detail-section-card-emerald::before {
  background: #2563eb;
}

.detail-section-card-amber::before,
.detail-section-card-violet::before,
.detail-section-card-slate::before {
  background: #64748b;
}

.detail-section-card-head {
  margin-bottom: 0.85rem;
  padding-left: 0.1rem;
}

.detail-section-card-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.detail-section-card-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  color: #2563eb;
  font-size: 0.9rem;
}

.detail-section-card-title {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
}

.detail-section-card-copy {
  margin-top: 0.16rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.detail-section-card .form-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.34rem;
}

.detail-section-card .form-control,
.detail-section-card .form-select {
  min-height: 42px;
}

.form-error-alert {
  display: block;
  width: 100%;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff5f5;
  color: #b91c1c;
  padding: 0.55rem 0.75rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.form-error-alert-summary {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.form-error-alert-label {
  font-weight: 800;
}

.form-error-alert-list {
  margin-top: 0.35rem;
  padding-left: 1.15rem;
}

.form-success-alert {
  display: block;
  width: 100%;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  padding: 0.55rem 0.75rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.form-success-alert-summary {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.form-success-alert-label {
  font-weight: 800;
}

.central-sync-step-list {
  display: grid;
  gap: 0.3rem;
  padding-left: 0;
  list-style: none;
}

.central-sync-step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.central-sync-step-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.central-sync-step-status.is-ok {
  background: #dcfce7;
  color: #166534;
}

.central-sync-step-status.is-duplicate {
  background: #fef3c7;
  color: #92400e;
}

.central-sync-step-status.is-skipped {
  background: #f1f5f9;
  color: #475569;
}

.central-sync-step-status.is-failed {
  background: #fee2e2;
  color: #991b1b;
}

.central-sync-step-name {
  color: #0f172a;
  font-weight: 700;
}

.central-sync-step-id {
  color: #64748b;
  font-size: 0.78rem;
}

.central-sync-step-number {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
}

.central-sync-step-error {
  color: #b91c1c;
  font-size: 0.78rem;
}

.detail-subsection-quiet .detail-section-card {
  border-color: #e2e8f0;
  box-shadow: none;
}

.voice-remote-panel {
  border: 0;
}

.voice-remote-card {
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #f8fbff;
  padding: 1rem;
}

.voice-remote-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.voice-remote-title {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.voice-remote-copy,
.voice-remote-hint {
  color: #64748b;
  font-size: 0.82rem;
}

.voice-remote-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.voice-remote-meta-item {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  padding: 0.72rem;
  min-width: 0;
}

.voice-remote-meta-item span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.voice-remote-meta-item strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.voice-remote-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.voice-provision-modal {
  border: 1px solid #d7e1ef;
  border-radius: 14px;
  overflow: hidden;
}

.voice-provision-modal-subtitle {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.35;
}

.central-provision-step {
  padding: 0.85rem 0;
  border-top: 1px solid #e2e8f0;
}

.central-provision-step:first-child {
  border-top: 0;
  padding-top: 0;
}

.voice-provision-form {
  display: grid;
  gap: 1rem;
}

.voice-provision-section {
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.9rem;
}

.voice-provision-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.voice-provision-section-title {
  margin: 0;
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.25;
}

.voice-provision-section-copy {
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
}

.voice-provision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.voice-provision-grid .form-control,
.voice-provision-grid .form-select {
  min-height: 40px;
}

.voice-provision-number-table-wrap {
  overflow: auto;
}

.voice-provision-number-table {
  min-width: 980px;
}

.voice-provision-number-table th {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.voice-provision-number-table td,
.voice-provision-number-table th {
  vertical-align: middle;
  padding: 0.55rem;
}

.voice-provision-number-table .form-control,
.voice-provision-number-table .form-select {
  min-height: 38px;
  min-width: 0;
}

.voice-provision-number-actions {
  width: 54px;
  text-align: right;
}

.backup-voice-sync-panel {
  border-color: #cfe0f5;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.backup-voice-sync-head {
  align-items: flex-start;
}

.backup-voice-sync-copy {
  color: #64748b;
  font-size: 0.9rem;
}

.backup-voice-sync-badge {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.backup-voice-sync-badge.is-success {
  background: #dcfce7;
  color: #166534;
}

.backup-voice-sync-badge.is-error {
  background: #fee2e2;
  color: #991b1b;
}

.backup-voice-sync-badge.is-idle {
  background: #e2e8f0;
  color: #475569;
}

.backup-voice-sync-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.backup-voice-sync-metric {
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.75rem 0.85rem;
  min-width: 0;
}

.backup-voice-sync-metric span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  margin-bottom: 0.32rem;
  text-transform: uppercase;
}

.backup-voice-sync-metric strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-voice-sync-response {
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #ffffff;
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
}

.backup-voice-sync-response.is-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.backup-voice-sync-response span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.backup-voice-sync-response pre {
  color: #0f172a;
  font-family: "Sarabun", "Inter", sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.search-select {
  position: relative;
  z-index: 5;
}

.search-select:focus-within {
  z-index: 1100;
}

.search-select-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  color: #1f2937;
  display: flex;
  font-size: 1rem;
  gap: 0.75rem;
  justify-content: space-between;
  min-height: 44px;
  padding: 0.55rem 0.78rem;
  text-align: left;
  width: 100%;
}

.search-select-toggle:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.18);
  outline: 0;
}

.search-select-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-select-menu {
  background: #ffffff;
  border: 1px solid #cfd9e6;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  left: 0;
  padding: 0.55rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 1050;
}

.search-select-input {
  margin-bottom: 0.5rem;
}

.search-select-options {
  display: grid;
  gap: 0.2rem;
  max-height: 260px;
  overflow: auto;
}

.search-select-option {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #1f2937;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 0.5rem 0.58rem;
  text-align: left;
  width: 100%;
}

.search-select-option:hover,
.search-select-option:focus,
.search-select-option.is-selected {
  background: #eaf2ff;
  color: #0b57d0;
  outline: 0;
}

.search-select-empty {
  color: #64748b;
  font-size: 0.9rem;
  padding: 0.65rem 0.58rem;
}

.table-pbx-link,
.table-record-link {
  background: transparent;
  border: 0;
  color: #111827;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.table-pbx-link:focus,
.table-record-link:focus {
  outline: 2px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.role-permissions-page {
  display: grid;
  gap: 0.75rem;
}

.role-permissions-panel {
  min-height: calc(100vh - 1.5rem);
}

.role-permissions-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.role-permissions-kicker {
  margin: 0 0 0.2rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.role-permissions-meta {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.role-permissions-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.role-permissions-sidebar,
.role-permissions-template {
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #ffffff;
}

.role-permissions-sidebar {
  position: sticky;
  top: 0.75rem;
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
}

.role-permissions-sidebar-head,
.role-permissions-template-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.role-permissions-pane-title {
  color: #0f172a;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.25;
}

.role-permissions-role-list {
  display: grid;
  gap: 0.45rem;
}

.role-permissions-role-card {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.8rem;
  text-align: left;
}

.role-permissions-role-card:hover,
.role-permissions-role-card:focus {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.role-permissions-role-card.active {
  border-color: #7db0ff;
  background: #eaf2ff;
  color: #0f172a;
}

.role-permissions-role-card-name {
  font-size: 0.94rem;
  font-weight: 800;
}

.role-permissions-role-card-meta {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.role-permissions-template {
  min-width: 0;
  padding: 0.95rem;
}

.role-permissions-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(320px, 1fr) auto;
  align-items: end;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  border: 1px solid #d8e3f0;
  border-radius: 8px;
  background: #f8fbff;
}

.role-permissions-role {
  min-width: 0;
}

.role-permissions-role-create {
  min-width: 0;
}

.role-permissions-inline-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.role-permissions-inline-controls .btn {
  min-height: 38px;
  white-space: nowrap;
}

.role-permissions-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.role-permissions-actions .btn {
  min-height: 38px;
  min-width: 96px;
  border-radius: 8px;
  font-weight: 700;
}

.role-permissions-root-editor {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 420px);
  align-items: end;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0.9rem;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #f8fbff;
}

.role-permissions-root-note {
  color: #64748b;
  font-size: 0.84rem;
}

.role-permissions-root-editor-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(100%, 420px);
}

.role-permissions-root-editor-row .btn {
  min-height: 38px;
  white-space: nowrap;
}

.role-permissions-groups {
  display: grid;
  gap: 0.55rem;
}

.role-permissions-group {
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.role-permissions-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.role-permissions-group-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.role-permissions-group-title i {
  color: #2563eb;
  font-size: 0.95rem;
}

.role-permissions-group-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
}

.role-permissions-root-subtitle {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
}

.role-permissions-root-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.role-permissions-root-actions .btn {
  min-height: 30px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.role-permissions-count {
  border-radius: 999px;
  background: #e8f1ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.35rem 0.62rem;
  white-space: nowrap;
}

.role-permissions-table-wrap {
  overflow: auto;
}

.role-permissions-table {
  min-width: 820px;
}

.role-permissions-table th {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.role-permissions-table td,
.role-permissions-table th {
  vertical-align: middle;
  padding: 0.72rem 0.9rem;
}

.role-permissions-table tbody tr {
  transition: background-color 140ms ease, opacity 140ms ease;
}

.role-permissions-table tbody tr.is-dragging {
  opacity: 0.46;
}

.role-permissions-table tbody tr.is-drag-over {
  background: #eaf2ff;
}

.role-permissions-list {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
}

.role-permissions-tree-root {
  display: grid;
  gap: 0.35rem;
}

.role-permissions-tree-root.is-drag-over {
  outline: 2px solid #7db0ff;
  outline-offset: 2px;
}

.role-permissions-tree-node {
  border: 1px solid #d8e3f0;
  border-radius: 4px;
  background: linear-gradient(#ffffff, #f5f7fb);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 38px;
  padding: 0.38rem 0.45rem;
}

.role-permissions-tree-node.is-drag-over {
  background: #eaf2ff;
  border-color: #9ab8e8;
}

.role-permissions-tree-parent {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.role-permissions-tree-child {
  margin-left: 2.3rem;
  grid-template-columns: minmax(280px, 1fr) auto;
  background: #ffffff;
}

.role-permissions-tree-node-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.role-permissions-tree-node-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.role-permissions-tree-node-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}

.role-permissions-expand-btn,
.role-permissions-icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 1;
}

.role-permissions-expand-btn:hover,
.role-permissions-icon-btn:hover,
.role-permissions-expand-btn:focus,
.role-permissions-icon-btn:focus {
  background: #eaf2ff;
  color: #1d4ed8;
}

.role-permissions-tree-connector {
  width: 1rem;
  height: 1rem;
  border-left: 2px solid #cbd5e1;
  border-bottom: 2px solid #cbd5e1;
  flex: 0 0 auto;
  transform: translateY(-0.2rem);
}

.role-permissions-item {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(170px, 220px) minmax(120px, 150px);
  align-items: center;
  gap: 0.85rem;
  border: 1px solid #dbe5f1;
  border-left: 4px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.7rem 0.8rem;
  transition: background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.role-permissions-item.is-allowed {
  border-left-color: #22c55e;
}

.role-permissions-item.is-blocked {
  border-left-color: #94a3b8;
  background: #fbfdff;
}

.role-permissions-item.is-dragging {
  opacity: 0.46;
}

.role-permissions-item.is-drag-over {
  background: #eaf2ff;
  border-color: #9ab8e8;
}

.role-permissions-item-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.role-permissions-item-order {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.role-permissions-item-title {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.role-permissions-item-parent {
  display: grid;
  gap: 0.22rem;
}

.role-permissions-field-label {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.role-permissions-item-toggle {
  display: flex;
  justify-content: flex-end;
}

.role-permissions-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-weight: 700;
  padding: 1rem;
  text-align: center;
}

.role-permissions-order-cell {
  width: 160px;
  white-space: nowrap;
}

.role-permissions-drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 54px;
  color: #64748b;
  cursor: grab;
  font-weight: 800;
}

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

.role-permissions-order-number {
  min-width: 1.35rem;
  color: #334155;
  font-size: 0.84rem;
  text-align: right;
}

.role-permissions-order-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  margin-left: 0.4rem;
}

.role-permissions-order-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #d2dce9;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.role-permissions-order-btn:hover,
.role-permissions-order-btn:focus {
  border-color: #9ab8e8;
  background: #f4f8ff;
  color: #1d4ed8;
}

.role-permissions-order-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.role-permissions-key {
  color: #0f172a;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
  white-space: normal;
}

.role-permissions-tree-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.role-permissions-tree-branch {
  width: 1.1rem;
  height: 1.1rem;
  border-left: 2px solid #cbd5e1;
  border-bottom: 2px solid #cbd5e1;
  flex: 0 0 auto;
  transform: translateY(-0.18rem);
}

.role-permissions-tree-type {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.role-permissions-tree-type i {
  color: #2563eb;
}

.role-permissions-toggle-cell {
  width: 180px;
}

.role-permissions-root-cell {
  width: 190px;
}

.role-permissions-root-select {
  min-height: 34px;
}

.role-permissions-switch {
  display: inline-flex;
  align-items: center;
  min-width: 118px;
  margin: 0;
}

.role-permissions-switch .form-check-input {
  cursor: pointer;
}

.role-permissions-switch .form-check-label {
  color: #334155;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  margin-left: 0.35rem;
}

.sidebar-tree-root {
  display: grid;
  gap: 0.2rem;
}

.sidebar-tree-root-label {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.45rem 1rem 0.15rem;
  text-transform: uppercase;
}

.sidebar-tree-children {
  display: grid;
  gap: 0.15rem;
}

.sidebar-tree-children .module-tab-btn {
  padding-left: 1.35rem;
}

@media (max-width: 991.98px) {
  .role-permissions-workspace,
  .role-permissions-toolbar,
  .role-permissions-root-editor,
  .role-permissions-item,
  .role-permissions-tree-child {
    grid-template-columns: 1fr;
  }

  .role-permissions-sidebar {
    position: static;
  }

  .role-permissions-template-head {
    display: grid;
  }

  .role-permissions-actions,
  .role-permissions-item-toggle,
  .role-permissions-tree-node-actions {
    justify-content: flex-start;
  }

  .role-permissions-tree-child {
    margin-left: 1rem;
  }

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

  .voice-provision-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .voice-remote-meta-grid {
    grid-template-columns: 1fr;
  }

  .backup-voice-sync-grid {
    grid-template-columns: 1fr;
  }

  .voice-provision-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .voice-provision-section-head .btn {
    width: 100%;
  }

  .role-permissions-head {
    display: grid;
  }

  .role-permissions-meta {
    white-space: normal;
  }

  .role-permissions-toolbar,
  .role-permissions-actions,
  .role-permissions-role,
  .role-permissions-role-create,
  .role-permissions-inline-controls,
  .role-permissions-root-editor,
  .role-permissions-root-editor-row,
  .role-permissions-actions .btn {
    width: 100%;
  }

  .role-permissions-inline-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .role-permissions-root-editor {
    align-items: stretch;
    flex-direction: column;
  }

  .role-permissions-root-editor-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.phone-map-modal-dialog {
  max-width: 1120px;
}

.phone-map-modal-content {
  border: 1px solid #d7e1ef;
  border-radius: 18px;
  overflow: hidden;
}

.phone-map-modal-body {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  background: #f8fafc;
}

.phone-map-modal-section {
  border: 1px solid #d7e1ef;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.95rem 1rem;
}

.phone-map-modal-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.phone-map-modal-section-title {
  margin: 0;
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
}

.phone-map-modal-section-copy {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.5;
}

.phone-map-modal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.phone-map-modal-note {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.7rem 0.82rem;
  border: 1px dashed #c9d6ea;
  border-radius: 12px;
  background: #f8fbff;
  color: #516277;
  font-size: 0.8rem;
  line-height: 1.45;
}

.phone-map-modal-table-shell {
  max-height: 360px;
  overflow: auto;
}

.phone-map-modal-footer-copy {
  margin-right: auto;
  color: #64748b;
  font-size: 0.82rem;
}

@media (max-width: 767.98px) {
  .phone-map-modal-body {
    padding: 0.85rem;
  }

  .phone-map-modal-section {
    padding: 0.85rem;
  }

  .phone-map-modal-footer-copy {
    width: 100%;
    margin-right: 0;
    order: 3;
  }
}

.log-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.log-search-grid {
  display: grid;
  grid-template-columns: minmax(0, 520px);
  gap: 0.7rem;
}

.log-limit-grid {
  display: grid;
  grid-template-columns: minmax(0, 180px);
  gap: 0.7rem;
}

.log-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 18% 12%, rgba(22, 115, 255, 0.14), transparent 38%),
    radial-gradient(circle at 80% 6%, rgba(13, 148, 136, 0.14), transparent 44%),
    linear-gradient(180deg, #eef3fb 0%, #ecf0f4 100%);
}

.auth-card {
  width: min(100%, 680px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.auth-logo {
  display: block;
  width: 76px;
  height: 76px;
  margin-bottom: 1.15rem;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.44rem;
  font-weight: 700;
}

.auth-preview-otp {
  border: 1px dashed #b8c6db;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.65rem 0.72rem;
}

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

  .app-sidebar {
    min-height: 100dvh;
    height: 100dvh;
    width: min(86vw, 304px);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1050;
    padding: 0.85rem 0.55rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 220ms ease, box-shadow 220ms ease;
    box-shadow: none;
  }

  .module-tabs {
    grid-template-columns: 1fr;
  }

  .app-content {
    padding-top: 0.8rem;
  }

  .mobile-sidebar-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .mobile-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0.45rem;
    right: 0.3rem;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #f3f7fc;
  }

  .sidebar-header-has-close {
    position: relative;
    padding-right: 3.1rem;
  }

  .sidebar-session {
    margin-top: 1rem;
    padding-top: 0.4rem;
    padding-bottom: 0.25rem;
  }

  .sidebar-account-menu {
    position: absolute !important;
    inset: auto 0 calc(100% + 0.5rem) 0 !important;
    transform: none !important;
    margin: 0 !important;
    box-shadow: none;
  }

  .sidebar-account-head {
    padding: 0.78rem 0.9rem;
  }

  .sidebar-account-fullname {
    font-size: 0.92rem;
  }

  .sidebar-account-email {
    font-size: 0.86rem;
  }

  .sidebar-account-item {
    padding: 0.68rem 0.9rem;
    font-size: 0.9rem;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.28);
  }

  body.sidebar-open .mobile-sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

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

  .log-search-grid {
    grid-template-columns: 1fr;
  }

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

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

  .number-import-grid {
    grid-template-columns: 1fr;
  }

  .monthly-mail-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .dashboard-chip-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-head,
  .dashboard-control-bar {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (max-width: 767.98px) {
  .app-content {
    padding: 0.7rem;
  }

  .app-card .card-body {
    padding: 0.9rem;
  }

  .table {
    min-width: 900px;
  }

  .detail-header {
    flex-direction: column;
  }

  .etax-panel-actions {
    justify-content: flex-start;
  }

  .billing-sync-actions,
  .billing-sync-toolbar-actions {
    justify-content: flex-start;
  }

  .billing-sync-filter-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .billing-files-layout,
  .billing-file-link-grid,
  .billing-file-quick-grid,
  .billing-source-files-grid {
    grid-template-columns: 1fr;
  }

  .etax-summary-grid {
    grid-template-columns: 1fr;
  }

  .module-tabs {
    grid-template-columns: 1fr;
  }

  .list-toolbar-cluster,
  .list-toolbar-search-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .list-toolbar-cluster-left,
  .list-toolbar-cluster-right {
    width: 100%;
  }

  .list-limit-inline {
    width: 100%;
    justify-content: space-between;
  }

  .list-toolbar-modern #searchInput {
    width: 100%;
  }

  .log-toolbar-search-inline .log-search-control,
  .log-toolbar-search-inline .form-control {
    width: 100%;
  }

  .log-toolbar-search-inline .log-search-control {
    align-items: stretch;
  }

  .list-toolbar-modern .list-create-btn,
  .list-filter-toggle-btn,
  .list-limit-inline .form-select {
    width: 100%;
  }

  .list-simple-controls {
    max-width: 100%;
  }

  .list-filter-grid {
    grid-template-columns: 1fr;
  }

  .list-limit-grid {
    max-width: 100%;
  }

  .list-search-wrap {
    max-width: 100%;
  }

  .list-create-btn,
  .list-reset-btn {
    width: 100%;
  }

  .list-filter-offcanvas {
    width: 100vw;
    max-width: 100vw;
  }

  .list-filter-offcanvas .offcanvas-header {
    padding: 0.8rem 0.85rem 0.68rem;
  }

  .list-filter-offcanvas .offcanvas-body {
    padding: 0.8rem 0.85rem;
  }

  .list-filter-grid-body,
  .list-filter-offcanvas .list-filter-grid,
  .list-sort-grid {
    gap: 0.65rem;
  }

  .list-sort-order-group {
    gap: 0.4rem;
  }

  .list-filter-offcanvas-footer {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    padding: 0.7rem 0.85rem calc(0.8rem + env(safe-area-inset-bottom));
    background: #ffffff;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
  }

  .list-filter-offcanvas-footer .btn {
    width: 100%;
    min-width: 0;
  }

  .log-filter-grid {
    grid-template-columns: 1fr;
  }

  .log-limit-grid,
  .log-search-grid {
    grid-template-columns: 1fr;
  }

  .sync-filter-grid {
    grid-template-columns: 1fr;
  }

  .monthly-mail-filter-grid,
  .monthly-mail-summary-grid {
    grid-template-columns: 1fr;
  }

  .number-import-grid {
    grid-template-columns: 1fr;
  }

  .monthly-mail-actions,
  .monthly-mail-actions .btn,
  .number-import-actions,
  .number-import-actions .btn,
  .monthly-mail-mini-actions,
  .monthly-mail-mini-actions .btn {
    width: 100%;
  }

  .monthly-mail-test-recipient {
    grid-template-columns: 1fr;
  }

  .dashboard-controls-row,
  .dashboard-card-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-refresh-btn {
    width: 100%;
  }

  .dashboard-billing-table {
    min-width: 980px;
  }
}

/* Auth Login (2-step email + OTP) */
body.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #e7ebf0;
}

.auth-card {
  width: min(100%, 430px);
  border-radius: 14px;
  background: #f8f9fb;
  border: 1px solid #d5dbe3;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.auth-card .card-body {
  padding: 2rem !important;
}

.auth-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.auth-headline {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.62rem;
  font-weight: 700;
  color: #0f172a;
}

.auth-subline {
  margin: 0;
  color: #4b5563;
  font-size: 0.93rem;
}

.auth-label {
  color: #516174;
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-ref {
  color: #4b5563;
  font-weight: 500;
}

.auth-main-input {
  height: 42px;
  font-size: 0.96rem;
  border: 1px solid #cad4e0;
  background: #e9eff7;
  color: #0f172a;
}

.auth-main-input:focus {
  border-color: #7aa2ff;
  box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.15);
  background: #eaf1fa;
}

.auth-main-btn {
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #1f2630 0%, #202a35 100%);
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

.auth-main-btn:hover,
.auth-main-btn:focus {
  background: linear-gradient(90deg, #171d25 0%, #1a222c 100%);
  color: #ffffff;
}

.auth-main-btn:disabled {
  background: #70747a;
  color: #eef0f3;
}

.auth-edit-link {
  font-weight: 700;
  text-decoration: none;
}

.auth-resend-link {
  color: #74a6ff;
  font-weight: 700;
  text-decoration: none;
}

.auth-resend-link[disabled] {
  color: #93b8f1;
  opacity: 1;
}

.auth-otp-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.auth-otp-box {
  width: 100%;
  height: 54px;
  border: 1px solid #c8d1dd;
  border-radius: 10px;
  background: #f6f7fa;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
}

.auth-otp-box:focus {
  border-color: #6376ff;
  box-shadow: 0 0 0 0.15rem rgba(99, 118, 255, 0.18);
}

@media (max-width: 575.98px) {
  .auth-card .card-body {
    padding: 1.4rem !important;
  }

  .auth-logo {
    width: 46px;
    height: 46px;
    border-radius: 10px;
  }

  .auth-headline {
    font-size: 1.45rem;
  }

  .auth-main-btn {
    font-size: 0.92rem;
    height: 44px;
  }

  .auth-otp-box {
    height: 50px;
    font-size: 1.32rem;
  }
}
