:root {
  --bt-navy: #0A2540;
  --bt-navy-2: #073054;
  --bt-blue: #0B5CFF;
  --bt-cyan: #06B6D4;
  --bt-green: #10B981;
  --bt-orange: #F59E0B;
  --bt-red: #EF4444;
  --bt-bg: #F8FAFC;
  --bt-panel: #FFFFFF;
  --bt-line: #D8E3F0;
  --bt-muted: #64748B;
  --bt-text: #102033;
  --bt-shadow: 0 18px 45px rgba(10, 37, 64, 0.10);
  --bt-radius: 14px;
}

html {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  color: var(--bt-text);
  background: var(--bt-bg);
  margin-bottom: 0;
}

a {
  color: var(--bt-blue);
  text-decoration: none;
}

a:hover {
  color: #0848c7;
}

.bt-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background:
    radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.18), transparent 30%),
    linear-gradient(135deg, #06203a 0, var(--bt-navy) 34%, var(--bt-bg) 34%, var(--bt-bg) 100%);
}

.bt-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  color: #EAF6FF;
  background: linear-gradient(180deg, #061b31 0%, #082b4a 58%, #061a2e 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 20px 0 45px rgba(2, 12, 28, 0.18);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.bt-brand {
  color: #fff;
  display: block;
  padding: 8px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.bt-brand:hover {
  color: #fff;
}

.bt-brand-main {
  display: block;
  font-weight: 900;
  line-height: 1;
  font-size: 1.5rem;
  letter-spacing: 0;
}

.bt-brand-main span {
  color: #34C7FF;
}

.bt-brand-sub {
  display: block;
  margin-top: 8px;
  text-transform: uppercase;
  color: #B8D8F5;
  font-size: 0.72rem;
  letter-spacing: 0.12rem;
}

.bt-side-nav,
.bt-sidebar-footer {
  display: grid;
  gap: 7px;
}

.bt-side-nav {
  flex: 1;
  align-content: start;
}

.bt-side-label {
  margin: 16px 10px 6px;
  color: #7DB5DC;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
}

.bt-side-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #D9EEFF;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  font-weight: 650;
  font-size: 0.92rem;
}

.bt-side-link:hover,
.bt-side-link.active {
  color: #fff;
  background: linear-gradient(90deg, var(--bt-blue), #0C8FFF);
  box-shadow: 0 12px 28px rgba(11, 92, 255, 0.26);
}

.bt-side-button {
  border: 0;
}

.bt-side-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #EAF6FF;
  background: rgba(255, 255, 255, 0.10);
  font-size: 0.72rem;
  font-weight: 800;
}

.bt-nav-count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bt-red);
  color: #fff;
  font-size: 0.75rem;
}

.bt-main {
  min-width: 0;
  padding: 22px 24px 32px;
}

