:root {
  --primary: #002F6C;
  --primary-dark: #001f47;
  --primary-light: #0A4D94;
  --accent: #E05A47;
  --gold: #D4AF37;
  --gold-bg: #FEF9E7;
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: #0B192C;
  color: #E2E8F0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  border-right: 1px solid #1E293B;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 22px 20px;
  border-bottom: 1px solid #1E293B;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background: linear-gradient(135deg, #004B9B, #002F6C);
  color: var(--gold);
  font-weight: 800;
  font-size: 18px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.logo-text h2 {
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.3px;
}

.logo-text p {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 500;
}

.sidebar-menu {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748B;
  padding: 12px 10px 4px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 9px;
  color: #94A3B8;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary) 0%, #004B9B 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 47, 108, 0.4);
}

.nav-item .icon {
  font-size: 17px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #1E293B;
  background: #081220;
}

.server-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  color: #34D399;
  font-weight: 600;
}

.pulse {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Main Content Area */
.main-wrapper {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  height: 70px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 900;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-menu-mobile {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
}

.page-title h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.page-title p {
  font-size: 12px;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Rank Selector Pill in Header */
.rank-switch-box {
  display: flex;
  align-items: center;
  background: #F1F5F9;
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.rank-switch-box label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 8px;
}

.rank-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

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

.rank-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(0, 47, 108, 0.3);
}

.badge-shopee {
  background: #FFF1EE;
  color: #EE4D2D;
  border: 1px solid #FFD3CB;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Content Container */
.content {
  padding: 24px 28px;
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

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

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* CorePlan Banner */
.banner-coreplan {
  background: linear-gradient(135deg, #002F6C 0%, #004B9B 60%, #0A5EBA 100%);
  color: white;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.banner-coreplan::after {
  content: "⭐";
  position: absolute;
  right: -20px;
  bottom: -30px;
  font-size: 140px;
  opacity: 0.08;
  pointer-events: none;
}

.banner-title {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.banner-desc {
  font-size: 13.5px;
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.5;
}

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

.btn-gold {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  transition: all 0.2s;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

/* Table Card */
.card-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.card-header-bar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.card-header-bar h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

table.data-table th {
  background: #F8FAFC;
  color: var(--text-muted);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

table.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

table.data-table tr:hover td {
  background: #F8FAFC;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-est {
  background: var(--warning-bg);
  color: #B45309;
  border: 1px solid #FDE68A;
}

.badge-final {
  background: var(--success-bg);
  color: #047857;
  border: 1px solid #A7F3D0;
}

.badge-sku {
  font-family: monospace;
  background: #EFF6FF;
  color: #1E40AF;
  font-weight: 700;
}

/* Product Controls Bar */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.search-input-box {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.search-input-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s;
}

.search-input-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 47, 108, 0.12);
}

.search-icon-pos {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 15px;
}

.select-filter {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: white;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

/* Product Card Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.prod-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.25s;
}

.prod-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.prod-img-box {
  width: 100%;
  height: 200px;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid #F1F5F9;
  overflow: hidden;
}

.prod-img-box img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  transition: transform 0.3s;
}

.prod-card:hover .prod-img-box img {
  transform: scale(1.06);
}

.prod-tag-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.prod-tag-sku {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  font-family: monospace;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.prod-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.prod-name {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prod-pricing-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #F8FAFC;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #EEF2F6;
}

.price-mini-item {
  display: flex;
  flex-direction: column;
}

.price-mini-item .label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}

.price-mini-item .val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.price-mini-item .val.abo {
  color: var(--primary);
}

.price-mini-item .val.sell {
  color: #EE4D2D;
}

/* Profit Highlight Box */
.profit-highlight {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profit-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.profit-row.total {
  border-top: 1px dashed #86EFAC;
  padding-top: 5px;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 800;
  color: #15803D;
}

.prod-footer {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 8px;
}

.btn-outline {
  flex: 1;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-outline:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.btn-primary {
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

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

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: white;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  border-radius: 14px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

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

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.form-control {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 47, 108, 0.12);
}

/* Webhook Monitor Elements */
.hook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.hook-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hook-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hook-name {
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hook-url-box {
  background: #F8FAFC;
  padding: 8px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 11px;
  color: #334155;
  border: 1px solid #E2E8F0;
  word-break: break-all;
}

/* Mobile Bottom Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border);
  height: 60px;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
}

.mobile-nav-btn.active {
  color: var(--primary);
}

.mobile-nav-btn .icon {
  font-size: 20px;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
    margin-bottom: 60px;
  }
  .btn-menu-mobile {
    display: block;
  }
  .mobile-nav {
    display: flex;
  }
}

/* ==========================================================================
   AUTHENTICATION & LOGIN SCREEN (MODERN GLASSMORPHISM & EXECUTIVE AESTHETIC)
   ========================================================================== */

body.auth-loading #appContainer,
body.auth-loading #loginOverlay {
  opacity: 0;
  pointer-events: none;
}

body:not(.auth-loading) #appContainer,
body:not(.auth-loading) #loginOverlay {
  transition: opacity 0.25s ease-in-out;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 18%, #0C2340 0%, #06111E 55%, #02060D 100%);
  padding: 20px;
  overflow-y: auto;
}

.login-ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 75, 155, 0.25) 0%, transparent 70%);
  top: 5%;
  left: 15%;
  filter: blur(80px);
}

.glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  bottom: 8%;
  right: 15%;
  filter: blur(80px);
}

.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 38px 34px 30px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  color: #F8FAFC;
  animation: loginCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardPop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-box {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.login-logo-box .logo-badge {
  width: 52px;
  height: 52px;
  font-size: 22px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 47, 108, 0.4);
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 13px;
  color: #94A3B8;
  font-weight: 500;
  margin-bottom: 12px;
}

.login-security-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.security-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.login-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
  font-size: 12.5px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #CBD5E1;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  color: #64748B;
  pointer-events: none;
}

.login-input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  background: rgba(30, 41, 59, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #FFFFFF;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.login-input:focus {
  border-color: #38BDF8;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.login-input::placeholder {
  color: #64748B;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #94A3B8;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.btn-toggle-pwd:hover {
  color: #FFFFFF;
}

.login-extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  font-size: 12.5px;
}

.checkbox-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94A3B8;
  cursor: pointer;
  user-select: none;
}

.checkbox-remember input {
  accent-color: #004B9B;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.btn-login-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #004B9B 0%, #002F6C 100%);
  color: #FFFFFF;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 20px rgba(0, 47, 108, 0.35);
}

.btn-login-submit:hover {
  background: linear-gradient(135deg, #0A5FBC 0%, #003B88 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 47, 108, 0.5);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.btn-login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.login-credentials-hint {
  margin-top: 20px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px dashed rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
}

.hint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #D4AF37;
  font-weight: 700;
  margin-bottom: 4px;
}

.btn-copy-creds {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #FDE047;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-copy-creds:hover {
  background: rgba(212, 175, 55, 0.3);
}

.hint-body {
  color: #94A3B8;
  font-family: monospace;
}

.hint-body strong {
  color: #FFFFFF;
}

.login-footer {
  margin-top: 22px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  font-size: 11px;
  color: #64748B;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vps-tag {
  color: #475569;
  font-family: monospace;
  font-size: 10.5px;
}

/* ==========================================================================
   TOPBAR USER PROFILE & LOGOUT
   ========================================================================== */

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 4px 10px 4px 5px;
  border-radius: 30px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #004B9B, #002F6C);
  color: #D4AF37;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
}

.user-role-badge {
  font-size: 10px;
  font-weight: 700;
  color: #047857;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.btn-logout {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #EF4444;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s;
}

.btn-logout:hover {
  background: #FEE2E2;
}

/* ==========================================================================
   SETTINGS - USER MANAGEMENT STYLING
   ========================================================================== */

.user-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.user-table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #002F6C;
  color: #D4AF37;
  font-weight: 800;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  vertical-align: middle;
}

.badge-role-admin {
  background: #EEF2FF;
  color: #4338CA;
  border: 1px solid #C7D2FE;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
}

.badge-role-operator {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
}

.badge-status-active {
  color: #059669;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-status-inactive {
  color: #94A3B8;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.settings-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.settings-tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.settings-tab-btn:hover {
  color: var(--primary);
}


