/* Extra small red delete button for modals */
.modal-delete-btn {
  padding: 2px 10px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  min-width: 0 !important;
  width: 56px !important;
  height: 24px !important;
  background: #dc3545 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-transition: background 0.2s;
  transition: background 0.2s;
}

.modal-delete-btn:hover {
  background: #b52a37 !important;
  color: #fff !important;
}

/* Main styles for RentACar */
body {
  font-family: Arial, sans-serif;
  padding: 0;
  margin: 0;
}

/* page layout: stick footer to bottom */
html {
  height: 100%;
  min-height: 100vh;
}

body {
  height: 100%;
  min-height: 100vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin: 0;
}

header {
  background: #343a40;
  color: #ffffff;
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.doc-type-mini {
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
  color: #444;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  display: block;
}

#clientsGrid .card {
  min-height: 280px;
}

/* Add to your CSS file or inside a <style> block */
.hero-img-container {
  width: 50%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.hero-img-container img {
  width: 100%;
  height: 100%;
  -o-object-fit: fill;
  object-fit: fill;
}

.titlehead {
  margin: 0 auto;
  text-align: center;
  padding: 2rem 0 1rem 0;
}

.titlehead h2 {
  font-size: 2.5rem;
  font-weight: bold;
}

.titlehead p {
  font-size: 1.2rem;
}

.titlehead .text-muted {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 1rem;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}
.titlehead .text-muted span, .titlehead .text-muted a {
  -webkit-box-flex: 0;
  -ms-flex: 0 1 auto;
  flex: 0 1 auto;
}

@media (max-width: 768px) {
  .titlehead .text-muted {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.5rem;
  }
  .titlehead .text-muted span, .titlehead .text-muted a {
    display: block;
    text-align: center;
  }
}
nav a {
  color: #ffffff;
  margin-right: 0.5rem;
}

a.btn {
  padding: 1px 6px;
  border: 1px outset buttonborder;
  border-radius: 3px;
  color: #ffffff;
  background-color: #6c757d;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table td,
table th {
  border: 1px solid #ffffff;
  padding: 0.5rem;
}

.flash.success {
  background: #e6ffed;
  padding: 0.5rem;
  margin-top: 0.5rem;
  color: darkgreen;
}

.flash.error {
  background: #ffe6e6;
  padding: 0.5rem;
  margin-top: 0.5rem;
  color: red;
}

footer p {
  text-align: center;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.2rem;
  }
  table td {
    font-size: 0.8rem;
  }
}
/* layout helpers */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem; /* move text from the very edge */
}

main {
  padding: 1.25rem 0;
  -webkit-box-flex: 1;
  -ms-flex: 1 0 auto;
  flex: 1 0 auto; /* allow main to grow and push footer to bottom */
  margin-top: 70px; /* Add space for fixed header */
}

