/* Rent Car Deals — Unified Dashboard UI V1
 * Final normalization layer for Company + Admin dashboards only.
 * Loaded after public CSS; every selector is scoped to body.crs-dashboard-shell.
 */

body.crs-dashboard-shell{
  --dash-bg:#f4f8f6;
  --dash-surface:#ffffff;
  --dash-surface-soft:#f7faf8;
  --dash-border:#d9e6df;
  --dash-border-strong:#c8d9cf;
  --dash-text:#173b2f;
  --dash-muted:#687a71;
  --dash-green:#087846;
  --dash-green-dark:#075f38;
  --dash-green-soft:#eaf6ee;
  --dash-danger:#a82c2c;
  --dash-radius-sm:10px;
  --dash-radius-md:13px;
  --dash-radius-lg:18px;
  --dash-shadow:0 10px 28px rgba(13,67,46,.055);
  background:var(--dash-bg)!important;
  color:var(--dash-text)!important;
}

body.crs-dashboard-shell .content{
  min-width:0!important;
  padding:clamp(24px,3vw,42px)!important;
}

body.crs-dashboard-shell .content > section,
body.rcd-admin-dashboard-shell .content > [data-admin-panel]{
  min-width:0!important;
  padding-inline:2px;
  padding-block-end:28px;
}

body.crs-dashboard-shell .content > section > h1,
body.crs-dashboard-shell .content > section > h2,
body.rcd-admin-dashboard-shell .content > [data-admin-panel] > h1,
body.rcd-admin-dashboard-shell .content > [data-admin-panel] > h2{
  margin:0 0 18px!important;
  color:var(--dash-text)!important;
  font-size:clamp(26px,2.4vw,36px)!important;
  line-height:1.22!important;
  letter-spacing:-.015em!important;
}

body.crs-dashboard-shell .content h2,
body.crs-dashboard-shell .content h3,
body.crs-dashboard-shell .content h4{
  color:var(--dash-text);
}

body.crs-dashboard-shell .content .muted{
  color:var(--dash-muted)!important;
}

/* Surface system */
body.crs-dashboard-shell .content .card{
  border:1px solid var(--dash-border)!important;
  border-radius:var(--dash-radius-lg)!important;
  background:var(--dash-surface)!important;
  box-shadow:var(--dash-shadow)!important;
}

body.crs-dashboard-shell .content .card:hover{
  box-shadow:0 14px 34px rgba(13,67,46,.07)!important;
}

body.crs-dashboard-shell .content .section:not(.card){
  padding:24px 0!important;
}

body.crs-dashboard-shell .content .card.section{
  margin-block:22px 0!important;
  padding:22px!important;
}

body.crs-dashboard-shell .content form.card{
  padding:22px!important;
}

body.crs-dashboard-shell .content .grid{
  gap:16px!important;
  min-width:0;
}

body.crs-dashboard-shell .content .grid > *{
  min-width:0;
}

/* Field system: text, number, date, tel, email, password, URL, search */
body.crs-dashboard-shell .content .field,
body.crs-dashboard-shell .rcd-admin-login-card .field{
  display:grid!important;
  gap:7px!important;
  min-width:0;
}

body.crs-dashboard-shell .content .field > label,
body.crs-dashboard-shell .content label.field > span:first-child,
body.crs-dashboard-shell .content .field > span:first-child,
body.crs-dashboard-shell .rcd-admin-login-card .field > label{
  color:#35584a!important;
  font-size:12.5px!important;
  font-weight:800!important;
  line-height:1.45!important;
}

body.crs-dashboard-shell .content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]),
body.crs-dashboard-shell .content select,
body.crs-dashboard-shell .content textarea,
body.crs-dashboard-shell .rcd-admin-login-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]),
body.crs-dashboard-shell .rcd-admin-login-card select,
body.crs-dashboard-shell .rcd-admin-login-card textarea{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  margin:0!important;
  padding:11px 13px!important;
  border:1px solid var(--dash-border-strong)!important;
  border-radius:var(--dash-radius-md)!important;
  outline:0!important;
  background:#fff!important;
  background-image:none!important;
  color:var(--dash-text)!important;
  box-shadow:none!important;
  font-size:14px!important;
  line-height:1.45!important;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease!important;
}

