/* ============================================================
   Sistema de Portfólio — estilos
   --accent é injetado por aluna (cor de destaque do painel)
   ============================================================ */
:root {
    --accent: #c08a5e;
    --ink: #1d1b19;
    --muted: #8a817a;
    --bg: #faf7f3;
    --card: #ffffff;
    --line: #ece6df;
    --radius: 16px;
    --shadow: 0 10px 40px rgba(40, 30, 20, .08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Fraunces', 'Inter', serif; font-weight: 600; letter-spacing: -.01em; }
a { color: inherit; }

/* ===================== LINK NA BIO ===================== */
.bio-body {
    background:
        radial-gradient(1100px 700px at 50% -15%, color-mix(in srgb, var(--accent) 26%, transparent), transparent),
        radial-gradient(800px 500px at 85% 110%, color-mix(in srgb, var(--accent) 14%, transparent), transparent),
        var(--bg);
    min-height: 100vh;
    display: grid;
    place-items: start center;
    padding: 28px 18px 48px;
}
.bio { width: 100%; max-width: 470px; }
.bio-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(40,30,20,.14);
    overflow: hidden;
    text-align: center;
}
/* capa/banner */
.bio-cover { position: relative; height: 168px; overflow: hidden; background: color-mix(in srgb, var(--accent) 22%, #fff); }
.bio-cover img { width: 100%; height: 100%; object-fit: cover; }
.bio-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.18)); }
.bio-inner { padding: 22px 26px 30px; }
.bio-card.has-cover .bio-inner { padding-top: 0; }

.bio-avatar {
    width: 112px; height: 112px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    background: color-mix(in srgb, var(--accent) 22%, #fff);
    display: grid; place-items: center;
    border: 4px solid #fff;
    box-shadow: 0 8px 26px rgba(40,30,20,.18);
}
.bio-card.has-cover .bio-avatar { margin-top: -60px; position: relative; z-index: 2; }
.bio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bio-avatar span { font-family: 'Fraunces', serif; font-size: 36px; color: var(--accent); }
.bio-name { font-size: 27px; margin: 4px 0 3px; }
.bio-niche { color: var(--muted); margin: 0 auto 18px; font-size: 15px; max-width: 320px; }

/* redes — ícones circulares */
.bio-social { display: flex; justify-content: center; gap: 12px; margin: 0 0 22px; }
.bio-social a {
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--accent) 12%, #fff);
    color: var(--accent); text-decoration: none;
    transition: transform .12s ease, background .12s ease, color .12s ease;
}
.bio-social a:hover { transform: translateY(-3px); background: var(--accent); color: #fff; }
.bio-social svg { width: 20px; height: 20px; }

/* links / botões */
.bio-links { display: flex; flex-direction: column; gap: 12px; }
.bio-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 56px; padding: 12px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    text-decoration: none;
    font-weight: 600; color: var(--ink);
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.bio-btn:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 24px rgba(40,30,20,.1); }
.bio-btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 35%, transparent); }
/* botão com miniatura (estilo card) */
.bio-btn--rich { justify-content: flex-start; padding-left: 8px; text-align: left; }
.bio-btn-thumb { width: 44px; height: 44px; border-radius: 11px; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.bio-btn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bio-btn--rich .bio-btn-label { flex: 1; }
.bio-btn-label small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }

.bio-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 22px; }

@media (max-width: 420px) {
    .bio-cover { height: 140px; }
    .bio-avatar { width: 100px; height: 100px; }
    .bio-card.has-cover .bio-avatar { margin-top: -54px; }
    .bio-inner { padding: 20px 18px 26px; }
}

/* ===================== PORTFÓLIO ===================== */
.pf-body { background: var(--bg); }
.pf-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; max-width: 1100px; margin: 0 auto;
}
.pf-brand { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; text-decoration: none; }
.pf-navlink { text-decoration: none; color: var(--muted); font-size: 14px; }
.pf-navlink:hover { color: var(--accent); }

