.dashboard-content {
  flex: 1;
  padding: var(--margin-desktop);
  padding-top: 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gutter);
  max-width: 1440px;
  width: 100%;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
}

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
}

.stat-card {
  background-color: var(--surface-container-lowest);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 4px 20px #0000000a;
  border: 1px solid #bfc9c44d;
}

.stat-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
  font-size: 32px;
  flex-shrink: 0;
}

.stat-icon-wrapper.ph {
  border-color: #0052cc;
  color: #0052cc;
}
.stat-icon-wrapper.temp {
  border-color: #c62828;
  color: #c62828;
}

.stat-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.05em;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.stat-label.ph {
  color: #0052cc;
}
.stat-label.temp {
  color: #c62828;
}

.stat-value {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 48px;
  line-height: 56px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-value.ph {
  color: #0052cc;
}
.stat-value.temp {
  color: #c62828;
}

/* ===== MOTORS SECTION ===== */
.motors-section {
  margin-top: var(--stack-sm);
}

.motors-title {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: var(--stack-sm);
}

.motors-content {
  overflow-y: auto;
  height: 570px;
}

.motors-content::-webkit-scrollbar {
  width: 4px;
}
.motors-content::-webkit-scrollbar-thumb {
  background: var(--on-tertiary-container);
  border-radius: 6px;
}

.motor-card {
  background-color: var(--surface-container-lowest);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 15px;
  box-shadow: 0 4px 20px #0000000a;
  border: 1px solid #bfc9c480;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.motor-card:hover {
  box-shadow: 0 12px 24px #00000014;
}

.motor-info {
  display: flex;
  flex-direction: column;
}

.motor-chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  line-height: 16px;
  font-weight: 500;
  color: var(--on-surface-variant);
  margin-bottom: 4px;
}

.motor-time {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 48px;
  line-height: 56px;
  font-weight: 400;
  color: var(--on-surface);
}

.motor-stats {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-right: 32px;
}

.motor-stat {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.motor-stat-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.motor-stat-value {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--on-surface);
}