/* forms */
.search-form {
  margin-bottom: 1rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 0.5rem;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.search-form input,
.search-form select {
  padding: 0.4rem 0.5rem;
  border: 1px solid #ddd;
}

.btn {
  padding: 0.45rem 0.7rem;
  background: #17a2b8;
  color: #ffffff;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #138496;
  color: #ffffff !important;
}

.btn:active,
.btn:focus {
  background: #17a2b8 !important;
  color: #ffffff !important;
  outline: none;
}

.btn.secondary {
  background: #6c757d;
}

.btn.secondary:hover {
  background: rgb(84.3605150215, 91.3905579399, 97.6394849785);
  color: #ffffff !important;
}

.btn.secondary:active,
.btn.secondary:focus {
  background: #6c757d !important;
  color: #ffffff !important;
  outline: none;
}

.promo {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
}

.stats {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.stat-card {
  background: #ffffff;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 6px;
  min-width: 120px;
  text-align: center;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
}

@media (max-width: 576px) {
  .stats {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
  }
  .stat-card {
    width: 100%;
    min-width: 100%;
  }
}
footer {
  background: #f8f8f8;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-pack: distribute !important;
  justify-content: space-around !important;
}
footer p {
  padding: 1rem 0;
  margin-top: 1rem;
}
footer .container {
  padding-left: 1rem;
  padding-right: 1rem;
}
footer .container p {
  text-align: center;
}

/* auth forms */
.form-container {
  max-width: 420px;
  margin: 2rem auto;
  background: #ffffff;
  padding: 1.25rem;
  border-radius: 6px;
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.form-container h2 {
  margin-top: 0;
}

.form-container label {
  display: block;
  margin: 0.5rem 0 0.25rem;
}

.form-container input, .form-container select, .form-container textarea {
  width: 100%;
  padding: 0.6rem 0.5rem;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.form-container .btn {
  width: 100%;
  margin-top: 0.75rem;
}

/* Car Status Styling */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.car-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background: #fff;
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  -webkit-transition: -webkit-box-shadow 0.3s ease;
  transition: -webkit-box-shadow 0.3s ease;
  transition: box-shadow 0.3s ease;
  transition: box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease;
}

.car-card:hover {
  -webkit-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Status-based background colors */
.car-status-available {
  background-color: #f8f9fa;
  border-left: 4px solid #28a745;
}

.car-status-booked {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
}

.car-status-rented {
  background-color: #f8d7da;
  border-left: 4px solid #dc3545;
}

.car-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  margin-bottom: 10px;
}

.car-header h3 {
  margin: 0;
  color: #333;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.status-available {
  background-color: #d4edda;
  color: #155724;
}

.status-booked {
  background-color: #fff3cd;
  color: #856404;
}

.status-rented {
  background-color: #f8d7da;
  color: #721c24;
}

.car-image {
  margin-bottom: 10px;
  text-align: center;
}

.car-thumb {
  max-width: 100%;
  max-height: 150px;
  border-radius: 4px;
  -o-object-fit: cover;
  object-fit: cover;
}

.car-details p {
  margin: 5px 0;
  font-size: 14px;
}

.car-actions {
  margin-top: 15px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 10px;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-sm {
  font-size: 0.3rem;
  width: 10px;
  height: 10px;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 10px;
}

.sticky-cta {
  text-align: center;
}

.sticky-cta .cta-btn {
  background-color: rgba(0, 252, 0, 0.1) !important;
}

/* WhatsApp CTA icon color default */
.sticky-cta .cta-btn .fa-whatsapp {
  color: #00ff5e !important;
}

/* Ensure CTA has a visible border across states */
.sticky-cta .cta-btn {
  border: 1px solid #25D366 !important;
  border-radius: 8px;
}

@media (max-width: 576px) {
  /* Ensure WhatsApp CTA stays visible on tap/active */
  .sticky-cta .cta-btn {
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    color: #25D366 !important;
    -webkit-tap-highlight-color: transparent;
  }
  .sticky-cta .cta-btn .fa-whatsapp {
    color: #25D366 !important;
  }
  .sticky-cta .cta-btn:focus,
  .sticky-cta .cta-btn:visited {
    background: transparent !important;
    color: #25D366 !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    outline: none !important;
  }
  .sticky-cta .cta-btn:hover {
    background-color: rgba(37, 211, 102, 0.08) !important;
    color: #25D366 !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    outline: none !important;
  }
  .sticky-cta .cta-btn:active {
    background-color: rgba(37, 211, 102, 0.15) !important;
    color: #25D366 !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    outline: none !important;
  }
  .sticky-cta .cta-btn:focus .fa-whatsapp,
  .sticky-cta .cta-btn:hover .fa-whatsapp,
  .sticky-cta .cta-btn:active .fa-whatsapp {
    color: #25D366 !important;
  }
  /* Moved from inline styles: CTA container and button sizing */
  .sticky-cta {
    position: fixed;
    bottom: 60px;
    left: 0;
    z-index: 9999;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 8px;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    padding-left: 8px;
    width: auto;
    -webkit-box-shadow: none;
    box-shadow: none;
  }
  .sticky-cta .btn {
    min-width: 40px;
    min-height: 40px;
    -webkit-box-shadow: 0 8px 8px rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 8px rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 0;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }
}
/* Mobile responsive */
@media (max-width: 768px) {
  footer {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    font-size: 12px;
  }
  footer p {
    margin: 2px;
    padding: 5px;
  }
  img {
    width: 200px;
  }
  .cars-grid {
    grid-template-columns: 1fr;
  }
  .car-header {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    gap: 5px;
  }
}
/* End of cars styling */
/* User role badges */
.role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.role-admin {
  background-color: #dc3545;
  color: white;
}

.role-manager {
  background-color: #fd7e14;
  color: white;
}

.role-user {
  background-color: #6c757d;
  color: white;
}

/* Data table styling */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.data-table th {
  background-color: #f8f9fa;
  font-weight: bold;
}

.data-table tr:hover {
  background-color: #f5f5f5;
}

.actions {
  margin: 20px 0;
}

/* Form styling */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 400px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  -webkit-box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.required {
  color: #dc3545;
}

.form-actions {
  margin-top: 30px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  text-align: center;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

/* File upload styling */
.current-file {
  margin-bottom: 10px;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.current-file p {
  margin: 0;
  font-size: 14px;
}

.current-file a {
  color: #007bff;
  text-decoration: none;
}

.current-file a:hover {
  text-decoration: underline;
}

input[type=file] {
  margin-top: 5px;
}

small {
  color: #6c757d;
  font-size: 12px;
  display: block;
  margin-top: 5px;
}

/* Modern Layout Styles */
.page-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}
.page-header h2 {
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 2.2rem;
}
.page-header h2 .icon {
  margin-right: 10px;
}
.page-header .page-description {
  color: #6c757d;
  margin: 0;
  font-size: 1.1rem;
}

.form-container-modern {
  background: #ffffff;
  border-radius: 12px;
  -webkit-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  padding: 0;
  overflow: hidden;
}

.form-section {
  padding: 30px;
  border-bottom: 1px solid #e9ecef;
}
.form-section:last-child {
  border-bottom: none;
}

.section-title {
  color: #495057;
  font-size: 1.3rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
.section-title .section-icon {
  margin-right: 10px;
  font-size: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 20px;
}
.form-group.full-width {
  grid-column: 1/-1;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  background-color: #ffffff;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.form-control:focus {
  outline: none;
  border-color: #3b82f6;
  -webkit-box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: #fefefe;
}
.form-control:hover {
  border-color: #d1d5db;
}
.form-control.file-input {
  padding: 8px 12px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.current-file-preview {
  margin-bottom: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}
.current-file-preview .file-info {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
.current-file-preview .file-info .file-icon {
  margin-right: 10px;
  font-size: 1.2rem;
}
.current-file-preview .file-info .file-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}
.current-file-preview .file-info .file-link:hover {
  text-decoration: underline;
}

.form-text {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 5px;
  display: block;
}

.form-actions {
  padding: 25px 30px;
  background: #f8f9fa;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 15px;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 8px;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  font-size: 1rem;
}
.btn .btn-icon {
  font-size: 0.9rem;
}
.btn.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
}
.btn.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  -webkit-transform: translateY(-1px);
  -ms-transform: translateY(-1px);
  transform: translateY(-1px);
  -webkit-box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.btn.btn-secondary {
  background: #6b7280;
  color: #ffffff;
}
.btn.btn-secondary:hover {
  background: #4b5563;
  -webkit-transform: translateY(-1px);
  -ms-transform: translateY(-1px);
  transform: translateY(-1px);
  -webkit-box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* Responsive Design for Modern Forms */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .form-section {
    padding: 20px;
  }
  .form-actions {
    padding: 20px;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
  }
  .form-actions .btn {
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }
}
@media (max-width: 1024px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}
/* Image Preview Styles */
.image-preview {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}
.image-preview .thumbnail-image {
  max-width: 120px;
  max-height: 120px;
  border-radius: 6px;
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  -o-object-fit: cover;
  object-fit: cover;
}
.image-preview .image-actions {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  gap: 8px;
}
.image-preview .image-actions .btn-view {
  padding: 8px 12px;
  background: #3b82f6;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  text-align: center;
}
.image-preview .image-actions .btn-view:hover {
  background: #2563eb;
  -webkit-transform: translateY(-1px);
  -ms-transform: translateY(-1px);
  transform: translateY(-1px);
  -webkit-box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

/* Responsive Image Preview */
@media (max-width: 768px) {
  .image-preview {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    text-align: center;
  }
  .image-preview .thumbnail-image {
    max-width: 100px;
    max-height: 100px;
  }
  .image-preview .image-actions {
    width: 100%;
  }
  .image-preview .image-actions .btn-view {
    width: 100%;
  }
  .id-documents {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 8px;
  }
  .id-documents .doc-preview .doc-thumb {
    width: 50px;
    height: 35px;
  }
}
/* ID Documents in Table */
.id-documents {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 10px;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
.id-documents .doc-preview {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 4px;
}
.id-documents .doc-preview .doc-thumb {
  width: 40px;
  height: 30px;
  -o-object-fit: cover;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ddd;
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.id-documents .doc-preview .doc-link {
  font-size: 0.75rem;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}
.id-documents .doc-preview .doc-link:hover {
  text-decoration: underline;
  color: #2563eb;
}
.id-documents .no-docs {
  color: #6b7280;
  font-style: italic;
  font-size: 0.85rem;
}

/* Multi-File Upload System */
.existing-files-container {
  margin-bottom: 30px;
}
.existing-files-container h4 {
  color: #374151;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}
.files-grid .no-files {
  grid-column: 1/-1;
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 20px;
}

.file-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  cursor: pointer;
  background: #ffffff;
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.file-item:hover {
  -webkit-transform: translateY(-2px);
  -ms-transform: translateY(-2px);
  transform: translateY(-2px);
  -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.file-item.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  z-index: 1000;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
}
.file-item.expanded .file-thumbnail img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  -o-object-fit: contain;
  object-fit: contain;
}
.file-item .file-thumbnail {
  width: 100%;
  height: 120px;
  overflow: hidden;
}
.file-item .file-thumbnail img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  transition: transform 0.3s ease;
  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}
.file-item .file-overlay {
  position: absolute;
  top: 0;
  right: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 5px;
  padding: 8px;
  opacity: 0;
  -webkit-transition: opacity 0.3s ease;
  transition: opacity 0.3s ease;
}
.file-item:hover .file-overlay {
  opacity: 1;
}
.file-item .file-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 12px;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
.file-item .file-action-btn.view-btn {
  background: rgba(59, 130, 246, 0.9);
  color: #ffffff;
}
.file-item .file-action-btn.view-btn:hover {
  background: rgb(59, 130, 246);
}
.file-item .file-action-btn.delete-btn {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
}
.file-item .file-action-btn.delete-btn:hover {
  background: rgb(239, 68, 68);
}

/* Clients modal document items (unified with cars style) */
.client-doc-item .client-doc-thumb {
  position: relative;
  width: 100%;
  height: 80px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f8f9fa;
  overflow: hidden;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  cursor: pointer;
}
.client-doc-item .client-doc-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  display: block;
}
.client-doc-item .client-doc-file-tile {
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 11px;
}
.client-doc-item .client-doc-fallback {
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 11px;
  background: #fff;
  border: 1px solid #eee;
  cursor: pointer;
}
.client-doc-item .client-doc-avatar {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  padding: 2px 4px;
  z-index: 11;
}
.client-doc-item .client-doc-avatar-set {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 2px 6px;
  line-height: 1;
  font-size: 10px;
  z-index: 11;
}
.client-doc-item .client-doc-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 4px;
  z-index: 12;
}
.client-doc-item .client-doc-btn-view, .client-doc-item .client-doc-btn-crop {
  padding: 2px 6px;
  line-height: 1;
  font-size: 11px;
  display: none;
}
.client-doc-item .client-doc-btn-delete {
  padding: 2px 6px;
  line-height: 1;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  -webkit-transition: opacity 0.15s ease-in-out;
  transition: opacity 0.15s ease-in-out;
}
.client-doc-item .file-name {
  font-size: 0.7rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.client-doc-item .file-doc-type {
  font-size: 0.65rem;
  color: #6b7280;
}
.client-doc-item:hover .client-doc-btn-delete {
  opacity: 1;
}
.client-doc-item:hover .client-doc-btn-view, .client-doc-item:hover .client-doc-btn-crop {
  display: inline-block;
}

@media (max-width: 576px) {
  .client-doc-item .client-doc-btn-view,
  .client-doc-item .client-doc-btn-crop {
    display: none !important;
  }
  .client-doc-item .client-doc-btn-delete {
    opacity: 1;
  }
}
.upload-section h4 {
  color: #374151;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.upload-area {
  margin-bottom: 20px;
}

.file-input-hidden {
  display: none;
}

.upload-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  background: #f9fafb;
}
.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: #3b82f6;
  background: #eff6ff;
}
.upload-dropzone:hover .upload-icon, .upload-dropzone.drag-over .upload-icon {
  -webkit-transform: scale(1.1);
  -ms-transform: scale(1.1);
  transform: scale(1.1);
}
.upload-dropzone .upload-content .upload-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  transition: transform 0.3s ease;
  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}
.upload-dropzone .upload-content p {
  margin: 10px 0 5px 0;
  color: #374151;
  font-weight: 500;
}
.upload-dropzone .upload-content small {
  color: #6b7280;
}

.selected-files {
  margin-top: 20px;
}
.selected-files h5 {
  color: #374151;
  margin-bottom: 15px;
}

.selected-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.selected-file-item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}
.selected-file-item .file-preview {
  width: 60px;
  height: 45px;
  border-radius: 6px;
  overflow: hidden;
}
.selected-file-item .file-preview img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
}
.selected-file-item .file-info {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}
.selected-file-item .file-info .file-name {
  display: block;
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.selected-file-item .file-info .file-size {
  display: block;
  color: #6b7280;
  font-size: 0.8rem;
}
.selected-file-item .remove-file-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  -webkit-transition: background 0.2s ease;
  transition: background 0.2s ease;
}
.selected-file-item .remove-file-btn:hover {
  background: #fee2e2;
}

/* Modal backdrop for expanded images */
.file-item.expanded::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;
}

/* Client documents display in index */
.client-documents .doc-thumbnails {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 5px;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}
.client-documents .doc-thumbnails .doc-thumb-link {
  display: block;
  text-decoration: none;
}
.client-documents .doc-thumbnails .doc-thumb-link .doc-thumb {
  width: 40px;
  height: 40px;
  -o-object-fit: cover;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  -webkit-transition: -webkit-transform 0.2s ease;
  transition: -webkit-transform 0.2s ease;
  transition: transform 0.2s ease;
  transition: transform 0.2s ease, -webkit-transform 0.2s ease;
}
.client-documents .doc-thumbnails .doc-thumb-link .doc-thumb:hover {
  -webkit-transform: scale(1.1);
  -ms-transform: scale(1.1);
  transform: scale(1.1);
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.client-documents .doc-thumbnails .more-files {
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
}
.client-documents .no-docs {
  color: #999;
  font-style: italic;
  font-size: 14px;
}

/* Responsive file management */
@media (max-width: 768px) {
  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }
  .file-item .file-thumbnail {
    height: 100px;
  }
  .selected-files-grid {
    grid-template-columns: 1fr;
  }
  .upload-dropzone {
    padding: 30px 15px;
  }
  .upload-dropzone .upload-content .upload-icon {
    font-size: 1.5rem;
  }
  .client-documents .doc-thumbnails .doc-thumb {
    width: 35px;
    height: 35px;
  }
  .titlehead {
    padding: 1rem 0 0.5rem 0;
  }
  .titlehead h2 {
    font-size: 2rem;
    font-weight: bold;
  }
  .titlehead p {
    font-size: 0.8rem;
  }
}
/* Modal fixes for mobile */
.modal-body {
  max-height: 80vh;
  overflow-y: auto;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

.form {
  width: 100%;
}

.form-actions {
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .container {
    padding: 0.5rem;
  }
  .form-group,
  .form-actions {
    width: 100%;
    display: block;
  }
}
/* Removed conflicting height rule that breaks sticky footer */
@media (max-width: 576px) {
  .modal .btn-image-remove,
  .modal .btn-danger[aria-label=Remove],
  .modal .btn-danger[title=Remove],
  .modal .btn-outline-danger {
    display: none !important;
  }
  #carsTable th, #carsTable td {
    white-space: nowrap;
    font-size: 0.95rem;
    padding: 0.4rem 0.3rem;
  }
  #carsTable th.col-id,
  #carsTable td.col-serial,
  #carsTable th.col-chassis,
  #carsTable th.col-year {
    display: none !important;
  }
}
.modal-header .btn-close {
  z-index: 9999;
  display: block !important;
  position: absolute;
  right: 1rem;
  top: 1rem;
}

