/* ================================================================
   DMK REMORQUAGE — Mobile Driver App Theme
   Couleurs : Bleu #002B7F | Rouge #CC1414
   ================================================================ */

:root {
  --dmk-blue:       #002B7F;
  --dmk-blue-mid:   #1A3FA0;
  --dmk-blue-light: #4A6FD4;
  --dmk-red:        #CC1414;
  --dmk-red-light:  #E84040;
  --dmk-bg:         #EEF2FF;
  --dmk-card:       #FFFFFF;
  --dmk-text:       #1E293B;
  --dmk-muted:      #64748B;
  --dmk-border:     #E2E8F0;
  --dmk-success:    #10B981;
  --dmk-warning:    #F59E0B;
  --dmk-radius:     16px;
  --dmk-shadow:     0 2px 16px rgba(0, 43, 127, 0.08);
  --dmk-shadow-lg:  0 8px 32px rgba(0, 43, 127, 0.16);
  --nav-height:     70px;
  --header-height:  60px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.dmk-body {
  background: var(--dmk-bg);
  font-family: 'Roboto', sans-serif;
  color: var(--dmk-text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  padding-top: var(--header-height);
  padding-bottom: calc(var(--nav-height) + 8px);
  overflow-x: hidden;
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes slideInUp {
  from { transform: translateY(32px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes slideInDown {
  from { transform: translateY(-16px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes truckFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-8px) rotate(2deg); }
}
@keyframes pulseRed {
  0%, 100% { box-shadow: 0 4px 16px rgba(204, 20, 20, 0.4); }
  50%       { box-shadow: 0 6px 28px rgba(204, 20, 20, 0.7); }
}
@keyframes wavingHand {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(20deg); }
  40%  { transform: rotate(-10deg); }
  60%  { transform: rotate(15deg); }
  80%  { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}
@keyframes barFill {
  from { width: 0; }
}

/* Staggered entrance for lists */
.dmk-anim-1  { animation: slideInUp 0.4s ease-out 0.05s both; }
.dmk-anim-2  { animation: slideInUp 0.4s ease-out 0.10s both; }
.dmk-anim-3  { animation: slideInUp 0.4s ease-out 0.15s both; }
.dmk-anim-4  { animation: slideInUp 0.4s ease-out 0.20s both; }
.dmk-anim-5  { animation: slideInUp 0.4s ease-out 0.25s both; }

/* ================================================================
   LOGIN PAGE
   ================================================================ */
body.dmk-login-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--dmk-bg);
  font-family: 'Roboto', sans-serif;
  display: flex;
  align-items: stretch;
}

.dmk-login-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dmk-login-hero {
  background: linear-gradient(145deg, var(--dmk-blue) 0%, var(--dmk-blue-mid) 60%, #2455C0 100%);
  padding: 48px 24px 64px;
  text-align: center;
  position: relative;
  flex-shrink: 0;
}
.dmk-login-hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--dmk-bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  z-index: 1;
}

.dmk-login-logo-wrap {
  display: inline-block;
  animation: scaleIn 0.6s ease-out 0.1s both;
  position: relative;
  z-index: 2;
}
.dmk-login-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.3));
  border-radius: 50%;
}

.dmk-login-truck {
  font-size: 2.8rem;
  display: block;
  margin-top: 12px;
  animation: truckFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.dmk-login-brand {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  margin-top: 8px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 300;
  animation: fadeIn 0.6s ease 0.4s both;
  position: relative;
  z-index: 2;
}

.dmk-login-form-area {
  background: var(--dmk-bg);
  padding: 48px 24px 32px;
  flex: 1;
  position: relative;
  z-index: 2;
}

.dmk-login-card {
  background: white;
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: var(--dmk-shadow-lg);
  max-width: 420px;
  margin: 0 auto;
  animation: slideInUp 0.5s ease-out 0.2s both;
}

.dmk-login-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dmk-blue);
  margin: 0 0 4px;
}
.dmk-login-subheading {
  font-size: 0.85rem;
  color: var(--dmk-muted);
  margin: 0 0 22px;
}

