/**
 * Skycare Oman - Designed and Developed By WEBSOLVED
 * Whitelabed Work for Tamqinx Technology
 */

:root {
  --sidebar: #0a0a0a;
  --sidebar-text: rgba(255, 255, 255, 0.65);
  --sidebar-text-active: #fff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active-bar: rgba(255, 255, 255, 0.4);

  --bg: #f5f5f5;
  --surface: #fff;
  --border: #e5e5e5;

  --text: #171717;
  --text-secondary: #737373;
  --text-placeholder: #a3a3a3;

  --accent: #171717;
  --accent-hover: #404040;

  --transition: 150ms ease;
  --nav-height: 56px;
}

.badge-pending {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}

.badge-in-progress {
  background-color: #eff6ff !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
}

.badge-completed {
  background-color: #ecfdf5 !important;
  color: #059669 !important;
  border-color: #a7f3d0 !important;
}

* {
  box-sizing: border-box;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.app-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Focus visible for keyboard nav */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Auth - Split Layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  padding: 0;
  background: var(--bg);
  overflow: hidden;
}

.auth-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Left background panel */
.auth-bg-panel {
  flex: 1 1 50%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  background-color: #0a0a0a;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 3rem;
}

.auth-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.85) 0%,
      rgba(0, 0, 0, 0.4) 40%,
      rgba(0, 0, 0, 0.15) 100%);
  z-index: 0;
}

.auth-bg-content {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.auth-bg-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.auth-bg-logo-text {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  color: #0a0a0a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.auth-bg-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0;
}

.auth-bg-tagline {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.auth-bg-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-bg-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-bg-feature svg {
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

/* Right form panel */
.auth-form-panel {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--surface);
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-card {
  padding: 0;
}

.auth-header {
  margin-bottom: 2rem;
}

.auth-logo-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.auth-logo-text {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0;
}

.auth-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0.125rem 0 0;
}

.auth-form .form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

/* Input with left icon */
.auth-input-icon-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-placeholder);
  pointer-events: none;
  z-index: 2;
}

.auth-input-with-icon {
  padding-left: 2.75rem !important;
}

.auth-input-password {
  padding-right: 2.75rem !important;
}

/* Password toggle eye button */
.auth-password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.375rem;
  cursor: pointer;
  color: var(--text-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  z-index: 2;
}

.auth-password-toggle:hover {
  color: var(--text);
  background: var(--bg);
}

