/* =========================================================
   JF Miguens — CSS global
   Paleta baseada no logo real (navy profundo + azul claro) com
   accent âmbar/eléctrico para CTAs.
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
    background: #fff;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; }

:root {
    --navy-950: #00113c;       /* cor principal do logo */
    --navy-900: #071a4d;
    --navy-800: #0f2763;
    --navy-700: #1a3782;
    --sky-400:  #6ab3d6;       /* azul claro do logo */
    --amber-400:#fbbf24;       /* electric accent */
    --amber-500:#f59e0b;
    --amber-600:#d97706;
    --slate-50: #f8fafc;
    --slate-100:#f1f5f9;
    --slate-200:#e2e8f0;
    --slate-300:#cbd5e1;
    --slate-400:#94a3b8;
    --slate-500:#64748b;
    --slate-600:#475569;
    --slate-700:#334155;
    --slate-800:#1e293b;
    --slate-900:#0f172a;
    --red-50:   #fef2f2;
    --red-200:  #fecaca;
    --red-600:  #dc2626;
    --red-800:  #991b1b;
    --green-50: #f0fdf4;
    --green-200:#bbf7d0;
    --green-800:#166534;
}

/* Container */
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 640px) { .container { padding: 0 1.75rem; } }

/* =========================================================
   Header
   ========================================================= */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--slate-200);
}
.site-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 4rem;
    gap: 1rem;
}
@media (min-width: 900px) { .site-header-inner { height: 4.5rem; } }
.site-logo img { height: 1.75rem; width: auto; }
@media (min-width: 640px) { .site-logo img { height: 2rem; } }

.site-nav { display: none; gap: 2rem; font-size: 0.9375rem; font-weight: 500; }
.site-nav a { color: var(--slate-700); text-decoration: none; transition: color .15s; }
.site-nav a:hover { color: var(--navy-950); }
.site-nav a.active { color: var(--navy-950); }
.site-nav a.active::after {
    content: ""; display: block; height: 2px; background: var(--amber-500);
    margin-top: 0.25rem;
}
.site-header-cta { display: none; }

/* Hamburger mobile */
.nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem;
    color: var(--navy-950);
    margin-left: auto;
}
.nav-toggle svg { width: 1.5rem; height: 1.5rem; }
.nav-toggle .icon-close { display: none; }
.site-header.open .nav-toggle .icon-open  { display: none; }
.site-header.open .nav-toggle .icon-close { display: block; }

