/* =========================================
   PORTAL DO CLIENTE - SATÉLITE ASSESSORIA
   ========================================= */

:root {
  --primary: #0a1628;
  --primary-light: #132240;
  --accent: #c8a45a;
  --accent-light: #e0c47a;
  --accent-dark: #a8843a;
  --white: #ffffff;
  --gray-50: #f8f9fc;
  --gray-100: #eef1f6;
  --gray-200: #d8dde8;
  --gray-400: #8892a6;
  --gray-600: #4a5568;
  --gray-800: #2d3748;
  --shadow-sm: 0 2px 8px rgba(10, 22, 44, 0.06);
  --shadow-md: 0 8px 30px rgba(10, 22, 40, 0.1);
  --shadow-lg: 0 20px 60px rgba(10, 22, 40, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== LOGIN ===== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 100%);
  padding: 20px;
}

.login-box {
  background: var(--white);
  padding: 48px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
}

.login-box .logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-box .logo img {
  height: 100px;
  width: auto;
  margin-bottom: 16px;
}

.login-box .logo h1 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 6px;
}

.login-box .logo p {
  color: var(--gray-400);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-800);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 15px;
  transition: 0.3s;
  background: var(--gray-50);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(200, 164, 90, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: 0.3s;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #c8a45a 0%, #e0c47a 100%);
  color: var(--primary);
  box-shadow: 0 8px 30px rgba(200, 164, 90, 0.3);
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(200, 164, 90, 0.4);
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* ===== HEADER ===== */

.portal-header {
  background: var(--primary);
  padding: 16px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.portal-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.portal-header .logo {
  display: inline-block;
  flex-shrink: 0;
}

.portal-header .logo-img {
  height: 80px;
  width: auto;
  display: block;
}

.portal-nav {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
}

.portal-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c8a45a 0%, #e0c47a 100%);
  color: var(--primary) !important;
  padding: 12px 26px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  transition: 0.3s;
}

.portal-logout:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(200, 164, 90, 0.4);
}

.portal-user-mobile {
  display: none;
  align-items: center;
  gap: 16px;
}

.user-name {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.user-name i {
  color: var(--accent);
  margin-right: 6px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: 0.3s;
  border-radius: 2px;
}

/* ===== FAIXA DOURADA ===== */

.portal-header-band {
  height: 4px;
  background: linear-gradient(135deg, #c8a45a 0%, #e0c47a 100%);
  position: fixed;
  top: 112px;
  left: 0;
  right: 0;
  z-index: 999;
}

/* ===== MOBILE MENU ===== */

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 600;
}

.mobile-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-close svg {
  width: 28px;
  height: 28px;
  stroke: var(--white);
}

/* ===== MAIN ===== */

.portal-main {
  padding-top: 116px;
}

.dashboard-hero {
  background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 100%);
  padding: 50px 0 70px;
  margin-bottom: -40px;
}

.dashboard-welcome h1 {
  color: #fff;
  font-size: 32px;
  margin-bottom: 6px;
}

.dashboard-welcome h1 i {
  color: var(--accent);
  margin-right: 12px;
}

.dashboard-welcome p {
  color: rgba(255, 255, 255, 0.7);
}

.dashboard-content {
  padding-bottom: 80px;
}

/* ===== LAYOUT COM SIDEBAR ===== */

.dashboard-layout .container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  align-items: start;
}

.sidebar {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 140px;
}

.sidebar-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  transition: 0.3s;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  color: var(--accent-dark);
  transition: 0.3s;
}

.sidebar-link:hover {
  background: var(--gray-50);
  color: var(--primary);
}

.sidebar-link.active {
  background: linear-gradient(135deg, #c8a45a 0%, #e0c47a 100%);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(200, 164, 90, 0.3);
}

.sidebar-link.active i {
  color: var(--primary);
}

/* ===== CARDS ===== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}

.card-icon.blue { background: var(--primary); }
.card-icon.orange { background: var(--accent); }
.card-icon.green { background: #28a745; }
.card-icon.red { background: #dc3545; }

.card-info h3 {
  font-size: 28px;
  color: var(--primary);
  line-height: 1.2;
}

.card-info p {
  color: var(--gray-400);
  font-size: 14px;
}

/* ===== INFO BOX / CARTÃO CNPJ ===== */

.info-box {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.info-box h3 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-100);
}

