/* ═══════════════════════════════════════════════════════════════════════════
   app.css — Sistema de design do boilerplate PHP
   Inspirado no Bootstrap, mas sem dependência externa.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Variáveis ─────────────────────────────────────────────────────────── */
:root {
    --primary:    #3b82f6;
    --primary-d:  #2563eb;
    --primary-l:  #eff6ff;
    --danger:     #ef4444;
    --danger-d:   #dc2626;
    --danger-l:   #fef2f2;
    --success:    #22c55e;
    --success-d:  #16a34a;
    --success-l:  #f0fdf4;
    --warning:    #f59e0b;
    --warning-d:  #d97706;
    --warning-l:  #fffbeb;
    --info:       #06b6d4;
    --info-d:     #0891b2;
    --info-l:     #ecfeff;
    --muted:      #6b7280;
    --bg:         #f9fafb;
    --card:       #ffffff;
    --border:     #e5e7eb;
    --text:       #111827;
    --text-light: #6b7280;

    /* Espaçamento base — múltiplos de 4px, igual ao Bootstrap */
    --sp-1:  .25rem;
    --sp-2:  .5rem;
    --sp-3:  .75rem;
    --sp-4:  1rem;
    --sp-5:  1.25rem;
    --sp-6:  1.5rem;
    --sp-8:  2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;

    /* Bordas */
    --radius-sm:   .25rem;
    --radius:      .5rem;
    --radius-lg:   .75rem;
    --radius-xl:   1rem;
    --radius-full: 999px;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
    --shadow:    0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.10), 0 4px 6px rgba(0,0,0,.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,.10), 0 10px 10px rgba(0,0,0,.04);

    --transition:    .15s ease;
    --transition-md: .25s ease;
}

/* ── 2. Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1 { font-size: 2rem;    line-height: 1.3; font-weight: 600; }
h2 { font-size: 1.5rem;  line-height: 1.3; font-weight: 600; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
h4 { font-size: 1.1rem;  line-height: 1.3; font-weight: 600; }

/* ── 3. Layout ────────────────────────────────────────────────────────────── */
.container       { max-width: 1140px; margin: 0 auto; padding: 0 var(--sp-5); }
.container-sm    { max-width: 720px;  margin: 0 auto; padding: 0 var(--sp-5); }
.container-fluid { width: 100%; padding: 0 var(--sp-5); }
.main-content    { flex: 1; padding: var(--sp-8) var(--sp-5); }

/* ── 4. Grid — 12 colunas ─────────────────────────────────────────────────── */
.row { display: flex; flex-wrap: wrap; gap: var(--sp-4); }

.col-1  { flex: 0 0 calc(1/12  * 100%); }
.col-2  { flex: 0 0 calc(2/12  * 100%); }
.col-3  { flex: 0 0 calc(3/12  * 100%); }
.col-4  { flex: 0 0 calc(4/12  * 100%); }
.col-5  { flex: 0 0 calc(5/12  * 100%); }
.col-6  { flex: 0 0 calc(6/12  * 100%); }
.col-7  { flex: 0 0 calc(7/12  * 100%); }
.col-8  { flex: 0 0 calc(8/12  * 100%); }
.col-9  { flex: 0 0 calc(9/12  * 100%); }
.col-10 { flex: 0 0 calc(10/12 * 100%); }
.col-11 { flex: 0 0 calc(11/12 * 100%); }
.col-12 { flex: 0 0 100%; }
.col    { flex: 1 1 0; }
.col-auto { flex: 0 0 auto; }

.row-cols-2 > * { flex: 0 0 calc(50%    - var(--sp-2)); }
.row-cols-3 > * { flex: 0 0 calc(33.33% - var(--sp-3)); }
.row-cols-4 > * { flex: 0 0 calc(25%    - var(--sp-3)); }

.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

@media (max-width: 768px) {
    [class^="col-"]:not(.col-auto) { flex: 0 0 100%; }
    .row-cols-2 > *, .row-cols-3 > *, .row-cols-4 > * { flex: 0 0 100%; }
}

