﻿/* ===== CRM LMS — Codify CRM Style ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,400;1,500;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Font stacks ── */
:root {
  --font-ui:      'Montserrat', 'Inter', Helvetica, Arial, sans-serif;
  --font-heading: 'Montserrat', 'Inter', Helvetica, Arial, sans-serif;
  --font-data:    'Inter', Helvetica, Arial, sans-serif;
}

:root {
  --sidebar-width: 260px;
  --topbar-height: 4.45rem;
  --primary: #009C4D;
  --primary-dark: #007a3d;
  --primary-light: #e0f5ea;
  --success: #28C76F;
  --warning: #FF9F43;
  --danger: #EA5455;
  --info: #00CFE8;
  --border-color: #D9DCE4;
  --bg-body: #ECEFF4;
  --text-muted: #9299A6;
  --text-body: #5A6170;
  --text-dark: #2D3340;
  --card-shadow: 0 1px 3px rgba(0,0,0,.07);
  --sidebar-bg: #fff;
  --topbar-bg: #fff;
}

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

html,
body {
  font-family: var(--font-ui);
  font-size: 14px;
  background: var(--bg-body);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}


/* ===== Custom scrollbar (WebKit) ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cacaca;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* ===== SIDEBAR (main-menu) ===== */
.main-menu {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  z-index: 1031;
  background: #fff;
  border-right: 1px solid var(--border-color);
  box-shadow: none;
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.main-menu .navbar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0.35rem 1rem 0.3rem 1.64rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.main-menu .navbar-header .navbar-nav {
  display: flex;
  align-items: center;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
  color: var(--text-dark);
  flex: 1;
}

.brand-logo {
  display: flex;
  align-items: center;
}
.brand-logo i {
  font-size: 2rem;
  color: var(--primary);
}
.brand-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  white-space: nowrap;
}

.modern-nav-toggle {
  cursor: pointer;
  color: var(--text-body);
  background: none;
  border: none;
  border-radius: 5px;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.modern-nav-toggle:hover {
  color: var(--primary);
}

.shadow-bottom {
  display: none;
  position: absolute;
  z-index: 2;
  top: var(--topbar-height);
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(#fff 41%, rgba(255, 255, 255, 0.11) 95%, rgba(255, 255, 255, 0));
  pointer-events: none;
}

.main-menu-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 1rem;
}

/* Navigation */
ul.navigation-main {
  padding: 0;
  margin: 0;
  list-style: none;
}

li.navigation-header {
  padding: 1.286rem 1.28rem 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.01rem;
  list-style: none;
}

.navigation-main .nav-item {
  position: relative;
}

.navigation-main .nav-item > a {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  color: var(--text-body);
  font-size: 1.1rem;
  font-family: 'Montserrat', Helvetica, Arial, serif;
  font-weight: 400;
  text-decoration: none;
  border-radius: 3px;
  margin: 1px 10px;
  transition: color 0.15s, background 0.15s;
}
.navigation-main .nav-item > a:hover {
  background: rgba(0, 156, 77, 0.06);
  color: var(--primary);
}
.navigation-main .nav-item > a:hover i {
  color: var(--primary);
}
.navigation-main .nav-item.active > a {
  background: rgba(0, 156, 77, 0.07);
  color: var(--primary) !important;
  font-weight: 500;
  font-size: 1.1rem;
  box-shadow: none;
  border-left: 3px solid var(--primary);
  padding-left: 11px;
  border-radius: 0 3px 3px 0;
}
.navigation-main .nav-item.active > a i {
  color: var(--primary) !important;
}
.navigation-main .nav-item > a i {
  font-size: 1.15rem;
  width: 1.1rem;
  margin-right: 0.6rem;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.15s;
}

.menu-title,
.menu-item {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Submenu */
.nav-item.has-sub > a::after {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(-45deg);
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.25s;
}
.nav-item.has-sub.open > a::after {
  transform: rotate(45deg);
}
ul.menu-content {
  list-style: none;
  padding: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}
.nav-item.has-sub.open > ul.menu-content {
  max-height: 1000px;
}
ul.menu-content .nav-item > a {
  padding-left: 2.75rem;
  font-size: 0.925rem;
}

/* ===== FLOATING NAVBAR ===== */
.header-navbar {
  height: var(--topbar-height);
  padding: 0;
  background: #fff;
  border: none;
}

.header-navbar.floating-nav {
  position: fixed !important;
  top: 20px !important;
  right: 32px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 9999 !important;
  margin: 0 !important;
  border-radius: 0.428rem;
  box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
  transition: all 0.25s ease;
  max-width: calc(100% - var(--sidebar-width) - 4rem);
  width: auto;
}

/* Когда сайдбар скрыт на мобильных */
.main-menu:not(.menu-open) ~ .app-content .header-navbar.floating-nav,
body:not(.sidebar-visible) .header-navbar.floating-nav {
  max-width: calc(100% - 4rem);
}

.navbar-container {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 1rem;
}

.bookmark-wrapper {
  display: flex;
  align-items: center;
}

.navbar-container .nav.navbar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}
.navbar-container .nav.navbar-nav .nav-item {
  position: relative;
}
.navbar-container .nav.navbar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  color: var(--text-body);
  font-size: 13px;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  cursor: pointer;
}
.navbar-container .nav.navbar-nav .nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.navbar-container .nav.navbar-nav .nav-link i {
  font-size: 16px;
}
.navbar-container .nav.navbar-nav .dropdown-toggle::after {
  display: none;
}