.info-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.info-row.cnpj-row {
  grid-template-columns: repeat(2, 1fr);
}

.info-item {
  min-width: 0;
}

.info-item.full-width {
  grid-column: 1 / -1;
}

.info-item label {
  font-size: 11px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.info-item p {
  font-size: 15px;
  color: var(--gray-800);
  font-weight: 500;
  line-height: 1.5;
}

.cnpj-card .info-item p {
  font-size: 15px;
  color: var(--gray-800);
  font-weight: 600;
}

.cnpj-card .info-item label {
  color: var(--gray-400);
  font-size: 10px;
  letter-spacing: 0.6px;
}

/* ===== QUICK MENU ===== */

.quick-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-item {
  background: var(--gray-50);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  border: 1px solid var(--gray-100);
  transition: 0.3s;
}

.quick-item:hover {
  background: #fff;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.quick-item i {
  font-size: 32px;
  color: var(--accent-dark);
  margin-bottom: 12px;
  display: block;
}

.quick-item span {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

/* ===== FOOTER ===== */

.portal-footer {
  background: var(--primary);
  padding: 60px 0 0;
  color: rgba(255, 255, 255, 0.4);
}

.portal-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-about .logo {
  display: inline-block;
  margin-bottom: 18px;
}

.footer-about .logo-img {
  height: 80px;
  width: auto;
}

.footer-about p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  line-height: 1.8;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  transition: 0.3s;
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--primary);
}

.portal-footer h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 20px;
}

.portal-footer ul li {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.portal-footer ul a {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  transition: 0.3s;
}

.portal-footer ul a:hover {
  color: var(--accent);
}

.footer-address {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
}

/* ===== WHATSAPP FLOAT ===== */

.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 30px;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: 0.3s;
  animation: pulse-green 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

@keyframes pulse-green {
  0% { box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 6px 40px rgba(37, 211, 102, 0.6); }
  100% { box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4); }
}

/* ===== PÁGINA DE DOCUMENTOS ===== */

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  transition: 0.3s;
}

.category-tab:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--primary);
}

.category-tab.active {
  background: linear-gradient(135deg, #c8a45a 0%, #e0c47a 100%);
  color: var(--primary);
  border-color: var(--accent);
  box-shadow: 0 4px 15px rgba(200, 164, 90, 0.3);
}

.category-tab i { font-size: 16px; }

.documents-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.document-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: 0.3s;
  border: 1px solid transparent;
}

.document-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.document-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  color: #fff;
}