.auth-form .form-control {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6875rem 0.875rem;
  font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-form .form-control:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.auth-form .form-control::placeholder {
  color: var(--text-placeholder);
  font-weight: 400;
}

.auth-form .btn-primary {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: background var(--transition), border-color var(--transition), transform 100ms ease;
}

.auth-form .btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.auth-form .btn-primary:active {
  transform: scale(0.985);
}

/* Auth responsive: tablet */
@media (max-width: 991.98px) {
  .auth-bg-panel {
    flex: 0 0 42%;
    padding: 2rem;
  }

  .auth-bg-title {
    font-size: 1.25rem;
  }

  .auth-bg-tagline {
    font-size: 0.9375rem;
    margin-bottom: 2rem;
  }

  .auth-bg-features {
    gap: 0.75rem;
  }

  .auth-bg-feature {
    font-size: 0.8125rem;
  }
}

/* Auth responsive: mobile - stack vertically, hide bg panel */
@media (max-width: 767.98px) {
  .auth-split {
    flex-direction: column;
  }

  .auth-bg-panel {
    display: none;
  }

  .auth-form-panel {
    flex: 1;
    min-height: 100vh;
    padding: 1.5rem;
    background: var(--bg);
  }

  .auth-container {
    max-width: 420px;
  }

  .auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .auth-logo-row {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .auth-header {
    margin-bottom: 1.75rem;
  }
}

@media (max-width: 380px) {
  .auth-form-panel {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.25rem;
  }

  .auth-title {
    font-size: 1.125rem;
  }
}

/* App layout */
.app-body {
  min-height: 100vh;
}

.app-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-navbar {
  background: var(--sidebar) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.625rem 1rem;
}

.app-navbar .navbar-brand {
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  transition: opacity var(--transition);
}

.app-navbar .navbar-brand:hover {
  opacity: 0.9;
}

.app-nav-notifications {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  transition: background var(--transition), opacity var(--transition);
}

.app-nav-notifications:hover {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

.app-nav-notifications .icon {
  display: flex;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.icon svg {
  display: block;
}

.app-content-row {
  flex: 1;
  display: flex;
}

.app-sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  z-index: 100;
}

.app-sidebar-nav {
  padding: 1rem 0 0.5rem;
  flex: 1;
  overflow-y: auto;
}

.app-sidebar-nav .nav-link {
  margin: 0 0.75rem;
}

.app-sidebar-footer {
  flex-shrink: 0;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.sidebar-user-link {
  color: inherit;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.sidebar-user-link:hover {
  color: var(--sidebar-text-active);
}

.sidebar-user-link:hover .sidebar-user-name {
  color: var(--sidebar-text-active);
}

.sidebar-user-link:hover .sidebar-user-email {
  color: var(--sidebar-text);
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--sidebar-text-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 0.6875rem;
  color: var(--sidebar-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout {
  margin: 0;
  flex-shrink: 0;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--sidebar-text);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.sidebar-logout-btn:hover {
  color: var(--sidebar-text-active);
  background: var(--sidebar-hover);
}

.sidebar-logout-btn .icon {
  display: flex;
}

.app-sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}

.app-sidebar-nav .nav-link:last-of-type {
  margin-bottom: 0;
}

.app-sidebar-nav .nav-link:hover:not(.disabled) {
  color: var(--sidebar-text-active);
  background: var(--sidebar-hover);
}

.app-sidebar-nav .nav-link.active {
  color: var(--sidebar-text-active);
  background: var(--sidebar-hover);
  position: relative;
}

.app-sidebar-nav .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 1rem;
  background: var(--sidebar-active-bar);
  border-radius: 0 1px 1px 0;
}

.app-sidebar-nav .nav-link.disabled {
  color: var(--sidebar-text);
  opacity: 0.45;
  cursor: default;
}

.app-sidebar-nav .nav-link .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-width: 0;
  max-width: 100%;
}

.app-main .content-wrap {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
}

/* Offcanvas sidebar */
.app-sidebar-offcanvas {
  width: 280px;
  max-width: 85vw;
  background: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.app-sidebar-offcanvas .offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1rem 1.25rem;
}

.app-sidebar-offcanvas .offcanvas-title {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
}

.app-sidebar-offcanvas .btn-close {
  filter: invert(1);
  opacity: 0.6;
}

.app-sidebar-offcanvas .app-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Cards */
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.app-card:hover {
  border-color: #d4d4d4;
}

.app-card .card-body {
  padding: 1.375rem;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.stat-card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-secondary);
}

.stat-card .label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.stat-card .value {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.stat-card .value.empty {
  color: var(--text-placeholder);
  font-weight: 500;
}

/* Dropdown (for future use) */
.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 0.375rem;
}

.dropdown-item {
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background: var(--bg);
}

.dropdown-item.active {
  background: var(--bg);
  color: var(--text);
}

/* Custom scrollbar for dropdowns */
.dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Forms */
.form-control,
.form-select {
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.btn {
  font-weight: 500;
  border-radius: 6px;
  transition: background var(--transition), border-color var(--transition);
}

.btn-primary {
  background: var(--text);
  border-color: var(--text);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Alerts */
.alert {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.875rem 1rem;
}

.alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

/* Tables */
.table thead th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

.table tbody td {
  padding: 0.75rem 1rem;
}

/* Page title */
.page-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Searchable customer select */
.customer-select-wrapper .customer-select-toggle {
  cursor: pointer;
  appearance: none;
  background-image: none;
}

.customer-select-wrapper .customer-select-toggle::after {
  display: none;
}

.customer-select-list .customer-select-option {
  cursor: pointer;
  white-space: nowrap;
}

.customer-select-list .customer-select-option:hover,
.customer-select-list .customer-select-option:focus {
  background: var(--bg);
}

.customer-select-list .customer-select-option.hidden {
  display: none !important;
}

/* Responsive search bar */
.search-bar-responsive {
  flex-wrap: wrap;
  gap: 0;
}

.search-bar-responsive .form-control {
  min-width: 0;
  flex: 1 1 140px;
}

.search-bar-responsive .btn {
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .search-bar-responsive {
    border-radius: 6px;
  }

  .search-bar-responsive .input-group-text {
    flex-shrink: 0;
  }

  .search-bar-responsive .form-control {
    flex: 1 1 0;
    min-width: 0;
  }

  .search-bar-responsive .btn {
    flex: 0 0 100%;
    border-radius: 0 0 6px 6px;
    border-top: 1px solid var(--border);
  }

  .search-bar-responsive .input-group-text {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .search-bar-responsive .form-control {
    border-radius: 0;
    border-top-right-radius: 6px;
  }

  .search-bar-responsive .btn {
    border-radius: 0 0 6px 6px;
  }
}

/* Detail Views */
.detail-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.detail-item {
  margin-bottom: 1.25rem;
}

.detail-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 0.25rem;
}

.detail-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.detail-value.monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: -0.01em;
}

/* Workflow Tracker */
.workflow-list {
  position: relative;
  padding-left: 1.5rem;
  list-style: none;
  margin-bottom: 0;
}

.workflow-list::before {
  content: "";
  position: absolute;
  left: 0.3125rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--border);
}

.workflow-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.workflow-item:last-child {
  padding-bottom: 0;
}

.workflow-item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.3125rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  z-index: 1;
}

.workflow-item.active::before {
  border-color: var(--text);
  background: var(--text);
}

.workflow-item.completed::before {
  border-color: #166534;
  background: #166534;
}

.workflow-title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
  display: block;
}

.workflow-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.photo-card {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.photo-card:hover img {
  transform: scale(1.05);
}

.photo-card-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.photo-card:hover .photo-card-actions {
  opacity: 1;
}

.btn-icon-sm {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Mobile Responsiveness Overrides */
@media (max-width: 767.98px) {
  .page-title {
    font-size: 1.25rem;
  }

  .app-card .card-body {
    padding: 1rem;
  }

  .stat-card {
    gap: 0.75rem;
  }

  .stat-card .icon {
    width: 36px;
    height: 36px;
  }

  .stat-card .value {
    font-size: 1.25rem;
  }

  .table thead th {
    font-size: 0.625rem;
    padding: 0.625rem 0.75rem;
  }

  .table tbody td {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
  }

  /* Stack filters more tightly on mobile */
  .card.app-card .card-body form.row {
    --bs-gutter-y: 0.75rem;
  }
}

@media (max-width: 575.98px) {
  .app-navbar .navbar-brand {
    font-size: 0.875rem;
  }

  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* Enhanced Table Responsiveness */
@media (max-width: 991.98px) {

  html,
  body,
  .app-wrapper {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    position: relative;
  }

  .app-navbar .navbar-brand {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
  }

  .table-responsive {
    border: none !important;
    overflow-x: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch;
  }

  table.table-custom-mobile {
    display: block !important;
    width: 100% !important;
  }

  table.table-custom-mobile thead {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
  }

  table.table-custom-mobile tbody {
    display: block !important;
    width: 100% !important;
  }

  table.table-custom-mobile tr {
    display: block !important;
    width: 100% !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    margin-bottom: 1.25rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  }

  table.table-custom-mobile td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    padding: 0.875rem 0 !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 0.875rem !important;
    text-align: right !important;
    min-height: 2.75rem;
  }

  table.table-custom-mobile td:last-child {
    border-bottom: none !important;
    padding-top: 1rem !important;
    margin-top: 0.5rem;
    justify-content: center !important;
  }

  table.table-custom-mobile td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    margin-right: 1.5rem;
    flex-shrink: 0;
  }

  table.table-custom-mobile .text-end {
    justify-content: center !important;
  }
}

/* General Layout Fixes for Mobile */
@media (max-width: 767.98px) {
  .app-main .content-wrap {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .page-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }

  .card.app-card {
    border-radius: 12px;
    overflow: hidden;
  }

  .stat-card .value {
    font-size: 1.5rem;
  }

  /* Stack buttons on mobile */
  .d-flex.flex-wrap {
    width: 100%;
  }

  .d-flex.flex-wrap .btn {
    flex: 1 0 45%;
  }
}

@media (max-width: 575.98px) {
  .stat-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .stat-card .icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.25rem;
  }

  .d-flex.flex-wrap .btn {
    flex: 0 0 100%;
  }
}

@media (max-width: 380px) {
  .stat-card .label {
    font-size: 0.625rem;
    letter-spacing: 0.04em;
  }

  .stat-card .value {
    font-size: 1.125rem;
  }

  .stat-card .icon {
    width: 32px;
    height: 32px;
  }
}

/* App Footer */
.app-footer {
  padding: 1.5rem 1.5rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.app-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.app-footer a:hover {
  text-decoration: underline;
}

/* Settings Tabs Mobile Scroll */
@media (max-width: 767.98px) {
  .nav-tabs-settings {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    border-bottom: 2px solid var(--border) !important;
    padding: 0 1rem !important;
    margin: 0 -1rem 1.5rem !important;
    /* Negative margin to bleed to edges */
    width: calc(100% + 2rem) !important;
    max-width: calc(100% + 2rem) !important;
    min-width: 0 !important;
    -ms-overflow-style: none;
  }

  .nav-tabs-settings::-webkit-scrollbar {
    display: none !important;
  }

  .nav-tabs-settings .nav-item {
    flex: 0 0 auto !important;
  }

  .nav-tabs-settings .nav-link {
    white-space: nowrap !important;
    padding: 0.875rem 1.25rem !important;
    margin-bottom: -2px !important;
    font-size: 0.875rem !important;
    border-bottom: 2px solid transparent !important;
  }

  .nav-tabs-settings .nav-link.active {
    border-bottom-color: var(--accent) !important;
  }
}

/* Custom scrollbar for table-responsive */
.table-responsive::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.table-responsive::-webkit-scrollbar-corner {
  background: var(--bg);
}

/* Sticky table header */
.table-responsive thead.sticky-top th {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 var(--border);
}

/* ============================================
   JOB CARD WORKFLOW STYLES
   ============================================ */

/* Sticky Job Header */
.job-header-sticky {
  position: sticky;
  top: var(--nav-height);
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  margin: -1rem -1rem 1.5rem -1rem;
  padding: 1rem 1rem 1rem;
}

@media (min-width: 768px) {
  .job-header-sticky {
    margin: -1.375rem -1.375rem 1.5rem -1.375rem;
    padding: 1.25rem 1.375rem 1.25rem;
  }
}

.job-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.job-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.job-header-title h1 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.job-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.job-header-meta .separator {
  color: var(--border);
}

.job-header-meta .plate {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  color: var(--text);
}

.job-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Step Progress Bar */
.step-progress {
  display: flex;
  background: var(--bg);
  border-radius: 12px;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.step-progress-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.step-progress-item:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.02);
}

.step-progress-item.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.step-progress-item.completed {
  color: #10b981;
}

.step-progress-item.completed .step-number {
  background: #10b981;
  color: #fff;
}

.step-progress-item .step-number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: all var(--transition);
}