.pf-hero { position: relative; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.pf-hero-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(min(100%, 520px), 1fr);
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-radius: var(--radius);
    padding-bottom: 6px;
}
.pf-hero-slide { scroll-snap-align: center; }
.pf-hero-slide img {
    width: 100%; height: 440px; object-fit: cover;
    border-radius: var(--radius); display: block;
}
.pf-hero-placeholder {
    height: 360px; border-radius: var(--radius);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, #fff), color-mix(in srgb, var(--accent) 8%, #fff));
}
.pf-hero-overlay {
    position: absolute; left: 40px; bottom: 34px; color: #fff;
    text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.pf-hero-overlay h1 { font-size: clamp(28px, 5vw, 46px); margin: 0; }
.pf-hero-overlay p { margin: 4px 0 0; font-size: 17px; opacity: .95; }

.pf-about {
    max-width: 820px; margin: 56px auto; padding: 0 24px;
    display: flex; gap: 28px; align-items: center;
}
.pf-about-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow); }
.pf-about h2 { margin: 0 0 8px; font-size: 26px; }
.pf-about p { margin: 0; color: #534c45; }

.pf-works { max-width: 1100px; margin: 56px auto; padding: 0 24px; }
.pf-works h2 { font-size: 28px; margin: 0 0 6px; text-align: center; }
.pf-works-intro { text-align: center; color: var(--muted); margin: 0 auto 30px; max-width: 560px; }
.pf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}
.pf-item { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.pf-item img { width: 100%; height: 280px; object-fit: cover; display: block; transition: transform .4s ease; }
.pf-item:hover img { transform: scale(1.04); }
.pf-item figcaption { padding: 12px 14px; font-size: 14px; color: #534c45; }
.pf-empty { text-align: center; color: var(--muted); }

.pf-contact { text-align: center; padding: 60px 24px; }
.pf-contact h2 { font-size: 28px; margin: 0 0 20px; }
.pf-contact-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pf-btn {
    display: inline-block; padding: 13px 22px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 500;
    transition: transform .12s ease, box-shadow .12s ease;
}
.pf-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(40,30,20,.08); }
.pf-btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.pf-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 30px; border-top: 1px solid var(--line); }

@media (max-width: 640px) {
    .pf-about { flex-direction: column; text-align: center; }
    .pf-hero-slide img { height: 320px; }
    .pf-hero-overlay { left: 24px; bottom: 24px; }
}

/* ===================== ADMIN ===================== */
.admin-body {
    background: #f3f0ec;
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
}
.admin-top {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px 22px; position: sticky; top: 0; z-index: 5;
}
.admin-top nav { display: flex; align-items: center; gap: 18px; }
.admin-top a { text-decoration: none; color: var(--muted); font-size: 14px; }
.admin-top a:hover { color: var(--accent); }
.admin-top .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e0903a; margin-left: 2px; vertical-align: middle; }
.admin-wrap { max-width: 760px; margin: 0 auto; padding: 22px 20px 80px; }

/* abas do painel */
.admin-tabs {
    position: sticky; top: 53px; z-index: 4;
    display: flex; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 0 14px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.admin-tab {
    flex: 1 0 auto; text-align: center; white-space: nowrap;
    padding: 14px 18px; text-decoration: none;
    color: var(--muted); font-weight: 500; font-size: 15px;
    border-bottom: 2.5px solid transparent; margin-bottom: -1px;
}
.admin-tab:hover { color: var(--ink); }
.admin-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab-intro { color: var(--muted); font-size: 14px; margin: 2px 0 18px; line-height: 1.5; }
.tab-intro a { color: var(--accent); }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; margin-bottom: 18px;
}
.card h2 { margin: 0 0 16px; font-size: 19px; }
.muted { color: var(--muted); font-size: 14px; }