.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  background: var(--danger);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid #fff;
}

.user-nav {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  text-align: right;
}
.user-nav .user-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dark);
}
.user-nav .user-status {
  font-size: 11px;
  color: var(--text-muted);
}

.navbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.navbar-avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

/* ===== APP CONTENT ===== */
.app-content.content {
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - 3.35rem);
  padding-top: calc(var(--topbar-height) + 1.3rem + 1rem);
  /* Must match .main-menu's collapse/expand transition (modern-navigation.css)
     exactly, otherwise the sidebar edge and the content edge settle at
     different times and every element's coordinates visibly "float" for
     ~150ms after each toggle, causing misclicks on nearby menu items. */
  transition: margin-left 0.4s cubic-bezier(.25, .8, .25, 1);
}

.content-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 41, 47, 0.5);
  z-index: 1025;
  display: none;
}
.content-overlay.show {
  display: block;
}

.content-wrapper {
  padding: 0 1.5rem 1.5rem;
}

/* ===== FOOTER ===== */
.footer {
  padding: 1rem 2rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  font-size: 12px;
  color: var(--text-muted);
  margin-left: var(--sidebar-width);
  transition: margin-left 0.4s cubic-bezier(.25, .8, .25, 1);
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.5rem;
  padding-top: 0.25rem;
}

.page-title {
  font-size: 1.286rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-dark);
  font-family: var(--font-heading);
  letter-spacing: .01em;
}

/* ── Montserrat: headings, titles, nav, labels ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
}

.page-title,
.card-title,
.card-header .card-title,
.brand-text,
.stat-value,
.stat-label,
.kpi-val,
.kpi-lbl,
.finance-total,
.form-label,
.navigation-main .nav-item > a,
.nav-submenu a,
.menu-header-text,
.badge,
.btn,
.navbar-container .nav-link,
.user-nav .user-name,
.user-nav .user-status,
.drawer-title {
  font-family: var(--font-heading);
}

/* ── Inter: dense data — table cells, long text, descriptions ── */
.table td,
.table th,
.info-row,
.info-label,
.form-control,
.form-select,
.django-messages .alert,
.dropdown-item {
  font-family: var(--font-data);
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* ===== Cards ===== */
.card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: var(--card-shadow);
}

.card-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  background: #FAFBFC;
  border-radius: 4px 4px 0 0;
}

.card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
}
.card-body {
  padding: 20px;
}
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background: transparent;
}

/* ===== Stat Cards ===== */
.stat-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.stat-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon-box.purple {
  background: rgba(0, 156, 77, 0.15);
  color: var(--primary);
}
.stat-icon-box.green {
  background: rgba(40, 199, 111, 0.15);
  color: var(--success);
}
.stat-icon-box.orange {
  background: rgba(255, 159, 67, 0.15);
  color: var(--warning);
}
.stat-icon-box.red {
  background: rgba(234, 84, 85, 0.15);
  color: var(--danger);
}
.stat-icon-box.blue {
  background: rgba(0, 207, 232, 0.15);
  color: var(--info);
}

.stat-info {
  flex: 1;
}
.stat-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-dark);
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ===== KPI Cards (Dashboard) ===== */
.kpi-card {
  transition: border-color 0.15s;
}
.kpi-card:hover {
  border-color: var(--primary);
}
.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.kpi-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-top: 4px;
}
.kpi-lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}
.kpi-badge {
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
}
.mini-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* ===== Card hover lift ===== */
.card-hover {
  transition: border-color 0.15s;
}
.card-hover:hover {
  border-color: #b0b8c8;
}

