/* ==========================================================================
   Admin Modern (v3) — ГЛОБАЛЬНЫЙ СТИЛЬ «АНАЛИТИКА»
   Синяя шапка + тёмный сайдбар (классика v2), контент — как в разделе
   «Аналитика»: резкие углы (radius 0), акцент #1a56db, светлые карточки,
   таблицы с заглавными шапками, плоские кнопки и формы.
   Подключается ПОСЛЕ admin_business.css.
   ВАЖНО: не меняет ни одного ID и класса в HTML (к JS-привязкам не касается).
   ========================================================================== */

:root{
  --am-radius: 0;
  --am-radius-sm: 0;
  --am-blue: #1a56db;
  --am-blue-dark: #1648c0;
  --am-border: #e2e8f0;
  --am-bg: #f1f5f9;
  --am-sidebar: #1e293b;
  --am-shadow: 0 1px 3px rgba(15,23,42,.05);
}

/* ═══════════ БАЗА ═══════════ */
body{ background: var(--am-bg); }

/* ═══════════ SIDEBAR (тёмный, без градиента) ═══════════ */
.skin-blue .main-sidebar,
.skin-blue .left-side{
  background: var(--am-sidebar) !important;
}
.skin-blue .sidebar{ padding-top: 4px; }
.skin-blue .sidebar-menu > li{ margin: 1px 8px; }
.skin-blue .sidebar-menu > li > a{
  border-radius: 8px !important;
  border-left: none !important;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: #cbd5e1 !important;
  transition: background .15s ease, color .15s ease;
}
.skin-blue .sidebar-menu > li > a:hover{
  background: rgba(255,255,255,.06) !important;
  color: #fff !important;
}
.skin-blue .sidebar-menu > li.active > a{
  background: var(--am-blue) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px -2px rgba(26,86,219,.5);
}
.skin-blue .sidebar-menu > li.active > a .fa,
.skin-blue .sidebar-menu > li.active > a .fas,
.skin-blue .sidebar-menu > li.active > a .far,
.skin-blue .sidebar-menu > li.active > a .ion{ color:#fff !important; }
.skin-blue .sidebar-menu > li > a .fa,
.skin-blue .sidebar-menu > li > a .fas,
.skin-blue .sidebar-menu > li > a .far{ width: 20px; color: #94a3b8; }
.skin-blue .sidebar-menu > li:hover > a .fa{ color:#fff; }
.skin-blue .sidebar-menu .treeview-menu{ background: transparent !important; padding: 2px 0 4px 10px; }
.skin-blue .sidebar-menu .treeview-menu > li > a{ border-radius: 6px; color: #a8b6c9; padding: 7px 10px; }
.skin-blue .sidebar-menu .treeview-menu > li > a:hover{ color:#fff; background: rgba(255,255,255,.05); }
.skin-blue .sidebar-menu .treeview-menu > li.active > a{ color:#fff; }

/* ═══════════ HEADER (синяя шапка, без градиента) ═══════════ */
.skin-blue .main-header .navbar{
  background: var(--am-blue) !important;
  border-bottom: 1px solid #143db0;
  box-shadow: 0 1px 4px rgba(15,23,42,.08);
}
.skin-blue .main-header .navbar .sidebar-toggle{ color: #fff; }
.skin-blue .main-header .navbar .sidebar-toggle:hover{ background: #1648c0; color:#fff; }
.skin-blue .navbar-custom-menu > .navbar-nav > li > a,
.skin-blue .navbar-nav > .notifications-menu > a,
.skin-blue .navbar-nav > .messages-menu > a,
.skin-blue .navbar-nav > .tasks-menu > a,
.skin-blue .navbar-nav > .user-menu > .dropdown-toggle{
  color: #fff !important;
}
.skin-blue .navbar-custom-menu > .navbar-nav > li > a:hover{ background:#1648c0; color:#fff; }
.skin-blue .main-header .logo{
  background: var(--am-blue-dark) !important;
  color:#fff !important;
}
.skin-blue .main-header .logo:hover{ background: #143db0 !important; }

/* ═══════════ КОНТЕНТ ═══════════ */
.content-wrapper{ background: var(--am-bg); }
.content{ padding: 18px 22px; }

/* ═══════════ КАРТОЧКИ (BOX) — стиль Аналитики: плоско, без скруглений ═══════════ */
.box{
  border-radius: 0 !important;
  border: 1px solid var(--am-border) !important;
  box-shadow: var(--am-shadow) !important;
  overflow: hidden;
}
.box.box-primary{ border-top: 2px solid #1a56db !important; }
.box.box-success{ border-top: 2px solid #059669 !important; }
.box.box-info{ border-top: 2px solid #0284c7 !important; }
.box.box-warning{ border-top: 2px solid #d97706 !important; }
.box.box-danger{ border-top: 2px solid #dc2626 !important; }
.box-header{
  border-radius: 0 !important;
  padding: 12px 20px !important;
  background: #f8fafc;
  border-bottom: 1px solid var(--am-border);
}
.box-title{
  color: #0f172a !important;
  font-weight: 600;
  font-size: 15px;
}
.box-body{ padding: 14px 16px !important; }
.box-footer{
  border-radius: 0 !important;
  background: #f8fafc;
  border-top: 1px solid var(--am-border);
  padding: 12px 20px !important;
}
.widget-user-header{
  border-radius: 0 !important;
  background: var(--am-blue) !important;
  padding: 16px 24px !important;
}

/* ═══════════ КНОПКИ — стиль Аналитики: плоские, акцент #1a56db ═══════════ */
.btn{ border-radius: 0 !important; font-weight: 500 !important; transition: all .15s ease !important; }
.btn-primary{ background: #1a56db !important; border-color: #1a56db !important; color: #fff !important; }
.btn-primary:hover,.btn-primary:focus,.btn-primary.active{ background: #1648c0 !important; border-color: #1648c0 !important; color: #fff !important; }
.btn-default{
  background: #fff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
.btn-default:hover{ background: #f1f5f9 !important; color: #1e293b !important; }
.btn-success{ background: #059669 !important; border-color: #059669 !important; color: #fff !important; }
.btn-success:hover{ background: #047857 !important; border-color: #047857 !important; color: #fff !important; }
.btn-danger{ background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }
.btn-danger:hover{ background: #b91c1c !important; border-color: #b91c1c !important; color: #fff !important; }
.btn-warning{ background: #d97706 !important; border-color: #d97706 !important; color: #fff !important; }
.btn-warning:hover{ background: #b45309 !important; border-color: #b45309 !important; color: #fff !important; }
.btn-info{ background: #0284c7 !important; border-color: #0284c7 !important; color: #fff !important; }
.btn-info:hover{ background: #0369a1 !important; border-color: #0369a1 !important; color: #fff !important; }
.btn:hover{ box-shadow: 0 3px 10px -3px rgba(15,23,42,.25) !important; }
.btn:focus, .btn:active:focus{ box-shadow: 0 0 0 3px rgba(26,86,219,.16) !important; }
.btn-group > .btn{ border-radius: 0 !important; }
.btn-box-tool{ border: none !important; background: transparent !important; }

/* ═══════════ ФОРМЫ И ПОЛЯ — аккуратный современный вид ═══════════ */
label{
  font-weight: 600;
  color: #334155;
  font-size: 13px;
  margin-bottom: 5px;
}
.form-group{ margin-bottom: 14px; }
.help-block{ font-size: 12px; color: #64748b; }

.form-control{
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  height: 36px;
  font-size: 13px;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.03);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:hover:not(:disabled):not([readonly]){ border-color: #94a3b8; }
.form-control:focus{
  border-color: #1a56db !important;
  box-shadow: 0 0 0 3px rgba(26,86,219,.12) !important;
  outline: none;
}
.form-control::placeholder{ color: #94a3b8; opacity: 1; }
.form-control[readonly]{ background: #f8fafc; }
.form-control:disabled{ background: #f1f5f9; opacity: .85; cursor: not-allowed; }
textarea.form-control{ height: auto; min-height: 80px; resize: vertical; }
select.form-control{ height: 36px; cursor: pointer; }

/* чекбоксы и радио — синий акцент (без ломки вёрстки) */
input[type="checkbox"],
input[type="radio"]{
  accent-color: #1a56db;
  width: 15px;
  height: 15px;
  margin-right: 4px;
  vertical-align: middle;
  cursor: pointer;
}
.checkbox, .radio{ margin-top: 6px; margin-bottom: 10px; }

/* input-group */
.input-group .input-group-addon{
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  padding: 6px 10px;
}
.input-group .input-group-addon:first-child{ border-radius: 4px 0 0 4px; border-right: 0; }
.input-group .input-group-addon:last-child{ border-radius: 0 4px 4px 0; border-left: 0; }
.input-group .form-control:first-child{ border-radius: 4px 0 0 4px; }
.input-group .form-control:last-child{ border-radius: 0 4px 4px 0; }
.input-group-btn .btn{ height: 36px; }

/* select2 — в общем стиле */
.select2-container .select2-choice,
.select2-container .select2-selection--single{
  border-radius: 4px !important;
  height: 36px !important;
  border: 1px solid #cbd5e1 !important;
  background: #fff !important;
}
.select2-container .select2-selection--single .select2-selection__rendered{
  line-height: 34px !important;
  font-size: 13px;
  color: #1e293b;
  padding-left: 10px;
}
.select2-container .select2-selection--single .select2-selection__arrow{ height: 34px !important; }
.select2-container .select2-selection--multiple{ border-radius: 4px !important; border-color: #cbd5e1 !important; }
.select2-dropdown{ border-radius: 4px !important; border-color: #cbd5e1 !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected]{ background: #1a56db !important; }

/* датапикеры и таймпикеры */
.datepicker{ border-radius: 4px !important; }
.datepicker table tr td.active.active{ background: #1a56db !important; }
.bootstrap-timepicker-widget.dropdown-menu{ border-radius: 4px !important; }
.input-group.date .input-group-addon{ cursor: pointer; }

/* inline-формы и фильтры */
.form-inline .form-control{ margin-right: 6px; }
.form-inline .btn{ margin-right: 6px; }
.form-horizontal .control-label{ padding-top: 7px; }

/* ═══════════ МОДАЛКИ — стандартный вид (модалку не трогаем) ═══════════ */

/* ═══════════ ТАБЛИЦЫ — компактные, с сеткой, как виджет «Занятия сегодня» ═══════════ */
.table{ font-size: 12px; }
.table > thead > tr > th{
  background: #f8fafc;
  padding: 5px 8px !important;
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
  border: 1px solid #e2e8f0 !important;
}
.table > tbody > tr > td{
  padding: 5px 8px !important;
  border: 1px solid #eef1f6 !important;
  color: #1e293b;
  vertical-align: middle;
}
.table-hover > tbody > tr:hover > td{ background: #f8fafc; }
.table-bordered{ border: 1px solid #e2e8f0 !important; }
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td{ border: 1px solid #e2e8f0 !important; }
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > td{ padding: 4px 6px !important; }

/* ═══════════ МОДАЛКИ / АЛЕРТЫ / БЕДЖИ — плоско ═══════════ */
.modal-content{ border-radius: 0 !important; box-shadow: 0 20px 50px -12px rgba(15,23,42,.3) !important; border: 1px solid var(--am-border); }
.modal-header{ border-radius: 0 !important; background: #f8fafc; border-bottom: 1px solid var(--am-border); }
.modal-footer{ border-radius: 0 !important; border-top: 1px solid var(--am-border); }
.modal-title{ font-weight: 600; color: #0f172a; }
.badge{ border-radius: 0 !important; padding: 4px 9px; font-weight: 600; }
.label{ border-radius: 0 !important; font-weight: 600; }
.alert{ border-radius: 0 !important; border: 1px solid transparent; }
.callout{ border-radius: 0 !important; }
.progress{ border-radius: 0 !important; }
.progress-bar{ border-radius: 0 !important; }
.dropdown-menu{ border-radius: 0 !important; box-shadow: 0 12px 32px -8px rgba(15,23,42,.18) !important; }

/* ═══════════ ТАБЫ — стиль Аналитики ═══════════ */
.nav-tabs-custom{
  border-radius: 0 !important;
  background: #fff;
  border: 1px solid var(--am-border);
  box-shadow: var(--am-shadow);
}
.nav-tabs-custom > .nav-tabs{ border-bottom: 1px solid var(--am-border) !important; background: #f8fafc; }
.nav-tabs-custom > .nav-tabs > li.active > a{
  border-top: 3px solid var(--am-blue) !important;
  border-left: 1px solid var(--am-border);
  border-right: 1px solid var(--am-border);
  background: #fff;
  color: #0f172a;
}
.nav-tabs-custom > .nav-tabs > li > a{
  border-radius: 0 !important;
  color: #475569;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
  border-top: 3px solid transparent;
}
.nav-tabs-custom > .nav-tabs > li > a:hover{ background: #fff; border-top-color: #cbd5e1; }
.nav-tabs-custom > .tab-content{ padding: 16px; background: #fff; }
.nav-tabs > li > a{ border-radius: 0 !important; }
.nav-pills > li > a{ border-radius: 0 !important; }
.nav-pills > li.active > a{ background: var(--am-blue) !important; }

/* ═══════════ ПРОЧЕЕ — плоско ═══════════ */
.pagination > li > a,
.pagination > li > span{ border-radius: 0 !important; margin: 0 2px; color: #334155; }
.pagination > .active > a,
.pagination > .active > span{ background: var(--am-blue) !important; border-color: var(--am-blue) !important; }
.well{ border-radius: 0 !important; }
.info-box{ border-radius: 0 !important; }
.info-box-icon{ border-radius: 0 !important; }
.small-box{ border-radius: 0 !important; }
.small-box-footer{ border-radius: 0 !important; }
.tooltip-inner{ border-radius: 0 !important; }
.popover{ border-radius: 0 !important; }
.datepicker{ border-radius: 0 !important; }
.bootstrap-timepicker-widget.dropdown-menu{ border-radius: 0 !important; }
.list-group-item:first-child{ border-radius: 0 !important; }
.list-group-item:last-child{ border-radius: 0 !important; }
.swal2-popup{ border-radius: 0 !important; }
.select2-dropdown{ border-radius: 0 !important; }

/* ═══════════ БИБЛИОТЕКА КЛАССОВ «АНАЛИТИКИ» (доступна на всех страницах) ═══════════ */
.kpi-row{ margin-bottom: 16px; }
.kpi-card{
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  padding: 16px 14px 12px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow .18s, border-color .18s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 100%;
}
.kpi-card:hover{
  box-shadow: 0 4px 12px rgba(0,0,0,.07);
  border-color: #cbd5e1;
}
.kpi-icon{
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #1a56db;
  background: #eff6ff;
  border-radius: 0;
}
.kpi-body{ flex: 1; min-width: 0; }
.kpi-number{ font-size: 24px; font-weight: 700; color: #0f172a; line-height: 1.15; }
.kpi-number small{ font-size: 13px; font-weight: 400; color: #64748b; }
.kpi-label{
  font-size: 11px; text-transform: uppercase;
  letter-spacing: .4px;
  color: #64748b;
  margin-top: 1px;
}
.analytics-card{
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.analytics-card-header{
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-wrap: wrap;
  gap: 8px;
}
.analytics-card-header h3{ margin: 0; font-size: 15px; font-weight: 600; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.analytics-card-header h3 i{ color: #1a56db; }
.analytics-card-header .controls{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.analytics-card-body{ padding: 14px 18px 18px; }
.analytics-title-bar{
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #1a56db;
  padding: 16px 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.analytics-title-bar h2{ margin: 0; font-size: 20px; font-weight: 700; color: #0f172a; }
.analytics-title-bar h2 i{ color: #1a56db; margin-right: 10px; }
.analytics-title-bar h2 small{ font-weight:400; font-size:13px; color:#64748b; margin-left:12px; }
.filter-bar{
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  padding: 12px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.filter-bar label{ font-weight: 600; color: #334155; margin: 0; font-size: 13px; }
.filter-bar .form-control{ border-radius: 0 !important; border-color: #cbd5e1; box-shadow: none !important; height: 34px; }
.filter-bar .form-control:focus{ border-color: #1a56db; }
.btn-ana{
  border-radius: 0;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  transition: background .15s;
}
.btn-ana:hover{ background: #f1f5f9; }
.btn-ana-primary{ background: #1a56db; border-color: #1a56db; color: #fff; }
.btn-ana-primary:hover{ background: #1648c0; color: #fff; }
.table-analytics{ width: 100%; border-collapse: collapse; font-size: 12px; border: 1px solid #e2e8f0; }
.table-analytics thead th{
  background: #f8fafc;
  padding: 5px 8px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
  border: 1px solid #e2e8f0;
}
.table-analytics tbody td{ padding: 5px 8px; border: 1px solid #eef1f6; color: #1e293b; vertical-align: middle; }
.table-analytics tbody tr:hover{ background: #f8fafc; }
.table-analytics .text-muted{ color: #94a3b8; }
.table-analytics .text-right{ text-align: right; }
.table-analytics .fw-600{ font-weight: 600; }
.badge-amount{ font-weight: 600; color: #0f172a; }
.badge-success{ color: #059669; font-weight: 600; }
.badge-warning{ color: #d97706; font-weight: 600; }
.badge-danger{ color: #dc2626; font-weight: 600; }
.fw-600{ font-weight: 600; }
.graph-wrap{ width: 100%; min-height: 340px; }

/* ═══════════ ФОРМА РЕДАКТИРОВАНИЯ КУРСА — стандартный вид (не трогаем) ═══════════ */


/* ═══════════ АДАПТИВНОСТЬ ═══════════ */
@media (max-width: 1199px){
  .content{ padding: 16px; }
}

@media (max-width: 991px){
  .content{ padding: 14px; }
  .box-body{ padding: 14px 16px !important; }
  .form-inline .form-control{ min-width: 180px; }
  .filter-bar{ flex-direction: column; align-items: stretch; }
  .analytics-card-header{ flex-direction: column; align-items: stretch; }
  .kpi-card{ padding: 12px 10px; }
  .kpi-number{ font-size: 20px; }
}

@media (max-width: 767px){
  .content{ padding: 10px; }
  .content-wrapper{ overflow-x: hidden; }
  .box{ margin-bottom: 14px; }
  .box-body{ padding: 12px !important; }
  .widget-user-header{ padding: 14px 16px !important; }
  .widget-user-username.h_title{ font-size: 17px !important; }

  .btn-group{ display: flex; flex-wrap: wrap; gap: 6px; }
  .btn-group .btn{ flex: 1 1 auto; }

  .form-inline{ display: block; }
  .form-inline .form-control,
  .form-inline select.form-control,
  .form-inline .btn{ width: 100%; margin-bottom: 6px; }
  .select2-container{ width: 100% !important; }

  .filters .col-md-3,
  .col-sm-4.col-md-3,
  .col-sm-8.col-md-9{ margin-bottom: 10px; }

  .table{ font-size: 12px; }
  .table > thead > tr > th{ font-size: 10.5px; padding: 8px !important; }
  .table > tbody > tr > td{ padding: 8px !important; }

  .main-header .logo{ font-size: 16px; }
  .analytics-title-bar{ padding: 14px 16px; }
  .analytics-title-bar h2{ font-size: 17px; }
}

@media (max-width: 480px){
  .content{ padding: 8px; }
  .btn{ font-size: 12px; padding: 6px 10px; }
}
