/* ============================================================
   CDC – cliente.css — Área do Cliente / Dashboard
   ============================================================ */

/* ---------- BODY ---------- */
.app-body { background: var(--bg); }

/* ============================================================
   AUTH SCREENS
   ============================================================ */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1a3a6e 60%, #1a6eff 100%);
  position: relative;
  overflow: hidden;
}
.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
  top: -200px; right: -200px;
  border-radius: 50%;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 28px;
  justify-content: center;
}
.auth-logo i { font-size: 2rem; }

.auth-panel { display: none; }
.auth-panel.active { display: block; }

.auth-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
  text-align: center;
}
.auth-sub {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

.auth-form .btn--full { margin-top: 4px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard {
  display: flex;
  min-height: 100vh;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 500;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.sidebar__logo i { color: var(--primary); }

.sidebar__close {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: 1rem;
  display: none;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar__user strong { font-size: 14px; color: #fff; display: block; }

.sidebar__nav { flex: 1; padding: 12px 0; }
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 14px;
  color: rgba(255,255,255,.65);
  transition: all var(--transition);
  border-left: 3px solid transparent;
  position: relative;
}
.sidebar__link:hover {
  color: #fff;
  background: var(--bg-sidebar-hover);
  border-left-color: var(--primary);
}
.sidebar__link.active {
  color: #fff;
  background: rgba(26,110,255,.2);
  border-left-color: var(--primary);
  font-weight: 600;
}
.sidebar__link i { width: 18px; text-align: center; font-size: 15px; }

.sidebar__footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.08); }

/* ---------- MAIN CONTENT ---------- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin var(--transition);
}

/* ---------- TOPBAR ---------- */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.topbar__menu {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text);
  display: none;
}
.topbar__title { font-size: 1.1rem; font-weight: 700; flex: 1; }
.topbar__right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar__icon {
  position: relative;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.topbar__icon:hover { background: var(--bg); color: var(--text); }
.topbar__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* ---------- CONTENT AREA / SECTIONS ---------- */
.content-area { flex: 1; padding: 28px; overflow-y: auto; }

.section { display: none; }
.section.active { display: block; }

.section-welcome { margin-bottom: 24px; }
.section-welcome h2 { font-size: 1.5rem; }
.section-welcome p { font-size: 14px; color: var(--text-muted); }

/* ---------- OVERVIEW CARDS ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.overview-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.overview-card:hover { box-shadow: var(--shadow-md); }
.overview-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.overview-card__icon.blue   { background: var(--primary-light); color: var(--primary); }
.overview-card__icon.green  { background: var(--success-light); color: var(--success); }
.overview-card__icon.red    { background: var(--danger-light); color: var(--danger); }
.overview-card__icon.yellow { background: var(--warning-light); color: var(--warning); }
.overview-card__icon.purple { background: var(--purple-light); color: var(--purple); }

.overview-card__data strong { font-size: 1.5rem; display: block; }
.overview-card__data span { font-size: 12px; color: var(--text-muted); }

/* ---------- OVERVIEW ROW ---------- */
.overview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) { .overview-row { grid-template-columns: 1fr; } }

.overview-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.block-title { font-size: 1rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.block-title i { color: var(--primary); }

.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 13px;
}
.mini-item strong { color: var(--text); }
.mini-item span { color: var(--text-muted); }

/* ---------- VEHICLES ---------- */
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.vehicle-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.vehicle-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.vehicle-card__header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.vehicle-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.vehicle-card__plate {
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 2px;
}
.vehicle-card__info { font-size: 13px; color: var(--text-muted); }
.vehicle-card__details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vehicle-detail { background: var(--bg); padding: 8px 10px; border-radius: var(--radius-sm); }
.vehicle-detail label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.vehicle-detail span { font-size: 13px; font-weight: 600; display: block; }
.vehicle-card__actions { margin-top: 16px; display: flex; gap: 8px; }

/* ---------- CNH ---------- */
.cnh-card-wrapper { margin-bottom: 24px; }
.cnh-card {
  background: linear-gradient(135deg, #1a3a6e, #1a6eff);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #fff;
  max-width: 480px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.cnh-card::before {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  right: -60px; top: -60px;
}
.cnh-card__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.cnh-card__header h3 { font-size: 1rem; opacity: .8; }
.cnh-card__status { padding: 4px 12px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; }
.cnh-card__status.valid { background: rgba(39,174,96,.3); color: #a8f0c6; }
.cnh-card__status.expired { background: rgba(231,76,60,.3); color: #f5b7b1; }
.cnh-card__status.suspended { background: rgba(243,156,18,.3); color: #fdebd0; }

.cnh-card__name { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.cnh-card__number { font-family: var(--font-mono); letter-spacing: 2px; opacity: .8; font-size: 14px; margin-bottom: 16px; }
.cnh-card__footer { display: flex; gap: 24px; }
.cnh-card__field label { font-size: 10px; text-transform: uppercase; opacity: .7; }
.cnh-card__field span { font-size: 14px; font-weight: 600; display: block; }

.cnh-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.cnh-info-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}
.cnh-info-item i { font-size: 1.5rem; color: var(--primary); margin-bottom: 8px; }
.cnh-info-item strong { display: block; font-size: 1.1rem; }
.cnh-info-item span { font-size: 12px; color: var(--text-muted); }

/* ---------- DOCUMENTS ---------- */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.doc-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.doc-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--primary); }
.doc-card i { font-size: 2rem; margin-bottom: 12px; }
.doc-card i.fa-file-pdf { color: #e74c3c; }
.doc-card i.fa-file-image { color: #2980b9; }
.doc-card i.fa-file-alt { color: #8e44ad; }
.doc-card strong { display: block; font-size: 14px; margin-bottom: 4px; }
.doc-card small { font-size: 12px; color: var(--text-muted); }

/* ---------- ALERTS ---------- */
.alerts-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.alert-item.unread { border-left: 4px solid var(--primary); background: var(--primary-light); }
.alert-item__icon { font-size: 1.2rem; margin-top: 2px; }
.alert-item__icon.danger { color: var(--danger); }
.alert-item__icon.warning { color: var(--warning); }
.alert-item__icon.info { color: var(--info); }
.alert-item__icon.success { color: var(--success); }
.alert-item__content { flex: 1; }
.alert-item__content strong { display: block; font-size: 14px; margin-bottom: 2px; }
.alert-item__content p { font-size: 13px; color: var(--text-light); }
.alert-item__time { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ---------- PROFILE ---------- */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) { .profile-layout { grid-template-columns: 1fr; } }

.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.profile-avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 16px;
}
.profile-card h3 { font-size: 1.1rem; }
.profile-card p { font-size: 13px; color: var(--text-muted); }
.profile-card .plan-badge { margin: 12px auto 0; display: inline-flex; }

.profile-form-wrap { display: flex; flex-direction: column; gap: 20px; }
.profile-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.profile-form h3 { font-size: 1rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.profile-form .form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition);
}
.profile-form .form-group input:focus { outline: none; border-color: var(--primary); }
.profile-form .form-group input[readonly] { background: var(--bg); cursor: not-allowed; }

/* ---------- RESPONSIVE SIDEBAR COLLAPSE ---------- */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 800;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar__close { display: block; }
  .main-content { margin-left: 0; }
  .topbar__menu { display: flex; }
}
