@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --brand-950: #081a38;
  --brand-900: #0b2a5b;
  --brand-800: #0f3d8f;
  --brand-700: #1f4aa3;
  --brand-500: #2d6cdf;
  --accent: #ff8a00;
  --bg: #eef2f7;
  --card: #ffffff;
  --muted: #6b7a90;
  --shadow: 0 10px 30px rgba(15, 61, 143, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(180deg, #e9eff8 0%, #f6f8fc 100%);
  color: #1f2a44;
}

a {
  color: inherit;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-950) 100%);
  color: #ffffff;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.topbar {
  background: linear-gradient(120deg, var(--brand-800) 0%, var(--brand-700) 100%);
  color: #ffffff;
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid #e6ecf5;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-radius: 9999px;
  padding: 10px 18px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary {
  background: #ffffff;
  color: var(--brand-800);
  border-radius: 9999px;
  padding: 10px 18px;
  font-weight: 600;
  border: 1px solid #d9e2f1;
}

.input,
.select,
.textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d7e1f1;
  padding: 10px 12px;
  background: #ffffff;
  color: #1f2a44;
}

.label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-blue {
  background: rgba(45, 108, 223, 0.15);
  color: #1f4aa3;
}

.badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.badge-gray {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 320px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-column {
  background: #f7f9fc;
  border-radius: 18px;
  border: 1px dashed #c7d4ea;
  padding: 14px;
  min-height: 480px;
}

.kanban-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e6ecf5;
  padding: 12px;
  box-shadow: 0 10px 18px rgba(15, 61, 143, 0.08);
  margin-bottom: 12px;
  cursor: grab;
}

.kanban-card:active {
  cursor: grabbing;
}

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
}

.alert-success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 8px;
}

.table td {
  padding: 10px 8px;
  border-top: 1px solid #edf1f7;
}

#globalSearchResults {
  color: #0f172a;
}

#globalSearchResults a {
  color: #0f172a;
}

#globalSearchResults .text-slate-500 {
  color: #64748b;
}

#globalSearchResults .text-slate-600 {
  color: #475569;
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 50;
  }

  .sidebar.open {
    transform: translateX(0);
  }
}

.portal-auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1b1b1b 0%, #0a0a0a 60%, #000000 100%);
  color: #f8f5ef;
  padding: 24px;
}

.portal-auth-card {
  width: min(520px, 100%);
  background: #111111;
  border: 1px solid rgba(255, 215, 160, 0.2);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.portal-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.portal-logo {
  width: 180px;
  height: auto;
  object-fit: contain;
}

.portal-brand-title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.portal-brand-subtitle {
  font-size: 12px;
  color: #d0b47a;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.portal-auth-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.portal-auth-subtitle {
  color: #c7c2b8;
  font-size: 14px;
  margin-bottom: 18px;
}

.portal-auth-hint {
  margin-top: 16px;
  font-size: 12px;
  color: #9e978c;
}

.portal-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #e3b76b 0%, #c9973b 100%);
  color: #111111;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.portal-body {
  background: #f4f4f4;
  color: #1f1f1f;
}

.portal-body.admin-theme {
  background: #0e0a08;
}

.portal-body.client-theme {
  background: #0c0a08;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: #f4f4f4;
}

.portal-sidebar {
  background: #000000;
  color: #ffffff;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.portal-sidebar-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.portal-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-link {
  color: #f5f5f5;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.2s ease;
  font-size: 14px;
}

.portal-link:hover,
.portal-link.active {
  background: rgba(255, 215, 160, 0.15);
  color: #ffd59c;
}

.portal-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: transparent;
}

.portal-body.admin-theme .portal-main {
  background: url('fundo.adm.jpeg') no-repeat center top / cover;
}

.portal-body.client-theme .portal-main {
  background: url('fundo.cliente.jpeg') no-repeat center top / cover;
}

.portal-body.admin-theme .portal-content,
.portal-body.client-theme .portal-content {
  background: rgba(0, 0, 0, 0.55);
  border-radius: 16px;
  margin: 18px;
  padding: 28px;
}

.portal-topbar {
  background: #000000;
  color: #ffffff;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-topbar-title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.03em;
}

.portal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-user-name {
  font-weight: 600;
  font-size: 14px;
}

.portal-user-email {
  font-size: 12px;
  color: #c2b08a;
}

.portal-logout {
  background: #e10600;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.portal-content {
  padding: 28px;
  flex: 1;
}

.portal-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.portal-card-wide {
  max-width: 720px;
}

.portal-card-space {
  margin-bottom: 18px;
}

.portal-section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.portal-body.admin-theme .portal-section-title,
.portal-body.client-theme .portal-section-title {
  color: #ffffff;
}

.portal-form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portal-form-full {
  grid-column: 1 / -1;
}

.portal-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d7d7d7;
  padding: 10px 12px;
  background: #f9f9f9;
}

.portal-input-sm {
  padding: 6px 8px;
  font-size: 12px;
  min-width: 120px;
}

.portal-label {
  font-size: 12px;
  font-weight: 700;
  color: #3a3a3a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-button-dark {
  background: #000000;
  color: #ffffff;
}

.portal-button-gold {
  background: linear-gradient(120deg, #d4a632 0%, #b99122 100%);
  color: #111111;
}

.portal-button-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.portal-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b6b6b;
  padding: 8px;
}

.portal-table td {
  padding: 10px 8px;
  border-top: 1px solid #eeeeee;
}

.portal-link-inline {
  color: #8b5e1a;
  font-weight: 600;
  text-decoration: underline;
}

.portal-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(212, 166, 50, 0.18);
  color: #7c5a12;
  font-size: 12px;
  font-weight: 600;
}

.portal-empty {
  text-align: center;
  color: #6b6b6b;
  padding: 20px 8px;
}

.portal-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.portal-hero-greeting {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

.portal-hero-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 6px;
}

.portal-hero-chip {
  background: #000000;
  color: #ffd59c;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-list {
  display: grid;
  gap: 12px;
}

.portal-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
}

.portal-list-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(212, 166, 50, 0.18);
}

.portal-client-hero {
  display: grid;
  gap: 16px;
}

.portal-client-banner {
  background: rgba(0, 0, 0, 0.55);
  border-radius: 16px;
  padding: 26px;
  color: #f8f5ef;
}

.portal-client-greeting {
  font-size: 22px;
  font-weight: 700;
}

.portal-client-subtitle {
  font-size: 14px;
  color: #d5c7ad;
  margin-top: 6px;
}

.portal-alert {
  background: #ffe7e7;
  color: #8b1f1f;
}

.portal-timeline {
  display: grid;
  gap: 14px;
}

.portal-timeline-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #efefef;
}

.portal-timeline-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.portal-timeline-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.portal-timeline-details {
  color: #5a5146;
  font-size: 13px;
  margin-bottom: 8px;
}

.portal-muted {
  font-size: 12px;
  color: #7a7a7a;
}

@media (max-width: 1024px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
  }
}
