/* CloudMetrics Demo — Layout & Page-specific styles */

/* ===== Login Page ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  max-width: 420px;
  width: 100%;
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--sui-primary);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-header h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.login-header p {
  margin: 0;
  color: var(--sui-text-muted);
  font-size: 14px;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.login-row a {
  font-size: 13px;
  color: var(--sui-primary);
  text-decoration: none;
}

.login-row a:hover {
  text-decoration: underline;
}

.social-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.social-row button {
  flex: 1;
}

.login-footer {
  text-align: center;
  font-size: 13px;
  color: var(--sui-text-muted);
}

.login-footer a {
  color: var(--sui-primary);
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

.login-alert {
  display: none;
  margin-bottom: 16px;
}

.login-alert.show {
  display: flex;
}

/* ===== Dashboard Layout ===== */
.dash-layout {
  display: flex;
  min-height: 100vh;
}

.dash-main {
  flex: 1;
  padding: 24px 28px;
  min-width: 0;
}


/* Activity list */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
}

.activity-item:not(:last-child) {
  border-bottom: 1px solid var(--sui-bg-dark);
}

.activity-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
}

.activity-text strong {
  color: var(--sui-text);
}

.activity-time {
  font-size: 11px;
  color: var(--sui-text-muted);
  white-space: nowrap;
}


/* Team list */
.team-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.team-item:not(:last-child) {
  border-bottom: 1px solid var(--sui-bg-dark);
}

.team-info {
  flex: 1;
}

.team-info .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--sui-text);
}

.team-info .role {
  font-size: 12px;
  color: var(--sui-text-muted);
}

/* Quick actions grid */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Status item */
.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.status-item:not(:last-child) {
  border-bottom: 1px solid var(--sui-bg-dark);
}

.status-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

/* Project cards */
.project-item {
  padding: 14px;
  border-radius: var(--sui-radius);
  margin-bottom: 12px;
}

.project-item h6 {
  margin: 0 0 4px;
  font-size: 14px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--sui-text-muted);
}

/* Table customer cell */
.customer-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Navbar user area */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav-right .sui-avatar {
  cursor: pointer;
}

/* Section spacing */
.dash-section {
  margin-bottom: 24px;
}

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sui-bg);
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  color: var(--sui-text);
  box-shadow: var(--sui-shadow-raised-sm);
  transition: var(--sui-transition);
}

.theme-toggle:hover {
  box-shadow: var(--sui-shadow-raised);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .dash-main {
    padding: 16px;
  }
}

@media (max-width: 600px) {
  .login-card {
    max-width: 100%;
  }

  /* Navbar */
  .sui-navbar-links {
    display: none;
  }
  .nav-right .sui-badge-positioned,
  .nav-right .sui-dropdown {
    display: none;
  }

  /* Main content */
  .dash-main {
    padding: 12px;
  }

  /* Grid rows — add vertical gap between stacked columns */
  .sui-row.sui-g-3 {
    row-gap: 12px;
  }

  /* Stat cards — full width stack */
  .dash-section .sui-col-sm-6,
  .dash-section .sui-col-md-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }


  /* Section spacing */
  .dash-section {
    margin-bottom: 16px;
  }

  /* Invoice header — stack vertically */
  .sui-card-body > div[style*="justify-content:space-between"] {
    flex-direction: column;
    gap: 12px;
  }
  .sui-card-body > div[style*="justify-content:space-between"] > div[style*="text-align:right"] {
    text-align: left !important;
  }

  /* Invoice totals — left-align on mobile */
  .sui-card-body > div[style*="padding:12px 20px 0"] {
    padding: 12px 16px 0 !important;
  }
  .sui-card-body > div[style*="padding:12px 20px 0"] > div[style*="justify-content:flex-end"] {
    justify-content: space-between !important;
    gap: 16px !important;
  }
  .sui-card-body > div[style*="padding:12px 20px 0"] .sui-divider {
    max-width: 100% !important;
    margin-left: 0 !important;
  }

  /* Tables — tighter on mobile */
  .sui-table th,
  .sui-table td {
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* Card footers — wrap buttons */
  .sui-card-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
  .sui-card-footer .sui-btn {
    font-size: 12px;
  }

  /* Quick actions */
  .quick-actions {
    grid-template-columns: 1fr;
  }

  /* Project cards */
  .project-meta {
    flex-direction: column;
    gap: 2px;
  }

  /* Stepper — vertical layout on mobile */
  .sui-stepper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .sui-step {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
  .sui-step-label {
    margin-top: 0;
    margin-left: 12px;
  }
  .sui-step-connector {
    width: 2px;
    height: 28px;
    flex: none;
    margin: 0;
    margin-left: 17px;
  }

  /* Section headings */
  .sui-card-header h4 {
    font-size: 14px !important;
  }

  /* Activity & team items */
  .activity-time {
    font-size: 10px;
  }
  .team-info .name {
    font-size: 13px;
  }
  .team-info .role {
    font-size: 11px;
  }
}
