/* ============================================
   INTERLACTO FLEET MANAGEMENT - MASTER STYLESHEET
   ============================================ */

/* ===========================================
   1. RESPONSIVE LAYOUT OVERRIDES (SIDEBAR)
   =========================================== */
@media (min-width: 1300px) and (max-width: 1730px) {
  .left-sidebar.with-vertical {
    width: 270px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
  }

  .body-wrapper {
    margin-left: 270px;
    transition: margin-left 0.3s ease;
  }

  .container-fluid {
    max-width: calc(100% - 48px);
    padding-left: 24px;
    padding-right: 24px;
  }

  .left-sidebar.with-vertical .sidebar-nav {
    opacity: 1;
    visibility: visible;
  }

  .left-sidebar.with-vertical .brand-logo {
    width: 270px;
  }

  .left-sidebar.with-vertical.mini-sidebar {
    width: 270px;
  }

  .left-sidebar.with-vertical.mini-sidebar ~ .body-wrapper {
    margin-left: 270px;
  }
}

@media (min-width: 1731px) {
  .body-wrapper {
    margin-left: 270px;
  }
}

@media (min-width: 1200px) {
  .body-wrapper {
    margin-left: 260px;
  }
}

@media (max-width: 1199.98px) {
  .body-wrapper {
    margin-left: 0;
  }
}

/* ===========================================
   2. TYPOGRAPHY & TEXT COLORS
   =========================================== */
body {
  color: #2c3e50;
}

.text-muted {
  color: #5a6c7d !important;
}

.text-secondary {
  color: #495057 !important;
}

.card-body p,
.card-body div,
.card-body span {
  color: #2c3e50;
}

/* ===========================================
   3. CARD STYLING
   =========================================== */
.card {
  border: 1px solid #dee2e6;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.card-header {
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

/* ===========================================
   4. BADGES
   =========================================== */
.badge {
  font-weight: 600;
  padding: 0.5em 1em;
  font-size: 0.75rem;
}

/* ===========================================
   5. ALERTS
   =========================================== */
.alert {
  border-width: 1px;
  border-style: solid;
}

.alert-primary {
  background-color: rgba(13, 110, 253, 0.1);
  border-color: #0d6efd;
}

.alert-info {
  background-color: rgba(13, 202, 240, 0.1);
  border-color: #0dcaf0;
}

.alert-success {
  background-color: rgba(25, 135, 84, 0.1);
  border-color: #198754;
}

/* ===========================================
   6. ROUNDED ELEMENTS
   =========================================== */
.rounded-2,
.rounded-3 {
  border-radius: 0.5rem !important;
}

/* ===========================================
   7. BACKGROUND COLORS
   =========================================== */
.bg-light {
  background-color: #f8f9fa !important;
}

/* ===========================================
   8. SHADOWS
   =========================================== */
.shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* ===========================================
   9. FORM VALIDATION
   =========================================== */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-check-input.is-invalid {
  border-color: #dc3545;
}

.form-check-input.is-invalid ~ .form-check-label {
  color: #dc3545;
}

/* ===========================================
   10. TRIP LOGGING STYLES (kniha-jizd)
   =========================================== */
.record-trip {
  background-color: rgba(13, 110, 253, 0.05);
}

.record-refueling {
  background-color: rgba(25, 135, 84, 0.05);
}

.record-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.record-icon.trip {
  background-color: rgba(13, 110, 253, 0.15);
  color: #0d6efd;
}

.record-icon.refueling {
  background-color: rgba(25, 135, 84, 0.15);
  color: #198754;
}

.stat-card {
  border-left: 4px solid;
}

.stat-card.km {
  border-left-color: #0d6efd;
}

.stat-card.fuel {
  border-left-color: #198754;
}

.stat-card.cost {
  border-left-color: #dc3545;
}

.stat-card.consumption {
  border-left-color: #ffc107;
}

.month-closed {
  opacity: 0.7;
}

.month-closed .btn-edit {
  display: none;
}

/* ===========================================
   11. FINANCIAL PARAMETERS
   =========================================== */
.fin-params-inner {
  background-color: #f6f8ff;
  border-radius: 12px;
  padding: 20px 24px;
}

/* ===========================================
   12. OFFER TYPE TOGGLES
   =========================================== */
.offer-type-toggle-group {
  display: inline-flex;
  gap: 8px;
  border-radius: 999px;
  background-color: #e6ecff;
  padding: 4px;
  margin-top: 6px;
  margin-bottom: 18px;
}

.offer-type-btn {
  border-radius: 999px !important;
  padding: 6px 18px;
  font-size: 0.875rem;
  border: none;
  box-shadow: none !important;
  white-space: nowrap;
}

.offer-type-btn.btn-light {
  background-color: transparent;
}

.offer-type-btn.btn-primary {
  color: #fff;
}

/* ===========================================
   13. ACTION BUTTONS
   =========================================== */
.top-action-buttons .btn-top-fixed {
  white-space: nowrap;
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.45rem 0.9rem;
}

/* ===========================================
   14. RIDE/VEHICLE MODALS
   =========================================== */
.ride-modal {
  border-radius: 14px;
  overflow: hidden;
}

.ride-modal-header {
  background: rgba(13, 110, 253, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.ride-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .08);
}

.ride-modal-icon i {
  font-size: 18px;
  opacity: .9;
}

.ride-card {
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  box-shadow: none;
}

.ride-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 575.98px) {
  .ride-kv-grid {
    grid-template-columns: 1fr;
  }
}