/* Input groups login */
.dmk-field {
  position: relative;
  margin-bottom: 14px;
}
.dmk-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dmk-blue-light);
  font-size: 1rem;
  pointer-events: none;
}
.dmk-field-input {
  width: 100%;
  padding: 14px 14px 14px 42px;
  border: 2px solid var(--dmk-border);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--dmk-text);
  background: #F8FAFF;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.dmk-field-input:focus {
  border-color: var(--dmk-blue);
  box-shadow: 0 0 0 3px rgba(0, 43, 127, 0.1);
  background: #fff;
}
.dmk-field-input::placeholder { color: #A0AEC0; }

/* Eye icon for password toggle */
.dmk-field-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dmk-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  background: none;
  border: none;
  outline: none;
}

.dmk-btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--dmk-blue), var(--dmk-blue-light));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.97rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  letter-spacing: 0.3px;
  transition: transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.dmk-btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 43, 127, 0.35);
}
.dmk-btn-login:active { transform: scale(0.98); }

.dmk-login-error {
  background: #FFF5F5;
  border: 1px solid #FED7D7;
  border-radius: 10px;
  color: #C53030;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInDown 0.3s ease;
}

.dmk-login-footer {
  text-align: center;
  padding: 16px 24px 24px;
  color: var(--dmk-muted);
  font-size: 0.78rem;
}

/* ================================================================
   APP HEADER
   ================================================================ */
.dmk-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-height);
  background: linear-gradient(135deg, var(--dmk-blue) 0%, var(--dmk-blue-mid) 100%);
  box-shadow: 0 2px 20px rgba(0, 43, 127, 0.3);
  display: flex;
  align-items: center;
  padding: 0 12px;
  animation: slideInDown 0.3s ease;
}

.dmk-header-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-size: 1.15rem;
  flex-shrink: 0;
  text-decoration: none;
}
.dmk-header-btn:hover { background: rgba(255,255,255,0.22); color: white; }
.dmk-header-btn:active { transform: scale(0.92); }

.dmk-header-logo-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
}
.dmk-header-logo {
  height: 38px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.dmk-header-title {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  flex: 1;
  margin: 0;
}

/* ================================================================
   MAIN CONTENT AREA
   ================================================================ */
.dmk-content {
  padding: 16px;
  animation: fadeIn 0.3s ease;
}

/* ================================================================
   DRAWER MENU
   ================================================================ */
.dmk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  backdrop-filter: blur(2px);
}
.dmk-overlay.open {
  opacity: 1;
  visibility: visible;
}

.dmk-drawer {
  position: fixed;
  top: 0;
  left: -290px;
  width: 285px;
  height: 100%;
  background: white;
  z-index: 301;
  transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,0.18);
  border-radius: 0 20px 20px 0;
  overflow: hidden;
}
.dmk-drawer.open { left: 0; }

.dmk-drawer-header {
  background: linear-gradient(145deg, var(--dmk-blue), var(--dmk-blue-mid));
  padding: 48px 20px 24px;
  position: relative;
}
.dmk-drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}
.dmk-drawer-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.5);
  object-fit: cover;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
}
.dmk-drawer-name {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 2px;
}
.dmk-drawer-role {
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dmk-drawer-body { padding: 12px 10px; flex: 1; overflow-y: auto; }

.dmk-drawer-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dmk-muted);
  padding: 10px 14px 6px;
  font-weight: 600;
}

