/* ============================================
   LCO CONNECT — Super Admin Styles
   Phase 2: Super Admin Dashboard
   ============================================ */


/* ══════════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════════ */

.sa-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 500px at 30% 20%, rgba(11, 122, 110, 0.08), transparent 60%),
    radial-gradient(700px 400px at 80% 80%, rgba(74, 80, 196, 0.06), transparent 50%),
    var(--paper);
  position: relative;
  overflow: hidden;
}

.sa-login-main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

.sa-login-card {
  background: linear-gradient(155deg, rgba(var(--clay-light), 1) 0%, rgba(var(--clay-light), 0.92) 100%);
  box-shadow:
    8px 10px 22px rgba(var(--clay-shadow), 0.09),
    -6px -6px 18px rgba(255, 255, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  padding: 40px 36px;
}

@media (max-width: 480px) {
  .sa-login-card { padding: 30px 22px; }
}

.sa-login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.sa-login-brand .brand {
  justify-content: center;
}

.sa-login-subtitle {
  display: inline-block;
  background: linear-gradient(135deg, var(--indigo-light), #D6D6F5);
  color: var(--indigo-dark);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-top: 8px;
}

.sa-login-card h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 6px;
}

.sa-login-desc {
  text-align: center;
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 28px;
}

.sa-form-group {
  margin-bottom: 18px;
}

.sa-form-group label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 6px;
}

.sa-form-group input {
  width: 100%;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sa-form-group input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 122, 110, 0.1);
}

.sa-form-group input.error {
  border-color: #E74C3C;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.sa-field-error {
  font-size: 12px;
  color: #E74C3C;
  margin-top: 4px;
  display: none;
}

.sa-field-error.visible {
  display: block;
}

.sa-password-wrap {
  position: relative;
}

.sa-password-wrap input {
  padding-right: 44px;
}

.sa-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--slate);
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.sa-toggle-pw:hover {
  color: var(--ink);
}

.sa-login-btn {
  width: 100%;
  padding: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(155deg, var(--teal), var(--teal-dark));
  color: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px rgba(11, 122, 110, 0.3);
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sa-login-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11, 122, 110, 0.35);
}

.sa-login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.sa-login-footer-text {
  text-align: center;
  margin-top: 18px;
}

.sa-login-footer-text a {
  font-size: 13px;
  color: var(--slate);
  transition: color 0.15s ease;
}

.sa-login-footer-text a:hover {
  color: var(--teal);
}

/* Background circles */
.sa-login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.sa-bg-circle {
  position: absolute;
  border-radius: 50%;
}

.sa-bg-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(11, 122, 110, 0.06), transparent 70%);
  top: -200px;
  right: -120px;
}

.sa-bg-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(74, 80, 196, 0.05), transparent 70%);
  bottom: -160px;
  left: -100px;
}

.sa-bg-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(240, 164, 48, 0.06), transparent 70%);
  top: 40%;
  left: 60%;
}


/* ══════════════════════════════════════════════
   SPINNER
   ══════════════════════════════════════════════ */

.sa-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sa-spin 0.6s linear infinite;
}

@keyframes sa-spin {
  to { transform: rotate(360deg); }
}


/* ══════════════════════════════════════════════
   TOAST (shared across admin pages)
   ══════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.sa-toast {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(15, 28, 46, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: sa-toast-in 0.3s ease;
}

.sa-toast.error {
  border-left-color: #E74C3C;
}

.sa-toast.success {
  border-left-color: var(--teal);
}

.sa-toast.removing {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sa-toast-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

@keyframes sa-toast-in {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* ══════════════════════════════════════════════
   DASHBOARD LAYOUT
   ══════════════════════════════════════════════ */

.sa-dashboard-page {
  min-height: 100vh;
  background: var(--paper);
}

/* Header */
.sa-header {
  background: rgba(246, 242, 234, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.sa-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sa-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sa-header-left .brand {
  font-size: 17px;
}

.sa-header-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--indigo-light), #D6D6F5);
  color: var(--indigo-dark);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
}

