.perfil-body {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--creme) 0%, var(--creme-escuro) 100%);
  color: var(--texto-escuro);
  display: flex;
  flex-direction: column;
}

body.page-hidden {
  opacity: 0;
  visibility: hidden;
}

.content-wrapper {
  width: 100%;
  flex: 1;
  padding: 88px 20px 40px;
}

.admin-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 66px;
  padding: 8px 16px;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(245, 234, 224, 0.88);
  border-bottom: 1px solid rgba(92, 48, 32, 0.12);
  box-shadow: 0 4px 20px rgba(92, 48, 32, 0.08);
  backdrop-filter: blur(14px);
  animation: slideDown 0.55s ease;
}

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

.header-left,
.header-right {
  width: 44px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-left { justify-content: flex-start; }
.header-right { justify-content: flex-end; }

.header-center {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.header-center h1 {
  margin: 0;
  font-family: var(--fonte-titulo);
  font-size: clamp(20px, 4vw, 25px);
  color: var(--marrom);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-link,
.hamburger-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--creme-claro);
  border: 1px solid rgba(92, 48, 32, 0.1);
  color: var(--marrom);
  box-shadow: 0 2px 10px rgba(92, 48, 32, 0.08);
  transition: all var(--transicao-normal);
}

.logo-link:hover,
.hamburger-btn:hover {
  transform: translateY(-2px);
  background: var(--marrom);
  color: var(--creme);
}

.header-logo-texto {
  display: flex;
  align-items: baseline;
  gap: 1px;
  transform: translateY(1px);
}

.header-logo-texto .logo-tua { font-size: 1.35rem; }
.header-logo-texto .logo-pele { font-size: 1rem; }

.logo-tua {
  font-family: var(--fonte-script), cursive;
  color: currentColor;
  line-height: 1;
  font-weight: 300;
  position: relative;
  z-index: 2;
}

.logo-pele {
  font-family: var(--fonte-titulo), serif;
  color: currentColor;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  position: relative;
  z-index: 1;
  -webkit-text-stroke: 0.03em currentColor;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1450;
  background: rgba(44, 24, 16, 0.45);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transicao-lenta);
}

.drawer-overlay.ativo {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  z-index: 1500;
  overflow-y: auto;
  background: var(--creme-claro);
  border-right: 1px solid rgba(92, 48, 32, 0.12);
  box-shadow: var(--sombra-xl);
  padding: var(--space-12) var(--space-6);
  transition: left var(--transicao-lenta);
}

.nav-drawer.aberto { left: 0; }

.drawer-brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: var(--space-10);
  color: var(--marrom);
}

.drawer-brand .logo-tua { font-size: 2.5rem; }
.drawer-brand .logo-pele { font-size: 1.8rem; }

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-full);
  color: var(--marrom);
  font-family: var(--fonte-corpo);
  font-size: var(--texto-md);
  font-weight: 700;
  transition: all var(--transicao-normal);
  text-decoration: none;
}

.drawer-nav a:hover,
.drawer-nav a.active {
  background: var(--marrom);
  color: var(--creme);
  transform: translateX(4px);
}

.profile-hero {
  width: min(100%, 980px);
  margin: 0 auto 22px;
  animation: contentIn 0.65s ease both;
}

@keyframes contentIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: var(--marrom);
  margin-bottom: 18px;
}

.hero-brand .logo-tua { font-size: clamp(3rem, 12vw, 5rem); }
.hero-brand .logo-pele { font-size: clamp(2rem, 8vw, 3.6rem); }

.employee-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(92, 48, 32, 0.1);
  box-shadow: 0 12px 36px rgba(92, 48, 32, 0.12);
  backdrop-filter: blur(12px);
}

.employee-photo-block { flex-shrink: 0; }

.photo-edit-btn {
  position: relative;
  width: 114px;
  height: 114px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(92, 48, 32, 0.25);
  box-shadow: 0 10px 24px rgba(92, 48, 32, 0.16);
  background: var(--creme-escuro);
}