.dmk-drawer-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--dmk-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
  margin-bottom: 2px;
}
.dmk-drawer-item i { font-size: 1.15rem; width: 22px; text-align: center; }
.dmk-drawer-item:hover { background: #EEF2FF; color: var(--dmk-blue); }
.dmk-drawer-item.active { background: #E0E8FF; color: var(--dmk-blue); font-weight: 600; }
.dmk-drawer-item.red { color: var(--dmk-red); }
.dmk-drawer-item.red:hover { background: #FFF0F0; }

.dmk-drawer-divider {
  height: 1px;
  background: var(--dmk-border);
  margin: 8px 14px;
}

/* ================================================================
   BOTTOM NAVIGATION
   ================================================================ */
.dmk-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: white;
  box-shadow: 0 -4px 24px rgba(0, 43, 127, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 200;
  border-radius: 20px 20px 0 0;
}

.dmk-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--dmk-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 12px;
  transition: color 0.2s;
  position: relative;
}
.dmk-nav-item i { font-size: 1.3rem; transition: transform 0.2s; }
.dmk-nav-item.active { color: var(--dmk-blue); }
.dmk-nav-item.active i { transform: scale(1.15); }
.dmk-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--dmk-blue);
  border-radius: 0 0 4px 4px;
}

/* FAB */
.dmk-fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dmk-red), var(--dmk-red-light));
  color: white;
  border: none;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(204, 20, 20, 0.45);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pulseRed 2.5s infinite;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.dmk-fab:hover {
  transform: scale(1.12) rotate(5deg);
  color: white;
  animation: none;
  box-shadow: 0 6px 24px rgba(204, 20, 20, 0.6);
}
.dmk-fab:active { transform: scale(0.94); }

/* ================================================================
   FLASH ALERTS
   ================================================================ */
.dmk-alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  animation: slideInDown 0.4s ease;
  line-height: 1.4;
}
.dmk-alert-success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}
.dmk-alert-danger {
  background: #FFF5F5;
  border: 1px solid #FED7D7;
  color: #C53030;
}
.dmk-alert i { font-size: 1rem; margin-top: 1px; flex-shrink: 0; }
.dmk-alert-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  padding: 0;
  color: inherit;
}

/* ================================================================
   WELCOME BANNER
   ================================================================ */