.sa-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sa-admin-name {
  font-size: 13px;
  color: var(--slate);
  font-weight: 500;
}

@media (max-width: 600px) {
  .sa-admin-name { display: none; }
}

.sa-logout-btn {
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.sa-logout-btn:hover {
  border-color: var(--slate);
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.sa-mobile-nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.sa-mobile-nav-toggle:hover {
  background: rgba(15, 28, 46, 0.04);
}

.sa-mobile-nav-toggle svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 860px) {
  .sa-mobile-nav-toggle { display: flex; }
}


/* Body layout */
.sa-body {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
}


/* Sidebar */
.sa-sidebar {
  width: 240px;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.5);
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sa-sidebar-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  padding: 0 12px;
  margin-bottom: 8px;
}

.sa-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.sa-nav-item:hover {
  background: rgba(15, 28, 46, 0.04);
  color: var(--ink);
}

.sa-nav-item.active {
  background: linear-gradient(155deg, rgba(11, 122, 110, 0.08), rgba(11, 122, 110, 0.04));
  color: var(--teal-dark);
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px rgba(11, 122, 110, 0.12);
}

.sa-nav-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sa-nav-count {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  background: var(--amber-light);
  color: var(--amber-dark);
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 22px;
  text-align: center;
}

@media (max-width: 860px) {
  .sa-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    z-index: 50;
    background: var(--card);
    border-right: 1px solid var(--line);
    box-shadow: 10px 0 30px rgba(15, 28, 46, 0.1);
    transition: left 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
    padding-top: 20px;
  }

  .sa-sidebar.open {
    left: 0;
  }

  .sa-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 28, 46, 0.3);
    z-index: 45;
  }

  .sa-sidebar-overlay.visible {
    display: block;
  }
}


/* Main content area */
.sa-content {
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
}

@media (max-width: 600px) {
  .sa-content { padding: 18px 16px; }
}


/* ══════════════════════════════════════════════
   SECTION VIEWS
   ══════════════════════════════════════════════ */

.sa-view {
  display: none;
}

.sa-view.active {
  display: block;
  animation: sa-view-in 0.25s ease;
}

@keyframes sa-view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ══════════════════════════════════════════════
   OVERVIEW STAT CARDS
   ══════════════════════════════════════════════ */

.sa-view-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 6px;
}

.sa-view-subtitle {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 24px;
}

.sa-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 1000px) {
  .sa-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .sa-stats-grid { grid-template-columns: 1fr; }
}

.sa-stat-card {
  background: linear-gradient(155deg, rgba(var(--clay-light), 1) 0%, rgba(var(--clay-light), 0.88) 100%);
  box-shadow:
    4px 5px 14px rgba(var(--clay-shadow), 0.06),
    -4px -4px 12px rgba(255, 255, 255, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 22px 20px;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.sa-stat-card:hover {
  transform: translateY(-3px);
}

.sa-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sa-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sa-stat-dot.total { background: var(--ink); }
.sa-stat-dot.pending { background: var(--amber); }
.sa-stat-dot.approved { background: var(--teal); }
.sa-stat-dot.rejected { background: #E74C3C; }

.sa-stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 36px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.sa-stat-loading {
  width: 60px;
  height: 36px;
  background: linear-gradient(90deg, var(--line) 25%, rgba(230, 223, 209, 0.5) 50%, var(--line) 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: sa-shimmer 1.5s ease infinite;
}

@keyframes sa-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ══════════════════════════════════════════════
   SEARCH & FILTERS
   ══════════════════════════════════════════════ */

.sa-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.sa-search-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.sa-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate);
  pointer-events: none;
}

.sa-search-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sa-search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 122, 110, 0.08);
}

