/* ==========================================================================
   Admin Business Style — глобальная тема для всех страниц админки
   Сине-белая гамма, прямые углы, профессиональная типографика.
   Подключается после основного AdminLTE-скина.
   ========================================================================== */

/* ── Шрифт и базовые настройки ── */
body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* ── Box (универсальная карточка) ── */
.box {
  border-radius: 0 !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
  margin-bottom: 20px;
}
.box.box-primary,
.box.box-success,
.box.box-info,
.box.box-warning,
.box.box-danger {
  border-top: 3px solid #1a56db !important;
}
.box.box-success { border-top-color: #059669 !important; }
.box.box-info    { border-top-color: #0284c7 !important; }
.box.box-warning { border-top-color: #d97706 !important; }
.box.box-danger  { border-top-color: #dc2626 !important; }

/* ── Box header ── */
.box-header {
  border-radius: 0 !important;
  padding: 12px 20px !important;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.box-header.with-border { border-bottom: 1px solid #e2e8f0; }
.box-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}
.box-tools { margin-top: 0; }
.btn-box-tool {
  border-radius: 0 !important;
  color: #64748b !important;
}
.btn-box-tool:hover { color: #0f172a !important; }

/* ── Box body ── */
.box-body {
  padding: 16px 20px !important;
  background: #fff;
}

/* ── Box footer ── */
.box-footer {
  border-radius: 0 !important;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 12px 20px;
}

/* ── Box-solid (цельный блок без header-фон) ── */
.box-solid { border: 1px solid #e2e8f0 !important; }
.box-solid .box-header {
  background: #1a56db !important;
  color: #fff !important;
  border-bottom: none !important;
}
.box-solid .box-title { color: #fff !important; }

/* ── Widget user (шапка с иконкой + заголовком) ── */
.widget-user-header {
  border-radius: 0 !important;
  padding: 16px 24px !important;
  background: #1a56db !important;
  border-bottom: none;
}
.widget-user-username.h_title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0;
}
.widget-user-username.h_title i { margin-right: 8px; }

/* ── Цветные фоны заголовков ── */
.bg-aqua   { background: #1a56db !important; color: #fff !important; }
.bg-blue   { background: #2563eb !important; color: #fff !important; }
.bg-green  { background: #059669 !important; color: #fff !important; }
.bg-red    { background: #dc2626 !important; color: #fff !important; }
.bg-maroon { background: #be185d !important; color: #fff !important; }
.bg-navy   { background: #1e3a5f !important; color: #fff !important; }
.bg-yellow,
.bg-warning { background: #d97706 !important; color: #fff !important; }

/* ── Small box (цифровые виджеты на dashboard) ── */
.small-box { border-radius: 0 !important; }
.small-box .icon { font-size: 60px; }
.small-box h3 { font-size: 32px; font-weight: 700; }
.small-box-footer { border-radius: 0 !important; }

/* ── Info box ── */
.info-box { border-radius: 0 !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.info-box-icon { border-radius: 0 !important; }

/* ── Кнопки ── */
.btn {
  border-radius: 0 !important;
  font-weight: 500 !important;
  font-size: 13px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:active,
.btn:focus { box-shadow: none !important; }

.btn-success {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #fff !important;
}
.btn-success:hover { background: #047857 !important; border-color: #047857 !important; }

.btn-primary {
  background: #1a56db !important;
  border-color: #1a56db !important;
  color: #fff !important;
}
.btn-primary:hover { background: #1648c0 !important; border-color: #1648c0 !important; }

.btn-info {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #fff !important;
}
.btn-info:hover { background: #0369a1 !important; border-color: #0369a1 !important; }

.btn-warning {
  background: #d97706 !important;
  border-color: #d97706 !important;
  color: #fff !important;
}
.btn-warning:hover { background: #b45309 !important; border-color: #b45309 !important; }

.btn-danger {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}
.btn-danger:hover { background: #b91c1c !important; border-color: #b91c1c !important; }

.btn-default {
  background: #fff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
.btn-default:hover { background: #f1f5f9 !important; border-color: #94a3b8 !important; }

.btn-flat { border-radius: 0 !important; }

/* ── Формы ── */
.form-control {
  border-radius: 0 !important;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
  height: 34px;
  padding: 6px 12px;
  font-size: 13px;
  color: #334155;
}
.form-control:focus {
  border-color: #1a56db !important;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.03), 0 0 0 1px rgba(26,86,219,.15) !important;
}
select.form-control { height: 34px; }
textarea.form-control { height: auto; }

/* ── Input groups ── */
.input-group .input-group-addon {
  border-radius: 0 !important;
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 13px;
}
.input-group .form-control:first-child,
.input-group-addon:first-child { border-radius: 0 !important; }
.input-group .form-control:last-child,
.input-group-addon:last-child { border-radius: 0 !important; }

/* ── Nav / Tabs ── */
.nav-tabs-custom { border-radius: 0 !important; }
.nav-tabs > li > a { border-radius: 0 !important; margin-right: 0; }
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  border-top: 3px solid #1a56db !important;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #fff;
}
.nav-pills > li > a { border-radius: 0 !important; }
.nav-pills > li.active > a { background: #1a56db !important; }

/* ── Таблицы ── */
.table { margin-bottom: 0; }
.table > thead > tr > th {
  border-bottom: 2px solid #e2e8f0 !important;
  color: #475569;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 10px 12px !important;
  background: #f8fafc;
}
.table > tbody > tr > td {
  border-top: 1px solid #f1f5f9 !important;
  padding: 10px 12px !important;
  vertical-align: middle;
}
.table > tbody > tr:hover > td { background: #f8fafc; }
.table-hover > tbody > tr:hover > td { background: #f1f5f9; }
.table-striped > tbody > tr:nth-of-type(odd) > td { background: #fafbfc; }

/* ── Модальные окна ── */
.modal-content { border-radius: 0 !important; border: none; box-shadow: 0 10px 25px rgba(0,0,0,.1); }
.modal-header { background: #f8fafc; border-bottom: 1px solid #e2e8f0; padding: 14px 20px; }
.modal-header .close { margin-top: 0; }
.modal-title { font-weight: 600; font-size: 16px; color: #0f172a; }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid #e2e8f0; padding: 12px 20px; }

/* ── Callout ── */
.callout { border-radius: 0 !important; }
.callout-info    { border-left-color: #1a56db !important; }
.callout-success { border-left-color: #059669 !important; }
.callout-warning { border-left-color: #d97706 !important; }
.callout-danger  { border-left-color: #dc2626 !important; }

/* ── Alert ── */
.alert { border-radius: 0 !important; border: none; border-left: 4px solid; }
.alert-success { border-left-color: #059669; }
.alert-danger  { border-left-color: #dc2626; }
.alert-warning { border-left-color: #d97706; }
.alert-info    { border-left-color: #1a56db; }

/* ── Progress ── */
.progress { border-radius: 0 !important; box-shadow: none; }
.progress-bar { box-shadow: none; }

/* ── Badge / Label ── */
.badge { border-radius: 0 !important; font-weight: 500; }
.label { border-radius: 0 !important; font-weight: 500; }
.badge-info,
.label-info { background: #0284c7; }

/* ── Pagination ── */
.pagination > li > a,
.pagination > li > span {
  border-radius: 0 !important;
  color: #1a56db;
  border-color: #cbd5e1;
}
.pagination > li.active > a,
.pagination > li.active > span {
  background: #1a56db !important;
  border-color: #1a56db !important;
}
.pagination > li > a:hover { background: #f1f5f9; }

/* ── Dropdown ── */
.dropdown-menu { border-radius: 0 !important; }
.dropdown-menu > li > a { padding: 6px 16px; }
.dropdown-menu > li > a:hover { background: #f1f5f9; }

/* ── Datepicker ── */
.datepicker { border-radius: 0 !important; }
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td span.active {
  background: #1a56db !important;
  background-image: none !important;
}
.datepicker table tr td.today {
  background: #dbeafe !important;
  background-image: none !important;
}

/* ── Timepicker ── */
.bootstrap-timepicker-widget.dropdown-menu { border-radius: 0 !important; }

/* ── Select2 ── */
.select2-container .select2-choice,
.select2-container .select2-selection--single {
  border-radius: 0 !important;
  border-color: #cbd5e1 !important;
  height: 34px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 34px; }

/* ── Well ── */
.well { border-radius: 0 !important; border-color: #e2e8f0; box-shadow: none; }

/* ── Popover ── */
.popover { border-radius: 0 !important; }

/* ── Tooltip ── */
.tooltip-inner { border-radius: 0 !important; }

/* ── Panel ── */
.panel { border-radius: 0 !important; }
.panel-heading { border-radius: 0 !important; }
.panel-footer { border-radius: 0 !important; }

/* ── List group ── */
.list-group-item { border-color: #e2e8f0; }
.list-group-item:first-child,
.list-group-item:last-child { border-radius: 0 !important; }

/* ── Thumbnail ── */
.thumbnail { border-radius: 0 !important; border-color: #e2e8f0; }

/* ── Carousel ── */
.carousel-control { background: none; }

/* ── Вспомогательные отступы для KPI-рядов ── */
.mb-3 { margin-bottom: 12px; }
.mt-2 { margin-top: 8px; }

/* ── Стилизация скроллов (Webkit) ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Основная навигация sidebar ── */
.skin-blue .main-sidebar,
.skin-blue .left-side {
  background: #1e293b !important;
}
.skin-blue .sidebar-menu > li.active > a {
  border-left-color: #1a56db !important;
}
.skin-blue .sidebar a { color: #cbd5e1; }
.skin-blue .sidebar a:hover { color: #fff; }

/* ── Header / Top nav ── */
.skin-blue .main-header .navbar { background: #1a56db !important; }
.skin-blue .main-header .logo { background: #1648c0 !important; border-bottom: none; }
.skin-blue .main-header .logo:hover { background: #143db0 !important; }

/* ── Content wrapper ── */
.content-wrapper { background: #f1f5f9; }

/* Fix: select2 dropdown z-index above modal backdrop */
.select2-container--open {
    z-index: 9999 !important;
}
