/* =====================================================================
   L.F.QUEL  —  Modern Black & Orange theme
   Author: L.F.QUEL
   Mobile-first, responsive (PC / tablet / celular)
   ===================================================================== */

/* ---------- Tokens / Variáveis ---------- */
:root {
    --bg:            #0d0d0f;       /* preto profundo */
    --bg-soft:       #141417;
    --panel:         #16161a;
    --panel-2:       #1c1c21;
    --panel-hover:   #22222a;
    --border:        #27272b;
    --border-soft:   #1f1f23;
    --text:          #ededee;
    --text-soft:     #c6c6cc;
    --muted:         #8a8a93;
    --orange:        #ff7a1a;
    --orange-soft:   #ff9248;
    --orange-deep:   #e0641a;
    --orange-glow:   rgba(255,122,26,.45);
    --success:       #2ecc71;
    --danger:        #e74c3c;
    --warning:       #f1c40f;
    --radius-sm:     8px;
    --radius:        12px;
    --radius-lg:     18px;
    --shadow-sm:     0 4px 12px rgba(0,0,0,.35);
    --shadow:        0 14px 40px rgba(0,0,0,.45);
    --shadow-orange: 0 14px 40px rgba(255,122,26,.25);
    --container:     1180px;
    --header-h:      68px;
    --font-sans:     'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display:  'Playfair Display', Georgia, serif;

    /* ---------- Glare (destaque dos painéis) ----------
       Estas variáveis controlam o efeito de "glare" aplicado a todos
       os painéis do site. Para ajustar a intensidade do brilho:
         • Aumentar --glare-highlight  -> topo mais claro
         • Aumentar --glare-gradient    -> gradiente mais visível
         • Aumentar --shadow-panel      -> mais profundidade/sombra
    */
    --border-strong:   #313338;
    --glare-highlight: rgba(255, 255, 255, 0.06);
    --glare-gradient:  linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0) 45%);
    --shadow-panel:    0 8px 22px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-panel-hi: 0 16px 40px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.45);

    /* Mixin visual aplicado a todos os painéis via classe .glare */
    --panel-bg:      var(--panel);
    --panel-shadow:  inset 0 1px 0 var(--glare-highlight), var(--shadow-panel);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(900px 500px at 80% -10%, rgba(255,122,26,.10), transparent 60%),
        radial-gradient(700px 400px at -10% 20%, rgba(255,122,26,.06), transparent 60%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--orange-soft); }
button { font-family: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
input, textarea, select, button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0; letter-spacing: .2px; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
p  { margin: 0 0 1em; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--orange); color: #0d0d0f;
    padding: 8px 14px; z-index: 9999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}
main { flex: 1 0 auto; }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(13,13,15,.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    min-height: var(--header-h);
    display: flex; align-items: center;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; gap: 16px;
}
.brand {
    display: inline-flex; align-items: baseline; gap: 6px;
    font-family: var(--font-display);
    font-weight: 800; letter-spacing: 2px;
    font-size: 20px; color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
    color: #0d0d0f;
    padding: 4px 9px; border-radius: 8px;
    box-shadow: 0 6px 18px rgba(255,122,26,.35);
    font-size: 14px; letter-spacing: 1px;
}
.brand-text { color: var(--text); }

.main-nav ul { display: flex; gap: 4px; align-items: center; }
.main-nav a {
    padding: 10px 14px; border-radius: 999px;
    color: var(--text-soft); font-weight: 500; font-size: 15px;
    border: 1px solid transparent;
}
.main-nav a:hover { color: var(--text); background: var(--panel); }
.main-nav a.is-active { color: var(--orange); border-color: var(--border); background: var(--panel); }