.bt-topbar {
  min-height: 76px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(216, 227, 240, 0.9);
  border-radius: var(--bt-radius);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: var(--bt-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.bt-kicker {
  color: var(--bt-blue);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08rem;
}

.bt-topbar-title {
  margin: 2px 0 0;
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: 0;
}

.bt-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.bt-notification-link,
.bt-user-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #F1F7FF;
  color: var(--bt-navy);
  border: 1px solid #D8E8FB;
  font-weight: 700;
}

.bt-notification-link span {
  min-width: 22px;
  min-height: 22px;
  border-radius: 999px;
  color: #fff;
  background: var(--bt-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.bt-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--bt-blue), var(--bt-cyan));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.bt-content {
  min-width: 0;
}

.bt-content > .d-flex:first-child,
.bt-page-header {
  padding: 18px 20px;
  margin-bottom: 16px !important;
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  background: var(--bt-panel);
  box-shadow: var(--bt-shadow);
}

.bt-content h1,
.bt-content .h3 {
  color: #0B1F35;
  font-weight: 850;
  letter-spacing: 0;
}

.bt-content > form.row,
.bt-filter-card {
  padding: 18px;
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  background: var(--bt-panel);
  box-shadow: var(--bt-shadow);
}

.bt-card {
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  background: var(--bt-panel);
  box-shadow: var(--bt-shadow);
  overflow: hidden;
}

.bt-content > .table-responsive,
.bt-content form > .table-responsive {
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  background: var(--bt-panel);
  box-shadow: var(--bt-shadow);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.bt-content form.bt-card {
  overflow: visible;
}

.table {
  margin-bottom: 0;
  color: var(--bt-text);
}

.table thead th {
  background: #F1F7FF;
  color: #173653;
  border-bottom: 1px solid var(--bt-line);
  font-size: 0.78rem;
  text-transform: none;
  font-weight: 800;
  vertical-align: middle;
}

.table tbody td {
  border-color: #E7EEF7;
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #F8FBFF;
}

.bt-data-table {
  min-width: 720px;
}

.bt-transit-mobile-list {
  display: none;
}

.form-label {
  color: #254762;
  font-weight: 750;
  font-size: 0.84rem;
}

.form-control,
.form-select {
  border-color: #C9D8E8;
  border-radius: 9px;
  background-color: #FBFDFF;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--bt-blue);
  box-shadow: 0 0 0 0.2rem rgba(11, 92, 255, 0.16);
}

.btn {
  border-radius: 9px;
  font-weight: 750;
}

.btn-primary {
  background: var(--bt-blue);
  border-color: var(--bt-blue);
  box-shadow: 0 10px 18px rgba(11, 92, 255, 0.20);
}

.btn-primary:hover {
  background: #084BD4;
  border-color: #084BD4;
}

.btn-outline-secondary {
  color: #28506F;
  border-color: #B9CBE0;
}

.btn-outline-success,
.btn-success {
  color: #fff;
  background: var(--bt-green);
  border-color: var(--bt-green);
}

.btn-outline-success:hover {
  background: #0D966B;
  border-color: #0D966B;
}

.btn-outline-warning {
  color: #8A5B00;
  border-color: #F7C66E;
  background: #FFF7E7;
}

.btn-outline-danger {
  color: #A51D2A;
  border-color: #F4B5BD;
  background: #FFF1F3;
}

.badge {
  border-radius: 999px;
  padding: 0.42em 0.72em;
  font-weight: 800;
}

.text-bg-success,
.bg-success {
  background-color: rgba(16, 185, 129, 0.14) !important;
  color: #057A55 !important;
}

.text-bg-warning,
.bg-warning {
  background-color: rgba(245, 158, 11, 0.16) !important;
  color: #925B00 !important;
}

.text-bg-danger,
.bg-danger {
  background-color: rgba(239, 68, 68, 0.14) !important;
  color: #B4232E !important;
}

.text-bg-info,
.bg-info {
  background-color: rgba(6, 182, 212, 0.15) !important;
  color: #08768A !important;
}

.text-bg-secondary,
.bg-secondary {
  background-color: #E8EFF7 !important;
  color: #52677C !important;
}

.pagination {
  margin-top: 16px;
}

.page-link {
  color: var(--bt-blue);
  border-color: #D8E3F0;
}

.transit-photo-thumb {
  width: 74px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #C9D8E8;
  box-shadow: 0 6px 14px rgba(10, 37, 64, 0.10);
}

.transit-photo-floating-preview {
  border-radius: 12px;
  border: 1px solid #BBD8F3;
  box-shadow: 0 20px 50px rgba(10, 37, 64, 0.22);
}

.bt-transit-detail-table {
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  background: var(--bt-panel);
  box-shadow: var(--bt-shadow);
}

.bt-transit-detail-table .table th {
  width: 42%;
  color: #0A2540;
  background: #EAF4FF;
  font-weight: 850;
}

.bt-transit-detail-table .table td {
  color: #102033;
  background: #FFFFFF;
  font-weight: 650;
}

.bt-photo-viewer {
  display: grid;
  gap: 14px;
}

.bt-photo-toolbar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  background: var(--bt-panel);
  box-shadow: var(--bt-shadow);
}

.bt-photo-stage {
  min-height: 58vh;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  background: #071C31;
  box-shadow: var(--bt-shadow);
}

.bt-photo-stage img {
  max-width: 100%;
  max-height: calc(100vh - 260px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.bt-telegram-qr {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid #CFE0F2;
  border-radius: var(--bt-radius);
  background: #F7FBFF;
}

.bt-telegram-qr-code {
  width: 172px;
  height: 172px;
  flex: 0 0 172px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--bt-line);
}

.bt-telegram-qr-code svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bt-public-body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(10, 37, 64, 0.92), rgba(10, 37, 64, 0.54)),
    radial-gradient(circle at 80% 15%, rgba(6, 182, 212, 0.35), transparent 28%),
    linear-gradient(135deg, #061728, #0A2540);
}

.bt-public-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.bt-public-shell > .row {
  width: min(980px, 100%);
}

.bt-login-panel {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(300px, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.bt-login-hero {
  min-height: 520px;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(5, 20, 36, 0.32), rgba(5, 20, 36, 0.92)),
    linear-gradient(135deg, #08233F, #0B5CFF);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bt-login-card {
  padding: 44px;
  align-self: center;
}

.bt-login-title {
  color: #0B1F35;
  font-weight: 900;
}

.bt-login-mark {
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}

.bt-login-mark span {
  color: #36C8FF;
}

.bt-login-copy {
  color: #C8E5FF;
  max-width: 20rem;
}

.bt-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.bt-stat-card {
  padding: 18px;
  border: 1px solid var(--bt-line);
  border-radius: var(--bt-radius);
  background: var(--bt-panel);
  box-shadow: var(--bt-shadow);
}

.bt-dashboard-link {
  color: var(--bt-text);
  display: grid;
  gap: 4px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.bt-dashboard-link:hover {
  color: var(--bt-text);
  border-color: #A9CBF8;
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(10, 37, 64, 0.14);
}

.bt-stat-label {
  color: var(--bt-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.bt-stat-value {
  margin-top: 8px;
  color: var(--bt-navy);
  font-size: 1.65rem;
  font-weight: 900;
}

.bt-stat-note {
  color: var(--bt-muted);
  font-size: 0.88rem;
}

.bt-system-strip {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.bt-export-button {
  padding-inline: 18px;
}

.bt-dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bt-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.bt-dashboard-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.bt-dashboard-status-grid > div {
  padding: 14px;
  border-radius: 12px;
  background: #F6FAFF;
  border: 1px solid #E1EBF6;
}

.bt-dashboard-status-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--bt-navy);
  font-size: 1.45rem;
  font-weight: 900;
}

.bt-hour-chart {
  height: 230px;
  display: grid;
  grid-template-columns: repeat(24, minmax(7px, 1fr));
  align-items: end;
  gap: 5px;
  padding-top: 8px;
}

.bt-hour-column {
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 18px;
  align-items: end;
  justify-items: center;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
}

.bt-hour-column:hover .bt-hour-bar {
  filter: brightness(1.08);
  box-shadow: 0 10px 20px rgba(11, 92, 255, 0.24);
}

.bt-hour-column:hover .bt-hour-label,
.bt-hour-column:hover .bt-hour-count {
  color: var(--bt-blue);
}

.bt-hour-measure {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
}

.bt-hour-count {
  color: var(--bt-navy);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  min-height: 0.7rem;
}

.bt-hour-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--bt-cyan), var(--bt-blue));
  box-shadow: 0 8px 16px rgba(11, 92, 255, 0.16);
}

.bt-hour-label {
  color: var(--bt-muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.bt-dashboard-list {
  display: grid;
  gap: 8px;
}

.bt-dashboard-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #E1EBF6;
  border-radius: 12px;
  color: var(--bt-text);
  background: #F8FBFF;
}

.bt-dashboard-list-row:hover {
  color: var(--bt-text);
  border-color: #A9CBF8;
  background: #F2F8FF;
}

.bt-dashboard-list-row span {
  min-width: 0;
}

.bt-dashboard-list-row strong,
.bt-dashboard-list-row small {
  display: block;
}

.bt-dashboard-list-row strong {
  font-weight: 900;
}

.bt-dashboard-list-row small {
  margin-top: 3px;
  color: var(--bt-muted);
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .bt-shell {
    grid-template-columns: 1fr;
  }

  .bt-sidebar {
    position: relative;
    height: auto;
    padding: 14px;
  }

  .bt-side-nav,
  .bt-sidebar-footer {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .bt-side-link {
    white-space: nowrap;
    min-width: max-content;
  }

  .bt-side-label {
    display: none;
  }

  .bt-main {
    padding: 16px;
  }

  .bt-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .bt-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bt-dashboard-grid,
  .bt-dashboard-status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .bt-main {
    padding: 12px;
  }

  .bt-content > .d-flex:first-child,
  .bt-page-header {
    padding: 14px;
    align-items: flex-start !important;
    flex-direction: column;
    gap: 6px;
  }

  .bt-filter-card {
    padding: 14px;
  }

  .bt-topbar {
    margin-bottom: 14px;
    padding: 14px;
  }

  .bt-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .bt-notification-link,
  .bt-user-chip {
    min-height: 36px;
    padding: 7px 10px;
  }

  .bt-login-panel {
    grid-template-columns: 1fr;
  }

  .bt-login-hero {
    min-height: 260px;
  }

  .bt-login-card {
    padding: 26px;
  }

  .bt-stat-grid {
    grid-template-columns: 1fr;
  }

  .bt-dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .bt-system-strip {
    justify-content: flex-start;
  }

  .bt-hour-chart {
    height: 170px;
    gap: 3px;
  }

  .bt-dashboard-list-row {
    grid-template-columns: 1fr;
  }

  .bt-dashboard-list-row .text-end {
    text-align: left !important;
  }

  .bt-export-button {
    width: 100%;
  }

  .bt-transits-table {
    display: none;
  }

  .bt-transit-mobile-list {
    display: grid;
    gap: 12px;
  }

  .bt-transit-mobile-card {
    padding: 12px;
    border: 1px solid var(--bt-line);
    border-radius: var(--bt-radius);
    background: var(--bt-panel);
    box-shadow: var(--bt-shadow);
  }

  .bt-transit-mobile-head,
  .bt-transit-mobile-main {
    display: flex;
    gap: 12px;
  }

  .bt-transit-mobile-head {
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .bt-transit-mobile-select {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--bt-muted);
    font-size: 0.86rem;
    font-weight: 750;
  }

  .bt-transit-mobile-main {
    align-items: stretch;
  }

  .bt-transit-mobile-photo {
    width: 128px;
    min-height: 92px;
    flex: 0 0 128px;
    border-radius: 12px;
    overflow: hidden;
    background: #EAF2FB;
    border: 1px solid #C9D8E8;
    display: grid;
    place-items: center;
    color: var(--bt-muted);
    font-size: 0.82rem;
    text-align: center;
  }

  .bt-transit-mobile-photo a,
  .bt-transit-mobile-photo img {
    width: 100%;
    height: 100%;
    display: block;
  }

  .bt-transit-mobile-photo img {
    object-fit: cover;
  }

  .bt-transit-mobile-info {
    min-width: 0;
    flex: 1;
  }

  .bt-transit-mobile-plate {
    display: inline-block;
    color: var(--bt-blue);
    font-size: 1.1rem;
    font-weight: 900;
    word-break: break-word;
  }

  .bt-transit-mobile-date {
    margin-top: 4px;
    color: var(--bt-navy);
    font-weight: 800;
  }

  .bt-transit-mobile-meta {
    margin-top: 4px;
    color: var(--bt-muted);
    font-size: 0.88rem;
  }

  .bt-transit-mobile-grid {
    margin: 12px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .bt-transit-mobile-grid div {
    padding: 9px;
    border-radius: 10px;
    background: #F6FAFF;
  }

  .bt-transit-mobile-grid dt {
    color: var(--bt-muted);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .bt-transit-mobile-grid dd {
    margin: 2px 0 0;
    color: var(--bt-text);
    font-weight: 750;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .bt-transit-mobile-main {
    flex-direction: column;
  }

  .bt-transit-mobile-photo {
    width: 100%;
    min-height: 168px;
    flex-basis: auto;
  }
}