body.crs-dashboard-shell .content select,
body.crs-dashboard-shell .rcd-admin-login-card select{
  cursor:pointer;
}

body.crs-dashboard-shell .content textarea,
body.crs-dashboard-shell .rcd-admin-login-card textarea{
  min-height:112px!important;
  resize:vertical!important;
}

body.crs-dashboard-shell .content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]):focus,
body.crs-dashboard-shell .content select:focus,
body.crs-dashboard-shell .content textarea:focus,
body.crs-dashboard-shell .rcd-admin-login-card input:focus,
body.crs-dashboard-shell .rcd-admin-login-card select:focus,
body.crs-dashboard-shell .rcd-admin-login-card textarea:focus{
  border-color:#6fb28d!important;
  box-shadow:0 0 0 3px rgba(8,120,70,.10)!important;
  background:#fff!important;
}

body.crs-dashboard-shell .content input:disabled,
body.crs-dashboard-shell .content select:disabled,
body.crs-dashboard-shell .content textarea:disabled{
  cursor:not-allowed!important;
  border-color:#dde7e1!important;
  background:#f1f5f2!important;
  color:#8b9992!important;
  opacity:1!important;
}

body.crs-dashboard-shell .content input::placeholder,
body.crs-dashboard-shell .content textarea::placeholder,
body.crs-dashboard-shell .rcd-admin-login-card input::placeholder,
body.crs-dashboard-shell .rcd-admin-login-card textarea::placeholder{
  color:#9aa8a1!important;
  opacity:1!important;
}

/* Checkbox/radio system */
body.crs-dashboard-shell .content input[type="checkbox"],
body.crs-dashboard-shell .content input[type="radio"]{
  inline-size:18px!important;
  block-size:18px!important;
  min-inline-size:18px!important;
  margin:0!important;
  accent-color:var(--dash-green)!important;
}

body.crs-dashboard-shell .content label:has(> input[type="checkbox"]),
body.crs-dashboard-shell .content label:has(> input[type="radio"]){
  display:flex!important;
  align-items:flex-start!important;
  gap:9px!important;
  color:#35584a!important;
  line-height:1.55!important;
}

/* File inputs */
body.crs-dashboard-shell .content input[type="file"]{
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  padding:7px!important;
  border:1px dashed var(--dash-border-strong)!important;
  border-radius:var(--dash-radius-md)!important;
  background:var(--dash-surface-soft)!important;
  color:var(--dash-muted)!important;
}

body.crs-dashboard-shell .content input[type="file"]::file-selector-button{
  min-height:32px;
  margin-inline-end:10px;
  padding:6px 12px;
  border:1px solid var(--dash-border-strong);
  border-radius:9px;
  background:#fff;
  color:var(--dash-green-dark);
  font:inherit;
  font-weight:800;
  cursor:pointer;
}

/* Help text */
body.crs-dashboard-shell .content .field small,
body.crs-dashboard-shell .content .field .muted,
body.crs-dashboard-shell .rcd-admin-login-card .field small{
  color:var(--dash-muted)!important;
  font-size:11.5px!important;
  line-height:1.55!important;
}

/* Button system */
body.crs-dashboard-shell .content .btn,
body.crs-dashboard-shell .rcd-admin-login-card .btn,
body.crs-dashboard-shell .crs-dashboard-topbar .btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:44px!important;
  padding:9px 16px!important;
  border:1px solid transparent!important;
  border-radius:11px!important;
  box-shadow:none!important;
  font-size:13px!important;
  font-weight:850!important;
  line-height:1.25!important;
  text-align:center!important;
  cursor:pointer!important;
  white-space:normal;
}

body.crs-dashboard-shell .content .btn-primary,
body.crs-dashboard-shell .rcd-admin-login-card .btn-primary{
  border-color:var(--dash-green)!important;
  background:var(--dash-green)!important;
  color:#fff!important;
}

body.crs-dashboard-shell .content .btn-primary:hover,
body.crs-dashboard-shell .rcd-admin-login-card .btn-primary:hover{
  border-color:var(--dash-green-dark)!important;
  background:var(--dash-green-dark)!important;
}