.sa-filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sa-filter-btn {
  padding: 9px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border: 1.5px solid var(--line);
  border-radius: 100px;
  background: var(--card);
  color: var(--slate);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.sa-filter-btn:hover {
  border-color: var(--slate);
  color: var(--ink);
}

.sa-filter-btn.active {
  background: linear-gradient(155deg, var(--teal), var(--teal-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(11, 122, 110, 0.25);
}


/* ══════════════════════════════════════════════
   APPLICATION TABLE / CARDS
   ══════════════════════════════════════════════ */

.sa-table-wrap {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
}

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

.sa-table thead th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 242, 234, 0.5);
  white-space: nowrap;
}

.sa-table tbody tr {
  border-bottom: 1px solid rgba(230, 223, 209, 0.5);
  transition: background 0.15s ease;
  cursor: pointer;
}

.sa-table tbody tr:last-child {
  border-bottom: none;
}

.sa-table tbody tr:hover {
  background: rgba(11, 122, 110, 0.02);
}

.sa-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--ink);
  vertical-align: middle;
}

.sa-table .sa-app-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-dark);
}

.sa-table .sa-biz-name {
  font-weight: 600;
}

.sa-table .sa-date {
  font-size: 13px;
  color: var(--slate);
  white-space: nowrap;
}

.sa-table .sa-services {
  font-size: 12px;
  color: var(--slate);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hide table on mobile, show cards */
@media (max-width: 860px) {
  .sa-table thead { display: none; }
  .sa-table, .sa-table tbody, .sa-table tr, .sa-table td {
    display: block;
    width: 100%;
  }
  .sa-table tr {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    position: relative;
  }
  .sa-table td {
    padding: 3px 0;
  }
  .sa-table td::before {
    content: attr(data-label);
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate);
    min-width: 100px;
    margin-right: 8px;
  }
  .sa-table .sa-services {
    max-width: none;
  }
}


/* ══════════════════════════════════════════════
   STATUS BADGES
   ══════════════════════════════════════════════ */

.sa-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.sa-badge.pending {
  background: var(--amber-light);
  color: var(--amber-dark);
}

.sa-badge.approved {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.sa-badge.rejected {
  background: #FDEDEC;
  color: #C0392B;
}

.sa-badge.verified {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.sa-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.sa-badge.pending::before { background: var(--amber); }
.sa-badge.approved::before { background: var(--teal); }
.sa-badge.rejected::before { background: #E74C3C; }
.sa-badge.verified::before { background: var(--teal); }


/* ══════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════ */

.sa-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--slate);
}

.sa-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.sa-empty h3 {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
}

.sa-empty p {
  font-size: 14px;
}


/* ══════════════════════════════════════════════
   APPLICATION DETAIL VIEW
   ══════════════════════════════════════════════ */

.sa-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 18px;
  border: none;
  background: none;
  font-family: inherit;
  transition: color 0.15s ease;
}

.sa-detail-back:hover {
  color: var(--teal);
}

.sa-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.sa-detail-header-left h2 {
  font-size: 22px;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 4px;
}

.sa-detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.sa-detail-meta-item {
  font-size: 13px;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 5px;
}

.sa-detail-meta-item .mono {
  font-weight: 600;
  color: var(--ink);
}

.sa-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sa-btn-approve,
.sa-btn-reject {
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sa-btn-approve {
  background: linear-gradient(155deg, var(--teal), var(--teal-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(11, 122, 110, 0.25);
}

.sa-btn-approve:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11, 122, 110, 0.3);
}

.sa-btn-reject {
  background: #fff;
  color: #C0392B;
  border: 1.5px solid #FADBD8;
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.08);
}

.sa-btn-reject:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #E74C3C;
  box-shadow: 0 6px 16px rgba(231, 76, 60, 0.14);
}

.sa-btn-approve:disabled,
.sa-btn-reject:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* Detail sections */
.sa-detail-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 18px;
}

.sa-detail-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sa-detail-section-icon {
  font-size: 16px;
}

.sa-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 600px) {
  .sa-detail-grid { grid-template-columns: 1fr; }
}

.sa-detail-field {
  padding: 0;
}

.sa-detail-field.full-width {
  grid-column: 1 / -1;
}

.sa-detail-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin-bottom: 2px;
  font-family: 'IBM Plex Mono', monospace;
}