.nav-toggle {
    display: none;
    background: transparent; border: 1px solid var(--border);
    color: var(--text); width: 44px; height: 44px; border-radius: 10px;
    cursor: pointer; position: relative;
    z-index: 101; /* acima do menu aberto para continuar clicável */
}
.nav-toggle span {
    position: absolute; left: 11px; right: 11px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Botões ---------- */
.btn {
    --btn-bg: var(--orange);
    --btn-color: #0d0d0f;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--btn-bg); color: var(--btn-color);
    padding: 12px 22px; border-radius: 999px;
    font-weight: 700; font-size: 15px; border: none;
    cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    text-decoration: none; line-height: 1;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: var(--shadow-orange); color: var(--btn-color); }
.btn:active { transform: translateY(0); }
.btn-ghost {
    --btn-bg: transparent; --btn-color: var(--text);
    border: 1px solid var(--border); color: var(--text);
}
.btn-ghost:hover { color: var(--orange); border-color: var(--orange); }
.btn-outline {
    --btn-bg: transparent; --btn-color: var(--orange);
    border: 1px solid var(--orange);
}
.btn-outline:hover { background: var(--orange); color: #0d0d0f; }
.btn-danger { --btn-bg: var(--danger); --btn-color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }

/* ---------- HERO ---------- */
.hero {
    position: relative;
    padding: clamp(48px, 8vw, 90px) 0 clamp(40px, 6vw, 60px);
    overflow: hidden;
}
.hero-grid {
    display: grid; gap: clamp(28px, 5vw, 56px);
    grid-template-columns: 1.1fr 0.9fr; align-items: center;
}
.hero-content h1 {
    margin-bottom: 18px;
}
.hero-content h1 .accent { color: var(--orange); }
.hero-content .lead {
    color: var(--text-soft); font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    max-width: 56ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-stats { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats .stat .num { font-family: var(--font-display); font-size: 1.9rem; color: var(--orange); font-weight: 700; }
.hero-stats .stat .lbl { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.hero-image {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 5;
    background: var(--panel);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-image::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(13,13,15,0) 50%, rgba(13,13,15,.65) 100%);
    pointer-events: none;
}
.hero-image .hero-tag {
    position: absolute; left: 16px; top: 16px;
    background: rgba(13,13,15,.7); color: var(--orange);
    border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 2;
}

/* ---------- Section ---------- */
.section { padding: clamp(36px, 5vw, 64px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 6px; }
.section-head .subtitle { color: var(--muted); font-size: 14px; max-width: 60ch; }
.eyebrow {
    color: var(--orange); font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; font-size: 12px; margin-bottom: 10px; display: inline-block;
}

/* ---------- Card de Livro (Estante) ---------- */
.book-grid {
    display: grid; gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.book-card {
    background: var(--glare-gradient), var(--panel);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--panel-shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    display: flex; flex-direction: column;
}
.book-card:hover {
    transform: translateY(-4px);
    border-color: var(--orange);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), var(--shadow-panel-hi), var(--shadow-orange);
}
.book-cover {
    position: relative; aspect-ratio: 3 / 4; overflow: hidden;
    background: var(--panel-2);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.book-card:hover .book-cover img { transform: scale(1.05); }
.book-cover .types {
    position: absolute; left: 8px; bottom: 8px; display: flex; gap: 4px; flex-wrap: wrap;
}
.type-badge {
    background: rgba(13,13,15,.85); color: var(--text);
    border: 1px solid var(--border); padding: 3px 8px; border-radius: 999px;
    font-size: 10px; font-weight: 600; letter-spacing: .3px;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.type-badge.type-orange { background: var(--orange); color: #0d0d0f; border-color: transparent; }
.book-info { padding: 12px 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.book-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--text); }
.book-author { color: var(--muted); font-size: 13px; }
.book-meta { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }

/* ---------- Detalhe do Livro (Hotpage) ---------- */
.livro-detail {
    display: grid; gap: clamp(24px, 4vw, 48px);
    grid-template-columns: minmax(0, 360px) 1fr;
    align-items: start;
    padding: clamp(28px, 5vw, 56px) 0;
}
.livro-cover {
    border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong);
    box-shadow: inset 0 1px 0 var(--glare-highlight), var(--shadow);
    aspect-ratio: 3/4; background: var(--panel-2);
    position: sticky; top: calc(var(--header-h) + 20px);
}
.livro-cover img { width: 100%; height: 100%; object-fit: cover; }
.livro-info h1 { margin-bottom: 8px; }
.livro-info .autor { color: var(--orange); font-weight: 600; margin-bottom: 18px; font-size: 1.05rem; }
.livro-meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.meta-pill { background: var(--glare-gradient), var(--panel); border: 1px solid var(--border-strong); padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--text-soft); box-shadow: inset 0 1px 0 var(--glare-highlight); }
.livro-sinopse { color: var(--text-soft); line-height: 1.75; font-size: 1.02rem; }
.livro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.tipos-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Contato ---------- */
.contato-grid {
    display: grid; gap: clamp(24px, 4vw, 48px);
    grid-template-columns: 1fr 1fr;
    align-items: start;
    padding: clamp(28px, 5vw, 56px) 0;
}
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
    display: flex; gap: 14px; align-items: center;
    background: var(--glare-gradient), var(--panel); border: 1px solid var(--border-strong);
    padding: 16px; border-radius: var(--radius);
    box-shadow: var(--panel-shadow);
}
.contact-card .icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: rgba(255,122,26,.12); color: var(--orange);
    display: grid; place-items: center; flex-shrink: 0;
}
.contact-card .icon svg { width: 22px; height: 22px; }
.contact-card .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.contact-card .val { color: var(--text); font-weight: 600; word-break: break-word; }

.form-card {
    background: var(--glare-gradient), var(--panel); border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 32px);
    box-shadow: var(--panel-shadow);
}
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-soft); font-weight: 500; }
.field input, .field textarea, .field select {
    width: 100%; background: var(--bg-soft);
    border: 1px solid var(--border); color: var(--text);
    padding: 12px 14px; border-radius: 10px; font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255,122,26,.18);
}
.field textarea { resize: vertical; min-height: 140px; }
.field-error { color: var(--danger); font-size: 12px; margin-top: 6px; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.checkbox-group, .radio-group {
    display: flex; flex-wrap: wrap; gap: 10px;
}
.check-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--glare-gradient), var(--bg-soft); border: 1px solid var(--border);
    padding: 10px 14px; border-radius: 999px;
    cursor: pointer; user-select: none; font-size: 14px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    box-shadow: inset 0 1px 0 var(--glare-highlight);
}
.check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill:hover { border-color: var(--orange); }
.check-pill.is-checked {
    border-color: var(--orange); background: rgba(255,122,26,.12); color: var(--orange);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 0 0 1px rgba(255,122,26,0.20);
}
.check-pill .dot {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border); flex-shrink: 0; transition: all .15s ease;
}
.check-pill.is-checked .dot { border-color: var(--orange); background: var(--orange); box-shadow: inset 0 0 0 3px #0d0d0f; }

/* ---------- Mensagens / Alertas ---------- */
.alert {
    padding: 12px 16px; border-radius: 10px; margin-bottom: 18px;
    border: 1px solid transparent; font-size: 14px;
    display: flex; gap: 10px; align-items: flex-start;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 4px 14px rgba(0,0,0,0.35);
}
.alert-success { background: rgba(46,204,113,.10); border-color: rgba(46,204,113,.35); color: #b8e8c8; }
.alert-danger  { background: rgba(231,76,60,.10);  border-color: rgba(231,76,60,.35);  color: #f1a8a3; }
.alert-warning { background: rgba(241,196,15,.10); border-color: rgba(241,196,15,.35); color: #f3d97a; }
.alert-info    { background: rgba(255,122,26,.10); border-color: rgba(255,122,26,.35); color: #ffc89a; }

/* ---------- Empty state ---------- */
.empty-state {
    text-align: center; padding: 60px 24px; color: var(--muted);
    border: 1px dashed var(--border-strong); border-radius: var(--radius);
    background: var(--glare-gradient), var(--panel);
    box-shadow: var(--panel-shadow);
}
.empty-state .icon { font-size: 40px; margin-bottom: 12px; color: var(--orange); opacity: .6; }

/* ---------- Filtros ---------- */
.filter-bar {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    margin-bottom: 24px;
}
.filter-pill {
    background: var(--glare-gradient), var(--panel); border: 1px solid var(--border-strong);
    padding: 8px 14px; border-radius: 999px; font-size: 13px;
    cursor: pointer; color: var(--text-soft); font-weight: 500;
    transition: all .15s ease;
    box-shadow: inset 0 1px 0 var(--glare-highlight);
}
.filter-pill:hover { border-color: var(--orange); color: var(--text); }
.filter-pill.is-active { background: var(--orange); color: #0d0d0f; border-color: transparent; box-shadow: 0 6px 18px var(--orange-glow); }

/* ---------- Footer ---------- */
.site-footer {
    margin-top: auto;
    background: linear-gradient(180deg, var(--bg) 0%, #08080a 100%);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
}
.footer-inner {
    display: grid; gap: 28px;
    grid-template-columns: 1fr auto auto;
    align-items: start;
}
.footer-brand .brand { font-size: 22px; }
.footer-tagline { color: var(--muted); font-size: 14px; margin-top: 8px; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: var(--text-soft); font-size: 14px; }
.footer-nav a:hover { color: var(--orange); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--border); color: var(--text-soft);
    display: grid; place-items: center; transition: all .15s ease;
}
.footer-social a:hover { color: var(--orange); border-color: var(--orange); transform: translateY(-2px); }
.footer-bottom {
    border-top: 1px solid var(--border-soft);
    margin-top: 30px; padding-top: 18px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    color: var(--muted); font-size: 13px;
}
.footer-bottom .admin-link a { color: var(--muted); }
.footer-bottom .admin-link a:hover { color: var(--orange); }

/* ---------- To top ---------- */
.to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 80;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--orange); color: #0d0d0f; border: none;
    display: grid; place-items: center; cursor: pointer;
    box-shadow: var(--shadow-orange); opacity: 0; visibility: hidden;
    transform: translateY(10px); transition: all .2s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { filter: brightness(1.1); }

/* ---------- Page header (interno) ---------- */
.page-header {
    padding: clamp(28px, 5vw, 48px) 0 clamp(16px, 2vw, 24px);
}
.page-header .eyebrow { margin-bottom: 6px; }
.page-header h1 { margin-bottom: 8px; }
.page-header p { color: var(--muted); max-width: 60ch; margin: 0; }

.breadcrumb {
    font-size: 13px; color: var(--muted); margin-bottom: 18px;
    display: flex; gap: 6px; flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span.sep { opacity: .5; }

/* ---------- ADMIN ---------- */
.admin-body { background: var(--bg); }
.admin-layout {
    display: grid; grid-template-columns: 240px 1fr; gap: 0;
    min-height: 100vh;
}
.admin-sidebar {
    background: var(--panel); border-right: 1px solid var(--border);
    padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .brand { margin-bottom: 28px; padding: 0 8px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--text-soft); font-size: 14px; font-weight: 500;
}
.admin-nav a svg { width: 18px; height: 18px; opacity: .8; }
.admin-nav a:hover { background: var(--panel-2); color: var(--text); }
.admin-nav a.is-active { background: rgba(255,122,26,.12); color: var(--orange); }
.admin-nav .sep { height: 1px; background: var(--border); margin: 12px 4px; }
.admin-main { padding: clamp(20px, 3vw, 36px); min-width: 0; }
.admin-topbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.admin-topbar h1 { font-size: 1.6rem; }
.admin-user { color: var(--muted); font-size: 14px; }
.admin-user strong { color: var(--text); }

.admin-cards {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 28px;
}
.admin-card {
    background: var(--glare-gradient), var(--panel); border: 1px solid var(--border-strong);
    border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--panel-shadow);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.admin-card:hover {
    transform: translateY(-2px);
    border-color: var(--orange);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), var(--shadow-panel-hi);
}
.admin-card .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.admin-card .val { font-family: var(--font-display); font-size: 1.8rem; color: var(--text); margin-top: 4px; }
.admin-card .val.accent { color: var(--orange); }

.admin-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: var(--glare-gradient), var(--panel); border: 1px solid var(--border-strong);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--panel-shadow);
}
.admin-table th, .admin-table td {
    padding: 12px 14px; text-align: left; font-size: 14px;
    border-bottom: 1px solid var(--border-soft);
}
.admin-table th { background: var(--panel-2); color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 1px; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--panel-hover); }
.admin-table .thumb {
    width: 40px; height: 54px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border);
}
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--glare-gradient), var(--panel-2); border: 1px solid var(--border);
    color: var(--text-soft); display: grid; place-items: center; cursor: pointer;
    transition: all .15s ease;
    box-shadow: inset 0 1px 0 var(--glare-highlight);
}
.icon-btn:hover { color: var(--orange); border-color: var(--orange); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.icon-btn svg { width: 16px; height: 16px; }

.login-wrap {
    min-height: 100vh; display: grid; place-items: center;
    padding: 24px;
}
.login-card {
    width: 100%; max-width: 420px;
    background: var(--glare-gradient), var(--panel); border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 40px);
    box-shadow: inset 0 1px 0 var(--glare-highlight), var(--shadow);
}
.login-card .brand { justify-content: center; margin-bottom: 24px; }
.login-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: 6px; }
.login-card .subtitle { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 24px; }