.document-icon.red { background: #dc3545; }
.document-icon.blue { background: #2563eb; }
.document-icon.green { background: #16a34a; }
.document-icon.purple { background: #9333ea; }
.document-icon.orange { background: #f59e0b; }
.document-icon.gray { background: var(--gray-400); }

.document-info { flex: 1; min-width: 0; }

.document-info h4 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.document-meta span {
  font-size: 13px;
  color: var(--gray-400);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff !important;
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: 0.3s;
  flex-shrink: 0;
}

.btn-download:hover {
  background: var(--accent);
  color: var(--primary) !important;
  transform: translateY(-2px);
}

.empty-state {
  background: #fff;
  border-radius: 16px;
  padding: 60px 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.empty-icon {
  width: 90px;
  height: 90px;
  background: var(--gray-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 40px;
  color: var(--accent);
}

.empty-state h3 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  font-size: 24px;
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--gray-400);
  font-size: 15px;
  max-width: 500px;
  margin: 0 auto 8px;
}

.btn-whatsapp-empty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #fff !important;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 20px;
  transition: 0.3s;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-empty:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(37, 211, 102, 0.4);
}

/* ===== PÁGINA DE CERTIFICADOS ===== */

.cert-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.cert-summary-item {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: 0.3s;
}

.cert-summary-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cert-summary-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}

.cert-summary-icon.blue { background: var(--primary); }
.cert-summary-icon.green { background: #28a745; }
.cert-summary-icon.orange { background: #f59e0b; }
.cert-summary-icon.red { background: #dc3545; }

.cert-summary-info h3 {
  font-size: 28px;
  color: var(--primary);
  line-height: 1.2;
}

.cert-summary-info p {
  color: var(--gray-400);
  font-size: 14px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.cert-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: 0.3s;
  border-top: 4px solid transparent;
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cert-card.green { border-top-color: #28a745; }
.cert-card.yellow { border-top-color: #f59e0b; }
.cert-card.orange { border-top-color: #f97316; }
.cert-card.red { border-top-color: #dc3545; }

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0;
}

.cert-type-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--accent-dark);
}

.cert-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cert-status-badge.green {
  background: #d1fae5;
  color: #065f46;
}

.cert-status-badge.yellow {
  background: #fef3c7;
  color: #92400e;
}

.cert-status-badge.orange {
  background: #fed7aa;
  color: #9a3412;
}

.cert-status-badge.red {
  background: #fee2e2;
  color: #991b1b;
}

.cert-body {
  padding: 20px 24px 24px;
}

.cert-titular {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 4px;
  font-weight: 700;
}

.cert-tipo {
  color: var(--gray-400);
  font-size: 14px;
  margin-bottom: 20px;
}

.cert-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.cert-detail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cert-detail i {
  color: var(--accent);
  font-size: 16px;
  margin-top: 2px;
}

.cert-detail .label {
  display: block;
  font-size: 11px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.cert-detail .value {
  display: block;
  font-size: 14px;
  color: var(--gray-800);
  font-weight: 600;
}

.green-text { color: #059669 !important; }
.yellow-text { color: #d97706 !important; }
.orange-text { color: #ea580c !important; }
.red-text { color: #dc2626 !important; }

.cert-observacao {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: 10px;
  font-size: 13px;
  color: var(--gray-600);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cert-observacao i {
  color: var(--accent);
  margin-top: 2px;
}

.cert-footer {
  padding: 16px 24px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
}

.btn-renew {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, #c8a45a 0%, #e0c47a 100%);
  color: var(--primary) !important;
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  transition: 0.3s;
}

.btn-renew:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(200, 164, 90, 0.4);
}

/* ===== PÁGINA DE TICKETS ===== */

.tickets-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.btn-new-ticket {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #c8a45a 0%, #e0c47a 100%);
  color: var(--primary) !important;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  transition: 0.3s;
  box-shadow: 0 8px 30px rgba(200, 164, 90, 0.3);
}

.btn-new-ticket:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(200, 164, 90, 0.4);
}

.tickets-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.tickets-summary-item {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: 0.3s;
}

.tickets-summary-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tickets-summary-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}

.tickets-summary-icon.blue { background: var(--primary); }
.tickets-summary-icon.green { background: #28a745; }
.tickets-summary-icon.orange { background: #f59e0b; }
.tickets-summary-icon.gray { background: var(--gray-400); }

.tickets-summary-info h3 {
  font-size: 28px;
  color: var(--primary);
  line-height: 1.2;
}

.tickets-summary-info p {
  color: var(--gray-400);
  font-size: 14px;
}

.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ticket-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: 0.3s;
  border: 1px solid transparent;
}

.ticket-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.ticket-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.ticket-priority {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.ticket-priority.green { background: #28a745; }
.ticket-priority.blue { background: #2563eb; }
.ticket-priority.orange { background: #f59e0b; }
.ticket-priority.red { background: #dc3545; }

.ticket-info { flex: 1; min-width: 0; }

.ticket-info h3 {
  font-size: 17px;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.4;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--gray-400);
}

.ticket-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ticket-id {
  font-weight: 600;
  color: var(--gray-600);
}

.ticket-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.ticket-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ticket-status.blue {
  background: #dbeafe;
  color: #1e40af;
}

.ticket-status.orange {
  background: #fed7aa;
  color: #9a3412;
}

.ticket-status.green {
  background: #d1fae5;
  color: #065f46;
}

.ticket-status.gray {
  background: var(--gray-100);
  color: var(--gray-600);
}

.ticket-priority-label {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
}

.ticket-priority-label.green {
  background: #d1fae5;
  color: #065f46;
}

.ticket-priority-label.blue {
  background: #dbeafe;
  color: #1e40af;
}

.ticket-priority-label.orange {
  background: #fed7aa;
  color: #9a3412;
}

.ticket-priority-label.red {
  background: #fee2e2;
  color: #991b1b;
}

/* Ticket Detalhes */

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  transition: 0.3s;
}

.btn-back:hover {
  color: var(--primary);
}

.ticket-detail-header {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.ticket-detail-info h2 {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 16px;
  font-weight: 700;
}

.ticket-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ticket-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--gray-50);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
}

.ticket-conversation {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.ticket-message {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
}

.ticket-message:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.message-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.ticket-message.cliente .message-avatar {
  background: var(--gray-100);
  color: var(--gray-600);
}

.ticket-message.admin .message-avatar {
  background: linear-gradient(135deg, #c8a45a 0%, #e0c47a 100%);
  color: var(--primary);
}

.message-content { flex: 1; }

.message-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.message-header strong {
  color: var(--primary);
  font-size: 15px;
}

.message-date {
  color: var(--gray-400);
  font-size: 13px;
}

.message-body {
  color: var(--gray-800);
  font-size: 15px;
  line-height: 1.7;
}

.ticket-reply-form {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.form-actions .btn-primary {
  width: auto;
  padding: 14px 32px;
}

.ticket-closed-notice {
  background: var(--gray-50);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ticket-closed-notice i {
  font-size: 24px;
  color: var(--gray-400);
}

/* ===== RESPONSIVO ===== */

@media (max-width: 1024px) {

  .portal-nav,
  .portal-logout {
    display: none;
  }

  .portal-user-mobile {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .portal-header-band {
    top: 112px;
    height: 4px;
  }

  .portal-main {
    padding-top: 116px;
  }

  .dashboard-layout .container {
    grid-template-columns: 1fr;
  }

  /* Menu de Módulos no mobile: mantém o formato de lista vertical,
     sem transformar os itens em "chips" horizontais. */
  .sidebar {
    position: static;
  }

  .sidebar-title {
    width: 100%;
  }

  .sidebar-link {
    margin-bottom: 4px;
  }

  .cards-grid,
  .cert-summary,
  .tickets-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-row,
  .info-row.cnpj-row {
    grid-template-columns: 1fr;
  }

  .quick-menu {
    grid-template-columns: repeat(2, 1fr);
  }

  .portal-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {

  .login-box {
    padding: 32px 24px;
  }

  .dashboard-hero {
    padding: 40px 0 50px;
  }

  .dashboard-welcome h1 {
    font-size: 24px;
  }

  .portal-header-band {
    top: 92px;
    height: 4px;
  }

  .portal-main {
    padding-top: 96px;
  }

  .cards-grid,
  .cert-summary,
  .tickets-summary,
  .info-row,
  .quick-menu,
  .cert-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .portal-footer .footer-grid {
    grid-template-columns: 1fr;
  }

  .portal-header .logo-img {
    height: 60px;
  }

  .category-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 12px;
  }

  .category-tab {
    white-space: nowrap;
    padding: 10px 16px;
    font-size: 13px;
  }

  .documents-grid {
    grid-template-columns: 1fr;
  }

  .document-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .document-meta {
    justify-content: center;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
  }

  .cert-details {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ticket-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticket-right {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }

  .ticket-detail-meta {
    flex-direction: column;
  }

  .ticket-message {
    flex-direction: column;
  }
}