.sa-detail-value {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}

/* Service tags */
.sa-service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sa-service-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background: var(--teal-light);
  color: var(--teal-dark);
}


/* ══════════════════════════════════════════════
   DOCUMENT CARDS
   ══════════════════════════════════════════════ */

.sa-doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sa-doc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(246, 242, 234, 0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
  flex-wrap: wrap;
}

.sa-doc-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.sa-doc-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.sa-doc-details {
  min-width: 0;
}

.sa-doc-type {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate);
}

.sa-doc-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.sa-doc-meta {
  font-size: 12px;
  color: var(--slate);
}

.sa-doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sa-doc-view-btn {
  padding: 7px 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  border: 1.5px solid var(--teal);
  border-radius: 8px;
  background: transparent;
  color: var(--teal-dark);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.sa-doc-view-btn:hover {
  background: var(--teal);
  color: #fff;
}

.sa-doc-status-btn {
  padding: 7px 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease;
  white-space: nowrap;
}

.sa-doc-status-btn.verify {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.sa-doc-status-btn.reject {
  background: #FDEDEC;
  color: #C0392B;
}

.sa-doc-status-btn:hover {
  transform: translateY(-1px);
}


/* ══════════════════════════════════════════════
   AUDIT SECTION
   ══════════════════════════════════════════════ */

.sa-audit-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: rgba(246, 242, 234, 0.5);
  border-radius: 10px;
  border: 1px solid var(--line);
}

.sa-audit-row {
  font-size: 13px;
  color: var(--slate);
  display: flex;
  gap: 8px;
}

.sa-audit-row strong {
  color: var(--ink);
  font-weight: 600;
  min-width: 100px;
}


/* ══════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════ */

.sa-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 28, 46, 0.4);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: sa-modal-bg-in 0.2s ease;
}

.sa-modal-overlay.visible {
  display: flex;
}

@keyframes sa-modal-bg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sa-modal {
  background: var(--card);
  border-radius: 18px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(15, 28, 46, 0.2);
  animation: sa-modal-in 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes sa-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
  .sa-modal { padding: 24px 20px; }
}

.sa-modal h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  margin-bottom: 8px;
}

.sa-modal p {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 20px;
}

.sa-modal textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
  margin-bottom: 16px;
}

.sa-modal textarea:focus {
  border-color: var(--teal);
}

.sa-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.sa-modal-cancel {
  padding: 10px 18px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.sa-modal-cancel:hover {
  border-color: var(--slate);
}

.sa-modal-confirm {
  padding: 10px 18px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sa-modal-confirm.approve {
  background: linear-gradient(155deg, var(--teal), var(--teal-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(11, 122, 110, 0.2);
}

.sa-modal-confirm.reject {
  background: #E74C3C;
  color: #fff;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.sa-modal-confirm:hover {
  transform: translateY(-1px);
}

.sa-modal-confirm:disabled,
.sa-modal-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ══════════════════════════════════════════════
   IMAGE PREVIEW MODAL
   ══════════════════════════════════════════════ */

.sa-preview-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 28, 46, 0.85);
  z-index: 110;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
}

.sa-preview-overlay.visible {
  display: flex;
}

.sa-preview-overlay img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  cursor: default;
}

.sa-preview-overlay iframe {
  width: 90%;
  height: 90vh;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.sa-table-responsive {
  overflow-x: auto;
}

.sa-preview-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.sa-preview-close:hover {
  background: rgba(255, 255, 255, 0.3);
}


/* ══════════════════════════════════════════════
   FULL SCREEN LOADING
   ══════════════════════════════════════════════ */

.sa-loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--paper);
}

.sa-loading-content {
  text-align: center;
}

.sa-loading-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: sa-spin 0.7s linear infinite;
  margin-bottom: 14px;
}

.sa-loading-text {
  font-size: 14px;
  color: var(--slate);
}


/* ══════════════════════════════════════════════
   TABLE ACTION BUTTON
   ══════════════════════════════════════════════ */

