/* ── PONTE — Shared Styles ─────────────────────────────── */
:root {
  --primary: #7C3AED;
  --primary-light: #8B5CF6;
  --accent: #F59E0B;
  --success: #10B981;
  --teal: #06B6D4;
  --rose: #F43F5E;
  --dark: #0F0A1E;
  --dark2: #1E1A3A;
  --gray: #6B7280;
  --gray-light: #F3F4F6;
  --white: #FFFFFF;
  --sidebar-w: 260px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: #F8F7FF; color: var(--dark); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── LAYOUT ─────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR ─────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); background: var(--dark2); position: fixed;
  left: 0; top: 0; height: 100vh; display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto; border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo {
  padding: 1.4rem 1.5rem; display: flex; align-items: center; gap: .6rem;
  font-size: 1.3rem; font-weight: 800; text-decoration: none;
  background: linear-gradient(135deg, #A78BFA, var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.logo-icon {
  width: 32px; height: 32px; background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  -webkit-text-fill-color: white; font-size: .9rem;
}
.sidebar-user {
  padding: 1rem 1.5rem; display: flex; align-items: center; gap: .75rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.user-av {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: white; font-size: .88rem; flex-shrink: 0;
}
.user-name { font-size: .85rem; font-weight: 700; color: white; }
.user-role { font-size: .7rem; color: #94A3B8; }
.sidebar-nav { padding: .8rem; flex: 1; }
.nav-group-label {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #475569; padding: .5rem .75rem; margin-top: .3rem;
}
.nav-item {
  display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem;
  border-radius: 10px; color: #94A3B8; font-size: .85rem; font-weight: 600;
  transition: all .2s; margin-bottom: .15rem; text-decoration: none; cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: white; }
.nav-item.active { background: rgba(124,58,237,.25); color: white; }
.nav-icon {
  width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: .88rem; background: rgba(255,255,255,.06); flex-shrink: 0;
}
.nav-item.active .nav-icon { background: var(--primary); }
.nav-badge {
  margin-left: auto; background: var(--primary); color: white;
  padding: .1rem .45rem; border-radius: 100px; font-size: .62rem; font-weight: 700;
}

/* ── MAIN ─────────────────────────────── */
.main { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  background: white; border-bottom: 1px solid #E5E7EB;
  padding: 0 2rem; height: 62px; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: .95rem; font-weight: 700; color: var(--dark); }
.topbar-right { display: flex; align-items: center; gap: .8rem; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid #E5E7EB;
  background: white; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: .9rem; position: relative; transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--primary); }
.notif-dot {
  position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  background: var(--rose); border-radius: 50%; border: 2px solid white;
}
.page-content { padding: 1.8rem; flex: 1; }

/* ── CARDS ─────────────────────────────── */
.card { background: white; border: 1px solid #E5E7EB; border-radius: 18px; overflow: hidden; }
.card-header {
  padding: 1.1rem 1.4rem; border-bottom: 1px solid #F3F4F6;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
}
.card-title { font-size: .95rem; font-weight: 800; color: var(--dark); }
.card-body { padding: 1.4rem; }
.card-action { font-size: .8rem; color: var(--primary); font-weight: 700; cursor: pointer; background: none; border: none; font-family: inherit; text-decoration: none; }

/* ── STATS GRID ─────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: white; border: 1px solid #E5E7EB; border-radius: 16px; padding: 1.2rem;
  display: flex; align-items: center; gap: .9rem; transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,.07); }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.si-purple { background: rgba(124,58,237,.1); }
.si-teal { background: rgba(6,182,212,.1); }
.si-amber { background: rgba(245,158,11,.1); }
.si-green { background: rgba(16,185,129,.1); }
.si-rose { background: rgba(244,63,94,.1); }
.stat-val { font-size: 1.4rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-lbl { font-size: .73rem; color: var(--gray); margin-top: .2rem; }
.stat-chg { font-size: .68rem; font-weight: 700; margin-top: .25rem; }
.chg-up { color: var(--success); }

/* ── FORMS ─────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .8rem; font-weight: 700; color: var(--dark); margin-bottom: .35rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: .72rem 1rem; border: 1.5px solid #E5E7EB; border-radius: 10px;
  font-family: inherit; font-size: .88rem; color: var(--dark); background: white;
  transition: border-color .2s; outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── BUTTONS ─────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: .9rem; padding: .65rem 1.5rem; border-radius: 10px;
  box-shadow: 0 4px 15px rgba(124,58,237,.35); transition: all .2s;
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(124,58,237,.45); }
.btn-primary:disabled { opacity: .6; transform: none; cursor: not-allowed; }
.btn-outline {
  background: transparent; border: 1.5px solid #E5E7EB; color: var(--gray);
  cursor: pointer; font-family: inherit; font-weight: 600; font-size: .88rem;
  padding: .65rem 1.4rem; border-radius: 10px; transition: all .2s;
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: rgba(244,63,94,.1); border: 1px solid rgba(244,63,94,.2); color: var(--rose); cursor: pointer; font-family: inherit; font-weight: 700; font-size: .88rem; padding: .6rem 1.3rem; border-radius: 10px; transition: all .2s; }
.btn-danger:hover { background: rgba(244,63,94,.2); }
.btn-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.2); color: var(--success); cursor: pointer; font-family: inherit; font-weight: 700; font-size: .85rem; padding: .4rem 1rem; border-radius: 8px; transition: all .2s; }
.btn-success:hover { background: rgba(16,185,129,.2); }
.btn-sm { padding: .35rem .85rem; border-radius: 8px; font-size: .78rem; }

/* ── BADGES ─────────────────────────────── */
.badge { padding: .22rem .7rem; border-radius: 100px; font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; gap: .25rem; }
.badge-purple { background: rgba(124,58,237,.08); color: var(--primary); border: 1px solid rgba(124,58,237,.2); }
.badge-green { background: rgba(16,185,129,.08); color: var(--success); border: 1px solid rgba(16,185,129,.2); }
.badge-amber { background: rgba(245,158,11,.1); color: var(--accent); border: 1px solid rgba(245,158,11,.2); }
.badge-rose { background: rgba(244,63,94,.08); color: var(--rose); border: 1px solid rgba(244,63,94,.2); }
.badge-gray { background: rgba(107,114,128,.08); color: var(--gray); border: 1px solid rgba(107,114,128,.2); }
.badge-teal { background: rgba(6,182,212,.08); color: var(--teal); border: 1px solid rgba(6,182,212,.2); }

/* ── PROJECT CARDS ─────────────────────────── */
.project-card {
  background: white; border: 1px solid #E5E7EB; border-radius: 18px; padding: 1.3rem;
  transition: transform .25s, box-shadow .25s, border-color .25s; cursor: pointer; position: relative;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  transform: scaleX(0); transition: transform .3s; transform-origin: left; border-radius: 18px 18px 0 0;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 12px 35px rgba(124,58,237,.12); border-color: rgba(124,58,237,.2); }
.project-card:hover::before { transform: scaleX(1); }
.project-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .9rem; }
.company-logo {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: white; font-size: .85rem;
}
.project-title { font-size: .92rem; font-weight: 700; color: var(--dark); margin-bottom: .4rem; line-height: 1.3; }
.project-desc { font-size: .8rem; color: var(--gray); line-height: 1.5; margin-bottom: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.skill-tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.skill-tag { background: rgba(124,58,237,.07); color: var(--primary); border: 1px solid rgba(124,58,237,.15); padding: .17rem .6rem; border-radius: 6px; font-size: .7rem; font-weight: 600; }
.project-footer { display: flex; justify-content: space-between; align-items: center; padding-top: .9rem; border-top: 1px solid #F3F4F6; }
.project-value { font-size: 1rem; font-weight: 800; color: var(--dark); }
.project-duration { font-size: .7rem; color: var(--gray); margin-top: .15rem; }
.btn-apply {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: .78rem; padding: .48rem 1rem; border-radius: 9px;
  box-shadow: 0 3px 10px rgba(124,58,237,.3); transition: all .2s; text-decoration: none;
}
.btn-apply:hover { transform: scale(1.04); }

/* ── MODAL ─────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center;
  justify-content: center; padding: 1rem; background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
}
.modal-box {
  background: white; border-radius: 22px; width: 100%; max-width: 560px;
  position: relative; z-index: 1; max-height: 90vh; overflow-y: auto;
}
.modal-header { padding: 1.4rem 1.5rem; border-bottom: 1px solid #F3F4F6; display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 1.1rem; font-weight: 800; color: var(--dark); }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.3rem; color: var(--gray); }
.modal-body { padding: 1.4rem; }
.modal-footer { padding: 1rem 1.4rem; border-top: 1px solid #F3F4F6; display: flex; gap: .8rem; }

/* ── TOAST ─────────────────────────────── */
.toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 500;
  background: var(--dark2); color: white; padding: .9rem 1.4rem; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: .88rem; font-weight: 600;
  display: flex; align-items: center; gap: .6rem;
  animation: slideUp .3s ease-out; border-left: 4px solid var(--success);
}
.toast.error { border-left-color: var(--rose); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── EMPTY STATE ─────────────────────────── */
.empty-state { text-align: center; padding: 3rem 2rem; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-title { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: .4rem; }
.empty-desc { font-size: .85rem; color: var(--gray); }

/* ── LOADING ─────────────────────────────── */
.loading { display: flex; align-items: center; justify-content: center; padding: 3rem; }
.spinner {
  width: 36px; height: 36px; border: 3px solid rgba(124,58,237,.2);
  border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PROGRESS BAR ─────────────────────────── */
.progress-bar { height: 5px; background: #F3F4F6; border-radius: 100px; margin-top: .5rem; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 100px; transition: width .8s; }
.pf-green { background: var(--success); }
.pf-purple { background: var(--primary); }
.pf-amber { background: var(--accent); }

/* ── TABS ─────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid #E5E7EB; margin-bottom: 1.5rem; gap: .2rem; flex-wrap: wrap; }
.tab-btn {
  padding: .75rem 1.1rem; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: .86rem; font-weight: 600; color: var(--gray);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; white-space: nowrap;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── AVATAR COLORS ─────────────────────────── */
.av-purple { background: linear-gradient(135deg, #7C3AED, #8B5CF6); }
.av-teal { background: linear-gradient(135deg, #0891B2, #06B6D4); }
.av-amber { background: linear-gradient(135deg, #D97706, #F59E0B); }
.av-rose { background: linear-gradient(135deg, #E11D48, #F43F5E); }
.av-green { background: linear-gradient(135deg, #059669, #10B981); }
.av-indigo { background: linear-gradient(135deg, #4338CA, #6366F1); }

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 1100px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── MOBILE HAMBURGER MENU ───────────────────────────── */
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: .4rem;
}
.hamburger span {
  display: block; width: 22px; height: 2.5px; background: var(--dark);
  border-radius: 2px; transition: all .3s;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 99; backdrop-filter: blur(2px);
}
.sidebar-close {
  display: none; position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.1); border: none; color: white;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  font-size: 1.1rem; align-items: center; justify-content: center;
}
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .sidebar-close { display: flex; }
  .main { margin-left: 0 !important; }
  .page-content { padding: 1rem !important; }
  .topbar { padding: 0 1rem !important; }
}

/* ── FIREBASE STORAGE UPLOAD ─────────────────────────── */
.upload-zone {
  border: 2px dashed #D1D5DB; border-radius: 14px; padding: 2rem;
  text-align: center; cursor: pointer; transition: all .2s;
  background: #FAFAFA;
}
.upload-zone:hover { border-color: var(--primary); background: rgba(124,58,237,.03); }
.upload-zone input[type=file] { display: none; }
.upload-zone .upload-icon { font-size: 2rem; margin-bottom: .5rem; }
.upload-zone .upload-label { font-size: .88rem; color: var(--gray); }
.upload-zone .upload-label strong { color: var(--primary); }
.uploaded-files { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.uploaded-file {
  display: flex; align-items: center; gap: .75rem; padding: .65rem 1rem;
  background: rgba(124,58,237,.05); border: 1px solid rgba(124,58,237,.15);
  border-radius: 10px; font-size: .83rem;
}
.uploaded-file .file-icon { font-size: 1.1rem; }
.uploaded-file .file-name { flex: 1; color: var(--dark); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploaded-file .file-remove { background: none; border: none; cursor: pointer; color: var(--rose); font-size: 1rem; padding: 0; }
.upload-progress { height: 4px; background: #E5E7EB; border-radius: 4px; margin-top: .4rem; overflow: hidden; }
.upload-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--teal)); border-radius: 4px; transition: width .3s; }
.img-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .75rem; margin-top: 1rem; }
.img-preview { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid #E5E7EB; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview .remove-img { position: absolute; top: .25rem; right: .25rem; background: rgba(0,0,0,.6); color: white; border: none; border-radius: 4px; width: 20px; height: 20px; cursor: pointer; font-size: .7rem; display: flex; align-items: center; justify-content: center; }

/* ── PAYMENT STYLES ──────────────────────────────────── */
.payment-method-tabs { display: flex; gap: .75rem; margin-bottom: 2rem; flex-wrap: wrap; }
.pay-tab {
  flex: 1; min-width: 100px; padding: .9rem 1rem; border: 2px solid #E5E7EB;
  border-radius: 14px; cursor: pointer; transition: all .2s; text-align: center;
  background: white; font-family: inherit;
}
.pay-tab:hover { border-color: var(--primary); }
.pay-tab.active { border-color: var(--primary); background: rgba(124,58,237,.06); }
.pay-tab .pay-icon { font-size: 1.5rem; margin-bottom: .3rem; }
.pay-tab .pay-label { font-size: .8rem; font-weight: 700; color: var(--dark); }
.card-input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pix-qr { text-align: center; padding: 2rem; }
.pix-qr .qr-img { width: 200px; height: 200px; margin: 0 auto 1.2rem; border: 2px solid #E5E7EB; border-radius: 12px; padding: .5rem; }
.pix-code-box { background: #F8F7FF; border: 1px solid #E5E7EB; border-radius: 10px; padding: .9rem 1.2rem; font-family: monospace; font-size: .75rem; color: var(--dark); word-break: break-all; margin-bottom: 1rem; }
.boleto-box { padding: 2rem; text-align: center; }
.boleto-barcode { background: #F8F7FF; border: 1px solid #E5E7EB; border-radius: 10px; padding: 1.5rem; font-family: monospace; font-size: .8rem; letter-spacing: .15em; margin-bottom: 1rem; word-break: break-all; }
.payment-history-item {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  border-bottom: 1px solid #F3F4F6;
}
.payment-history-item:last-child { border-bottom: none; }
.pay-hist-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.pay-hist-info { flex: 1; }
.pay-hist-title { font-size: .88rem; font-weight: 700; color: var(--dark); }
.pay-hist-meta { font-size: .78rem; color: var(--gray); margin-top: .15rem; }
.pay-hist-amount { font-weight: 800; font-size: 1rem; }
.amount-out { color: var(--rose); }
.amount-in { color: var(--success); }

/* ── PROFILE ENHANCEMENTS ────────────────────────────── */
.profile-section-card { background: white; border: 1px solid #E5E7EB; border-radius: 18px; overflow: hidden; margin-bottom: 1.2rem; }
.profile-section-header { padding: 1rem 1.4rem; border-bottom: 1px solid #F3F4F6; display: flex; justify-content: space-between; align-items: center; }
.profile-section-body { padding: 1.4rem; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.info-item .label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray); margin-bottom: .25rem; }
.info-item .value { font-size: .92rem; font-weight: 600; color: var(--dark); }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.portfolio-card { border: 1px solid #E5E7EB; border-radius: 12px; overflow: hidden; transition: transform .2s; }
.portfolio-card:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,.08); }
.portfolio-card-img { height: 120px; background: linear-gradient(135deg, rgba(124,58,237,.1), rgba(6,182,212,.1)); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.portfolio-card-img img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-card-info { padding: .75rem; }
.portfolio-card-title { font-size: .85rem; font-weight: 700; color: var(--dark); margin-bottom: .25rem; }
.portfolio-card-link { font-size: .78rem; color: var(--primary); font-weight: 600; }
