/* ========================
   DASHBOARD APP STYLES
   Inherits design tokens from theme.css
   ======================== */

/* Dashboard Layout */
.dashboard-page {
  min-height: 100vh;
  padding-bottom: 80px;
}

.dashboard-hero {
  background: var(--teal);
  color: white;
  padding: 56px 32px 48px;
}

.dashboard-hero h1 {
  color: white;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 8px;
}

.dashboard-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  margin-bottom: 24px;
}

.stats-bar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
}

.stat-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-overdue { background: #FEE2E2; }
.dot-soon { background: #BAE6FD; }
.dot-ok { background: #BBF7D0; }

/* Dashboard Content */
.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.5rem;
}

.section-header .section-icon {
  font-size: 1.5rem;
}

/* Asset Cards */
.asset-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asset-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.asset-card:hover {
  border-color: var(--teal-light);
  box-shadow: 0 4px 16px rgba(14, 110, 110, 0.08);
}

.asset-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.icon-home { background: var(--teal-light); }
.icon-vehicle { background: #FDE8DF; }

.asset-body { flex: 1; min-width: 0; }

.asset-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.asset-desc {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.asset-interval {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.asset-next {
  font-size: 0.8rem;
  font-weight: 500;
}

.asset-next.overdue { color: #DC2626; }
.asset-next.soon { color: #0369A1; }
.asset-next.ok { color: var(--teal); }

.asset-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* Status Badge */
.status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-overdue { background: #FEE2E2; color: #DC2626; }
.badge-soon { background: #BAE6FD; color: #0369A1; }
.badge-on_track { background: #BBF7D0; color: #15803D; }
.badge-unknown { background: var(--gray-100); color: var(--gray-400); }

/* Buttons */
.btn-complete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.btn-complete:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: white;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}

.btn-delete:hover {
  border-color: #DC2626;
  color: #DC2626;
}

/* Add Asset Cards */
.add-card {
  background: white;
  border: 2px dashed var(--gray-200);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.add-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.add-card-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--charcoal);
}

.quick-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--cream);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--charcoal);
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
}

.quick-add-btn:hover {
  background: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  background: white;
  color: var(--charcoal);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
}

.modal h3 {
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-cancel {
  padding: 10px 20px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  color: var(--gray-600);
  transition: background 0.2s;
}

.btn-cancel:hover { background: var(--gray-100); }

.btn-save {
  padding: 10px 20px;
  background: var(--teal);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
}

.btn-save:hover { background: var(--teal-dark); }

/* Complete Modal specific */
.complete-date {
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* Empty state */
.empty-section {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}

.empty-section p {
  color: var(--gray-400);
  font-size: 0.9rem;
}

/* History section */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.history-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--cream);
  border-radius: 10px;
  font-size: 0.85rem;
}

.history-date {
  font-weight: 600;
  color: var(--charcoal);
  min-width: 90px;
}

.history-notes {
  color: var(--gray-600);
  flex: 1;
}

/* Responsive */
@media (max-width: 900px) {
  .dashboard-content {
    grid-template-columns: 1fr;
    padding: 32px 20px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .quick-add-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .dashboard-hero { padding: 40px 20px 32px; }
  .stats-bar { gap: 12px; }
  .asset-card { flex-wrap: wrap; }
  .asset-actions { width: 100%; justify-content: flex-end; }
}