.employee-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44, 24, 16, 0.55);
  color: var(--creme);
  font-size: 24px;
  opacity: 0;
  transition: opacity var(--transicao-normal);
}

.photo-edit-btn:hover .photo-overlay { opacity: 1; }

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

.employee-eyebrow {
  color: var(--marrom-medio);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  margin-bottom: 6px;
}

.employee-main-info h2 {
  font-size: clamp(2rem, 7vw, 3.1rem);
  margin: 0;
  color: var(--marrom);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-main-info p {
  color: var(--texto-medio);
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 4px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(93, 138, 94, 0.12);
  color: var(--sucesso);
  border: 1px solid rgba(93, 138, 94, 0.22);
  font-weight: 800;
  font-size: 12px;
}

.status-pill.secondary {
  background: rgba(92, 48, 32, 0.08);
  color: var(--marrom);
  border-color: rgba(92, 48, 32, 0.12);
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill.blocked {
  background: rgba(192, 57, 43, 0.1);
  color: var(--erro);
  border-color: rgba(192, 57, 43, 0.22);
}

.locked-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(92, 48, 32, 0.08);
  border: 1px solid rgba(92, 48, 32, 0.1);
}

.locked-notice i {
  color: var(--marrom);
  font-size: 20px;
  margin-top: 2px;
}

.locked-notice strong {
  display: block;
  color: var(--marrom);
  font-weight: 900;
  margin-bottom: 2px;
}

.locked-notice span {
  display: block;
  color: var(--texto-medio);
  font-size: 0.94rem;
  line-height: 1.55;
}

.profile-tabs {
  width: min(100%, 980px);
  margin: 0 auto 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar { display: none; }

.profile-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(92, 48, 32, 0.12);
  background: rgba(255, 255, 255, 0.58);
  color: var(--marrom);
  font-weight: 800;
  transition: all var(--transicao-normal);
}

.profile-tab:hover,
.profile-tab.active {
  background: var(--marrom);
  color: var(--creme);
  box-shadow: 0 10px 20px rgba(92, 48, 32, 0.16);
}

.profile-container {
  width: min(100%, 980px);
  margin: 0 auto;
}

.profile-section {
  display: none;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(92, 48, 32, 0.1);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 12px 36px rgba(92, 48, 32, 0.1);
  backdrop-filter: blur(10px);
  animation: sectionIn 0.35s ease both;
}

.profile-section.active { display: block; }

@keyframes sectionIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-heading {
  text-align: center;
  margin-bottom: 22px;
}

.section-heading h3 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 5vw, 2.25rem);
  color: var(--marrom);
}

.section-heading p {
  color: var(--texto-medio);
  max-width: 620px;
  margin: 0 auto;
}

.readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.readonly-field {
  position: relative;
  min-width: 0;
}

.readonly-field.full-width { grid-column: 1 / -1; }

.readonly-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--marrom);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.readonly-field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(92, 48, 32, 0.12);
  background: rgba(253, 248, 244, 0.85);
  color: var(--texto-escuro);
  font-weight: 700;
  outline: none;
  transition: all var(--transicao-normal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.readonly-field input[readonly] {
  color: var(--texto-medio);
  cursor: not-allowed;
}

.readonly-field input:not([readonly]):focus {
  border-color: var(--marrom);
  box-shadow: 0 0 0 4px rgba(92, 48, 32, 0.08);
}

.password-field input { padding-right: 48px; }

.toggle-password {
  position: absolute;
  right: 12px;
  bottom: 6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--marrom);
  background: rgba(92, 48, 32, 0.08);
  transition: all var(--transicao-normal);
}

.toggle-password:hover {
  background: var(--marrom);
  color: var(--creme);
}

.primary-action-btn {
  width: 100%;
  margin-top: 20px;
  min-height: 52px;
  border-radius: 999px;
  background: var(--marrom);
  color: var(--creme);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 12px 24px rgba(92, 48, 32, 0.16);
  transition: all var(--transicao-normal);
}

.primary-action-btn:hover {
  background: var(--marrom-medio);
  transform: translateY(-2px);
}