.mobile-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: 0 8px 24px rgba(0,17,60,.08);
    padding: 1rem 1.25rem 1.5rem;
}
.site-header.open .mobile-nav { display: block; }
.mobile-nav a {
    display: block;
    padding: 0.85rem 0.25rem;
    font-size: 1rem; font-weight: 500;
    color: var(--slate-700);
    text-decoration: none;
    border-bottom: 1px solid var(--slate-100);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a.active { color: var(--navy-950); font-weight: 600; }
.mobile-nav .btn { width: 100%; justify-content: center; margin-top: 1rem; }

@media (min-width: 900px) {
    .site-nav { display: flex; }
    .site-header-cta { display: inline-flex; }
    .nav-toggle { display: none; }
    .site-header.open .mobile-nav { display: none; }
}

/* =========================================================
   Botões
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    font-weight: 600; font-size: 0.9375rem;
    border-radius: 2px;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform .1s;
    border: 2px solid transparent;
    line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-sm  { padding: 0.55rem 1rem; font-size: 0.875rem; }
.btn-lg  { padding: 1rem 1.75rem; font-size: 1rem; }
.btn-primary { background: var(--amber-500); color: var(--navy-950); border-color: var(--amber-500); }
.btn-primary:hover { background: var(--amber-400); border-color: var(--amber-400); }
.btn-dark    { background: var(--navy-950); color: #fff; border-color: var(--navy-950); }
.btn-dark:hover { background: var(--navy-800); border-color: var(--navy-800); }
.btn-ghost-light {
    background: transparent; color: #fff; border-color: rgba(255,255,255,.45);
}
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-outline { border-color: var(--slate-300); color: var(--slate-800); background: #fff; }
.btn-outline:hover { border-color: var(--navy-950); color: var(--navy-950); }
.btn-full { width: 100%; justify-content: center; }
.btn .arrow { font-size: 1.1em; line-height: 0; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
    position: relative;
    color: #fff;
    background: var(--navy-950);
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background-image: url('/img/IMG_0691.jpg');
    background-size: cover; background-position: center;
    opacity: 0.28;
    filter: saturate(.7);
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(0,17,60,0.95) 0%, rgba(0,17,60,0.70) 60%, rgba(0,17,60,0.45) 100%);
}
.hero-inner {
    position: relative;
    padding: 4rem 0 3.5rem;
    display: grid;
    gap: 2rem;
}
@media (min-width: 640px) { .hero-inner { padding: 5.5rem 0 5rem; } }
@media (min-width: 900px) {
    .hero-inner { padding: 9rem 0 7rem; grid-template-columns: minmax(0, 720px); }
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-size: 0.8125rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.16em;
    color: var(--amber-400);
    margin-bottom: 1.25rem;
}
.hero-eyebrow::before {
    content: ""; width: 2rem; height: 2px; background: var(--amber-400);
}
.hero h1 {
    font-size: 1.875rem; line-height: 1.1; margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}
@media (min-width: 640px) { .hero h1 { font-size: 2.75rem; margin-bottom: 1.5rem; } }
@media (min-width: 900px) { .hero h1 { font-size: 3.5rem; } }
.hero-lead {
    font-size: 1.0625rem; color: rgba(255,255,255,0.85);
    margin-bottom: 2rem; max-width: 42rem;
}
@media (min-width: 640px) { .hero-lead { font-size: 1.125rem; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Pill de certificações sobre o hero */
.hero-trust {
    display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem;
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255,255,255,.15);
    font-size: 0.75rem; color: rgba(255,255,255,.8);
    text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500;
}
@media (min-width: 768px) {
    .hero-trust { gap: 1.25rem 2rem; margin-top: 3rem; padding-top: 2rem; font-size: 0.8125rem; }
}
.hero-trust span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-trust span::before {
    content: ""; width: 6px; height: 6px; background: var(--amber-400); border-radius: 50%;
}

/* =========================================================
   Page head (páginas internas)
   ========================================================= */
.page-head {
    background: var(--navy-950);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.page-head::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 80% 0%, rgba(106,179,214,0.18), transparent 55%);
}
.page-head-inner { position: relative; padding: 3rem 0 2.5rem; }
@media (min-width: 768px) { .page-head-inner { padding: 4.5rem 0 3.5rem; } }
.page-head h1 {
    font-size: 1.875rem; letter-spacing: -0.03em; margin-bottom: 0.75rem;
}
@media (min-width: 640px) { .page-head h1 { font-size: 2.25rem; } }
@media (min-width: 768px) { .page-head h1 { font-size: 3rem; } }
.page-head-eyebrow {
    color: var(--amber-400);
    font-size: 0.8125rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.16em;
    margin-bottom: 1rem;
    display: inline-flex; align-items: center; gap: 0.6rem;
}
.page-head-eyebrow::before {
    content: ""; width: 1.5rem; height: 2px; background: var(--amber-400);
}
.page-head-lead { font-size: 1.0625rem; color: rgba(255,255,255,0.85); max-width: 46rem; }

/* =========================================================
   Secções genéricas
   ========================================================= */