.ride-kv {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, .06);
}

.ride-kv-label {
  font-size: 12px;
  color: rgba(0, 0, 0, .55);
  font-weight: 600;
  margin-bottom: 2px;
}

.ride-kv-value {
  font-size: 15px;
  font-weight: 700;
  color: rgba(0, 0, 0, .85);
  line-height: 1.2;
  word-break: break-word;
}

.ride-route {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, .06);
}

.ride-route-point {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ride-route-text {
  flex: 1;
}

.ride-route-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(13, 110, 253, .9);
  margin-top: 6px;
  flex: 0 0 auto;
}

.ride-route-dot-end {
  background: rgba(25, 135, 84, .9);
}

.ride-route-line {
  height: 14px;
  margin: 6px 0 6px 4px;
  border-left: 2px dashed rgba(0, 0, 0, .18);
}

.ride-km-box {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, .06);
}

.ride-km-label {
  font-size: 12px;
  color: rgba(0, 0, 0, .55);
  font-weight: 700;
  margin-bottom: 4px;
}

.ride-km-value {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .2px;
}

.ride-purpose {
  border-radius: 12px;
}

/* ===========================================
   15. TABLE INTERACTIONS
   =========================================== */
.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* ===========================================
   16. PROGRESS STEPS
   =========================================== */
.rounded-circle {
  font-size: 0.875rem;
}

/* ===========================================
   17. SEARCH INPUT STYLES
   =========================================== */
.fleet-searchbox {
  width: 300px;
}

.fleet-searchbox-cursor {
  cursor: pointer;
}

/* ===========================================
   18. REQUEST TYPE CARDS (zadost-prislusenstvi)
   =========================================== */
.typ-zadosti-card {
  position: relative;
}

.typ-zadosti-radio {
  position: absolute;
  top: 16px;
  right: 16px;
  cursor: pointer;
  width: 20px;
  height: 20px;
  z-index: 1;
}

.typ-zadosti-label {
  display: block;
  margin-bottom: 0;
  padding: 16px 40px 16px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

.typ-zadosti-card:hover .typ-zadosti-label {
  border-color: #5d87ff;
  box-shadow: 0 2px 8px rgba(93, 135, 255, 0.15);
}

.typ-zadosti-card .typ-zadosti-radio:checked + .typ-zadosti-label {
  border-color: #5d87ff;
  background-color: #f5f8ff;
  box-shadow: 0 2px 12px rgba(93, 135, 255, 0.2);
}

.typ-zadosti-card .typ-zadosti-radio:focus-visible + .typ-zadosti-label {
  outline: 2px solid #5d87ff;
  outline-offset: 2px;
}

/* ===========================================
   19. UPLOADED FILES LIST
   =========================================== */
.uploaded-files-list {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
}

/* ===========================================
   20. SERVIS DETAIL BOX (zadost-prislusenstvi)
   =========================================== */
.servis-detail-box {
  background-color: #e8f4fd;
  border-color: #b8dff5;
}

.servis-detail-icon {
  color: #1976d2;
}

.servis-detail-label {
  color: #1565c0;
}

.servis-detail-nazev {
  color: #0d47a1;
}

.servis-detail-info {
  color: #424242;
  font-size: 14px;
  line-height: 1.8;
}