body.crs-dashboard-shell .content .btn-outline,
body.crs-dashboard-shell .crs-dashboard-topbar .btn-outline{
  border-color:var(--dash-border-strong)!important;
  background:#fff!important;
  color:#285443!important;
}

body.crs-dashboard-shell .content .btn-outline:hover,
body.crs-dashboard-shell .crs-dashboard-topbar .btn-outline:hover{
  border-color:#9fc7b2!important;
  background:#f7fbf8!important;
}

body.crs-dashboard-shell .content .btn-soft{
  border-color:#d4eadc!important;
  background:var(--dash-green-soft)!important;
  color:var(--dash-green-dark)!important;
}

body.crs-dashboard-shell .content .btn:disabled,
body.crs-dashboard-shell .content button:disabled{
  cursor:not-allowed!important;
  opacity:.55!important;
  transform:none!important;
}

/* Action rows */
body.crs-dashboard-shell .content .actions{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  min-width:0!important;
}

body.crs-dashboard-shell .content .actions > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.crs-dashboard-shell .content .actions > select{
  flex:1 1 180px;
  max-width:320px;
}

body.crs-dashboard-shell .content .actions > .field{
  flex:1 1 210px;
  min-width:0!important;
  max-width:360px;
}

/* Company vehicle wizard tabs use one consistent tab system. */
body.crs-dashboard-shell .content .crs-intake-steps{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0 0 22px!important;
}

body.crs-dashboard-shell .content .crs-intake-step{
  min-height:46px!important;
  padding:9px 11px!important;
  border:1px solid var(--dash-border-strong)!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#587067!important;
  box-shadow:none!important;
  font-size:12.5px!important;
  font-weight:850!important;
}

body.crs-dashboard-shell .content .crs-intake-step:hover{
  border-color:#94c4aa!important;
  color:var(--dash-green-dark)!important;
}

body.crs-dashboard-shell .content .crs-intake-step.active,
body.crs-dashboard-shell .content .crs-intake-step[aria-selected="true"]{
  border-color:var(--dash-green)!important;
  background:var(--dash-green-soft)!important;
  color:var(--dash-green-dark)!important;
  box-shadow:inset 0 0 0 1px rgba(8,120,70,.06)!important;
}

/* Metrics */
body.crs-dashboard-shell .content .metric{
  direction:ltr;
  color:var(--dash-green)!important;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}

html[dir="rtl"] body.crs-dashboard-shell .content .metric{
  text-align:right;
}

html[dir="ltr"] body.crs-dashboard-shell .content .metric{
  text-align:left;
}

/* Tables */
body.crs-dashboard-shell .content .card:has(> .table),
body.crs-dashboard-shell .content .card:has(table),
body.crs-dashboard-shell .content .table-wrap{
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch;
}

body.crs-dashboard-shell .content table,
body.crs-dashboard-shell .content .table{
  width:100%!important;
  min-width:720px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  background:#fff!important;
  color:var(--dash-text)!important;
}

body.crs-dashboard-shell .content table th,
body.crs-dashboard-shell .content table td,
body.crs-dashboard-shell .content .table th,
body.crs-dashboard-shell .content .table td{
  padding:12px 14px!important;
  border:0!important;
  border-block-end:1px solid #e8efeb!important;
  background:#fff;
  vertical-align:middle!important;
  font-size:13px!important;
  line-height:1.5!important;
  text-align:start!important;
  white-space:normal;
}

body.crs-dashboard-shell .content table th,
body.crs-dashboard-shell .content .table th{
  background:#f5f9f6!important;
  color:#35584a!important;
  font-size:12px!important;
  font-weight:900!important;
  white-space:nowrap;
}

body.crs-dashboard-shell .content table tr:last-child td,
body.crs-dashboard-shell .content .table tr:last-child td{
  border-block-end:0!important;
}

/* Status / badges / empty surfaces */
body.crs-dashboard-shell .content .status{
  border-radius:11px!important;
  line-height:1.55!important;
}

body.crs-dashboard-shell .content .badge{
  line-height:1.2!important;
}

body.crs-dashboard-shell .content :is(.crs-inline-message,.rcd-resolution-empty,.rcd-resolution-loading,.cars-reward-empty){
  border-radius:var(--dash-radius-md)!important;
}