.section      { padding: 3rem 0; }
.section-sm   { padding: 2rem 0; }
.section-muted{ padding: 3rem 0; background: var(--slate-50); }
@media (min-width: 768px) {
    .section      { padding: 5rem 0; }
    .section-sm   { padding: 3rem 0; }
    .section-muted{ padding: 5rem 0; }
}
.section-dark {
    padding: 4rem 0; background: var(--navy-950); color: #fff; text-align: center;
    background-image:
      linear-gradient(rgba(0,17,60,0.92), rgba(0,17,60,0.92)),
      url('/img/IMG_0691.jpg');
    background-size: cover; background-position: center;
}
.section-dark h2 { font-size: 1.875rem; margin-bottom: 0.75rem; }
@media (min-width: 640px) { .section-dark h2 { font-size: 2.25rem; } }
.section-dark p { color: rgba(255,255,255,0.85); margin-bottom: 1.75rem; max-width: 40rem; margin-inline: auto; }
.section-title { font-size: 1.875rem; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
@media (min-width: 768px) { .section-title { font-size: 2.25rem; } }
.section-lead { color: var(--slate-600); margin-bottom: 2.5rem; max-width: 44rem; font-size: 1.0625rem; }
.section-header { margin-bottom: 3rem; }
.section-header .page-head-eyebrow {
    color: var(--amber-600);
}
.section-header .page-head-eyebrow::before { background: var(--amber-500); }

/* Stats (home) — números grandes */
.stats {
    display: grid; gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat {
    padding: 2rem 1.5rem;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-top: 4px solid var(--amber-500);
    border-radius: 2px;
}
.stat-value {
    font-size: 3rem; font-weight: 800; color: var(--navy-950);
    letter-spacing: -0.04em; line-height: 1;
}
.stat-unit { font-size: 1.25rem; font-weight: 600; color: var(--slate-500); margin-left: 0.25rem; }
.stat-label {
    color: var(--slate-600); margin-top: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8125rem; font-weight: 600;
}

/* Serviços — cards na home */
.services-grid {
    display: grid; gap: 1rem;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px){ .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card {
    background: #fff;
    border: 1px solid var(--slate-200);
    padding: 2rem 1.75rem;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: var(--amber-500); transform: scaleX(0); transform-origin: left;
    transition: transform .25s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,17,60,.08); border-color: transparent; }
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
    width: 3.25rem; height: 3.25rem;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
    background: var(--slate-50);
    border-radius: 2px;
}
.service-icon img { max-width: 70%; max-height: 70%; }
.service-card h3 {
    font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--navy-950); margin-bottom: 0.5rem;
}
.service-card p { color: var(--slate-600); font-size: 0.95rem; }

/* Serviços — páginas internas (cards grandes) */
.service-detail-grid {
    display: grid; gap: 1.25rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) { .service-detail-grid { grid-template-columns: repeat(2, 1fr); } }
.service-detail-card {
    background: #fff;
    border: 1px solid var(--slate-200);
    padding: 1.5rem;
    display: flex; gap: 1.25rem;
    align-items: flex-start;
    transition: border-color .2s, box-shadow .2s;
}
@media (min-width: 640px) { .service-detail-card { padding: 2.25rem; gap: 1.5rem; } }
.service-detail-card:hover { border-color: var(--amber-500); box-shadow: 0 4px 20px rgba(0,17,60,.06); }
.service-detail-icon {
    flex-shrink: 0; width: 3.5rem; height: 3.5rem;
    background: var(--navy-950);
    display: flex; align-items: center; justify-content: center;
    border-radius: 2px;
}
.service-detail-icon img { max-width: 65%; max-height: 65%; filter: brightness(0) invert(1); }
.service-detail-body h2 {
    font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--navy-950); margin-bottom: 0.5rem;
}
.service-detail-body p { color: var(--slate-600); }

/* =========================================================
   Empresa (2 colunas)
   ========================================================= */
.two-col {
    display: grid; gap: 3rem;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) { .two-col { grid-template-columns: 2fr 1fr; } }
.prose p {
    color: var(--slate-700); margin-bottom: 1.25rem; line-height: 1.75;
    font-size: 1rem;
}
.prose p:first-of-type { font-size: 1.125rem; color: var(--slate-800); }
.prose h2 {
    font-size: 1.25rem; color: var(--navy-950);
    margin-top: 2.5rem; margin-bottom: 1rem;
    letter-spacing: 0.06em; text-transform: uppercase;
}
.prose h2:first-child { margin-top: 0; }

