/**
 * Login básico — dashboard único por permissões (dashboard.php).
 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(
    --menu-bar-bg,
    linear-gradient(180deg, #ffffff 0%, #fffafb 42%, #fff5f8 100%)
  );
  min-height: 100vh;
  color: var(--text, #111827);
}

.dashboard-container {
  max-width: min(1240px, 100%);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border, #e5e7eb);
  padding: 14px 16px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.07);
  backdrop-filter: blur(10px);
}

.dashboard-header h1 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text, #0f172a);
}

.user-info {
  text-align: right;
}

.user-name {
  font-weight: 600;
  color: var(--text, #0f172a);
  margin-bottom: 0.25rem;
}

.user-email {
  font-size: 0.875rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.35rem;
}

.user-roles {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.88rem;
  transition:
    transform 0.12s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
  border: 1px solid transparent;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text, #0f172a);
  border-color: var(--border, #e5e7eb);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
}

.btn-danger {
  background: var(--accent, #e61e4d);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(230, 30, 77, 0.24);
}

.gc-dash {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gc-dash-hero__card {
  border-radius: 22px;
  border: 1px solid var(--border, #e5e7eb);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.07);
  padding: 18px 18px;
}

.gc-dash-hero__top {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
  align-items: start;
}

.gc-dash-hero__eyebrow {
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
}

.gc-dash-hero__title {
  margin-top: 6px;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  letter-spacing: -0.04em;
}

.gc-dash-hero__subtitle {
  margin-top: 8px;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
}

.gc-dash-hero__meta {
  border-radius: 18px;
  border: 1px solid var(--border, #e5e7eb);
  background: rgba(255, 255, 255, 0.92);
  padding: 14px 14px;
}

.gc-dash-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.gc-dash-meta-label {
  color: var(--text-muted, #64748b);
  font-weight: 700;
}

.gc-dash-meta-value {
  color: var(--text, #0f172a);
  font-weight: 700;
  text-align: right;
}

.gc-dash-hero__actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.gc-dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text, #0f172a);
  background: rgba(255, 255, 255, 0.9);
  transition:
    transform 0.12s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
  cursor: pointer;
}

.gc-dash-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.09);
}

.gc-dash-btn--primary {
  background: linear-gradient(
    135deg,
    var(--accent, #e61e4d),
    var(--accent-hover, #c4184a)
  );
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 26px rgba(230, 30, 77, 0.22);
}

.gc-dash-btn--primary:hover {
  filter: brightness(0.99);
  box-shadow: 0 18px 34px rgba(230, 30, 77, 0.28);
}

.gc-dash-btn--ghost {
  background: rgba(255, 255, 255, 0.7);
}

.gc-dash-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  border-radius: 999px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.gc-dash-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted, #64748b);
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.18s,
    transform 0.12s;
}

.gc-dash-tab:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text, #0f172a);
}

.gc-dash-tab.is-active {
  color: var(--text, #0f172a);
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--border, #e5e7eb);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
}

.gc-dash-panel {
  display: none;
}

.gc-dash-panel.is-active {
  display: block;
}

.gc-dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.gc-dash-card {
  grid-column: span 4;
  border-radius: 20px;
  border: 1px solid var(--border, #e5e7eb);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.06);
  padding: 16px 16px;
  min-height: 156px;
}

.gc-dash-card--wide {
  grid-column: span 8;
}

.gc-dash-card--accent {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 250, 251, 0.95) 100%
  );
  border-color: rgba(230, 30, 77, 0.18);
}

.gc-dash-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.gc-dash-card__title {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.gc-dash-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #e5e7eb);
  background: rgba(255, 255, 255, 0.9);
}

.gc-dash-pill--accent {
  border-color: rgba(230, 30, 77, 0.22);
  color: var(--accent, #e61e4d);
}

.gc-dash-card__text {
  color: var(--text-muted, #64748b);
  line-height: 1.5;
  font-size: 0.94rem;
}

.gc-dash-card__actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gc-dash-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #e5e7eb);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

.gc-dash-link:hover {
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}

.gc-dash-kpis {
  margin-top: 8px;
  list-style: none;
  display: grid;
  gap: 10px;
}

.gc-dash-kpi__label {
  color: var(--text-muted, #64748b);
  font-weight: 800;
  font-size: 0.85rem;
}

.gc-dash-kpi__value {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.gc-dash-kpis li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border, #e5e7eb);
  background: rgba(255, 255, 255, 0.92);
}

.gc-dash-sections {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.gc-dash-section {
  grid-column: span 6;
  border-radius: 20px;
  border: 1px solid var(--border, #e5e7eb);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.06);
  padding: 16px 16px;
}

.gc-dash-section__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.gc-dash-section__icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 30, 77, 0.1);
  color: var(--accent, #e61e4d);
  font-size: 1.1rem;
  border: 1px solid rgba(230, 30, 77, 0.16);
  flex-shrink: 0;
}

.gc-dash-section__title {
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.gc-dash-section__subtitle {
  color: var(--text-muted, #64748b);
  font-size: 0.92rem;
  line-height: 1.4;
}

.gc-dash-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gc-dash-links--cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gc-dash-linkcard {
  display: block;
  text-decoration: none;
  border-radius: 16px;
  border: 1px solid var(--border, #e5e7eb);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 12px;
  transition:
    transform 0.12s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  color: var(--text, #0f172a);
}

.gc-dash-linkcard:hover {
  transform: translateY(-1px);
  border-color: rgba(230, 30, 77, 0.25);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
}

.gc-dash-linkcard__name {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.gc-dash-linkcard__desc {
  margin-top: 4px;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
  line-height: 1.35;
}

.gc-dash-empty {
  margin-top: 12px;
  border-radius: 18px;
  border: 1px dashed var(--border, #e5e7eb);
  background: rgba(255, 255, 255, 0.85);
  padding: 16px 16px;
  color: var(--text-muted, #64748b);
}

@media (max-width: 980px) {
  .gc-dash-hero__top {
    grid-template-columns: 1fr;
  }
  .gc-dash-card {
    grid-column: span 12;
  }
  .gc-dash-card--wide {
    grid-column: span 12;
  }
  .gc-dash-section {
    grid-column: span 12;
  }
  .gc-dash-links {
    grid-template-columns: 1fr;
  }
  .gc-dash-links--cols {
    grid-template-columns: 1fr;
  }
}

/* Account menu in dashboard header */
.dashboard-header .dashboard-account {
  display: inline-flex;
  align-items: center;
}

