/* HotelSuitePro Cloud Console — estilos SaaS superadmin */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --hsp-bg: #f1f5f9;
  --hsp-surface: #ffffff;
  --hsp-sidebar: #ffffff;
  --hsp-border: #e2e8f0;
  --hsp-text: #0f172a;
  --hsp-muted: #64748b;
  --hsp-accent: #4f46e5;
  --hsp-accent-soft: #eef2ff;
  --hsp-accent-hover: #4338ca;
  --hsp-success: #059669;
  --hsp-warning: #d97706;
  --hsp-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  --hsp-shadow-lg: 0 12px 40px rgba(79, 70, 229, 0.12);
  --hsp-radius: 14px;
}

* { box-sizing: border-box; }

body.hsp-cloud {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--hsp-bg);
  color: var(--hsp-text);
  min-height: 100vh;
}

/* —— Login —— */
.hsp-login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 45%, #f1f5f9 100%);
}

.hsp-login-brand {
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hsp-login-brand .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hsp-accent);
  background: var(--hsp-accent-soft);
  border: 1px solid #c7d2fe;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 1.25rem;
}

.hsp-login-brand h1 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--hsp-text);
}

.hsp-login-brand .subtitle {
  font-size: 1.05rem;
  color: var(--hsp-muted);
  margin-bottom: 1.75rem;
  max-width: 480px;
}

.hsp-login-brand .features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.hsp-login-brand .features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0;
  color: #334155;
  font-size: 0.92rem;
}

.hsp-login-brand .features li i {
  color: var(--hsp-accent);
  width: 1.1rem;
}

.hsp-login-brand .vendor {
  font-size: 0.8rem;
  color: var(--hsp-muted);
  line-height: 1.5;
}

.hsp-login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hsp-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--hsp-surface);
  border: 1px solid var(--hsp-border);
  border-radius: calc(var(--hsp-radius) + 4px);
  padding: 2rem 2rem 1.75rem;
  box-shadow: var(--hsp-shadow-lg);
}

.hsp-login-card .not-pms {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.76rem;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  line-height: 1.45;
}

.hsp-login-card label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.hsp-login-card .form-control {
  border: 1px solid var(--hsp-border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
}

.hsp-login-card .form-control:focus {
  border-color: var(--hsp-accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.hsp-btn-primary {
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  width: 100%;
  transition: transform 0.15s, box-shadow 0.15s;
}

.hsp-btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

.hsp-link-secondary {
  color: var(--hsp-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.hsp-link-secondary:hover { color: var(--hsp-accent); }

/* —— App shell —— */
.hsp-shell { display: flex; min-height: 100vh; }

.hsp-sidebar {
  width: 252px;
  background: var(--hsp-sidebar);
  border-right: 1px solid var(--hsp-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.hsp-sidebar-brand {
  padding: 1.35rem 1.25rem 1rem;
  border-bottom: 1px solid var(--hsp-border);
}

.hsp-sidebar-brand .logo-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.hsp-sidebar-brand .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.hsp-sidebar-brand h1 {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}

.hsp-sidebar-brand small {
  display: block;
  font-size: 0.68rem;
  color: var(--hsp-muted);
  margin-top: 0.15rem;
}

.hsp-nav { padding: 0.75rem 0.65rem; flex: 1; }

.hsp-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.15rem;
  border-radius: 10px;
  color: #475569;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.hsp-nav a i { width: 1.1rem; text-align: center; color: #94a3b8; font-size: 0.9rem; }

.hsp-nav a:hover {
  background: #f8fafc;
  color: var(--hsp-text);
}

.hsp-nav a.active {
  background: var(--hsp-accent-soft);
  color: var(--hsp-accent);
  font-weight: 600;
}

.hsp-nav a.active i { color: var(--hsp-accent); }

.hsp-nav-divider {
  border: none;
  border-top: 1px solid var(--hsp-border);
  margin: 0.75rem 0.85rem;
}

.hsp-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hsp-header {
  background: var(--hsp-surface);
  border-bottom: 1px solid var(--hsp-border);
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.hsp-header-title h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.hsp-header-title p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--hsp-muted);
}

.hsp-header-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.hsp-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--hsp-border);
  background: #f8fafc;
  color: #475569;
}

.hsp-badge.env { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.hsp-badge.vendor { background: var(--hsp-accent-soft); border-color: #c7d2fe; color: var(--hsp-accent); }

.hsp-user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  background: #f8fafc;
  border: 1px solid var(--hsp-border);
  border-radius: 999px;
  font-size: 0.78rem;
}

.hsp-user-chip .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.72rem;
}

.hsp-content { padding: 1.5rem 1.75rem 2rem; flex: 1; }

/* —— Cards & KPIs —— */
.hsp-card {
  background: var(--hsp-surface);
  border: 1px solid var(--hsp-border);
  border-radius: var(--hsp-radius);
  padding: 1.25rem;
  box-shadow: var(--hsp-shadow);
  height: auto;
}

.hsp-card.hsp-card-fill { height: 100%; }

.hsp-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--hsp-text);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hsp-card-title i { color: var(--hsp-accent); }

.hsp-kpi {
  position: relative;
  overflow: hidden;
}

.hsp-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--hsp-accent), #818cf8);
  border-radius: var(--hsp-radius) var(--hsp-radius) 0 0;
}

.hsp-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hsp-muted);
  margin-bottom: 0.35rem;
}

.hsp-kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--hsp-text);
  line-height: 1.1;
}

.hsp-kpi-hint {
  font-size: 0.72rem;
  color: var(--hsp-muted);
  margin-top: 0.25rem;
}

.hsp-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}

.hsp-stat-row:last-child { border-bottom: none; }

.hsp-health-ok { color: var(--hsp-success); font-weight: 600; }
.hsp-health-warn { color: var(--hsp-warning); font-weight: 600; }

.hsp-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

.hsp-module-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--hsp-border);
  background: #fafafa;
  font-size: 0.76rem;
  font-weight: 500;
  color: #475569;
}

.hsp-module-pill.on {
  background: var(--hsp-accent-soft);
  border-color: #c7d2fe;
  color: var(--hsp-accent);
}

.hsp-module-pill i { font-size: 0.85rem; opacity: 0.85; }

.hsp-scale-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.hsp-scale-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 999px;
}

.hsp-table { width: 100%; font-size: 0.82rem; }
.hsp-table th {
  text-align: left;
  color: var(--hsp-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--hsp-border);
}
.hsp-table td { padding: 0.5rem 0; border-bottom: 1px solid #f1f5f9; }

.hsp-footnote {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--hsp-border);
  border-radius: 10px;
  font-size: 0.78rem;
  color: var(--hsp-muted);
}

@media (max-width: 960px) {
  .hsp-login-page { grid-template-columns: 1fr; }
  .hsp-login-brand { padding: 2rem 1.5rem 1rem; }
  .hsp-shell { flex-direction: column; }
  .hsp-sidebar { width: 100%; }
  .hsp-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.5rem; }
  .hsp-nav a { margin: 0; }
}