.dmk-welcome {
  background: linear-gradient(135deg, var(--dmk-blue) 0%, var(--dmk-blue-mid) 60%, var(--dmk-blue-light) 100%);
  border-radius: 20px;
  padding: 20px 16px 16px;
  margin-bottom: 14px;
  color: white;
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.4s ease-out both;
}
.dmk-welcome::before {
  content: '🚛';
  position: absolute;
  right: -4px;
  bottom: -8px;
  font-size: 4.5rem;
  opacity: 0.15;
  animation: truckFloat 4s ease-in-out infinite;
  line-height: 1;
}
.dmk-welcome-hi {
  font-size: 0.85rem;
  opacity: 0.75;
  margin: 0 0 2px;
  font-weight: 300;
}
.dmk-welcome-name {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.2;
}
.dmk-welcome-emoji {
  display: inline-block;
  animation: wavingHand 1.5s 1s both;
  transform-origin: 70% 70%;
}
.dmk-welcome-date {
  font-size: 0.78rem;
  opacity: 0.65;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ================================================================
   STATS GRID
   ================================================================ */
.dmk-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.dmk-stat {
  background: white;
  border-radius: var(--dmk-radius);
  padding: 14px 12px;
  box-shadow: var(--dmk-shadow);
}
.dmk-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.stat-blue   { background: #E8EDFF; color: var(--dmk-blue); }
.stat-red    { background: #FFF0F0; color: var(--dmk-red); }
.stat-green  { background: #ECFDF5; color: var(--dmk-success); }
.stat-orange { background: #FFFBEB; color: var(--dmk-warning); }

.dmk-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dmk-text);
  margin: 0 0 2px;
  line-height: 1.1;
  word-break: break-word;
}
.dmk-stat-label {
  font-size: 0.72rem;
  color: var(--dmk-muted);
  margin: 0;
  line-height: 1.3;
}

/* ================================================================
   SECTION TITLES
   ================================================================ */
.dmk-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dmk-section-title {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--dmk-text);
  margin: 0;
}
.dmk-section-link {
  font-size: 0.8rem;
  color: var(--dmk-blue);
  text-decoration: none;
  font-weight: 500;
}

/* ================================================================
   FACTURE CARDS
   ================================================================ */
.dmk-facture-card {
  background: white;
  border-radius: var(--dmk-radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--dmk-shadow);
  text-decoration: none;
  color: var(--dmk-text);
  display: block;
  border-left: 4px solid var(--dmk-border);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.dmk-facture-card:active {
  transform: scale(0.98);
  color: var(--dmk-text);
}
.dmk-facture-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--dmk-shadow-lg);
  color: var(--dmk-text);
}
.dmk-facture-card.paid    { border-left-color: var(--dmk-success); }
.dmk-facture-card.pending { border-left-color: var(--dmk-warning); }

.fc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.fc-client {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0;
  text-transform: capitalize;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-amount {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dmk-blue);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.fc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.fc-info {
  font-size: 0.75rem;
  color: var(--dmk-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.fc-info i { font-size: 0.8rem; }
.fc-route {
  font-size: 0.8rem;
  color: var(--dmk-text);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
}
.fc-route i { color: var(--dmk-muted); font-size: 0.72rem; }
.fc-route .arrow { color: var(--dmk-blue-light); }

/* ================================================================
   BADGES
   ================================================================ */
.dmk-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.badge-paid    { background: #ECFDF5; color: #065F46; }
.badge-pending { background: #FFFBEB; color: #92400E; }

/* ================================================================
   SEARCH BAR
   ================================================================ */
.dmk-searchbar {
  position: relative;
  margin-bottom: 14px;
  animation: slideInUp 0.3s ease-out;
}
.dmk-searchbar i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dmk-muted);
  font-size: 1rem;
  pointer-events: none;
}
.dmk-searchbar input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 2px solid var(--dmk-border);
  border-radius: 12px;
  font-size: 0.9rem;
  background: white;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  color: var(--dmk-text);
}
.dmk-searchbar input:focus { border-color: var(--dmk-blue); }

/* ================================================================
   FORM STYLES
   ================================================================ */
.dmk-form-card {
  background: white;
  border-radius: var(--dmk-radius);
  padding: 18px;
  box-shadow: var(--dmk-shadow);
  margin-bottom: 12px;
  animation: slideInUp 0.4s ease-out both;
}

.dmk-form-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dmk-blue);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #EEF2FF;
  display: flex;
  align-items: center;
  gap: 7px;
}
.dmk-form-section-title i { font-size: 0.95rem; }

.dmk-form-group { margin-bottom: 14px; }

.dmk-form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dmk-muted);
  margin-bottom: 5px;
}
.dmk-form-label .req { color: var(--dmk-red); }

.dmk-form-ctrl {
  width: 100%;
  padding: 12px 13px;
  border: 2px solid var(--dmk-border);
  border-radius: 10px;
  font-size: 0.93rem;
  color: var(--dmk-text);
  background: #F8FAFF;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.dmk-form-ctrl:focus {
  border-color: var(--dmk-blue);
  box-shadow: 0 0 0 3px rgba(0, 43, 127, 0.1);
  background: white;
}
.dmk-form-ctrl.is-invalid { border-color: var(--dmk-red); }
.dmk-form-ctrl.is-invalid:focus { box-shadow: 0 0 0 3px rgba(204, 20, 20, 0.1); }

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

select.dmk-form-ctrl {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748B'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
  cursor: pointer;
}