.dashboard-header .gc-account-menu__trigger {
  min-height: 40px;
  height: 40px;
  padding: 4px 10px;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid var(--border, #e5e7eb);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.dashboard-header .gc-account-menu--icon .gc-account-menu__trigger-icon-user {
  background: rgba(230, 30, 77, 0.1);
}

/* ============================================================
   Dashboard Unificado — extensão para roles, grid, greeting
   ============================================================ */

/* Brand no header */
.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.dashboard-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.dashboard-site-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-primary, #1a73e8);
  letter-spacing: -0.02em;
}

/* Role badge */
.role-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.role-badge--webmaster    { background: #fef3c7; color: #92400e; }
.role-badge--tenant_admin { background: #dbeafe; color: #1e40af; }
.role-badge--staff        { background: #d1fae5; color: #065f46; }
.role-badge--user         { background: #f3f4f6; color: #374151; }
.role-badge--guest        { background: #fee2e2; color: #991b1b; }

/* Tenant badge */
.tenant-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  margin-left: 4px;
  letter-spacing: 0.02em;
}

/* Saudação */
.dashboard-greeting {
  padding: 20px 4px 10px;
}
.dashboard-greeting h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text, #0f172a);
  letter-spacing: -0.03em;
}
.dashboard-greeting .greeting-sub {
  font-size: 0.875rem;
  color: var(--text-muted, #64748b);
  margin-top: 4px;
}

/* Grid de secções */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

/* Card de secção */
.dashboard-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.25rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05);
  transition: box-shadow 0.15s ease, transform 0.12s ease, border-color 0.15s;
  cursor: pointer;
}
.dashboard-card:hover,
.dashboard-card:focus-visible {
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
  border-color: var(--brand-primary, #1a73e8);
  transform: translateY(-2px);
  outline: none;
}
.card-icon {
  font-size: 1.75rem;
  line-height: 1;
}
.card-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}
.card-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--brand-primary, #1a73e8);
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}

/* Estado vazio */
.dashboard-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
}

/* Rodapé */
.dashboard-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 4px 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}
.footer-sep { opacity: 0.4; }
.footer-admin-hint {
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Botões simples no header */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.btn-sm { padding: 6px 12px; }
.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted, #64748b);
}
.btn-ghost:hover { background: rgba(0,0,0,0.04); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text, #111827);
}
.btn-outline:hover { background: rgba(0,0,0,0.04); border-color: #9ca3af; }

/* Responsivo */
@media (max-width: 640px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-actions { align-self: flex-end; }
}
