:root {
  --bg: #f3efe6;
  --bg-deep: #e7dfd0;
  --ink: #1c2430;
  --muted: #5c6673;
  --accent: #0f6b5c;
  --accent-2: #c45c26;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(28, 36, 48, 0.12);
  --shadow: 0 18px 50px rgba(28, 36, 48, 0.08);
  --radius: 18px;
  --font: "Nunito", sans-serif;
  --display: "Nunito", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d9efe8 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #f3d9c8 0%, transparent 50%),
    linear-gradient(180deg, var(--bg), #f7f4ee 40%, var(--bg-deep));
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }

.container { width: min(1140px, calc(100% - 2rem)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(243, 239, 230, 0.85);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
}
.brand { display: flex; align-items: center; gap: .8rem; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #178f7b);
  color: #fff; font-weight: 800; font-size: 1.2rem;
}
.brand-logo { width: 46px; height: 46px; object-fit: cover; border-radius: 14px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--display); font-size: 1.15rem; }
.brand-text small { color: var(--muted); font-size: .78rem; }

.main-nav { display: flex; align-items: center; gap: 1.2rem; }
.main-nav ul { display: flex; gap: 1rem; flex-wrap: wrap; }
.main-nav a { font-weight: 600; font-size: .95rem; color: var(--muted); }
.main-nav a:hover { color: var(--accent); }
.main-nav .btn-primary,
.main-nav .btn-primary:hover { color: #fff; }
.nav-actions { display: flex; gap: .55rem; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; padding: .7rem 1.1rem; border-radius: 999px;
  border: 1px solid transparent; font-weight: 700; cursor: pointer;
  transition: .2s ease; font-family: inherit; font-size: .92rem;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-1px); background: #0c574b; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-accent { background: var(--accent-2); color: #fff; }
.btn-danger { background: #b42318; color: #fff; }
.btn-sm { padding: .45rem .8rem; font-size: .85rem; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; margin: 7px 0; background: var(--ink); border-radius: 2px;
}

.flash { margin: 1rem auto; padding: .9rem 1rem; border-radius: 12px; font-weight: 600; }
.flash-success { background: #e7f7ef; color: #0f6b5c; }
.flash-error { background: #fdecea; color: #b42318; }

.hero-slider {
  position: relative; overflow: hidden;
  min-height: min(72vh, 620px);
  background: #1c2430;
}
.slider-track {
  display: flex; width: 100%; height: min(72vh, 620px);
  transition: transform .7s ease;
}
.slide {
  min-width: 100%; height: 100%;
  background-size: cover; background-position: center;
  position: relative;
}
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15, 25, 32, .72), rgba(15, 25, 32, .25));
}
.slide-content {
  position: absolute; z-index: 2; left: max(1rem, calc((100% - 1140px) / 2));
  bottom: 18%; color: #fff; max-width: 520px;
}
.slide-content h2 {
  font-family: var(--display); font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0 0 .6rem; line-height: 1.1;
}
.slide-content p { margin: 0; font-size: 1.05rem; opacity: .92; }
.slider-dots {
  position: absolute; z-index: 3; left: 50%; bottom: 1.4rem;
  transform: translateX(-50%); display: flex; gap: .45rem;
}
.slider-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.45); cursor: pointer;
}
.slider-dots button.active { background: #fff; }

.section { padding: 4.5rem 0; }
.section-head { margin-bottom: 2rem; max-width: 640px; }
.section-head h2 {
  font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 0 0 .5rem;
}
.section-head p { margin: 0; color: var(--muted); }

.about-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center;
}
.about-media {
  border-radius: var(--radius); overflow: hidden; min-height: 360px;
  background: linear-gradient(145deg, #0f6b5c, #1c2430);
  box-shadow: var(--shadow);
}
.about-media img { width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.about-copy {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow);
}
.about-copy p { color: var(--muted); line-height: 1.7; }

.cards-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
}
.card-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.card-item:hover { transform: translateY(-4px); }
.card-item img { width: 100%; height: 190px; object-fit: cover; background: #d7e5e1; }
.card-item .card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card-item h3 { margin: 0 0 .45rem; font-size: 1.1rem; }
.card-item p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.card-placeholder {
  height: 190px; display: grid; place-items: center;
  background: linear-gradient(135deg, #d7e5e1, #f0e2d6); color: var(--accent); font-weight: 800;
}

.faq-list { display: grid; gap: .8rem; }
.faq-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; padding: 1rem 1.2rem;
  background: transparent; border: 0; font: inherit; font-weight: 700;
  cursor: pointer; color: var(--ink);
}
.faq-a { display: none; padding: 0 1.2rem 1rem; color: var(--muted); line-height: 1.65; }
.faq-item.open .faq-a { display: block; }

.testimonial-slider { overflow: hidden; position: relative; }
.testimonial-track { display: flex; transition: transform .7s ease; }
.testimonial-card {
  min-width: 100%;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
}
.testimonial-card p { font-size: 1.1rem; line-height: 1.7; margin: 0 0 1rem; }
.testimonial-meta { display: flex; align-items: center; gap: .8rem; }
.testimonial-meta img {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #ddd;
}
.testimonial-meta strong { display: block; }
.testimonial-meta span { color: var(--muted); font-size: .9rem; }

.contact-wrap {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 1.5rem;
}
.panel, .form-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.form-grid { display: grid; gap: .9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; }
input, textarea, select {
  width: 100%; padding: .75rem .9rem; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; font: inherit; color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
.auth-page {
  min-height: 70vh; display: grid; place-items: center; padding: 2rem 0 4rem;
}
.auth-card { width: min(460px, 100%); }

.detail-page { padding: 3rem 0 4rem; }
.detail-hero img {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 1.4rem; box-shadow: var(--shadow);
}
.detail-page h1 { font-family: var(--display); margin: 0 0 1rem; }
.detail-page .content { color: var(--muted); line-height: 1.75; white-space: pre-wrap; }

.site-footer {
  margin-top: 3rem;
  background: #162029;
  color: #e8eef2;
}
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem;
}
.footer-brand strong { font-family: var(--display); font-size: 1.4rem; }
.footer-brand p, .footer-contact p { color: #aeb8c2; }
.footer-links h4, .footer-contact h4 { margin: 0 0 .8rem; }
.footer-links a { color: #c9d3db; display: inline-block; margin-bottom: .45rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1rem 0 1.4rem; color: #8f9aa5; font-size: .9rem;
}

/* CV builder */
.cv-builder { padding: 2rem 0 4rem; }
.template-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem;
}
.template-card {
  border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; background: #fff; transition: .2s;
}
.template-card img { width: 100%; height: 280px; object-fit: cover; object-position: top; }
.template-card.selected, .template-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.template-card span { display: block; padding: .8rem 1rem; font-weight: 700; }
.repeater-block {
  border: 1px dashed var(--line); border-radius: 14px; padding: 1rem; margin-bottom: 1rem;
  background: rgba(255,255,255,.55);
}
.repeater-block h3 { margin: 0 0 .8rem; font-size: 1rem; }
.repeater-items { display: grid; gap: .8rem; margin-bottom: .8rem; }
.repeater-item {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem;
  display: grid; gap: .7rem;
}
.add-btn { background: transparent; border: 1px dashed var(--accent); color: var(--accent); }

/* CV templates preview */
.cv-preview-wrap { padding: 2rem 0 4rem; }
.cv-sheet {
  width: min(900px, 100%); margin: 0 auto 1.5rem;
  background: #fff; box-shadow: var(--shadow); border-radius: 8px; overflow: hidden;
}
.cv-actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }

.cv-t1 { display: grid; grid-template-columns: 320px 1fr; min-height: 1100px; font-size: 13px; }
.cv-t1 .side { background: #efefef; padding: 28px 22px; }
.cv-t1 .main { padding: 36px 28px; }
.cv-t1 .photo-wrap {
  width: 140px; height: 140px; border-radius: 50%; overflow: hidden;
  background: #f5c400; margin-bottom: 18px; border: 6px solid #f5c400;
}
.cv-t1 .photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cv-t1 h1 { margin: 0; font-size: 28px; letter-spacing: 1px; }
.cv-t1 .job { color: #666; margin: 6px 0 18px; }
.cv-t1 h3 { margin: 18px 0 8px; border-bottom: 2px solid #f5c400; padding-bottom: 4px; font-size: 14px; }
.cv-t1 .bar { width: 4px; background: #f5c400; margin-right: 10px; }

.cv-t2 { display: grid; grid-template-columns: 300px 1fr; min-height: 1100px; font-size: 13px; color: #333; }
.cv-t2 .side { background: #2f3338; color: #fff; padding: 28px 20px; position: relative; }
.cv-t2 .side::before {
  content: ""; position: absolute; top: 0; left: 0; border-top: 70px solid #f5b400; border-right: 70px solid transparent;
}
.cv-t2 .main { padding: 36px 28px; }
.cv-t2 .photo-wrap {
  width: 130px; height: 130px; border-radius: 50%; overflow: hidden; margin: 20px auto 20px; border: 3px solid #f5b400;
}
.cv-t2 .photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cv-t2 h1 { margin: 0; font-size: 30px; }
.cv-t2 h1 span { color: #f5b400; }
.cv-t2 h3 { color: #f5b400; margin: 18px 0 8px; font-size: 14px; text-transform: uppercase; }
.cv-t2 .progress { height: 7px; background: #e6e6e6; border-radius: 10px; overflow: hidden; margin: 4px 0 10px; }
.cv-t2 .progress i { display: block; height: 100%; background: #f5b400; }

.cv-t3 { display: grid; grid-template-columns: 300px 1fr; min-height: 1100px; font-size: 13px; }
.cv-t3 .side { padding: 28px 22px; border-right: 1px solid #ddd; }
.cv-t3 .main { padding: 36px 28px; }
.cv-t3 .photo-wrap {
  width: 140px; height: 140px; border-radius: 50%; overflow: hidden; margin: 0 auto 14px; background: #ccd;
}
.cv-t3 .photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cv-t3 h1 { text-align: center; margin: 0; font-size: 26px; color: #1f3a5f; }
.cv-t3 .job { text-align: center; color: #777; margin: 4px 0 18px; }
.cv-t3 h3 { color: #1f3a5f; border-bottom: 1px solid #ccc; padding-bottom: 4px; margin: 18px 0 8px; font-size: 13px; letter-spacing: 1px; }
.cv-t3 .dots span {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #d0d0d0; margin-right: 2px;
}
.cv-t3 .dots span.on { background: #1f3a5f; }

/* User panel */
.user-panel { padding: 2.5rem 0 4rem; }
.stats-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; box-shadow: var(--shadow);
}
.stat-box strong { display: block; font-size: 1.5rem; margin-top: .3rem; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
table.data th, table.data td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .92rem; }
table.data th { background: #eef3f1; }
.badge {
  display: inline-block; padding: .25rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
}
.badge-pending { background: #fff4e5; color: #b54708; }
.badge-approved { background: #e7f7ef; color: #0f6b5c; }
.badge-rejected { background: #fdecea; color: #b42318; }

@media (max-width: 960px) {
  .about-grid, .contact-wrap, .footer-grid, .cards-grid, .template-grid, .stats-mini,
  .cv-t1, .cv-t2, .cv-t3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 78px;
    background: rgba(243, 239, 230, .98); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 1rem;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; }
  .cards-grid { grid-template-columns: 1fr; }
}
