/* ============================================================
   SPEAXA Student Portal Stylesheet
   Premium Glassmorphic LIGHT Theme
   ============================================================ */
:root {
  --primary: #3CBDB0;
  --primary-rgb: 60, 189, 176;
  --primary-dark: #2A9F94;
  --bg-dark: #F8FAFC;
  --bg-sidebar: rgba(255, 255, 255, 0.8);
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-input: #F1F5F9;
  --bg-hover: rgba(60, 189, 176, 0.08);
  --text-primary: #0F172A;
  --text-muted: #64748B;
  --text-secondary: #475569;
  --border: rgba(15, 23, 42, 0.08);
  --border-focus: rgba(60, 189, 176, 0.5);
  --gradient: linear-gradient(135deg, #3CBDB0, #0F766E);
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --sidebar-w: 250px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top left, rgba(60, 189, 176, 0.05), transparent 45%),
              radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.03), transparent 45%),
              #F8FAFC;
  color: var(--text-primary);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── Custom Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ── Auth Screen ─────────────────────────────────────────────── */
.auth-screen {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
}

.auth-visual-panel {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.93), rgba(13, 92, 86, 0.97)), url('/logo.png');
  background-size: cover, 180px;
  background-position: center, center right -40px;
  background-repeat: no-repeat, no-repeat;
  position: relative;
  padding: 60px;
  color: white !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
}

.auth-visual-panel::after {
  content: '';
  position: absolute;
  top: -10%; right: -10%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.visual-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.visual-logo {
  width: 40px;
  height: 40px;
}

.visual-brand-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  color: #fff;
}

.visual-content {
  max-width: 500px;
  margin: auto 0;
  z-index: 2;
}

.text-gold {
  background: linear-gradient(135deg, #FDE047, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.visual-badge {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px);
  padding: 6px 14px !important;
  border-radius: 30px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  margin-bottom: 24px;
  display: inline-block;
}

.visual-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
  color: white !important;
}

.visual-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: white !important;
}

.feature-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: white !important;
}

.feature-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
}

.visual-footer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  z-index: 2;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  padding: 40px 24px;
}

.auth-form-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Premium Login Redesign */
.auth-logo-premium {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(60, 189, 176, 0.2));
  transition: var(--transition);
}
.auth-logo-premium:hover {
  transform: scale(1.05) rotate(5deg);
}

.portal-toggle-container {
  display: flex;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
}
.portal-toggle-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted) !important;
}
.portal-toggle-btn:hover {
  color: var(--text-primary) !important;
}
.portal-toggle-btn.active#toggleStudent {
  background: var(--gradient) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(60, 189, 176, 0.25);
}
.portal-toggle-btn.active#toggleTeacher {
  background: linear-gradient(135deg, #F59E0B, #D97706) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.spx-checkbox {
  border-color: var(--primary) !important;
  cursor: pointer;
}
.spx-checkbox:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* Auth Card & Tabs */
.auth-card {
  background: var(--bg-card) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 24px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  z-index: 2;
}

.auth-brand {
  text-align: center;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2px;
}

.auth-brand .brand-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
}

.auth-brand .brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand h2 {
  font-size: 1.4rem;
  color: var(--text-primary) !important;
  margin-bottom: 0;
  letter-spacing: 0.5px;
  line-height: 1;
}

.auth-brand p {
  color: var(--text-muted) !important;
  font-size: 0.88rem;
  font-weight: 500;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  color: var(--text-muted) !important;
}

.auth-tab:hover {
  color: var(--text-primary) !important;
}

.auth-tab.active {
  background: var(--gradient) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(60, 189, 176, 0.25);
}

.auth-card .spx-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary) !important;
  margin-bottom: 6px;
  display: block;
}

.auth-card .spx-input {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 0.9rem;
  transition: var(--transition);
}

.auth-card .spx-input:focus {
  border-color: rgba(60, 189, 176, 0.6) !important;
  box-shadow: 0 0 0 4px rgba(60, 189, 176, 0.15) !important;
  background: #ffffff !important;
}

.auth-card .spx-input::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.6;
}