@media (max-width: 576px) {
  .modal-header .btn-close {
    width: 2rem;
    height: 2rem;
    font-size: 1.5rem;
    right: 0.5rem;
    top: 0.5rem;
  }
}
/* Fixed File Item Styles - Smaller Buttons */
.file-item .file-overlay {
  gap: 3px;
  padding: 4px;
}
.file-item .file-action-btn {
  width: 20px;
  height: 20px;
  font-size: 10px;
  line-height: 1;
  padding: 0;
}
.file-item .file-name {
  padding: 6px 8px;
  font-size: 0.75rem;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}
.file-item .file-doc-type {
  padding: 4px 8px;
  font-size: 0.7rem;
  color: #6b7280;
  background: #f3f4f6;
  text-align: center;
  font-weight: 500;
  border-top: 1px solid #e5e7eb;
}
.file-item .doc-type-mini {
  font-size: 0.5rem;
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
  color: #444;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  display: block;
}

/* Image Cropper Modal */
.crop-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  padding: 20px;
}
.crop-modal .crop-container {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}
.crop-modal .crop-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
.crop-modal .crop-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #111827;
}
.crop-modal .crop-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 32px;
  height: 32px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  border-radius: 50%;
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
}
.crop-modal .crop-close:hover {
  background: #f3f4f6;
  color: #111827;
}
.crop-modal .crop-body {
  padding: 20px;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  overflow: auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  background: #f9fafb;
}
.crop-modal .crop-image-container {
  max-width: 100%;
  max-height: 500px;
  position: relative;
}
.crop-modal .crop-image-container img {
  max-width: 100%;
  display: block;
}
.crop-modal .crop-footer {
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 12px;
  -webkit-box-pack: end;
  -ms-flex-pack: end;
  justify-content: flex-end;
}
.crop-modal .btn {
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
}
.crop-modal .btn-secondary {
  background: #e5e7eb;
  color: #374151;
}
.crop-modal .btn-secondary:hover {
  background: #d1d5db;
}
.crop-modal .btn-primary {
  background: #3b82f6;
  color: white;
}
.crop-modal .btn-primary:hover {
  background: #2563eb;
}
.crop-modal .btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Cropper.js container */
.cropper-container {
  max-width: 100%;
  max-height: 500px;
}