.sa-view-btn {
  padding: 6px 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  border: 1.5px solid var(--teal);
  border-radius: 8px;
  background: transparent;
  color: var(--teal-dark);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.sa-view-btn:hover {
  background: var(--teal);
  color: #fff;
}

.sa-view-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 122, 110, 0.2);
}

.sa-view-btn:active {
  transform: translateY(1px);
}


/* ══════════════════════════════════════════════
   DOC REJECT REASON INPUT (inline)
   ══════════════════════════════════════════════ */

.sa-doc-reject-input {
  display: none;
  margin-top: 8px;
  width: 100%;
}

.sa-doc-reject-input.visible {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.sa-doc-reject-input textarea {
  flex: 1;
  min-height: 50px;
  padding: 8px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  border: 1.5px solid #FADBD8;
  border-radius: 8px;
  background: #FFFAFA;
  color: var(--ink);
  resize: vertical;
  outline: none;
}

.sa-doc-reject-input textarea:focus {
  border-color: #E74C3C;
}

.sa-doc-reject-input button {
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.sa-doc-reject-confirm {
  background: #E74C3C;
  color: #fff;
}

.sa-doc-reject-cancel {
  background: var(--line);
  color: var(--ink);
}


/* ══════════════════════════════════════════════
   PAGINATION (optional future)
   ══════════════════════════════════════════════ */

.sa-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.sa-page-btn {
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--slate);
  cursor: pointer;
}

.sa-page-btn.active {
  background: var(--teal);
  color: #fff;
  border-color: transparent;
}


/* ══════════════════════════════════════════════
   PHASE 13A: SUSPENDED BADGE
   ══════════════════════════════════════════════ */

.sa-badge.suspended {
  background: #FDEDEC;
  color: #C0392B;
}

.sa-badge.suspended::before {
  background: #E74C3C;
}


/* ══════════════════════════════════════════════
   PHASE 13A: INSPECTOR MODAL CONTENT
   ══════════════════════════════════════════════ */

.sa-inspect-section {
  background: rgba(246, 242, 234, 0.45);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.sa-inspect-section:last-child {
  margin-bottom: 0;
}

.sa-inspect-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.sa-inspect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

@media (max-width: 600px) {
  .sa-inspect-grid {
    grid-template-columns: 1fr;
  }
}

.sa-inspect-field {
  padding: 0;
}


/* ══════════════════════════════════════════════
   PHASE 13A: GOVERNANCE ACTION BUTTONS
   ══════════════════════════════════════════════ */

.sa-btn-suspend {
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-radius: 10px;
  border: 1.5px solid #FADBD8;
  background: #fff;
  color: #C0392B;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.08);
}

.sa-btn-suspend:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #E74C3C;
  box-shadow: 0 6px 16px rgba(231, 76, 60, 0.14);
}

.sa-btn-reactivate {
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(155deg, var(--teal), var(--teal-dark));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(11, 122, 110, 0.25);
}

.sa-btn-reactivate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11, 122, 110, 0.3);
}

.sa-btn-suspend:disabled,
.sa-btn-reactivate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ══════════════════════════════════════════════
   PHASE 13A: LCO DIRECTORY ROW STYLING
   ══════════════════════════════════════════════ */

.sa-lco-dir-row {
  transition: background 0.15s ease;
}

.sa-lco-dir-row:hover {
  background: rgba(11, 122, 110, 0.03) !important;
}


/* ══════════════════════════════════════════════
   PHASE 13A: LCO DETAIL MODAL - Large Variant
   ══════════════════════════════════════════════ */

.sa-modal.large {
  max-width: 820px;
}

@media (max-width: 860px) {
  .sa-modal.large {
    max-width: 98%;
    width: 98%;
    padding: 20px 16px;
    max-height: 85vh;
  }
}


/* ══════════════════════════════════════════════
   PHASE 13B: ROLE & CATEGORY BADGES
   ══════════════════════════════════════════════ */