.motor-btn {
  padding: 8px;
  background: none;
  border: none;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.motor-btn:hover {
  color: var(--primary);
}

/* ===== RIGHT PANELS ===== */
.panel {
  background-color: #fff;
  border-radius: 12px;
  display: flex;
  height: 345px;
  flex-direction: column;
  box-shadow: 0 4px 20px #0000000f;
  border: 1px solid #bfc9c44d;
}

.panel-content::-webkit-scrollbar {
  width: 4px;
}
.panel-content::-webkit-scrollbar-thumb {
  background: var(--on-tertiary-container);
  border-radius: 10px;
}

.panel-header {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 12px;
}

.panel-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

/* ===== EMPTY STATES ===== */
.empty-alerts-container {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #a1a1a1;
  background-color: white;
  border-radius: 12px;
}

.empty-motors-container {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #a1a1a1;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px #0000000f;
  border: 1px solid #bfc9c44d;
}

.empty-motors-container h4 {
  margin-top: 10px;
  margin-bottom: 10px;
  color: #484848;
  font-weight: 800;
  font-size: 1.4rem;
  font-family: "Hanken Grotesk", sans-serif;
}

.empty-motors-container p {
  padding: 0 5rem;
  color: #535353;
  text-align: center;
}

/* ===== ALERTS ===== */
.alert-item {
  padding: 12px;
  border-radius: 0 8px 8px 0;
  border-left: 4px solid;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  position: relative;
  font-size: 14px;
  line-height: 20px;
}

.alert-item .icon {
  margin-top: 4px;
  flex-shrink: 0;
  font-size: 20px;
}
.alert-item .close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.alert-item .close-btn:hover {
  opacity: 1;
}

.alert-item.warning {
  background-color: #fff8e1;
  border-color: #ffb300;
}
.alert-item.warning .icon {
  color: #f57f17;
}
.alert-item.warning .title {
  color: #5d4037;
  font-weight: 600;
}
.alert-item.warning .content {
  color: #5d4037cc;
}
.alert-item.warning .time {
  color: #5d403799;
}

.alert-item.info {
  background-color: #e3f2fd;
  border-color: #1e88e5;
}
.alert-item.info .icon {
  color: #1565c0;
}
.alert-item.info .title {
  color: #0d47a1;
  font-weight: 600;
}
.alert-item.info .content {
  color: #0d47a1cc;
}
.alert-item.info .time {
  color: #0d47a199;
}

.alert-item.error {
  background-color: #ffebee;
  border-color: #e53935;
}
.alert-item.error .icon {
  color: #c62828;
}
.alert-item.error .title {
  color: #b71c1c;
  font-weight: 600;
}
.alert-item.error .content {
  color: #b71c1ccc;
}
.alert-item.error .time {
  color: #b71c1c99;
}

.alert-item.success {
  background-color: #f1f8e9;
  border-color: #43a047;
}
.alert-item.success .icon {
  color: #2e7d32;
}
.alert-item.success .title {
  color: #1b5e20;
  font-weight: 600;
}
.alert-item.success .content {
  color: #1b5e20cc;
}
.alert-item.success .time {
  color: #1b5e2099;
}

.alert-content {
  flex: 1;
  padding-right: 24px;
}
.alert-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}
.alert-text {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.alert-time {
  font-size: 10px;
  line-height: 16px;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  margin-left: 12px;
  padding-left: 24px;
  padding-bottom: 16px;
}

.timeline-container::-webkit-scrollbar {
  width: 4px;
}
.timeline-container::-webkit-scrollbar-thumb {
  background: var(--on-tertiary-container);
  border-radius: 10px;
}

.timeline-item {
  position: relative;
}

.timeline-item:not(:last-child) {
  margin-bottom: 40px;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: -26px;
  top: 16px;
  width: 2px;
  bottom: -45px;
  background: var(--clr-border, #ccc);
}

.timeline-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: var(--primary);
  border-radius: 50%;
  left: -31.5px;
  top: 4px;
}

.timeline-title {
  text-align: justify;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 24px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 4px;
}
.timeline-user {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: var(--on-surface-variant);
  margin-bottom: 4px;
}
.timeline-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: #3f4945b3;
}

/* ===== RESPONSIVE ===== */

/* ── Large tablet / small laptop (1024px) ── */
@media (max-width: 1024px) {
  .dashboard-content {
    grid-template-columns: 1fr;
    padding: var(--margin-mobile);
    padding-top: 20px;
  }

  .right-column {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .right-column > div {
    flex: 1;
    min-width: 280px;
  }

  .panel {
    height: 300px;
  }
}

/* ── Tablet (768px) ── */
@media (max-width: 768px) {
  .dashboard-content {
    padding: 16px;
    padding-top: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px;
    gap: 16px;
  }

  .stat-value {
    font-size: 36px;
    line-height: 44px;
  }

  .stat-icon-wrapper {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .motor-card {
    padding: 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .motor-time {
    font-size: 32px;
    line-height: 40px;
  }

  .motor-stats {
    gap: 16px;
    margin-right: 0;
  }

  .empty-motors-container {
    padding: 40px;
  }

  .motors-content {
    height: auto;
    max-height: 400px;
  }

  .right-column {
    flex-direction: column;
  }

  .panel {
    height: 280px;
  }
}

/* ── Mobile (425px) ── */
@media (max-width: 425px) {
  .dashboard-content {
    padding: 12px;
  }

  .stat-value {
    font-size: 28px;
    line-height: 36px;
  }

  .motor-stats {
    flex-wrap: wrap;
    gap: 8px;
  }

  .motor-stat {
    text-align: left;
  }

  .empty-motors-container p {
    padding: 0 1.5rem;
  }

  .panel {
    height: 250px;
  }
}