label { display: block; font-size: 13px; font-weight: 500; color: #4a443e; margin-bottom: 4px; }
input, textarea, select {
    width: 100%; padding: 10px 12px; font: inherit;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 4px;
}
input[type=color] { padding: 4px; height: 42px; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 .full { grid-column: 1 / -1; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.row > input { flex: 1; min-width: 160px; }

.btn {
    display: inline-block; padding: 11px 18px; border: 1px solid var(--line);
    background: #fff; border-radius: 10px; font: inherit; font-weight: 500; cursor: pointer;
    transition: transform .1s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--block { width: 100%; }
.linkbtn { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { color: var(--accent); }
.linkbtn--danger:hover { color: #c0564e; }

.list { list-style: none; margin: 0 0 8px; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: none; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.thumb { position: relative; width: 110px; height: 110px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb form { position: absolute; top: 4px; right: 4px; margin: 0; }
.thumb-del {
    width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(0,0,0,.6); color: #fff; font-size: 12px; line-height: 1;
}
.thumb-del:hover { background: #c0564e; }
.avatar-prev {
    width: 80px; height: 80px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: color-mix(in srgb, var(--accent) 20%, #fff); display: grid; place-items: center;
}
.avatar-prev img { width: 100%; height: 100%; object-fit: cover; }
.avatar-prev span { font-family: 'Fraunces', serif; font-size: 26px; color: var(--accent); }
.uploader { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

.section-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 6px; }
.section-photo { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.section-photo-title { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.section-photo-prev { height: 120px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; }
.section-photo-prev img { width: 100%; height: 100%; object-fit: cover; }

/* seletor de modelos */
.models { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.model {
    position: relative; text-align: left; cursor: pointer; font: inherit;
    border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 16px;
    display: flex; flex-direction: column; gap: 3px; transition: border-color .12s ease, transform .1s ease;
}
.model:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.model.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); }
.model.is-soon { opacity: .55; cursor: not-allowed; }
.model-name { font-weight: 600; }
.model-desc { font-size: 12.5px; color: var(--muted); }
.model-badge {
    position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 600;
    background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 999px;
}
.model-badge--soon { background: var(--surface-2); color: var(--muted); }
@media (max-width: 560px) { .models { grid-template-columns: 1fr; } }

.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.flash--ok { background: #e7f4ec; color: #2e7d4f; }
.flash--erro { background: #fbe9e7; color: #c0564e; }

/* login */
.admin-login { display: grid; place-items: center; padding: 30px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 360px; box-shadow: var(--shadow); }
.login-card h1 { font-family: 'Inter', sans-serif; font-size: 22px; margin: 0 0 4px; }
.login-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.login-card label { margin-bottom: 14px; }

@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* ===== upload: botão de arquivo PT-BR + barra de progresso ===== */
.file-ui { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.file-btn {
    padding: 9px 16px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--surface-2); font: inherit; font-weight: 500; cursor: pointer;
}
.file-btn:hover { border-color: var(--accent); }
.file-name { font-size: 13px; color: var(--muted); }
.up-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.up-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.up-name { flex: 0 0 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.up-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s ease; }
.up-pct { flex: 0 0 44px; text-align: right; color: var(--muted); }
.up-row.ok .up-pct { color: #2e7d4f; font-weight: 600; }
.up-row.err .up-pct { color: #c0564e; font-weight: 600; }
.up-row.err .up-bar i { background: #c0564e; }
.hint-sm { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ===== painel no celular ===== */
@media (max-width: 560px) {
    .admin-top { padding: 12px 16px; }
    .admin-top strong { font-size: 15px; }
    .admin-top nav { gap: 13px; }
    .admin-top a, .admin-top .linkbtn { font-size: 13px; }
    .admin-tabs { top: 49px; padding: 0 8px; }
    .admin-tab { padding: 13px 14px; font-size: 14.5px; flex: 1 1 0; }
    .admin-wrap { padding: 16px 14px 70px; }
    .card { padding: 17px 15px; margin-bottom: 14px; border-radius: 14px; }
    .card h2 { font-size: 17px; margin-bottom: 12px; }
    .thumb { width: calc(33.333% - 7px); height: auto; aspect-ratio: 1; }
    .btn { padding: 12px 16px; }
    .row > input, .row > select { min-width: 0; flex: 1 1 100%; }
    .row .btn { width: 100%; }
    .uploader { width: 100%; }
    .uploader input[type=file] { flex: 1 1 100%; min-width: 0; }
    input, textarea, select { font-size: 16px; } /* evita zoom no iOS */
}