.step-progress-item.active .step-number {
  background: var(--text);
  color: #fff;
}

.step-progress-item .step-label {
  display: none;
}

@media (min-width: 576px) {
  .step-progress-item .step-label {
    display: inline;
  }
}

/* Step Content Panel */
.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Workflow Card */
.workflow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.workflow-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.workflow-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.workflow-card-title .icon {
  color: var(--text-secondary);
}

.workflow-card-body {
  padding: 1.25rem;
}

.workflow-card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  background: var(--bg);
}

.upload-zone:hover {
  border-color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.02);
}

.upload-zone.dragover {
  border-color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.upload-progress {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 12px;
}

.upload-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #10b981;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.upload-progress-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111;
}

.upload-progress-bar-container {
  width: 150px;
  height: 6px;
  background: #eee;
  border-radius: 10px;
  margin-top: 10px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background: #10b981;
  width: 0%;
  transition: width 0.2s ease;
}

.upload-zone.has-files {
  border-style: solid;
  border-color: var(--border);
  padding: 1rem;
}

.upload-zone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 50%;
  color: var(--text-secondary);
}

.upload-zone-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.upload-zone-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.upload-zone-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.upload-zone input[type="file"] {
  display: none;
}

/* Camera Capture */
.camera-capture-wrap {
  position: relative;
}