.auth-card select.spx-input option {
  background: #ffffff !important;
  color: var(--text-primary) !important;
}

.auth-card .spx-input-prefix {
  background: var(--bg-input) !important;
  border: 1px solid var(--border) !important;
  border-right: none !important;
  color: var(--text-muted) !important;
  border-radius: 12px 0 0 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.auth-card .btn-spx {
  background: var(--gradient) !important;
  color: white !important;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  padding: 12px 24px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(60, 189, 176, 0.2);
}

.auth-card .btn-spx:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(60, 189, 176, 0.35);
}

.auth-card .btn-outline-primary {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  border-radius: 12px;
  font-weight: 600;
  transition: var(--transition);
}

.auth-card .btn-outline-primary:hover {
  background: var(--gradient) !important;
  border-color: transparent !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(60, 189, 176, 0.25);
}

.auth-card .text-primary {
  color: var(--primary) !important;
  transition: var(--transition);
}

.auth-card .text-primary:hover {
  color: var(--primary-dark) !important;
  text-decoration: underline !important;
}

.auth-card .alert-danger {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-radius: 12px;
}

/* ── Main Layout ─────────────────────────────────────────────── */
#studentApp {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  transition: var(--transition);
  z-index: 1000;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand .brand-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand .brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  flex-shrink: 0;
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: rgba(15, 23, 42, 0.05);
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  margin-bottom: 3px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
  transform: translateX(4px);
}

.nav-item.active {
  background: rgba(60, 189, 176, 0.1);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 4px;
  background: var(--primary);
  border-radius: 4px;
}

.nav-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.1);
  color: var(--danger);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
}

.sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.12);
  transform: translateY(-1px);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

.top-header {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.page-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.header-avatar:hover {
  transform: scale(1.05);
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── Cards ───────────────────────────────────────────────────── */
.spx-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.spx-card:hover {
  border-color: rgba(60, 189, 176, 0.2);
  box-shadow: var(--shadow-md);
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(60, 189, 176, 0.3);
  box-shadow: 0 12px 30px rgba(60, 189, 176, 0.12);
}

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: rgba(60, 189, 176, 0.08);
  color: var(--primary);
}

/* Course Card */
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  height: 100%;
  box-shadow: var(--shadow-sm);
}

.course-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(60, 189, 176, 0.12);
}

.course-thumb {
  height: 120px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
}

/* ── Tables ──────────────────────────────────────────────────── */
.spx-table {
  width: 100%;
  border-collapse: collapse;
}

.spx-table thead th {
  padding: 14px 16px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  white-space: nowrap;
}

.spx-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.spx-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.015);
}

.spx-table tbody td {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  vertical-align: middle;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge-present {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-absent {
  background: rgba(239, 68, 68, 0.08);
  color: #DC2626;
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.badge-late {
  background: rgba(245, 158, 11, 0.08);
  color: #D97706;
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.badge-half {
  background: rgba(99, 102, 241, 0.08);
  color: #4F46E5;
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(60, 189, 176, 0.08);
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}

/* ── Batch Selection UI ── */
.batch-list::-webkit-scrollbar {
  width: 6px;
}
.batch-list::-webkit-scrollbar-track {
  background: transparent;
}
.batch-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
.batch-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.batch-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: var(--transition);
  cursor: default;
}

.batch-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(60, 189, 176, 0.08);
  transform: translateY(-2px);
}

.bg-success-subtle {
  background-color: rgba(16, 185, 129, 0.08) !important;
}
.bg-danger-subtle {
  background-color: rgba(239, 68, 68, 0.08) !important;
}

/* ── Custom Modals ───────────────────────────────────────────── */
.spx-custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 20px;
}

.spx-custom-modal.active {
  display: flex;
  opacity: 1;
}

.spx-custom-modal-content {
  background-color: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-primary);
}

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

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pulse-animation {
  animation: pulse-red 2s infinite !important;
}