/* ── 5. Flexbox utilitários ───────────────────────────────────────────────── */
.d-flex        { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-block       { display: block; }
.d-none        { display: none; }
.flex-column   { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }
.align-start   { align-items: flex-start; }
.align-center  { align-items: center; }
.align-end     { align-items: flex-end; }
.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

/* ── 6. Espaçamento (margin e padding) ───────────────────────────────────── */
.m-0 { margin: 0; }            .m-1 { margin: var(--sp-1); }
.m-2 { margin: var(--sp-2); }  .m-3 { margin: var(--sp-3); }
.m-4 { margin: var(--sp-4); }  .m-6 { margin: var(--sp-6); }
.m-auto { margin: auto; }      .mx-auto { margin-left: auto; margin-right: auto; }

.mt-0{margin-top:0}            .mt-1{margin-top:var(--sp-1)}
.mt-2{margin-top:var(--sp-2)}  .mt-3{margin-top:var(--sp-3)}
.mt-4{margin-top:var(--sp-4)}  .mt-5{margin-top:var(--sp-5)}
.mt-6{margin-top:var(--sp-6)}  .mt-8{margin-top:var(--sp-8)}

.mb-0{margin-bottom:0}         .mb-1{margin-bottom:var(--sp-1)}
.mb-2{margin-bottom:var(--sp-2)} .mb-3{margin-bottom:var(--sp-3)}
.mb-4{margin-bottom:var(--sp-4)} .mb-5{margin-bottom:var(--sp-5)}
.mb-6{margin-bottom:var(--sp-6)} .mb-8{margin-bottom:var(--sp-8)}

.ml-0{margin-left:0}           .ml-1{margin-left:var(--sp-1)}
.ml-2{margin-left:var(--sp-2)} .ml-3{margin-left:var(--sp-3)}
.ml-4{margin-left:var(--sp-4)} .ml-auto{margin-left:auto}

.mr-0{margin-right:0}          .mr-1{margin-right:var(--sp-1)}
.mr-2{margin-right:var(--sp-2)} .mr-3{margin-right:var(--sp-3)}
.mr-4{margin-right:var(--sp-4)} .mr-auto{margin-right:auto}

.mx-0{margin-left:0;margin-right:0}
.mx-2{margin-left:var(--sp-2);margin-right:var(--sp-2)}
.mx-4{margin-left:var(--sp-4);margin-right:var(--sp-4)}

.my-0{margin-top:0;margin-bottom:0}
.my-2{margin-top:var(--sp-2);margin-bottom:var(--sp-2)}
.my-4{margin-top:var(--sp-4);margin-bottom:var(--sp-4)}
.my-6{margin-top:var(--sp-6);margin-bottom:var(--sp-6)}
.my-8{margin-top:var(--sp-8);margin-bottom:var(--sp-8)}

.p-0{padding:0}                .p-1{padding:var(--sp-1)}
.p-2{padding:var(--sp-2)}      .p-3{padding:var(--sp-3)}
.p-4{padding:var(--sp-4)}      .p-5{padding:var(--sp-5)}
.p-6{padding:var(--sp-6)}      .p-8{padding:var(--sp-8)}

.pt-0{padding-top:0}           .pt-2{padding-top:var(--sp-2)}
.pt-4{padding-top:var(--sp-4)} .pt-6{padding-top:var(--sp-6)}
.pt-8{padding-top:var(--sp-8)}

.pb-0{padding-bottom:0}        .pb-2{padding-bottom:var(--sp-2)}
.pb-4{padding-bottom:var(--sp-4)} .pb-6{padding-bottom:var(--sp-6)}
.pb-8{padding-bottom:var(--sp-8)}

.px-0{padding-left:0;padding-right:0}
.px-2{padding-left:var(--sp-2);padding-right:var(--sp-2)}
.px-3{padding-left:var(--sp-3);padding-right:var(--sp-3)}
.px-4{padding-left:var(--sp-4);padding-right:var(--sp-4)}
.px-6{padding-left:var(--sp-6);padding-right:var(--sp-6)}

.py-0{padding-top:0;padding-bottom:0}
.py-2{padding-top:var(--sp-2);padding-bottom:var(--sp-2)}
.py-3{padding-top:var(--sp-3);padding-bottom:var(--sp-3)}
.py-4{padding-top:var(--sp-4);padding-bottom:var(--sp-4)}
.py-6{padding-top:var(--sp-6);padding-bottom:var(--sp-6)}
.py-8{padding-top:var(--sp-8);padding-bottom:var(--sp-8)}

/* ── 7. Tipografia ────────────────────────────────────────────────────────── */
.text-sm   { font-size: .875rem; }  .text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; } .text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }

.text-left   { text-align: left; }   .text-center { text-align: center; }
.text-right  { text-align: right; }

.text-muted   { color: var(--text-light); }
.text-primary { color: var(--primary); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.font-normal { font-weight: 400; }  .font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uppercase   { text-transform: uppercase; }

/* ── 8. Header / Nav ──────────────────────────────────────────────────────── */
.site-header { background: #1e293b; color: #fff; padding: var(--sp-3) 0; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.nav-brand { color: #fff; font-weight: 700; font-size: 1.1rem; }
.nav-links { list-style: none; display: flex; gap: var(--sp-5); }
.nav-links a, .nav-links .btn-link { color: #cbd5e1; font-size: .9rem; }
.nav-links a:hover { color: #fff; text-decoration: none; }

/* ── 9. Footer ────────────────────────────────────────────────────────────── */
.site-footer {
    background: #1e293b; color: #94a3b8;
    text-align: center; padding: var(--sp-4) 0;
    font-size: .85rem; margin-top: auto;
}

/* ── 10. Botões ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: .5rem 1.1rem; border-radius: var(--radius);
    font-size: .9rem; font-weight: 500; cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition);
    text-decoration: none; line-height: 1.5; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-sm  { padding: .3rem .75rem; font-size: .8rem; }
.btn-lg  { padding: .7rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary   { background: var(--primary);  color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); }

.btn-danger    { background: var(--danger);   color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-d); border-color: var(--danger-d); }

.btn-success   { background: var(--success);  color: #fff; border-color: var(--success); }
.btn-success:hover { background: var(--success-d); }

.btn-secondary { background: var(--border);   color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #d1d5db; }

.btn-outline   { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-l); }

.btn-outline-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger-l); }

.btn-link { background: none; border: none; color: var(--primary);
            padding: 0; cursor: pointer; font-size: inherit; }

/* ── 11. Cards ────────────────────────────────────────────────────────────── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-header {
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--border);
    background: #f8fafc; font-weight: 600; font-size: .95rem;
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.card-body    { padding: var(--sp-5); }
.card-body-sm { padding: var(--sp-3) var(--sp-4); }
.card-footer  {
    padding: var(--sp-3) var(--sp-5);
    border-top: 1px solid var(--border);
    background: #f8fafc;
    display: flex; align-items: center; gap: var(--sp-3);
}
.card-img    { width: 100%; object-fit: cover; }
.card-img-sm { height: 160px; }
.card-img-md { height: 220px; }
.card-img-lg { height: 300px; }

.card-horizontal { display: flex; }
.card-horizontal .card-img { width: 200px; flex-shrink: 0; object-fit: cover; }
.card-horizontal .card-body { flex: 1; }

.card-hover {
    cursor: pointer;
    transition: box-shadow var(--transition-md), transform var(--transition-md);
}
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── 12. Modal ────────────────────────────────────────────────────────────── */
/*
   <div class="modal" id="meuModal">
     <div class="modal-dialog">
       <div class="modal-header">
         <h3 class="modal-title">Título</h3>
         <button class="modal-close" data-close="meuModal">&times;</button>
       </div>
       <div class="modal-body">Conteúdo</div>
       <div class="modal-footer">
         <button class="btn btn-secondary" data-close="meuModal">Cancelar</button>
         <button class="btn btn-primary">Confirmar</button>
       </div>
     </div>
   </div>
   JS: document.getElementById('meuModal').classList.add('modal-open')
*/
.modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.45); padding: var(--sp-4);
    align-items: center; justify-content: center;
    animation: fadeIn var(--transition-md);
}
.modal.modal-open { display: flex; }

.modal-dialog {
    background: var(--card); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl); width: 100%; max-width: 520px;
    max-height: 90vh; display: flex; flex-direction: column;
    animation: slideUp var(--transition-md);
}
.modal-dialog-lg { max-width: 720px; }
.modal-dialog-sm { max-width: 360px; }

.modal-header {
    padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--sp-3); flex-shrink: 0;
}
.modal-title { font-size: 1.1rem; font-weight: 600; }
.modal-close {
    background: none; border: none; font-size: 1.4rem; line-height: 1;
    color: var(--muted); cursor: pointer; padding: 0 var(--sp-1);
    transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }
.modal-body   { padding: var(--sp-5); overflow-y: auto; flex: 1; }
.modal-footer {
    padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: var(--sp-3); flex-shrink: 0;
}

/* ── 13. Dropdown ─────────────────────────────────────────────────────────── */
/*
   <div class="dropdown">
     <button class="btn btn-secondary">Opções ▾</button>
     <ul class="dropdown-menu">
       <li><a href="#" class="dropdown-item">Editar</a></li>
       <li><hr class="dropdown-divider"></li>
       <li><a href="#" class="dropdown-item text-danger">Excluir</a></li>
     </ul>
   </div>
*/
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    display: none; position: absolute;
    top: calc(100% + var(--sp-1)); left: 0; z-index: 500;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    min-width: 180px; padding: var(--sp-1) 0;
    list-style: none; animation: fadeIn var(--transition);
}
.dropdown-menu.dropdown-right { left: auto; right: 0; }
.dropdown-menu.open { display: block; }

.dropdown-item {
    display: block; padding: var(--sp-2) var(--sp-4);
    font-size: .9rem; color: var(--text); cursor: pointer;
    transition: background var(--transition); white-space: nowrap;
    border: none; background: none; width: 100%; text-align: left;
    text-decoration: none;
}
.dropdown-item:hover { background: var(--bg); text-decoration: none; }
.dropdown-item.active { background: var(--primary-l); color: var(--primary); font-weight: 500; }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: var(--sp-1) 0; }