.dmk-invalid-msg {
  color: var(--dmk-red);
  font-size: 0.77rem;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dmk-invalid-msg i { font-size: 0.8rem; }

/* Amount display */
.dmk-amount-display {
  text-align: right;
  font-size: 0.8rem;
  color: var(--dmk-blue);
  font-weight: 600;
  margin-top: 4px;
  min-height: 18px;
}

/* ================================================================
   IMAGE UPLOAD
   ================================================================ */
/* ================================================================
   IMAGE UPLOAD — zone de dépôt
   ================================================================ */

/*
 * Input masqué — technique "visually hidden" (accessible).
 * On évite display:none (peut bloquer les labels sur anciens Safari)
 * et position:absolute;inset:0;opacity:0 (cause des artefacts natifs mobile).
 */
.dmk-file-input {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Zone visuelle cliquable */
.dmk-upload-zone {
  border: 2px dashed var(--dmk-blue-light);
  border-radius: 12px;
  padding: 28px 16px 22px;
  text-align: center;
  cursor: pointer;
  background: #F8FAFF;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dmk-upload-zone:hover,
.dmk-upload-zone:focus,
.dmk-upload-zone.dragover {
  border-color: var(--dmk-blue);
  background: #EEF2FF;
  outline: none;
}
.dmk-upload-zone:active { transform: scale(0.98); }

.dmk-upload-zone i {
  font-size: 2.2rem;
  color: var(--dmk-blue-light);
  line-height: 1;
}
.dmk-upload-zone p {
  font-size: 0.85rem;
  color: var(--dmk-muted);
  margin: 0;
  line-height: 1.4;
}
.dmk-upload-zone small {
  font-size: 0.73rem;
  color: #A0AEC0;
}

/* ---- Prévisualisation ---- */
.dmk-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dmk-preview-item {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  background: #EEF2FF;
  animation: scaleIn 0.25s ease both;
}
.dmk-preview-item img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  display: block;
}
.dmk-preview-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(204, 20, 20, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 0.72rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, transform 0.15s;
  padding: 0;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.dmk-preview-del:hover  { background: var(--dmk-red); }
.dmk-preview-del:active { transform: scale(0.88); }

/* Compteur sous la zone */
.dmk-upload-count {
  font-size: 0.78rem;
  color: var(--dmk-blue);
  font-weight: 500;
  margin-top: 6px;
  min-height: 18px;
  text-align: center;
}

/* ================================================================
   SUBMIT BUTTON
   ================================================================ */
.dmk-btn-submit {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--dmk-blue), var(--dmk-blue-light));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.97rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.2s;
  margin-top: 4px;
}
.dmk-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 43, 127, 0.35);
}
.dmk-btn-submit:active { transform: scale(0.98); }
.dmk-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.dmk-empty {
  text-align: center;
  padding: 48px 20px;
  animation: fadeIn 0.4s ease;
}
.dmk-empty i { font-size: 3.2rem; color: var(--dmk-border); display: block; margin-bottom: 12px; }
.dmk-empty p { color: var(--dmk-muted); font-size: 0.9rem; margin: 0; }

/* ================================================================
   PAGE LOADER
   ================================================================ */
.dmk-page-loader {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.92);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
}
.dmk-page-loader.show { display: flex; }
.dmk-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #E8EDFF;
  border-top-color: var(--dmk-blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.dmk-page-loader p { color: var(--dmk-muted); font-size: 0.85rem; margin: 0; }

/* ================================================================
   PAGE HEADER
   ================================================================ */
.dmk-page-header {
  margin-bottom: 14px;
  animation: fadeIn 0.35s ease;
}
.dmk-page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dmk-text);
  margin: 0 0 2px;
}
.dmk-page-subtitle {
  font-size: 0.8rem;
  color: var(--dmk-muted);
  margin: 0;
}

/* ================================================================
   FOOTER (page bottom)
   ================================================================ */
.dmk-page-footer {
  text-align: center;
  padding: 8px 0;
  color: var(--dmk-muted);
  font-size: 0.73rem;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 360px) {
  .dmk-stats { gap: 8px; }
  .dmk-stat-value { font-size: 1.1rem; }
  .dmk-nav-item { padding: 8px 12px; }
  .dmk-fab { width: 48px; height: 48px; font-size: 1.3rem; }
}

@media (min-width: 768px) {
  body.dmk-body { max-width: 500px; margin: 0 auto; }
  .dmk-header, .dmk-bottom-nav, .dmk-drawer, .dmk-overlay {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 100%;
  }
  .dmk-overlay { max-width: 100%; left: 0; transform: none; }
  .dmk-drawer  { left: calc(50% - 250px); transform: none; }
  .dmk-drawer.open { left: calc(50% - 250px); }
}