.admin-form-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.image-preview {
    margin-top: 12px; border: 1px dashed var(--border-strong);
    border-radius: var(--radius); padding: 8px; background: var(--bg-soft);
    display: inline-block;
    box-shadow: inset 0 1px 0 var(--glare-highlight);
}
.image-preview img { max-height: 200px; border-radius: 8px; }

/* ---------- Paginação ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.pagination a, .pagination span {
    min-width: 38px; height: 38px; display: grid; place-items: center;
    border-radius: 8px; border: 1px solid var(--border);
    background: var(--panel); color: var(--text-soft); font-size: 14px;
}
.pagination a:hover { border-color: var(--orange); color: var(--orange); }
.pagination .current { background: var(--orange); color: #0d0d0f; border-color: transparent; font-weight: 700; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-image { max-width: 420px; margin-inline: auto; width: 100%; }
    .livro-detail { grid-template-columns: 1fr; }
    .livro-cover { position: static; max-width: 320px; }
    .contato-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: rgba(13,13,15,.97);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        padding: 16px 20px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 20px 40px rgba(0,0,0,0.55);
        /* Esconde acima da tela: top negativo proporcional à altura do header + folga.
           Usar translateY negativo causava bug em alguns navegadores mobile onde o menu
           ficava parcialmente visível. Combinamos transform + visibility para garantir. */
        transform: translateY(calc(-100% - var(--header-h) - 20px));
        visibility: hidden;
        opacity: 0;
        transition: transform .3s ease, opacity .25s ease, visibility 0s linear .3s;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
        z-index: 99;
    }
    .main-nav.is-open {
        transform: translateY(0);
        visibility: visible;
        opacity: 1;
        transition: transform .3s ease, opacity .25s ease, visibility 0s;
    }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 6px; }
    .main-nav a { padding: 14px 16px; border-radius: 10px; font-size: 16px; }

    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: sticky; top: 0; height: auto; z-index: 50;
        border-right: none; border-bottom: 1px solid var(--border);
        padding: 14px 16px;
    }
    .admin-sidebar .brand { margin-bottom: 12px; display: inline-block; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .admin-nav .sep { display: none; }
    .admin-nav a { padding: 8px 12px; font-size: 13px; }
    .admin-form-row { grid-template-columns: 1fr; }
    .admin-table-wrap { overflow-x: auto; }
    .admin-table { min-width: 600px; }
}
@media (max-width: 768px) {
    /* Ajustes adicionais para telas muito pequenas */
    .site-header { padding-top: env(safe-area-inset-top, 0); }
    .site-header .header-inner { padding-top: 4px; padding-bottom: 4px; }
    .brand { font-size: 18px; }
    .brand-mark { padding: 3px 7px; font-size: 12px; }
    .nav-toggle { width: 40px; height: 40px; }
}
@media (max-width: 360px) {
    /* Telas muito estreitas (ex.: iPhone SE 1, Galaxy Fold fechado) */
    .container { padding-inline: 14px; }
    .hero { padding: 28px 0; }
    .hero-content h1 { font-size: 1.7rem; }
    .brand { font-size: 16px; }
    .brand-mark { padding: 2px 6px; font-size: 11px; letter-spacing: 0.5px; }
    .brand-text { letter-spacing: 1px; }
}
@media (max-width: 480px) {
    .book-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { justify-content: center; }
}

/* ---------- Loading skeleton ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 37%, var(--panel) 63%);
    background-size: 400% 100%; animation: skeleton 1.4s ease infinite;
    border-radius: var(--radius);
}
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Acessibilidade ---------- */
:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