/* ── 14. Toast / Notificações ─────────────────────────────────────────────── */
/*
   Via JS: toast('Mensagem salva!', 'success')
   Tipos: success | error | warning | info
*/
.toast-container {
    position: fixed; bottom: var(--sp-5); right: var(--sp-5);
    z-index: 2000; display: flex; flex-direction: column;
    gap: var(--sp-3); max-width: 340px;
    width: calc(100% - var(--sp-10));
}
.toast {
    display: flex; align-items: flex-start; gap: var(--sp-3);
    background: #1e293b; color: #f1f5f9;
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); font-size: .9rem; line-height: 1.5;
    animation: slideInRight var(--transition-md);
    border-left: 4px solid var(--muted);
}
.toast.toast-success { border-color: var(--success); }
.toast.toast-error   { border-color: var(--danger); }
.toast.toast-warning { border-color: var(--warning); }
.toast.toast-info    { border-color: var(--info); }
.toast-icon    { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast-message { flex: 1; }
.toast-close {
    background: none; border: none; color: #94a3b8;
    cursor: pointer; font-size: 1rem; line-height: 1; padding: 0;
    transition: color var(--transition);
}
.toast-close:hover { color: #fff; }
.toast.removing { animation: slideOut .3s ease forwards; }

/* ── 15. Forms ────────────────────────────────────────────────────────────── */
.form-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    padding: var(--sp-8); max-width: 440px; margin: var(--sp-8) auto;
}
.form-wide { max-width: 720px; }
.form-group { margin-bottom: var(--sp-4); }
.form-group label {
    display: block; font-size: .875rem; font-weight: 500;
    margin-bottom: var(--sp-2);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%; padding: .5rem .75rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 1rem; background: #fff; color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    line-height: 1.5;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-group input.error,
.form-group textarea.error { border-color: var(--danger); }
.form-hint  { font-size: .8rem; color: var(--text-light); margin-top: var(--sp-1); }
.form-error { font-size: .8rem; color: var(--danger); margin-top: var(--sp-1); }
.form-check { display: flex; align-items: center; gap: var(--sp-2); }
.form-check input { width: auto; }
.form-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.form-footer {
    margin-top: var(--sp-5); text-align: center;
    font-size: .875rem; color: var(--muted);
}
.form-footer a { font-weight: 500; }

/* ── 16. Alertas inline ───────────────────────────────────────────────────── */
.alert {
    padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
    margin-bottom: var(--sp-4); font-size: .9rem;
    border: 1px solid transparent;
}
.alert-success { background: var(--success-l); color: var(--success-d); border-color: #bbf7d0; }
.alert-error,
.alert-danger  { background: var(--danger-l);  color: var(--danger-d);  border-color: #fecaca; }
.alert-warning { background: var(--warning-l); color: var(--warning-d); border-color: #fde68a; }
.alert-info    { background: var(--info-l);    color: var(--info-d);    border-color: #a5f3fc; }

/* Flash messages do boilerplate PHP */
.flash-success { background: var(--success-l); color: var(--success-d); border: 1px solid #bbf7d0;
                 padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
                 margin-bottom: var(--sp-4); font-size: .9rem; }
.flash-error   { background: var(--danger-l);  color: var(--danger-d);  border: 1px solid #fecaca;
                 padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
                 margin-bottom: var(--sp-4); font-size: .9rem; }
.flash-warning { background: var(--warning-l); color: var(--warning-d); border: 1px solid #fde68a;
                 padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
                 margin-bottom: var(--sp-4); font-size: .9rem; }
.flash-info    { background: var(--info-l);    color: var(--info-d);    border: 1px solid #a5f3fc;
                 padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
                 margin-bottom: var(--sp-4); font-size: .9rem; }

/* ── 17. Tabela ───────────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; background: var(--card); font-size: .9rem; }
.table th, .table td {
    padding: var(--sp-3) var(--sp-4); text-align: left;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: #f1f5f9; font-weight: 600; font-size: .8rem;
    text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.table tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table-striped tbody tr:nth-child(even) { background: #f8fafc; }
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.actions { display: flex; align-items: center; gap: var(--sp-3); }

/* ── 18. Badge ────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block; padding: .2rem .6rem;
    border-radius: var(--radius-full); font-size: .75rem;
    font-weight: 600; line-height: 1.4;
}
.badge-primary { background: var(--primary-l); color: var(--primary-d); }
.badge-success { background: var(--success-l); color: var(--success-d); }
.badge-danger  { background: var(--danger-l);  color: var(--danger-d); }
.badge-warning { background: var(--warning-l); color: var(--warning-d); }
.badge-info    { background: var(--info-l);    color: var(--info-d); }
.badge-muted   { background: var(--border);    color: var(--muted); }

/* ── 19. Page header ──────────────────────────────────────────────────────── */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: var(--sp-6); gap: var(--sp-4); flex-wrap: wrap;
}
.page-header h2 { font-size: 1.4rem; }

/* ── 20. Paginação ────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: var(--sp-1); margin-top: var(--sp-5); flex-wrap: wrap; }
.page-link {
    padding: .4rem .8rem; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: .875rem;
    color: var(--text); background: var(--card);
    text-decoration: none; transition: background var(--transition);
    min-width: 36px; text-align: center;
}
.page-link:hover { background: var(--bg); text-decoration: none; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── 21. Hero ─────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: var(--sp-12) var(--sp-4); }
.hero h1 { font-size: 2.25rem; margin-bottom: var(--sp-3); }
.hero p  { color: var(--muted); margin-bottom: var(--sp-6); font-size: 1.1rem; }
.hero .btn { margin: 0 var(--sp-2); }

/* ── 22. Post single ──────────────────────────────────────────────────────── */
.post-single { max-width: 720px; margin: 0 auto; }
.post-single h1 { font-size: 1.75rem; margin-bottom: var(--sp-2); }
.post-meta   { color: var(--muted); font-size: .875rem; margin-bottom: var(--sp-8); }
.post-body   { line-height: 1.8; white-space: pre-line; }
.post-footer { margin-top: var(--sp-8); display: flex; gap: var(--sp-3); }

/* ── 23. Divisor ──────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: var(--sp-6) 0; }

/* ── 24. Error page ───────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: var(--sp-12) var(--sp-4); }
.error-page h1 { font-size: 5rem; color: var(--muted); font-weight: 800; }
.error-page p  { font-size: 1.2rem; margin: var(--sp-2) 0 var(--sp-6); }

/* ── 25. Empty state ──────────────────────────────────────────────────────── */
.empty-state { color: var(--muted); padding: var(--sp-8) 0; text-align: center; }

/* ── 26. Animações ────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); max-height: 200px; }
    to   { opacity: 0; transform: translateX(40px); max-height: 0; padding: 0; margin: 0; }
}

/* ── 27. Utilitários extras ───────────────────────────────────────────────── */
.w-full  { width: 100%; }   .w-auto { width: auto; }
.h-full  { height: 100%; }
.rounded { border-radius: var(--radius); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }
.shadow    { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.overflow-hidden { overflow: hidden; }
.relative        { position: relative; }
.cursor-pointer  { cursor: pointer; }
.opacity-50      { opacity: .5; }
.list-none       { list-style: none; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ════════════════════════════════════════════════════════════════
   HOME PÚBLICA — Hero, Galeria e Modal
   Adicionar ao final de public/css/app.css
═══════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
    padding: 5rem 0 3rem;
    text-align: center;
    background: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
    color: #e6edf3;
    border-bottom: 1px solid #30363d;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
    line-height: 1.05;
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    color: #8b949e;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Galeria ──────────────────────────────────────────────────── */
.gallery {
    padding: 3rem 0 5rem;
    background: #0d1117;
    min-height: 60vh;
}

.gallery-empty {
    text-align: center;
    color: #8b949e;
    padding: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.video-card {
    cursor: pointer;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.video-card:hover,
.video-card:focus-visible {
    transform: translateY(-2px);
    border-color: #58a6ff;
    outline: none;
}

.video-card-thumb {
    position: relative;
    aspect-ratio: 9 / 16;
    background: #0d1117;
    overflow: hidden;
}

.video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-card-thumb.no-thumb::before {
    content: "📹";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    opacity: 0.3;
}

.video-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 3rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.video-card:hover .video-card-play,
.video-card:focus-visible .video-card-play {
    opacity: 1;
}

.video-card-caption {
    padding: 0.75rem;
    margin: 0;
    font-size: 0.85rem;
    color: #c9d1d9;
    line-height: 1.4;
    border-top: 1px solid #21262d;
}

/* ── Modal ────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    width: 100%;
    max-width: 1100px;
    max-height: 92vh;
    overflow-y: auto;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.85);
}

.modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}

.modal-player {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 9 / 16;
    max-height: 75vh;
}

.modal-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info {
    color: #c9d1d9;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-caption {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #c9d1d9;
    padding: 0.75rem;
    background: #0d1117;
    border-radius: 6px;
    border: 1px solid #21262d;
}

.modal-frames-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.modal-frames {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.modal-frame-item {
    position: relative;
    aspect-ratio: 9 / 16;
    background: #0d1117;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #21262d;
}

.modal-frame-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-frame-label {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

/* ════════════════════════════════════════════════════════════════
   FILTROS DA HOME PÚBLICA
   Adicionar ao final de public/css/app.css (junto com os estilos da galeria)
═══════════════════════════════════════════════════════════════ */

.filters-bar {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
    background: rgba(22, 27, 34, 0.95);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input[type="date"] {
    background: #0d1117;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.filter-group select:hover,
.filter-group input[type="date"]:hover {
    border-color: #58a6ff;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

/* Ícone do calendário do input date em tema escuro */
.filter-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.6);
    cursor: pointer;
}

.filter-group-actions {
    justify-content: flex-end;
}

.filter-clear {
    background: transparent;
    border: 1px solid #30363d;
    color: #8b949e;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-clear:hover {
    border-color: #f85149;
    color: #f85149;
}

.filter-result-count {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #8b949e;
}

.filter-result-count #result-count {
    color: #c9d1d9;
    font-weight: 600;
}

@media (max-width: 640px) {
    .filters-bar {
        position: static; /* desativa sticky no mobile pra economizar espaço */
    }

    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-group-actions {
        grid-column: 1 / -1;
    }
}

.video-card-date {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    z-index: 1;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}