:root {
  --sidebar-width: 280px;
  --primary-gradient: linear-gradient(135deg, var(--first-color), #50e3c2);
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

body {
  background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--primary-gradient);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #fff;
  position: fixed;
  left: 0;
  top: 0;
  padding: 30px 20px;
  z-index: 1000;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.sidebar .profile {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 176px;
}

.sidebar .profile #profilePhoto {
  width: 90px;
  height: 90px;
  min-width: 90px;
  min-height: 90px;
  max-width: 90px;
  max-height: 90px;
  display: block;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.sidebar .profile #profilePhoto:hover {
  transform: scale(1.05);
}

.sidebar .profile h6 {
  margin-top: 15px;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 1.1rem;
  min-height: 1.4em;
}

.sidebar .profile small {
  opacity: 0.9;
  font-size: 0.85rem;
  display: block;
  min-height: 1.3em;
}

.sidebar nav {
  margin-top: 10px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: #fff;
  text-decoration: none;
  border-radius: var(--border-radius);
  margin-bottom: 8px;
  transition: var(--transition);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.sidebar a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: rgba(255, 255, 255, 0.25);
  transition: var(--transition);
}

.sidebar a:hover::before {
  width: 100%;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.sidebar a.active {
  background: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

.sidebar a i {
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
}

.sidebar a span {
  position: relative;
  z-index: 1;
}

.sidebar a.cta {
  background: rgba(176, 221, 29, 0.25);
}

.sidebar a.logout {
  margin-top: auto;
  background: rgba(127, 29, 29, 0.18);
  border: 1px solid rgba(255, 214, 220, 0.22);
  color: #fff1f3;
  box-shadow: inset 0 1px 0 rgba(255, 240, 242, 0.08);
}

.sidebar a.logout:hover {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(185, 28, 28, 0.95)) !important;
  border-color: rgba(255, 230, 234, 0.5);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.32);
}

.sidebar a.logout i,
.sidebar a.logout span {
  color: inherit;
}

/* Main Content */
.main {
  margin-left: var(--sidebar-width);
  padding: 30px;
  min-height: 100vh;
}

/* Header */
.page-header {
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.card-hover:hover {
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  transform: translateY(-2px);
}

.section-title {
  color: var(--first-color);
}

.form-control {
  font-size: 0.813rem;
}

.form-control:focus {
  border-color: var(--first-color);
  box-shadow: 0 0 0 0.2rem var(--shadow-effect);
}

.readonly {
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
  border: 1px solid var(--first-color);
  color: #495057;
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
    padding: 20px 15px;
  }
}

@media (max-width: 576px) {
  .page-header .btn {
    width: 100%;
  }
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1001;
  background: var(--first-color);
  border: none;
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--card-shadow);
}

@media (max-width: 992px) {
  .menu-toggle {
    display: flex;
  }
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 3px;
  background-color: #fff;
  transition: all 0.3s;
  position: relative;
}

.menu-toggle span:nth-child(2) {
  background-color: var(--secondary-color);
}

/* Animações */
.active.menu-toggle span:nth-child(1) {
  animation: ease 0.7s rotateTopBurger forwards;
}

.not-active.menu-toggle span:nth-child(1) {
  animation: ease 0.7s rotateTopBurgerReverse forwards;
}

.active.menu-toggle span:nth-child(2) {
  animation: ease 0.7s scaleOut forwards;
}

.not-active.menu-toggle span:nth-child(2) {
  animation: ease 0.7s scaleIn forwards;
}

.active.menu-toggle span:nth-child(3) {
  animation: ease 0.7s rotateBottomBurger forwards;
  background-color: var(--secondary-color);
}

.not-active.menu-toggle span:nth-child(3) {
  animation: ease 0.7s rotateBottomBurgerReverse forwards;
}

/* Keyframes originais */
@keyframes rotateTopBurger {
  0% {
    top: 0;
    transform: rotate(0);
  }
  50% {
    top: 6px;
    transform: rotate(0);
  }
  100% {
    top: 6px;
    transform: rotate(45deg);
  }
}

@keyframes rotateTopBurgerReverse {
  0% {
    top: 6px;
    transform: rotate(45deg);
  }
  50% {
    top: 6px;
    transform: rotate(0deg);
  }
  100% {
    top: 0;
    transform: rotate(0deg);
  }
}

@keyframes rotateBottomBurger {
  0% {
    top: 0;
    transform: rotate(0);
  }
  50% {
    top: -8px;
    transform: rotate(0);
  }
  100% {
    top: -8px;
    transform: rotate(135deg);
  }
}

@keyframes rotateBottomBurgerReverse {
  0% {
    top: -6px;
    transform: rotate(135deg);
  }
  50% {
    top: -6px;
    transform: rotate(0);
  }
  100% {
    top: 0;
    transform: rotate(0);
  }
}