/* Enhanced Cropper.js resize handles for better visibility and grab control */
.cropper-point {
  width: 12px !important;
  height: 12px !important;
  opacity: 1 !important;
  background-color: #0d6efd !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.cropper-point:hover {
  background-color: #0056b3 !important;
  -webkit-transform: scale(1.2);
  -ms-transform: scale(1.2);
  transform: scale(1.2);
  cursor: -webkit-grab;
  cursor: grab;
}

.cropper-point:active {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

/* Make the crop box border more visible */
.cropper-crop-box {
  border: 2px solid #0d6efd !important;
}

.cropper-view-box {
  outline: 2px solid rgba(13, 110, 253, 0.5) !important;
}

/* Ensure all corner and edge handles are visible */
.cropper-point.point-n,
.cropper-point.point-s,
.cropper-point.point-e,
.cropper-point.point-w,
.cropper-point.point-ne,
.cropper-point.point-nw,
.cropper-point.point-se,
.cropper-point.point-sw {
  opacity: 1 !important;
  display: block !important;
}

/* Mobile: make handles larger for easier touch */
@media (max-width: 768px) {
  .cropper-point {
    width: 16px !important;
    height: 16px !important;
  }
}
/* Compact button styles for modal file thumbnails */
.btn-compact {
  padding: 2px 6px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  min-width: auto !important;
  width: auto !important;
  height: auto !important;
}

@media (max-width: 768px) {
  .crop-modal {
    padding: 10px;
  }
  .crop-modal .crop-container {
    max-height: 95vh;
  }
  .crop-modal .crop-header,
  .crop-modal .crop-body,
  .crop-modal .crop-footer {
    padding: 15px;
  }
  .crop-modal .crop-image-container {
    max-height: 400px;
  }
  .crop-modal .crop-footer {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
  }
  .crop-modal .btn {
    width: 100%;
  }
}
/* Compact button styles for modal file thumbnails */
.btn-compact {
  padding: 2px 6px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  min-width: auto !important;
  width: auto !important;
  height: auto !important;
}