/* ===== Info List ===== */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
}
.info-row:last-child {
  border-bottom: none;
}
.info-label {
  color: var(--text-muted);
  min-width: 120px;
  font-weight: 500;
  font-size: 12px;
}

/* ===== Filter Bar ===== */
.filter-bar {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
}

/* ===== Tables ===== */
.table {
  font-size: 13px;
  color: var(--text-body);
}
.table thead th {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: #f3f2f7;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 14px;
  white-space: nowrap;
}
.table tbody td {
  vertical-align: middle;
  padding: 10px 14px;
  border-color: var(--border-color);
}
.table tbody tr:hover {
  background: #fafafa;
}
.table-card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
}

/* ===== Forms ===== */
.form-control,
.form-select {
  border-color: var(--border-color);
  border-radius: 3px;
  font-size: 13.5px;
  color: var(--text-dark);
  transition: border-color 0.15s, box-shadow 0.15s;
  padding: 7px 11px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: none;
  color: var(--text-dark);
}

.form-control::placeholder {
  color: var(--text-muted);
}
.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 5px;
}

/* ===== Buttons ===== */
.btn {
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover,
.btn-primary:active {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}
.btn-success {
  background: var(--success);
  border-color: var(--success);
}
.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
}
.btn-warning {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}
.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* ===== Badges ===== */
.badge {
  font-weight: 500;
  font-size: 11px;
  border-radius: 2px;
  padding: 3px 7px;
}
.badge.bg-primary {
  background: rgba(0, 156, 77, 0.15) !important;
  color: var(--primary);
}
.badge.bg-success {
  background: rgba(40, 199, 111, 0.15) !important;
  color: var(--success);
}
.badge.bg-danger {
  background: rgba(234, 84, 85, 0.15) !important;
  color: var(--danger);
}
.badge.bg-warning {
  background: rgba(255, 159, 67, 0.15) !important;
  color: var(--warning);
}
.badge.bg-info {
  background: rgba(0, 207, 232, 0.15) !important;
  color: var(--info);
}
.badge.bg-secondary {
  background: rgba(130, 134, 139, 0.15) !important;
  color: #82868b;
}

/* ===== Drawer / Side Panel ===== */
.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  background: #fff;
  border-left: 1px solid var(--border-color);
  box-shadow: -4px 0 24px rgba(34, 41, 47, 0.1);
  z-index: 1060;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.drawer-panel.open {
  transform: translateX(0);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 41, 47, 0.5);
  z-index: 1055;
  display: none;
}

.drawer-overlay.show,
.drawer-overlay.open {
  display: block;
}

.drawer-header {
  height: 62px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.drawer-title {
  font-weight: 600;
  font-size: 15px;
  margin: 0;
  color: var(--text-dark);
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

/* ===== Avatars ===== */
.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  color: #fff;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid white;
}
.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 13px;
}
.avatar-md {
  width: 44px;
  height: 44px;
  font-size: 17px;
}
.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
}
.avatar img {
  
  border-radius: 50%;
  object-fit: cover;
}

/* Legacy avatar classes */
.mentor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  color: var(--primary);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid white;
}
.mentor-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}
.timeline-item {
  position: relative;
  padding-bottom: 16px;
}
.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-content {
  padding-left: 4px;
}

/* ===== Django messages (toast notifications) ===== */
.django-messages {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  min-width: 280px;
  max-width: 360px;
}

