/* ==========================================================================
   SIKKHALAY TEACHER PORTAL — UNIVERSAL THEME STYLESHEET
   Comprehensive Dark & Light Theme Adaptations Across All 17 Pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL DARK THEME TOKENS & BASE OVERRIDES
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg-main: #0b0f19 !important;
  --bg-surface: #151c2c !important;
  --bg-muted: #1e293b !important;
  --bg-base: #0b0f19 !important;
  --bg-elevated: #1e293b !important;
  --bg-card: #151c2c !important;

  --dark-navy: #f8fafc !important;
  --slate-dark: #f1f5f9 !important;
  --slate-medium: #cbd5e1 !important;
  --slate-light: #94a3b8 !important;
  --slate-border: #2d3748 !important;
  --border-color: #2d3748 !important;

  --text-main: #f8fafc !important;
  --text-secondary: #cbd5e1 !important;
  --text-muted: #94a3b8 !important;
  --text-dark: #f8fafc !important;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
}

/* Smooth Universal Transition */
body,
.header,
.left-desktop-sidebar,
.card,
.settings-card,
.stat-card,
.tuition-card,
.batch-card,
.fb-post-card,
.form-input-control,
.form-control,
input,
select,
textarea {
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

/* --------------------------------------------------------------------------
   2. HEADER & NAVIGATION IN DARK MODE
   -------------------------------------------------------------------------- */
[data-theme="dark"] .header {
  background: rgba(21, 28, 44, 0.92) !important;
  border-bottom: 1px solid var(--slate-border) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .left-desktop-sidebar {
  background: #151c2c !important;
  border-right: 1px solid var(--slate-border) !important;
}

[data-theme="dark"] .sidebar-nav-item {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .sidebar-nav-item:hover {
  background: #1e293b !important;
  color: #ffffff !important;
}

[data-theme="dark"] .sidebar-nav-item.active {
  background: rgba(5, 150, 105, 0.2) !important;
  color: #34d399 !important;
}

[data-theme="dark"] .sidebar-nav-item.active .nav-icon {
  color: #34d399 !important;
}

[data-theme="dark"] .sidebar-user-footer {
  background: #151c2c !important;
  border-top: 1px solid var(--slate-border) !important;
}

[data-theme="dark"] .sidebar-user-card {
  background: #1e293b !important;
  border: 1px solid var(--slate-border) !important;
}

[data-theme="dark"] .sidebar-user-name {
  color: #f8fafc !important;
}

[data-theme="dark"] .sidebar-user-id {
  color: #94a3b8 !important;
}

/* --------------------------------------------------------------------------
   3. GENERAL CARDS, CONTAINERS & SURFACES
   -------------------------------------------------------------------------- */
[data-theme="dark"] .card,
[data-theme="dark"] .card-modern,
[data-theme="dark"] .profile-hero-card,
[data-theme="dark"] .profile-stat-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .educator-hero-center,
[data-theme="dark"] .fin-hero-banner,
[data-theme="dark"] .smart-schedule-cockpit-card,
[data-theme="dark"] .upcoming-spotlight-card,
[data-theme="dark"] .tuition-card,
[data-theme="dark"] .batch-card,
[data-theme="dark"] .exam-card,
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .glass-card,
[data-theme="dark"] .panel,
[data-theme="dark"] .filter-card,
[data-theme="dark"] .schedule-cockpit-card,
[data-theme="dark"] .roster-table-card {
  background: #151c2c !important;
  border-color: var(--slate-border) !important;
  color: #f8fafc !important;
}

/* Headings & Text */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: #f8fafc !important;
}

[data-theme="dark"] p,
[data-theme="dark"] span:not(.badge):not(.tag-pill) {
  color: inherit;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary {
  color: #94a3b8 !important;
}

/* --------------------------------------------------------------------------
   4. FORMS, INPUTS, SELECTS & TEXTAREAS
   -------------------------------------------------------------------------- */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="time"],
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-input-control,
[data-theme="dark"] .form-select-control,
[data-theme="dark"] .search-input {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-input-control:focus {
  background-color: #151c2c !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #64748b !important;
}

[data-theme="dark"] input:disabled,
[data-theme="dark"] select:disabled,
[data-theme="dark"] textarea:disabled {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
  color: #64748b !important;
}

/* --------------------------------------------------------------------------
   5. TABLES & ROSTERS
   -------------------------------------------------------------------------- */
[data-theme="dark"] table,
[data-theme="dark"] .table,
[data-theme="dark"] .staging-table,
[data-theme="dark"] .attendance-table {
  color: #f8fafc !important;
  background-color: #151c2c !important;
}

[data-theme="dark"] th,
[data-theme="dark"] thead tr,
[data-theme="dark"] .table thead th {
  background-color: #1e293b !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid var(--slate-border) !important;
}

[data-theme="dark"] td,
[data-theme="dark"] tbody tr,
[data-theme="dark"] .table tbody td {
  border-bottom: 1px solid #1e293b !important;
  color: #f8fafc !important;
}

[data-theme="dark"] tbody tr:hover,
[data-theme="dark"] .table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

/* --------------------------------------------------------------------------
   6. MODALS, DRAWERS & DROPDOWNS
   -------------------------------------------------------------------------- */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-container,
[data-theme="dark"] .modal-dialog,
[data-theme="dark"] .modal-card,
[data-theme="dark"] .sett-modal-window,
[data-theme="dark"] .drawer-content,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .fb-dropdown-menu,
[data-theme="dark"] .notifications-drawer {
  background: #151c2c !important;
  border: 1px solid var(--slate-border) !important;
  color: #f8fafc !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7) !important;
}

/* --------------------------------------------------------------------------
   7. BUTTONS, BADGES & TABS
   -------------------------------------------------------------------------- */
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-ghost {
  background-color: #1e293b !important;
  border-color: var(--slate-border) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .btn-secondary:hover {
  background-color: #27354a !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

[data-theme="dark"] .btn-icon {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .btn-icon:hover {
  background: #1e293b !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .tag-pill {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: var(--slate-border) !important;
}

[data-theme="dark"] .tag-pill:hover {
  border-color: #10b981 !important;
  color: #34d399 !important;
}

[data-theme="dark"] .tag-pill.active {
  background: rgba(5, 150, 105, 0.2) !important;
  color: #34d399 !important;
  border-color: rgba(5, 150, 105, 0.4) !important;
}

[data-theme="dark"] .profile-tab-btn,
[data-theme="dark"] .tab-btn {
  color: #94a3b8 !important;
}

[data-theme="dark"] .profile-tab-btn.active,
[data-theme="dark"] .tab-btn.active {
  color: #34d399 !important;
  border-bottom-color: #10b981 !important;
}

/* Header Quick Theme Toggle Icon */
.header-theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--slate-border, #e2e8f0);
  background: var(--bg-surface, #ffffff);
  color: var(--slate-medium, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-theme-toggle-btn:hover {
  border-color: var(--primary, #059669);
  color: var(--primary, #059669);
  background: var(--primary-light, #ecfdf5);
}

[data-theme="dark"] .header-theme-toggle-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f59e0b;
}

[data-theme="dark"] .header-theme-toggle-btn:hover {
  background: #27354a;
  border-color: #f59e0b;
  color: #fbbf24;
}

/* --------------------------------------------------------------------------
   8. CUSTOM SCROLLBARS FOR DARK MODE
   -------------------------------------------------------------------------- */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #0b0f19;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #2d3748;
  border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #4a5568;
}

/* --------------------------------------------------------------------------
   9. COACHING & WORKSPACE OS FULL ADAPTATIONS (coaching.html & components)
   -------------------------------------------------------------------------- */
[data-theme="dark"] .fb-main-container,
[data-theme="dark"] .app-main-viewport {
  background-color: var(--bg-base, #0b0f19) !important;
  color: var(--text-main, #f8fafc) !important;
}

[data-theme="dark"] .fb-hero-card,
[data-theme="dark"] .fb-hero-wrapper {
  background: var(--bg-surface, #151c2c) !important;
  border-bottom: 1px solid var(--slate-border, #2d3748) !important;
  color: var(--text-main, #f8fafc) !important;
  box-shadow: var(--shadow-md) !important;
}

[data-theme="dark"] .fb-profile-bar {
  background: var(--bg-surface, #151c2c) !important;
}

[data-theme="dark"] .fb-inst-title-en,
[data-theme="dark"] .fb-inst-title-bn {
  color: #f8fafc !important;
}

[data-theme="dark"] .fb-avatar-container,
[data-theme="dark"] .fb-avatar-holder {
  background: #151c2c !important;
  border-color: #151c2c !important;
}

[data-theme="dark"] .fb-meta-pill {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}

[data-theme="dark"] .fb-motto-strip {
  background: rgba(30, 41, 59, 0.7) !important;
  border-top: 1px solid #2d3748 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .teacher-duty-strip {
  border: 1px solid #2d3748 !important;
  box-shadow: var(--shadow-md) !important;
}

[data-theme="dark"] .teacher-duty-radar-box {
  background: rgba(15, 23, 42, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .btn-radar-action {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .btn-radar-action:hover {
  background: #27354a !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

[data-theme="dark"] .live-clock-pill {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .teacher-shift-pill {
  background: rgba(251, 191, 36, 0.12) !important;
  color: #fde68a !important;
}

[data-theme="dark"] .fb-tab-nav,
[data-theme="dark"] .fb-tab-bar {
  background: rgba(21, 28, 44, 0.94) !important;
  border-top: 1px solid #2d3748 !important;
  border-bottom: 1px solid #2d3748 !important;
}

[data-theme="dark"] .fb-tab-btn {
  color: #94a3b8 !important;
}

[data-theme="dark"] .fb-tab-btn:hover {
  color: #f8fafc !important;
  background: #1e293b !important;
}

[data-theme="dark"] .fb-tab-btn.active {
  color: #34d399 !important;
  border-bottom-color: #10b981 !important;
  background: rgba(5, 150, 105, 0.18) !important;
}

[data-theme="dark"] .fb-tab-count {
  background: #1e293b !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .fb-card {
  background: #151c2c !important;
  border-color: #2d3748 !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .fb-card-header {
  border-bottom-color: #2d3748 !important;
}

[data-theme="dark"] .fb-card-title {
  color: #f8fafc !important;
}

[data-theme="dark"] .fb-info-icon {
  background: #1e293b !important;
  color: #34d399 !important;
}

[data-theme="dark"] .fb-btn-action-secondary {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .fb-btn-action-secondary:hover {
  background: #27354a !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

[data-theme="dark"] .filter-chip-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .filter-chip-btn:hover,
[data-theme="dark"] .filter-chip-btn.active {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .badge-status {
  background: #1e293b !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .badge-coaching {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
}

[data-theme="dark"] .badge-school {
  background: rgba(2, 132, 199, 0.18) !important;
  color: #38bdf8 !important;
}

[data-theme="dark"] .badge-lms {
  background: rgba(139, 92, 246, 0.18) !important;
  color: #a78bfa !important;
}

/* Spotlight Command Palette */
[data-theme="dark"] .spotlight-card {
  background: #151c2c !important;
  border-color: #2d3748 !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85) !important;
}

[data-theme="dark"] .spotlight-search-header,
[data-theme="dark"] .spotlight-header {
  border-bottom-color: #2d3748 !important;
}

[data-theme="dark"] .spotlight-input {
  color: #f8fafc !important;
}

[data-theme="dark"] .spotlight-esc {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .spotlight-shortcuts-bar {
  background: #0f172a !important;
  border-bottom: 1px solid #2d3748 !important;
}

[data-theme="dark"] .spotlight-tag {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}

[data-theme="dark"] .spotlight-tag:hover {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
}

[data-theme="dark"] .spotlight-item {
  color: #f8fafc !important;
}

[data-theme="dark"] .spotlight-item:hover {
  background: #1e293b !important;
}

/* Modals & Overlays */
[data-theme="dark"] .fb-modal-overlay {
  background: rgba(0, 0, 0, 0.78) !important;
}

[data-theme="dark"] .fb-modal-card {
  background: #151c2c !important;
  border-color: #2d3748 !important;
  color: #f8fafc !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
}

[data-theme="dark"] .fb-modal-header {
  border-bottom-color: #2d3748 !important;
}

[data-theme="dark"] .fb-modal-footer {
  background: #0f172a !important;
  border-top-color: #2d3748 !important;
}

[data-theme="dark"] .fb-btn-close {
  background: #1e293b !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .fb-btn-close:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
}

/* Dynamic Cards & Boxes */
[data-theme="dark"] .coaching-batch-card,
[data-theme="dark"] .batch-card-box,
[data-theme="dark"] .handout-card,
[data-theme="dark"] .notice-card-box,
[data-theme="dark"] .circular-card,
[data-theme="dark"] .ledger-card,
[data-theme="dark"] .omr-card,
[data-theme="dark"] .student-card-box,
[data-theme="dark"] .lead-card-box {
  background: #151c2c !important;
  border-color: #2d3748 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .att-row-item {
  border-bottom-color: #1e293b !important;
}

[data-theme="dark"] .att-row-item:hover {
  background-color: rgba(255, 255, 255, 0.03) !important;
}