@keyframes scaleOut {
  50%,
  100% {
    transform: scale(0);
  }
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.overlay.active {
  display: block;
}

/*check.php*/
.portal-card-header {
  background: linear-gradient(135deg, #0b573e 0%, #1aaf7e 100%);
}
.portal-documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

/* documents.php */
/* ── Cards ──────────────────────────────────────────────────── */
.doc-card {
  border: 1px solid #eef0f4 !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  background: #fff;
  transition:
    box-shadow 0.22s ease,
    transform 0.22s ease,
    border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}

.doc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #e2e5ea;
  border-radius: 14px 0 0 14px;
  transition: background 0.22s ease;
}

.doc-card.enviado::before {
  background: linear-gradient(180deg, #20c997, #0f9b6e);
}
.doc-card.pendente::before {
  background: linear-gradient(180deg, #ffc107, #e0a800);
}
.doc-card.correcao::before {
  background: linear-gradient(180deg, #fd7e14, #e25c00);
}

.doc-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px);
  border-color: #d4d8e0 !important;
}

/* ── Ícone do documento ─────────────────────────────────────── */
.doc-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.doc-icon.enviado {
  background: #eafaf4;
  color: #0f9b6e;
}
.doc-icon.pendente {
  background: #fff8e1;
  color: #c79000;
}
.doc-icon.correcao {
  background: #fff3e8;
  color: #e25c00;
}

/* ── Textos ─────────────────────────────────────────────────── */
.doc-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1f2e;
  line-height: 1.3;
}

.doc-status {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}
.doc-status.enviado {
  color: #0f9b6e;
}
.doc-status.pendente {
  color: #c79000;
}
.doc-status.correcao {
  color: #e25c00;
}

/* ── Botão Visualizar ───────────────────────────────────────── */
.btn-visualizar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid #d0d8f0;
  color: #0b573e;
  background: #f4f6ff;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.btn-visualizar:hover,
.btn-visualizar.active {
  background: #0b573e;
  color: #fff;
  border-color: #0b573e;
  box-shadow: 0 3px 12px hsla(160, 77%, 19%, 0.7);
}

/* ── Preview inline ─────────────────────────────────────────── */
.doc-preview-area {
  display: none;
  margin-top: 14px;
  border-top: 1px solid #f0f2f5;
  padding-top: 14px;
  animation: fadeSlideIn 0.22s ease;
}

.doc-preview-area.open {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.doc-preview-area iframe {
  width: 100%;
  height: 280px;
  border: 1.5px solid #e8ecf5;
  border-radius: 10px;
  display: block;
  background: #f8f9fa;
}

.doc-preview-area .preview-loading,
.doc-preview-area .preview-error {
  text-align: center;
  font-size: 0.82rem;
  padding: 24px 0;
}
.doc-preview-area .preview-loading {
  color: #8a94a6;
}
.doc-preview-area .preview-error {
  color: #dc3545;
}

.doc-preview-img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 10px;
  border: 1.5px solid #e8ecf5;
  display: block;
  margin: 0 auto;
  background: #f8f9fa;
  cursor: zoom-in;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.doc-preview-img:hover {
  transform: scale(1.015);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.zoom-hint {
  text-align: center;
  font-size: 0.72rem;
  color: #b0b8c9;
  margin-top: 7px;
  letter-spacing: 0.01em;
}

/* ── Lightbox ───────────────────────────────────────────────── */
#doc-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 14, 26, 0.88);
  align-items: center;
  justify-content: center;
  animation: lbFadeIn 0.18s ease;
  cursor: zoom-out;
  backdrop-filter: blur(4px);
}

#doc-lightbox.open {
  display: flex;
}

@keyframes lbFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#doc-lightbox img {
  max-width: min(92vw, 960px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7);
  cursor: default;
  animation: lbImgIn 0.22s ease;
}

@keyframes lbImgIn {
  from {
    transform: scale(0.93);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#lb-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}
#lb-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

#lb-caption {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #00ff00;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 16px;
  border-radius: 50rem;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

/* home */
.portal-hero__logo {
  width: 198px;
  filter: drop-shadow(0 4px 14px rgba(58, 170, 140, 0.28));
  animation: floatLogo 3.6s ease-in-out infinite;
}

.portal-hero__description {
  max-width: 420px;
  line-height: 1.65;
}

.portal-hero__divider {
  width: 46px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #3aaa8c, #d0f0e8);
}

@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@media screen and (max-width: 768px) {
  .portal-hero__logo {
    width: 144px;
  }
}

@media screen and (max-width: 576px) {
  .main {
    padding: 0 !important;
    gap: 0 !important;
  }

  .portal-hero {
    min-height: 100vh;
    min-height: 100svh;
    padding: 2rem 1rem;
  }

  .portal-hero__logo {
    width: 96px;
  }

  .portal-hero__description {
    max-width: 320px;
    font-size: 0.95rem;
  }

  /* Setas animadas - Estilo adaptado */
  .portal-arrow-down {
    bottom: 70px;
    font-size: 1.25rem;
    color: var(--first-color);
  }

  .portal-arrow-down i {
    animation: scroll-down 2s infinite ease-in-out;
    animation-fill-mode: backwards;
  }

  .portal-arrow-down i:nth-child(1) {
    animation-delay: 0.3s;
  }

  .portal-arrow-down i:nth-child(2) {
    animation-delay: 0.6s;
  }

  .portal-arrow-down i:nth-child(3) {
    animation-delay: 0.9s;
  }

  /* Animação das setas - SÓ OPACITY E TOP */
  @keyframes scroll-down {
    0% {
      transform: translateY(-1rem);
      opacity: 0;
    }

    50% {
      transform: translateY(0);
      opacity: 1;
    }

    100% {
      transform: translateY(0.6rem);
      opacity: 0;
    }
  }

  /* Animação dos cards ao rolar - CENTRALIZADO */
  .portal-cards {
    opacity: 0;
    transform: translateY(30px);
    transition:
      opacity 0.6s ease,
      transform 0.6s ease;
    padding: 2rem 1rem;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
  }

  .portal-cards .row {
    width: 100%;
  }

  .portal-cards.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* Desktop - Cards sempre visíveis */
@media screen and (min-width: 577px) {
  .portal-cards {
    opacity: 1;
    transform: translateY(0);
  }
}