.django-messages .alert {
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
  border-left-width: 3px;
  border-radius: 3px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.django-messages .alert.alert-success {
  background: #e5f9ed;
  color: #28c76f;
}
.django-messages .alert.alert-error,
.django-messages .alert.alert-danger {
  background: #fce8e8;
  color: #ea5455;
}
.django-messages .alert.alert-warning {
  background: #fff3e0;
  color: #ff9f43;
}
.django-messages .alert.alert-info {
  background: #e0f7fa;
  color: #00cfe8;
}
.django-messages .btn-close {
  margin-left: auto;
  opacity: 0.6;
}

/* ===== Dropdown menu ===== */
.dropdown-menu {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 8px 25px rgba(34, 41, 47, 0.12);
  font-size: 13px;
  padding: 6px;
}
.dropdown-item {
  border-radius: 4px;
  padding: 7px 12px;
  color: var(--text-body);
  transition: background 0.1s;
}
.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.dropdown-item.text-danger:hover {
  background: rgba(234, 84, 85, 0.1);
  color: var(--danger);
}
.dropdown-header {
  font-size: 12px;
  padding: 6px 12px 4px;
  color: var(--text-muted);
}

/* ===== Pagination ===== */
.pagination .page-link {
  border-color: var(--border-color);
  color: var(--primary);
  border-radius: 5px;
  margin: 0 2px;
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* ===== Course header bar (course pages) ===== */
.course-header-bar {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 24px;
  box-shadow: 0 1px 0 rgba(34, 41, 47, 0.04);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  opacity: 0.4;
}
.empty-state h6 {
  margin-top: 12px;
  font-weight: 500;
}

/* ===== Attendance table ===== */
.student-col {
  white-space: nowrap;
  min-width: 160px;
  font-weight: 500;
  font-size: 13px;
}

/* ===== Lessons Calendar ===== */
.lessons-calendar {
  border: 1px solid #dadfe9;
  border-radius: 6px;
  background: #fff;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

.lessons-calendar td {
  padding: 4px !important;
  vertical-align: top !important;
  width: 14.28% !important;
  height: 100px !important;
}

.lessons-calendar .lesson {
  margin-top: 4px;
  position: relative;
  width: 100% !important;
  min-height: 40px;
  display: block !important;
}
.lessons-calendar .lesson .lesson-time {
  background: #b094d5;
  border-radius: 4px 4px 0 0;
  padding: 2px 6px;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
}
.lessons-calendar .lesson .lesson-title {
  background: #ccc7c6;
  border-radius: 0 0 4px 4px;
  padding: 3px 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
}
.lessons-calendar .lesson.past .lesson-time {
  background: #b7b6b2;
}
.lessons-calendar .lesson.past .lesson-title {
  background: #ccc7c6;
}
.lessons-calendar .lesson.completed .lesson-time {
  background: #8c8c8c;
}
.lessons-calendar .lesson.completed .lesson-title {
  background: #d4d4d4;
}
.lessons-calendar .lesson.canceled .lesson-time {
  background: var(--danger);
}
.lessons-calendar .lesson.canceled .lesson-title {
  background: rgba(234, 84, 85, 0.7);
}

/* ===== Kanban (leads) ===== */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 20px;
  min-height: 65vh;
}
.kanban-col {
  min-width: 255px;
  max-width: 275px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--card-shadow);
}
.kanban-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s;
}
.kanban-cards.drag-over {
  background: rgba(0, 156, 77, 0.07);
}
.kanban-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.15s, transform 0.1s;
}
.kanban-card:hover {
  box-shadow: 0 8px 25px rgba(34, 41, 47, 0.12);
  transform: translateY(-1px);
}
.kanban-card.dragging {
  opacity: 0.45;
}
.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 8px;
}
.kanban-move-bar {
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}
.kanban-card:hover .kanban-move-bar {
  display: flex;
}

/* ===== Misc ===== */
.fill-bar {
  width: 80px;
  height: 5px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}