.aside-card {
    background: var(--slate-50);
    border-left: 3px solid var(--amber-500);
    padding: 1.75rem;
    align-self: start;
}
.aside-card h3 {
    font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--slate-500); margin-bottom: 1.25rem;
}
.aside-list { list-style: none; padding: 0; }
.aside-list li { margin-bottom: 1rem; font-size: 0.9375rem; }
.aside-list li:last-child { margin-bottom: 0; }
.aside-list strong { display: block; color: var(--navy-950); font-weight: 600; }
.aside-list span { color: var(--slate-600); }
.aside-badges {
    display: flex; flex-wrap: wrap; gap: 1rem;
    margin-top: 1.5rem; padding-top: 1.5rem;
    border-top: 1px solid var(--slate-200);
    align-items: center;
}
.aside-badges img { height: 56px; width: auto; }

/* =========================================================
   Galeria
   ========================================================= */
.gallery-grid {
    display: grid; gap: 1.25rem;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px){ .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item {
    background: var(--slate-900);
    overflow: hidden; margin: 0;
    position: relative;
}
.gallery-image-wrap { aspect-ratio: 4 / 3; overflow: hidden; }
.gallery-image-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .6s, opacity .3s;
    opacity: 0.92;
}
.gallery-item:hover .gallery-image-wrap img { transform: scale(1.06); opacity: 1; }
.gallery-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 1.25rem;
    background: linear-gradient(transparent, rgba(0,17,60,0.9));
    color: #fff;
}
.gallery-caption-title { font-weight: 600; font-size: 1rem; }
.gallery-caption-desc { font-size: 0.8125rem; color: rgba(255,255,255,.85); margin-top: 0.25rem; }
.empty-state { text-align: center; padding: 5rem 0; color: var(--slate-500); }

/* =========================================================
   Contactos
   ========================================================= */
.contact-layout {
    display: grid; gap: 2.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) { .contact-layout { grid-template-columns: 1fr 1.5fr; } }
.contact-info {
    background: var(--navy-950);
    color: #fff;
    padding: 1.75rem;
}
@media (min-width: 640px) { .contact-info { padding: 2.5rem; } }
.contact-info-group { margin-bottom: 2rem; }
.contact-info-group:last-child { margin-bottom: 0; }
.contact-info-label {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--amber-400); margin-bottom: 0.5rem; font-weight: 600;
}
.contact-info-value { font-size: 1.0625rem; color: #fff; }
.contact-info a { color: #fff; text-decoration: none; }
.contact-info a:hover { color: var(--amber-400); }
.contact-facade {
    margin-top: 2.5rem;
    aspect-ratio: 4 / 3;
    background-image: url('/img/fachada.jpg');
    background-size: cover; background-position: center;
    border-radius: 2px;
}

/* Formulário */
.form-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-row-2 { grid-template-columns: repeat(2, 1fr); } }
.form-field { display: block; margin-bottom: 1.25rem; }
.form-label {
    display: block; font-size: 0.75rem; color: var(--slate-600);
    margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
.form-input, .form-textarea {
    width: 100%;
    border: 1px solid var(--slate-300);
    border-radius: 2px;
    padding: 0.75rem 0.9rem;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--navy-950);
    box-shadow: 0 0 0 3px rgba(0,17,60,0.08);
}
.form-textarea { resize: vertical; min-height: 7rem; }
.form-hidden { display: none; }

.alert { padding: 0.85rem 1rem; border-radius: 2px; margin-bottom: 1.5rem; font-size: 0.9375rem; }
.alert-success { background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-200); }
.alert-error { background: var(--red-50); color: var(--red-800); border: 1px solid var(--red-200); }
.alert ul { margin: 0; padding-left: 1.25rem; }

/* =========================================================
   Faixa de certificações
   ========================================================= */