.primary-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.permission-card,
.goal-card,
.signature-card,
.password-card {
  margin-top: 20px;
  border-radius: 22px;
  background: rgba(253, 248, 244, 0.7);
  border: 1px solid rgba(92, 48, 32, 0.1);
  padding: 20px;
}

.permission-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.permission-header i {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(92, 48, 32, 0.1);
  color: var(--marrom);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.permission-header h4,
.signature-card h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--marrom);
  font-family: var(--fonte-corpo);
  font-weight: 900;
}

.permission-header p,
.signature-card p {
  color: var(--texto-medio);
  font-size: 0.94rem;
}

.permissions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(92, 48, 32, 0.1);
  color: var(--marrom);
  font-weight: 800;
  font-size: 12px;
}

.permission-chip.muted {
  color: var(--texto-suave);
  background: rgba(168, 136, 122, 0.14);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  min-width: 0;
  min-height: 120px;
  border-radius: 22px;
  padding: 18px;
  background: var(--creme-claro);
  border: 1px solid rgba(92, 48, 32, 0.1);
  box-shadow: 0 8px 20px rgba(92, 48, 32, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card span {
  color: var(--texto-medio);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-card strong {
  color: var(--marrom);
  font-size: clamp(1.3rem, 4vw, 2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.goal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--marrom);
  font-weight: 900;
  margin-bottom: 12px;
}

.goal-track {
  width: 100%;
  height: 22px;
  border-radius: 999px;
  background: rgba(92, 48, 32, 0.12);
  overflow: hidden;
  box-shadow: inset 0 3px 8px rgba(92, 48, 32, 0.12);
}

.goal-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--marrom), var(--marrom-claro));
  transition: width 0.8s ease;
}

.goal-card p {
  margin-top: 10px;
  font-size: 0.94rem;
}

.signature-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.signature-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--marrom);
  color: var(--creme);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 10px 20px rgba(92, 48, 32, 0.18);
}

.signature-lines {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.signature-lines span {
  color: var(--texto-medio);
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.painel-footer {
  text-align: center;
  padding: 28px 18px 34px;
  background: rgba(253, 248, 244, 0.7);
  border-top: 1px solid rgba(92, 48, 32, 0.08);
  margin-top: 30px;
}

.footer-logo-texto {
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: var(--marrom);
  margin-bottom: 8px;
}

.footer-logo-texto .logo-tua { font-size: 2.4rem; }
.footer-logo-texto .logo-pele { font-size: 1.7rem; }

.painel-footer p,
.footer-dev,
.footer-dev span {
  color: var(--texto-medio);
  font-size: 0.92rem;
}

.dev-link {
  color: var(--marrom);
  font-weight: 900;
}

.toast-message {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 9999;
  padding: 13px 18px;
  border-radius: 16px;
  background: rgba(93, 138, 94, 0.96);
  color: #fff;
  box-shadow: 0 12px 28px rgba(44, 24, 16, 0.2);
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  max-width: min(92vw, 520px);
  text-align: center;
}

.toast-message.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-message.error { background: rgba(192, 57, 43, 0.96); }

@media (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .content-wrapper { padding: 82px 14px 32px; }
  .employee-card {
    flex-direction: column;
    text-align: center;
    padding: 24px 18px;
  }
  .status-row { justify-content: center; }
  .locked-notice { text-align: left; }
  .profile-section { padding: 22px 16px; border-radius: 24px; }
  .readonly-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .signature-card { flex-direction: column; text-align: left; }
  .profile-tabs { justify-content: flex-start; padding-left: 2px; padding-right: 2px; }
  .nav-drawer { width: 286px; }
  .drawer-brand .logo-tua { font-size: 2.25rem; }
  .drawer-brand .logo-pele { font-size: 1.65rem; }
}

@media (max-width: 420px) {
  .employee-main-info h2 { white-space: normal; }
  .profile-tab { padding: 10px 14px; font-size: 13px; }
  .photo-edit-btn { width: 102px; height: 102px; }
}