.fill-bar-inner {
  height: 100%;
  background: var(--success);
  border-radius: 3px;
}
.course-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ===== Mobile ===== */
@media (max-width: 1200px) {
  /* Sidebar скрыт по умолчанию на мобиле */
  .main-menu {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    box-shadow: none;
  }
  /* Полностью открыт — с оверлеем */
  .main-menu.menu-open {
    transform: translateX(0);
    box-shadow: 0 0 15px 0 rgba(34, 41, 47, 0.1);
  }
  /* Свёрнут до иконок — остаётся видимым без оверлея */
  .main-menu.menu-collapsed {
    transform: translateX(0) !important;
    box-shadow: none !important;
    border-right: 1px solid var(--border-color) !important;
  }
  /* Контент сдвигается под свёрнутый сайдбар */
  body.sidebar-mini .app-content.content {
    margin-left: 60px !important;
  }
  body.sidebar-mini .header-navbar.floating-nav {
    left: 80px !important;
    max-width: calc(100% - 80px - 2rem) !important;
  }
  .header-navbar.floating-nav {
    top: 20px !important;
    right: 32px !important;
    left: auto !important;
    bottom: auto !important;
    max-width: calc(100% - 2rem) !important;
  }
  .app-content.content {
    margin-left: 0 !important;
  }
  .footer {
    margin-left: 0 !important;
  }
  body.sidebar-mini .footer {
    margin-left: 60px !important;
  }
  .drawer-panel {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .content-wrapper {
    padding: 0 1rem 1rem;
  }
  .header-navbar.floating-nav {
    top: 20px !important;
    right: 32px !important;
    left: auto !important;
    bottom: auto !important;
    max-width: calc(100% - 1rem) !important;
    margin: 0 !important;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== AUTH PAGE ===== */
.auth-page {
  display: flex;
  min-height: 100vh;
  background: var(--bg-body);
}

.auth-left {
  flex: 1;
  background: var(--primary);
  background: linear-gradient(135deg, #009c4d 0%, #00c060 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  top: -100px;
  right: -100px;
}

.auth-left::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  bottom: -80px;
  left: -80px;
}

.auth-left-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.auth-brand .brand-icon {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}
.auth-brand .brand-name {
  color: #fff;
  font-size: 20px;
}
.auth-brand .brand-sub {
  color: rgba(255, 255, 255, 0.7);
}

.auth-headline {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 16px;
}

.auth-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-feature {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-feature i {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.auth-right {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
  background: #fff;
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.auth-card-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card-logo .brand-icon {
  box-shadow: 0 4px 14px rgba(0, 156, 77, 0.4);
}

@media (max-width: 768px) {
  .auth-left {
    display: none;
  }
  .auth-right {
    width: 100%;
    padding: 24px 20px;
  }
}

/* ===== ATTENDANCE DRAWER STYLES ===== */
.attendance-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attendance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
}
.attendance-item:last-child {
  border-bottom: none;
}

.attendance-student {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.attendance-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.attendance-select {
  width: 130px;
  font-size: 12px;
}
.att-present {
  border-color: var(--success) !important;
  color: var(--success);
}
.att-absent {
  border-color: var(--danger) !important;
  color: var(--danger);
}
.att-late {
  border-color: var(--warning) !important;
  color: var(--warning);
}
.att-excused {
  border-color: var(--info) !important;
  color: var(--info);
}

.lesson-color-bar {
  height: 4px;
  width: 100%;
}
.drawer-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.drawer-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-body);
}
.drawer-info-row i {
  width: 18px;
  text-align: center;
  color: var(--text-muted);
}
.drawer-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0;
}

/* ===== DASHBOARD EXTRAS ===== */
.income-card {
  background: linear-gradient(135deg, var(--primary) 0%, #00c060 100%);
  border: none;
}
.income-card .income-icon {
  font-size: 36px;
  color: rgba(255, 255, 255, 0.7);
}
.income-card .income-label {
  color: rgba(255, 255, 255, 0.8);
}
.income-card .income-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.news-card-mini {
  background: var(--bg-body);
  border-radius: 6px;
  padding: 14px;
  border: 1px solid var(--border-color);
  height: 100%;
}
.news-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

/* ===== COURSE DOT ===== */
.course-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.course-dot-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ===== NAVBAR INTERACTION FIX ===== */
.header-navbar,
.header-navbar *,
nav.navbar,
nav.navbar *,
#appNavbar,
#appNavbar * {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* ===== ULTIMATE NAVBAR POSITION FIX ===== */
#appNavbar,
.header-navbar.floating-nav,
nav.header-navbar.floating-nav,
nav#appNavbar.header-navbar.floating-nav {
  position: fixed !important;
  top: 20px !important;
  right: 32px !important;
  left: 280px !important;
  bottom: auto !important;
  z-index: 999999 !important;
  margin: 0 !important;
  pointer-events: auto !important;
  transform: none !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Override any possible bottom positioning */
[class*="navbar"][class*="floating"],
[class*="navbar"][class*="fixed"],
[class*="navbar"][class*="sticky"] {
  bottom: auto !important;
  left: auto !important;
}

/* Force all navbar elements to be clickable */
#appNavbar *,
#appNavbar > *,
#appNavbar .navbar-container,
#appNavbar .navbar-container *,
#appNavbar .nav,
#appNavbar .nav *,
#appNavbar .dropdown,
#appNavbar .dropdown *,
#appNavbar button,
#appNavbar a {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: inherit !important;
}

/* Emergency override for any inline styles or JavaScript injections */
html body #appNavbar.header-navbar.floating-nav,
html body nav#appNavbar.header-navbar.floating-nav {
  top: 20px !important;
  right: 32px !important;
  bottom: auto !important;
  left: 280px !important;
}