/* ============================================================
   TellerPro SaaS — SuperAdmin Premium Design System
   ============================================================ */

:root {
  --sa-primary:     #f43f5e; /* Rose 500 */
  --sa-primary-dark:#e11d48;
  --sa-primary-gl:  rgba(244,63,94,0.06);
  --sa-bg:          #f1f5f9;
  --sa-surface:     #ffffff;
  --sa-surface-elev:#f8fafc;
  --sa-border:      rgba(0,0,0,0.06);
  --sa-text:        #0f172a;
  --sa-text-mut:    #64748b;
  --sa-sidebar-w:   280px;
}

body.superadmin {
  background: var(--sa-bg);
  color: var(--sa-text);
  font-family: 'Inter', -apple-system, sans-serif;
  overflow-x: hidden;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sa-sidebar {
  background: var(--sa-surface);
  border-right: 1px solid var(--sa-border);
  width: var(--sa-sidebar-w);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  padding: 1.5rem;
}

.sa-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.5rem;
    margin-bottom: 2.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--sa-border);
}

.sa-logo-icon {
    background: var(--sa-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(244,63,94,0.3);
}

.sa-logo-text {
    line-height: 1.2;
}

.sa-logo-brand {
    font-weight: 800;
    font-size: 1.1rem;
    display: block;
}

.sa-logo-sub {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--sa-text-mut);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Navigation */
.sa-sidebar nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.sa-sidebar nav::-webkit-scrollbar {
    width: 4px;
}

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

.sa-sidebar nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.sa-sidebar nav::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.sa-nav-section {
    margin-bottom: 2rem;
}

.sa-nav-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--sa-text-mut);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
    opacity: 0.6;
}

.sa-nav-item {
  color: var(--sa-text-mut);
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 4px;
}

.sa-nav-item svg {
    opacity: 0.7;
    width: 20px;
    height: 20px;
}

.sa-nav-item:hover {
  background: #f1f5f9;
  color: var(--sa-text);
}

.sa-nav-item:hover svg {
    opacity: 1;
}

.sa-nav-item.active {
  background: var(--sa-primary-gl);
  color: var(--sa-primary);
  font-weight: 600;
}

.sa-nav-item.active svg {
    opacity: 1;
    stroke-width: 2.5px;
}

/* User Profile Mini Card */
.sa-user-card {
    background: var(--sa-surface-elev);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--sa-border);
}

.sa-user-avatar {
    width: 36px;
    height: 36px;
    background: var(--sa-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Main Content Area */
.sa-main {
    flex: 1;
    margin-left: var(--sa-sidebar-w);
    padding: 2rem 3rem;
}

.sa-page-header {
    margin-bottom: 2rem;
}

.sa-page-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

/* Dashboard Cards */
.sa-card {
  background: var(--sa-surface);
  border: 1px solid var(--sa-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sa-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sa-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sa-text-mut);
    margin-bottom: 0.25rem;
}

.sa-stat-value {
  font-size: 2rem;
  font-weight: 800;
  margin: 0.25rem 0;
  color: var(--sa-text);
}

.sa-stat-footer {
    font-size: 0.75rem;
    color: var(--sa-text-mut);
}

/* Utility Classes */
.badge-sa {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.table-sa {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-sa thead th {
    text-align: left;
    padding: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--sa-text-mut);
    letter-spacing: 0.05em;
}

.table-sa tbody tr td {
    background: var(--sa-surface-elev);
    padding: 1rem;
}

.table-sa tbody tr td:first-child { border-radius: 12px 0 0 12px; }
.table-sa tbody tr td:last-child { border-radius: 0 12px 12px 0; }