/* Admin dynamic cards and row-based modules */
body.rcd-admin-dashboard-shell .content :is(
  .rcd-finance-row,
  .rcd-home-section,
  .rcd-home-destination-card,
  .rcd-home-category-image-card,
  .cars-reward-item,
  .cars-reward-market-card,
  .crs-banner-item,
  .rcd-resolution-kv,
  .rcd-resolution-item
){
  border-color:var(--dash-border)!important;
  border-radius:var(--dash-radius-md)!important;
  background:#fff!important;
}

/* Keep content safely away from viewport edges. */
body.crs-dashboard-shell .content > *{
  max-width:100%;
}

@media(max-width:1100px){
  body.crs-dashboard-shell .content .grid-4{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.crs-dashboard-shell .content .grid-3{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.crs-dashboard-shell .content .crs-intake-steps{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

@media(max-width:900px){
  body.crs-dashboard-shell .content{
    padding:24px!important;
  }

  body.crs-dashboard-shell .content .grid-2{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:700px){
  body.crs-dashboard-shell .content{
    padding:18px 14px 36px!important;
  }

  body.crs-dashboard-shell .content .grid-4,
  body.crs-dashboard-shell .content .grid-3,
  body.crs-dashboard-shell .content .grid-2,
  body.crs-dashboard-shell .content .crs-intake-steps{
    grid-template-columns:1fr!important;
  }

  body.crs-dashboard-shell .content .card.section,
  body.crs-dashboard-shell .content form.card{
    padding:16px!important;
  }

  body.crs-dashboard-shell .content .actions{
    align-items:stretch!important;
  }

  body.crs-dashboard-shell .content .actions > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body.crs-dashboard-shell .content .actions > select,
  body.crs-dashboard-shell .content .actions > .field,
  body.crs-dashboard-shell .content .actions > .btn{
    flex:1 1 100%;
    width:100%!important;
    max-width:none!important;
  }

  body.crs-dashboard-shell .content table,
  body.crs-dashboard-shell .content .table{
    min-width:640px!important;
  }
}


/* Dashboard topbar utility actions: website, language, logout. */
body.crs-dashboard-shell .crs-dashboard-topbar-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  min-width:0!important;
}

body.crs-dashboard-shell .crs-dashboard-topbar-actions .crs-dashboard-topbar-action{
  flex:0 0 auto!important;
  min-height:44px!important;
  padding:8px 13px!important;
  border:1px solid var(--dash-border-strong)!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#285443!important;
  box-shadow:none!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}

body.crs-dashboard-shell .crs-dashboard-topbar-actions .crs-dashboard-topbar-action:hover{
  border-color:#9fc7b2!important;
  background:#f7fbf8!important;
  color:var(--dash-green-dark)!important;
}

body.crs-dashboard-shell .crs-dashboard-topbar-actions .crs-dashboard-language-toggle{
  min-width:48px!important;
  padding-inline:12px!important;
  direction:ltr!important;
  font-weight:900!important;
  letter-spacing:.02em!important;
}

body.crs-dashboard-shell .crs-dashboard-topbar-actions .crs-icon{
  flex:0 0 auto!important;
}

@media(max-width:760px){
  body.crs-dashboard-shell .crs-dashboard-topbar-actions{
    gap:6px!important;
  }

  body.crs-dashboard-shell .crs-dashboard-topbar-actions .crs-dashboard-topbar-action{
    min-height:42px!important;
    padding:7px 10px!important;
    font-size:12px!important;
  }

  body.crs-dashboard-shell .crs-dashboard-topbar-actions .crs-dashboard-language-toggle{
    min-width:44px!important;
  }
}

@media(max-width:560px){
  body.crs-dashboard-shell .crs-dashboard-topbar-actions .crs-dashboard-topbar-action > span{
    display:none!important;
  }

  body.crs-dashboard-shell .crs-dashboard-topbar-actions .crs-dashboard-topbar-action{
    width:42px!important;
    min-width:42px!important;
    padding:0!important;
  }

  body.crs-dashboard-shell .crs-dashboard-topbar-actions .crs-dashboard-language-toggle{
    width:44px!important;
    min-width:44px!important;
  }
}