.sa-badge.role-super-admin {
  background: #F3E8FF;
  color: #6B21A8;
}
.sa-badge.role-super-admin::before {
  background: #9333EA;
}

.sa-badge.role-lco-admin {
  background: #E0F2FE;
  color: #0369A1;
}
.sa-badge.role-lco-admin::before {
  background: #0284C7;
}

.sa-badge.role-customer {
  background: #CCFBF1;
  color: #0F766E;
}
.sa-badge.role-customer::before {
  background: #0D9488;
}

.sa-badge.role-technician {
  background: #FEF3C7;
  color: #B45309;
}
.sa-badge.role-technician::before {
  background: #D97706;
}

/* Communication Category Badges */
.sa-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 100px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.sa-cat-badge.account { background: #E0F2FE; color: #0369A1; }
.sa-cat-badge.service_request { background: #FEF3C7; color: #B45309; }
.sa-cat-badge.payment { background: #DCFCE7; color: #15803D; }
.sa-cat-badge.announcement { background: #FFEDD5; color: #C2410C; }
.sa-cat-badge.system { background: #F3E8FF; color: #6B21A8; }
.sa-cat-badge.customer_activity { background: #CCFBF1; color: #0F766E; }
.sa-cat-badge.technician_activity { background: #FEE2E2; color: #B91C1C; }


/* ══════════════════════════════════════════════
   PHASE 13C-2: AUDIT & SECURITY BADGES & STYLING
   ══════════════════════════════════════════════ */

/* Generic white card container (matches .sa-table-wrap used by other views).
   The Audit Trail block uses .sa-card; without this rule it rendered directly
   on the ash page background instead of on a white card. */
.sa-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* Collapsible secondary-filter row in the Audit & Security toolbar */
.sa-audit-more-filters {
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

/* Severity Badges */
.sa-sev-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sa-sev-badge.info {
  background: #E0F2FE;
  color: #0369A1;
}

.sa-sev-badge.warning {
  background: #FEF3C7;
  color: #B45309;
}

.sa-sev-badge.critical {
  background: #FEE2E2;
  color: #B91C1C;
}

/* Category Badges */
.sa-audit-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sa-audit-cat-badge.governance { background: #EEF2FF; color: #4338CA; }
.sa-audit-cat-badge.security { background: #FEE2E2; color: #991B1B; }
.sa-audit-cat-badge.user_mgmt { background: #F3E8FF; color: #6B21A8; }
.sa-audit-cat-badge.billing { background: #DCFCE7; color: #166534; }
.sa-audit-cat-badge.service_request { background: #FEF3C7; color: #92400E; }
.sa-audit-cat-badge.technician { background: #E0F2FE; color: #075985; }
.sa-audit-cat-badge.system { background: #F3F4F6; color: #374151; }

/* JSON Code Preview in Inspector Modal */
.sa-json-preview {
  background: #0F172A;
  color: #38BDF8;
  padding: 14px 16px;
  border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
  max-height: 250px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 6px 0 0 0;
  border: 1px solid #1E293B;
}

.sa-role-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  margin-top: 2px;
}
.sa-role-super_admin { background: #FCE7F3; color: #9D174D; }
.sa-role-lco_admin { background: #E0F2FE; color: #0369A1; }
.sa-role-customer { background: #CCFBF1; color: #0F766E; }
.sa-role-technician { background: #FEF3C7; color: #B45309; }
.sa-role-system { background: #F3F4F6; color: #4B5563; }

/* Super Admin Toolbar Controls */
.sa-select-input {
  padding: 8px 32px 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  height: 38px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sa-select-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 122, 110, 0.08);
}

.sa-date-input {
  padding: 8px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  cursor: pointer;
  height: 38px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sa-date-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 122, 110, 0.08);
}

.sa-btn-secondary {
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  height: 38px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.sa-btn-secondary:hover {
  background: rgba(15, 28, 46, 0.04);
  border-color: var(--slate);
  color: var(--ink);
}

.sa-btn-secondary:active {
  transform: translateY(1px);
}