.cert-strip {
    background: var(--slate-50);
    border-block: 1px solid var(--slate-200);
}
.cert-strip-inner {
    padding: 2rem 0;
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 2rem; justify-content: center;
}
.cert-strip-text {
    font-size: 0.8125rem; color: var(--slate-500);
    text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600;
}
.cert-strip img { height: 52px; width: auto; opacity: .85; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,0.7); }
.footer-grid {
    display: grid; gap: 2.5rem;
    grid-template-columns: 1fr;
    padding: 4rem 0 3rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-grid h4 {
    color: #fff; font-weight: 600;
    margin-bottom: 1rem; font-size: 0.8125rem;
    text-transform: uppercase; letter-spacing: 0.14em;
}
.footer-brand img { height: 2rem; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 0.9375rem; max-width: 28rem; }
.footer-grid ul { list-style: none; padding: 0; font-size: 0.9375rem; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-grid a { text-decoration: none; transition: color .15s; }
.footer-grid a:hover { color: var(--amber-400); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); }
.footer-bottom-inner {
    padding: 1.25rem 0;
    display: flex; flex-direction: column; gap: 0.5rem;
    font-size: 0.8125rem; color: rgba(255,255,255,0.5);
}
@media (min-width: 640px) {
    .footer-bottom-inner { flex-direction: row; justify-content: space-between; }
}

/* =========================================================
   Backoffice (mantido, alinhado à nova paleta)
   ========================================================= */
body.admin { background: var(--slate-100); min-height: 100vh; }
.admin-header { background: #fff; border-bottom: 1px solid var(--slate-200); }
.admin-header-inner { height: 3.5rem; display: flex; align-items: center; justify-content: space-between; }
.admin-brand { font-weight: 600; text-decoration: none; color: var(--navy-950); }
.admin-nav { display: flex; gap: 1rem; font-size: 0.875rem; }
.admin-nav a { color: var(--slate-600); text-decoration: none; }
.admin-nav a:hover { color: var(--navy-950); }
.admin-nav a.active { color: var(--navy-950); font-weight: 600; }
.admin-nav .logout { color: var(--red-600); }
.admin-nav .logout:hover { color: var(--red-800); }

.admin-body { padding: 2rem 0; }
.admin-card { background: #fff; border-radius: 4px; padding: 1.5rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.admin-card-hover:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.admin-stats { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .admin-stats { grid-template-columns: repeat(3, 1fr); } }
.admin-stat-value { font-size: 1.875rem; font-weight: 700; color: var(--navy-950); }
.admin-stat-value small { font-size: 1rem; color: var(--slate-400); font-weight: 400; }
.admin-stat-label { color: var(--slate-600); margin-top: 0.25rem; }
.admin-stat-link { text-decoration: none; color: inherit; display: block; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table thead { background: var(--slate-100); color: var(--slate-600); }
.admin-table th, .admin-table td { padding: 0.75rem 1rem; text-align: left; }
.admin-table tbody tr { border-top: 1px solid var(--slate-100); }
.admin-table code { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 0.75rem; color: var(--slate-500); }
.admin-table .cell-right { text-align: right; }
.link { color: var(--navy-950); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

.admin-form-max { max-width: 720px; }
.admin-form .form-input, .admin-form .form-textarea { font-size: 0.9375rem; }
.admin-form textarea.mono { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 0.8125rem; }
.admin-form-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy-950); }
.login-box { background: #fff; padding: 2rem; border-radius: 4px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); width: 100%; max-width: 22rem; }
.login-box h1 { font-size: 1.25rem; margin-bottom: 1.5rem; color: var(--navy-950); }

.flash { padding: 0.85rem 1rem; border-radius: 2px; margin-bottom: 1.5rem; font-size: 0.9375rem; }
.flash-success { background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-200); }
.flash-error { background: var(--red-50); color: var(--red-800); border: 1px solid var(--red-200); }

.gallery-admin-list { display: flex; flex-direction: column; gap: 0.75rem; }
.gallery-admin-item { background: #fff; border-radius: 4px; padding: 1rem; display: flex; gap: 1rem; align-items: flex-start; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.gallery-admin-thumb { width: 7rem; height: 7rem; object-fit: cover; border-radius: 2px; border: 1px solid var(--slate-200); flex-shrink: 0; }
.gallery-admin-meta { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.gallery-admin-meta input, .gallery-admin-meta textarea { border: 1px solid var(--slate-200); border-radius: 2px; padding: 0.25rem 0.5rem; font-size: 0.875rem; width: 100%; }
.gallery-admin-meta input.title { font-weight: 500; }
.gallery-admin-actions { display: flex; flex-direction: column; gap: 0.25rem; }
.gallery-admin-actions button { font-size: 0.75rem; color: var(--slate-500); text-align: left; padding: 0; }
.gallery-admin-actions button:hover { color: var(--navy-950); }
.gallery-admin-actions .danger { color: var(--red-600); }
.gallery-admin-actions .danger:hover { color: var(--red-800); }
.gallery-admin-row-meta { font-size: 0.75rem; color: var(--slate-500); display: flex; align-items: center; gap: 0.5rem; }
.sep { color: var(--slate-300); }

.admin-layout-sidebar { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .admin-layout-sidebar { grid-template-columns: 1fr 2fr; } }

.inbox-layout { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .inbox-layout { grid-template-columns: 2fr 3fr; } }
.inbox-list { background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.inbox-list ul { list-style: none; padding: 0; margin: 0; }
.inbox-list li + li { border-top: 1px solid var(--slate-100); }
.inbox-item { display: block; padding: 0.75rem 1rem; text-decoration: none; color: inherit; }
.inbox-item:hover { background: var(--slate-100); }
.inbox-item.active { background: var(--slate-50); border-left: 3px solid var(--amber-500); padding-left: calc(1rem - 3px); }
.inbox-item-head { display: flex; align-items: center; gap: 0.5rem; }
.inbox-item-name { font-weight: 500; color: var(--slate-600); }
.inbox-item-name.unread { color: var(--navy-950); }
.inbox-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: var(--amber-500); display: inline-block; }
.inbox-item-date { margin-left: auto; font-size: 0.75rem; color: var(--slate-400); }
.inbox-item-subject { font-size: 0.875rem; color: var(--slate-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.message-view { background: #fff; border-radius: 4px; padding: 1.5rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.message-view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.message-view-subject { font-size: 1.125rem; font-weight: 600; }
.message-view-meta { font-size: 0.875rem; color: var(--slate-600); margin-top: 0.25rem; }
.message-view-date { font-size: 0.75rem; color: var(--slate-400); margin-top: 0.25rem; }
.message-view-actions { display: flex; gap: 0.5rem; }
.message-view-actions button { font-size: 0.75rem; color: var(--slate-600); }
.message-view-actions button:hover { color: var(--navy-950); }
.message-view-actions .danger { color: var(--red-600); }
.message-view-actions .danger:hover { color: var(--red-800); }
.message-view-body { color: var(--slate-800); white-space: pre-wrap; line-height: 1.7; }
.message-view-footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--slate-100); }

.text-muted { color: var(--slate-500); }
.text-center { text-align: center; }
.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; }

/* =========================================================
   Cookie consent banner (RGPD)
   Mostrado até o utilizador clicar OK; guarda escolha em localStorage.
   ========================================================= */
.cookie-banner {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 60;
    background: var(--navy-950);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,17,60,0.25);
    padding: 1rem 1.25rem;
    display: none;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { flex: 1 1 280px; font-size: 0.875rem; line-height: 1.55; color: #e2e8f0; margin: 0; }
.cookie-banner a { color: var(--amber-400); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner a:hover { color: var(--amber-500); }
.cookie-banner .cookie-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.cookie-banner button {
    font-size: 0.875rem; font-weight: 600;
    padding: 0.5rem 1rem; border-radius: 6px;
    transition: background .15s, color .15s;
}
.cookie-banner .btn-accept { background: var(--amber-500); color: var(--navy-950); }
.cookie-banner .btn-accept:hover { background: var(--amber-400); }
.cookie-banner .btn-close { background: transparent; color: #cbd5e1; border: 1px solid rgba(255,255,255,0.2); }
.cookie-banner .btn-close:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
@media (min-width: 768px) {
    .cookie-banner { left: auto; right: 1.5rem; bottom: 1.5rem; max-width: 520px; }
}
