:root {
  --tb-navy: #0b2545;
  --tb-navy-2: #13315c;
  --tb-blue: #1d5fbf;
  --tb-grey: #8da9c4;
  --tb-bg: #f3f6fa;
  --bs-primary: #1d5fbf;
  --bs-primary-rgb: 29, 95, 191;
  --bs-link-color: #1d5fbf;
  --bs-link-color-rgb: 29, 95, 191;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
body { background: var(--tb-bg); color: #1d2b3a; }
.btn-primary { --bs-btn-bg: var(--tb-blue); --bs-btn-border-color: var(--tb-blue); --bs-btn-hover-bg: var(--tb-navy-2); --bs-btn-hover-border-color: var(--tb-navy-2); --bs-btn-active-bg: var(--tb-navy); }
.btn-outline-primary { --bs-btn-color: var(--tb-blue); --bs-btn-border-color: var(--tb-blue); --bs-btn-hover-bg: var(--tb-blue); --bs-btn-hover-border-color: var(--tb-blue); }
.text-primary { color: var(--tb-blue) !important; }
.bg-navy { background: var(--tb-navy) !important; }

.tb-navbar { background: var(--tb-navy); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.tb-navbar .nav-link { color: rgba(255,255,255,.8); }
.tb-navbar .nav-link.active, .tb-navbar .nav-link:hover { color: #fff; }
.tb-badge { position: absolute; top: 2px; right: -4px; font-size: .65rem; }

.tb-hero { background: linear-gradient(135deg, var(--tb-navy) 0%, var(--tb-navy-2) 60%, #1d4f8f 100%); color: #fff; position: relative; overflow: hidden; }
.tb-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(141,169,196,.25), transparent 45%); pointer-events: none; }
.tb-hero .search-card { background: #fff; color: #1d2b3a; border-radius: 1rem; box-shadow: 0 20px 40px rgba(0,0,0,.25); position: relative; z-index: 1; }
.tb-stat { background: #fff; border-radius: .75rem; padding: 1.25rem; box-shadow: 0 1px 3px rgba(11,37,69,.08); height: 100%; }
.tb-stat .value { font-size: 1.9rem; font-weight: 700; color: var(--tb-navy); line-height: 1.1; }
.tb-stat .label { color: #5c6f82; font-size: .85rem; }

.card { border-radius: .75rem; }
.card.tb-card { border: 0; box-shadow: 0 1px 3px rgba(11,37,69,.08); }
.tb-listing { border: 0; box-shadow: 0 1px 3px rgba(11,37,69,.08); transition: box-shadow .15s, transform .15s; }
.tb-listing:hover { box-shadow: 0 6px 18px rgba(11,37,69,.12); transform: translateY(-1px); }
.tb-listing.priority { border-left: 4px solid #f0ad4e; }
.tb-route { font-weight: 600; color: var(--tb-navy); }
.tb-route .arrow { color: var(--tb-grey); margin: 0 .35rem; }
.tb-flag { display: inline-block; min-width: 1.9rem; padding: 0 .3rem; border-radius: .25rem; background: #e7edf5; color: var(--tb-navy-2); font-size: .72rem; font-weight: 700; text-align: center; }
.tb-meta { color: #5c6f82; font-size: .85rem; }
.tb-meta i { color: var(--tb-grey); }

.table-tb thead th { background: #eef2f7; color: #4b5d70; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; border-bottom: 0; white-space: nowrap; }
.table-tb td { vertical-align: middle; }

.tb-sidenav { position: sticky; top: 76px; }
.tb-sidenav-link { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border-radius: .5rem; color: #33475b; text-decoration: none; font-size: .92rem; }
.tb-sidenav-link:hover { background: #eef2f7; }
.tb-sidenav-link.active { background: var(--tb-navy); color: #fff; }
.tb-sidenav-link i { width: 1.1rem; }

.tb-footer { background: var(--tb-navy); color: #dbe4ee; }
.tb-footer a { color: #dbe4ee; text-decoration: none; }
.tb-footer a:hover { color: #fff; text-decoration: underline; }

.stars { color: #f0ad4e; white-space: nowrap; }
.form-label { font-weight: 500; font-size: .9rem; }
.form-section { border-bottom: 1px solid #e5e9ef; padding-bottom: 1rem; margin-bottom: 1.25rem; }
.form-section h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: #4b5d70; margin-bottom: 1rem; }

/* Žemėlapiai */
.tb-map { height: 520px; border-radius: .75rem; z-index: 0; }
.tb-map-sm { height: 320px; border-radius: .75rem; z-index: 0; }
.tb-map-full { height: calc(100vh - 140px); min-height: 480px; border-radius: .75rem; z-index: 0; }
.tb-map-legend { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .82rem; }
.tb-dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); vertical-align: middle; margin-right: .25rem; }
.tb-dot.green { background: #1e9e4a; } .tb-dot.red { background: #d9363e; } .tb-dot.blue { background: #1d5fbf; } .tb-dot.orange { background: #f08c00; }
.leaflet-popup-content { font-size: .85rem; }

/* Maršrutų planuoklis */
.stop-item { display: flex; gap: .5rem; align-items: center; background: #fff; border: 1px solid #dde4ec; border-radius: .5rem; padding: .4rem .5rem; margin-bottom: .4rem; }
.stop-item .handle { cursor: grab; color: #8da9c4; }
.stop-item .num { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--tb-navy); color: #fff; font-size: .75rem; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.stop-item.dragging { opacity: .5; }
.geo-suggest { position: absolute; z-index: 1050; background: #fff; border: 1px solid #dde4ec; border-radius: .5rem; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 260px; overflow: auto; width: 100%; }
.geo-suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .45rem .7rem; font-size: .88rem; }
.geo-suggest button:hover, .geo-suggest button:focus { background: #eef2f7; }

/* Skaičiuoklė */
.calc-result { background: #fff; border-radius: .75rem; padding: 1rem; }
.calc-result dt { font-weight: 500; color: #5c6f82; font-size: .88rem; }
.calc-result dd { font-weight: 700; font-size: 1.05rem; margin-bottom: .5rem; }
.profit-pos { color: #1e9e4a !important; } .profit-neg { color: #d9363e !important; }

/* Žinutės */
.chat-box { height: 55vh; min-height: 320px; overflow-y: auto; background: #f8fafc; border-radius: .75rem; padding: 1rem; }
.msg { max-width: 78%; margin-bottom: .75rem; }
.msg .bubble { padding: .55rem .8rem; border-radius: .9rem; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06); white-space: pre-wrap; word-wrap: break-word; }
.msg.mine { margin-left: auto; } .msg.mine .bubble { background: var(--tb-blue); color: #fff; }
.msg.mine .bubble a { color: #fff; }
.msg .meta { font-size: .72rem; color: #8193a5; margin-top: .15rem; }
.msg.mine .meta { text-align: right; }

/* Planai */
.plan-card { border: 2px solid transparent; }
.plan-card.featured { border-color: var(--tb-blue); }
.plan-card .price { font-size: 2.2rem; font-weight: 800; color: var(--tb-navy); }

/* Admin */
.admin-body { background: #eef2f7; }
.admin-sidebar { background: var(--tb-navy); min-height: 100vh; width: 250px; flex: 0 0 250px; }
.admin-sidebar a { color: #c9d6e4; text-decoration: none; display: block; padding: .45rem 1rem; border-radius: .4rem; font-size: .9rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-sidebar .group { color: #8da9c4; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: .9rem 1rem .3rem; }
@media (max-width: 991.98px) {
  .admin-sidebar { position: fixed; left: -260px; top: 0; z-index: 1040; transition: left .2s; }
  .admin-sidebar.open { left: 0; }
  .tb-map { height: 380px; }
  .tb-map-full { height: 60vh; }
  .msg { max-width: 92%; }
}
@media (max-width: 575.98px) {
  .tb-stat .value { font-size: 1.4rem; }
  .table-responsive-stack thead { display: none; }
  .table-responsive-stack tr { display: block; border-bottom: 1px solid #dee2e6; padding: .5rem 0; }
  .table-responsive-stack td { display: flex; justify-content: space-between; border: 0; padding: .2rem .5rem; }
  .table-responsive-stack td::before { content: attr(data-label); font-weight: 600; color: #5c6f82; margin-right: 1rem; }
}