.camera-preview {
  width: 100%;
  max-height: 300px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.camera-preview video,
.camera-preview canvas {
  width: 100%;
  height: auto;
  display: block;
}

.camera-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Photo Preview Grid */
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition);
  font-size: 1rem;
  line-height: 1;
}

.photo-preview-item:hover .remove-btn {
  opacity: 1;
}

.photo-preview-item .photo-type-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

/* Checklist Items */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.checklist-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.checklist-item .check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.checklist-item.completed .check-icon {
  background: #166534;
  border-color: #166534;
  color: #fff;
}

.checklist-item .check-content {
  flex: 1;
}

.checklist-item .check-title {
  font-size: 0.875rem;
  font-weight: 500;
}

.checklist-item .check-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

/* Primary Action Button */
.btn-action-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--transition);
}

.btn-action-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Service Summary Card */
.service-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.service-summary-item:last-child {
  border-bottom: none;
}

.service-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  border-top: 2px solid var(--text);
}

.service-summary-total .label {
  font-size: 0.875rem;
  font-weight: 600;
}

.service-summary-total .value {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Duration Timer */
.duration-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  font-weight: 500;
}

.duration-timer .icon {
  color: var(--text-secondary);
}

/* Completed Summary */
.completed-summary {
  text-align: center;
  padding: 2rem 1rem;
}

.completed-summary .icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: #f0fdf4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #166534;
}

.completed-summary h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.completed-summary .timestamp {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.completed-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.completed-stat {
  text-align: center;
}

.completed-stat .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.completed-stat .label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Mobile Adjustments */
@media (max-width: 767.98px) {
  .step-progress {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .step-progress::-webkit-scrollbar {
    display: none;
  }

  .step-progress-item {
    flex: 0 0 auto;
    min-width: 80px;
    padding: 0.625rem 0.75rem;
  }

  .upload-zone {
    padding: 1.5rem 1rem;
  }

  .upload-zone-title {
    font-size: 0.875rem;
  }

  .photo-preview-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .completed-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}