@keyframes pulse-dot-anim {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.pulse-dot {
  animation: pulse-dot-anim 1.5s infinite !important;
}

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

.spx-custom-modal-header h3 {
  font-size: 16px;
  margin: 0;
  color: var(--text-primary);
}

.spx-close-modal-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.spx-close-modal-btn:hover {
  color: var(--text-primary);
}

.spx-custom-modal-body {
  padding: 20px;
}

.spx-custom-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #F9FAFB;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.w-100 {
  width: 100% !important;
}

.toast {
  background: #ffffff !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
  gap: 8px;
}
.btn:active, .btn-spx:active, .btn-primary:active, .btn-secondary:active, .btn-success:active, .btn-danger:active, .btn-warning:active, .btn-outline-primary:active, .btn-outline-secondary:active, .btn-outline-danger:active, .btn-outline-success:active {
  transform: scale(0.96) !important;
}

.btn-primary, .btn-spx {
  background: var(--gradient);
  color: white !important;
  border: none;
  box-shadow: 0 4px 12px rgba(60, 189, 176, 0.2);
}

.btn-primary:hover, .btn-spx:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(60, 189, 176, 0.35);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.05) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.09) !important;
  color: var(--text-primary) !important;
}

.btn-success {
  background: var(--success) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
}
.btn-success:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35) !important;
  background: #059669 !important;
}

.btn-danger {
  background: var(--danger) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
}
.btn-danger:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35) !important;
  background: #DC2626 !important;
}

.btn-warning {
  background: var(--warning) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2) !important;
}
.btn-warning:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35) !important;
  background: #D97706 !important;
}

.btn-outline-primary {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: transparent !important;
}

.btn-outline-primary:hover {
  background: var(--gradient) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(60, 189, 176, 0.2);
}

.btn-outline-secondary {
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
  background: transparent !important;
}
.btn-outline-secondary:hover {
  background: rgba(15, 23, 42, 0.05) !important;
  color: var(--text-primary) !important;
}

.btn-outline-danger {
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: var(--danger) !important;
  background: transparent !important;
}
.btn-outline-danger:hover {
  background: var(--danger) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-outline-success {
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: var(--success) !important;
  background: transparent !important;
}
.btn-outline-success:hover {
  background: var(--success) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}


/* ── Text Visibility Overrides ── */
.text-white {
  color: var(--text-primary) !important;
}
.text-white-50 {
  color: var(--text-muted) !important;
}
.btn .text-white {
  color: #ffffff !important;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media(max-width:768px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    z-index: 1009;
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .page-content {
    padding: 16px;
  }
  .top-header {
    padding: 12px 16px;
  }
}

/* ── Premium Close Button for Modals ── */
.modal-content .btn-close {
  background-color: rgba(15, 23, 42, 0.08) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 50% !important;
  opacity: 0.85 !important;
  padding: 10px !important;
  transition: all 0.25s ease !important;
  filter: none !important;
}
.modal-content .btn-close:hover {
  background-color: #EF4444 !important;
  filter: invert(1) !important;
  opacity: 1 !important;
  transform: rotate(90deg);
}

/* ── Interactive Profile Avatar Upload styles ── */
.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
}
.profile-avatar-wrapper .profile-avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.profile-avatar-wrapper:hover .profile-avatar-overlay {
  opacity: 1;
}
.profile-avatar-overlay i {
  color: #ffffff !important;
  font-size: 1.35rem;
}

/* ── Premium Tab Navigation for Modals ── */
.spx-nav-tabs {
  border-bottom: 2px solid var(--border) !important;
  gap: 8px;
}
.spx-nav-tabs .nav-link {
  border: none !important;
  color: var(--text-secondary) !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 8px 8px 0 0;
  background: transparent !important;
  transition: all 0.25s ease;
  position: relative;
}
.spx-nav-tabs .nav-link:hover {
  color: var(--primary) !important;
}
.spx-nav-tabs .nav-link.active {
  color: var(--primary) !important;
  background: rgba(60, 189, 176, 0.05) !important;
}
.spx-nav-tabs .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient);
  border-radius: 3px;
}
.btn-filter {
  font-size: 0.75rem !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  transition: all 0.25s ease !important;
}
.btn-filter.active {
  background: var(--gradient) !important;
  color: white !important;
  border-color: transparent !important;
}


