/* ============================================================
   RESET + BASE
   ============================================================ */
* { margin:0; padding:0; box-sizing:border-box; font-family:'Segoe UI',Roboto,system-ui,sans-serif; }
body { background:#f9f9f9; color:#1e1e1e; line-height:1.6; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
header {
    background:#f5f5f5;
    color:#0a2b3c;
    padding:1rem 2rem;
    position:sticky; top:0; z-index:100;
    box-shadow:0 4px 12px rgba(0,0,0,0.08);
    border-bottom:3px solid #c0392b;
}
.nav-container {
    max-width:1300px; margin:0 auto;
    display:flex; justify-content:space-between; align-items:center;
    gap:1rem; flex-wrap:wrap;
}
.logo { display:flex; align-items:center; gap:12px; text-decoration:none; color:#0a2b3c; }
.logo img { height:60px; width:auto; display:block; object-fit:contain; }
.logo-text { font-size:1.6rem; font-weight:700; line-height:1.1; color:#0a2b3c; }
.logo-text span { color:#c0392b; }

nav ul { display:flex; list-style:none; gap:2rem; flex-wrap:wrap; }
nav a {
    color:#0a2b3c; text-decoration:none; font-weight:600;
    padding:0.5rem 0.2rem; border-bottom:3px solid transparent;
    transition:0.3s; font-size:1.05rem;
}
nav a:hover, nav a.active { border-bottom-color:#c0392b; color:#c0392b; }

nav a.admin-link {
    color: #0a2b3c;
    background: #ffe9e6;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    border-bottom: none;
}
nav a.admin-link:hover,
nav a.admin-link.active {
    background: #c0392b;
    color: #fff;
    border-bottom-color: transparent;
}

nav a.logout-link {
    color: #c0392b;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    border-bottom: none;
    border: 2px solid #c0392b;
}
nav a.logout-link:hover {
    background: #c0392b;
    color: #fff;
    border-bottom-color: transparent;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid #0a2b3c;
    color: #0a2b3c;
    font-size: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    flex-shrink: 0;
}
.menu-toggle:hover { background: #0a2b3c; color: #fff; }
.menu-toggle i { font-size: 1.5rem; line-height: 1; }

/* ============================================================
   BOTÕES GENÉRICOS
   ============================================================ */
.btn {
    display:inline-block; background:#c0392b; color:#fff;
    padding:0.9rem 2.2rem; border-radius:40px; text-decoration:none;
    font-weight:600; border:none; cursor:pointer; transition:0.3s;
    box-shadow:0 6px 14px rgba(192,57,43,0.3);
}
.btn:hover { background:#a93226; transform:translateY(-2px); }

.container { max-width:1300px; margin:0 auto; padding:0 2rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero { background:linear-gradient(120deg,#eef2f5 0%,#fff 100%); padding:4rem 0 5rem; }
.hero-content { display:flex; align-items:center; gap:3rem; flex-wrap:wrap; }
.hero-text { flex:1 1 400px; }
.hero-text h1 { font-size:3.2rem; font-weight:800; line-height:1.2; margin-bottom:1.5rem; color:#0a2b3c; }
.hero-text h1 span { color:#c0392b; }
.hero-text p { font-size:1.2rem; color:#2c3e50; margin-bottom:2rem; max-width:600px; }
.hero-image {
    flex:1 1 400px; border-radius:30px; height:350px;
    background-size:cover;
    background-position:center;
    box-shadow:20px 20px 30px rgba(0,0,0,0.1);
}

/* ============================================================
   FEATURES
   ============================================================ */
.features { padding:5rem 0; background:#fff; }
.section-title { text-align:center; font-size:2.5rem; font-weight:700; margin-bottom:1rem; color:#0a2b3c; }
.section-sub { text-align:center; color:#5a6c7a; max-width:700px; margin:0 auto 3rem; font-size:1.2rem; }
.grid-3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:2.5rem; }
.feature-card {
    background:#f8faff; padding:2.5rem 1.8rem; border-radius:24px;
    text-align:center; border:1px solid #e9eef3;
}
.feature-card i { font-size:2.8rem; color:#c0392b; margin-bottom:1.5rem; }
.feature-card h3 { font-size:1.6rem; margin-bottom:0.8rem; color:#0a2b3c; }
.feature-card p { color:#4a5b68; }

/* ============================================================
   PORTFÓLIO
   ============================================================ */
.portfolio-section { padding:5rem 0; background:#f2f6fa; }
.portfolio-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:2rem; margin-top:3rem; }
.portfolio-item {
    border-radius:20px; overflow:hidden; position:relative;
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
    aspect-ratio:4/3; background:#1e2b36;
}
.portfolio-item img { width:100%; height:100%; object-fit:cover; display:block; transition:0.5s; }
.portfolio-item:hover img { transform:scale(1.08); }
.portfolio-overlay {
    position:absolute; bottom:0; left:0; right:0;
    background:linear-gradient(to top,#0a2b3cee,transparent);
    color:#fff; padding:1.8rem 1.5rem 1.5rem;
    opacity:0; transform:translateY(10px); transition:0.3s;
}
.portfolio-item:hover .portfolio-overlay { opacity:1; transform:translateY(0); }
.portfolio-overlay h4 { font-size:1.6rem; font-weight:700; margin-bottom:0.3rem; }
.portfolio-overlay p { color:#ddd; }

/* ============================================================
   SOBRE
   ============================================================ */
.about-section { padding:5rem 0; background:#fff; }
.about-grid { display:flex; gap:3.5rem; align-items:center; flex-wrap:wrap; }
.about-text { flex:1 1 400px; }
.about-text h2 { font-size:2.5rem; color:#0a2b3c; margin-bottom:1.5rem; }
.about-text p { color:#2e4050; margin-bottom:1.5rem; font-size:1.1rem; }
.about-text ul { list-style:none; margin:2rem 0; }
.about-text li { margin-bottom:0.8rem; display:flex; align-items:center; gap:12px; font-size:1.1rem; }
.about-text li i { color:#c0392b; font-size:1.3rem; width:25px; }
.about-image {
    flex:1 1 400px; border-radius:30px; min-height:400px;
    background-size:cover;
    background-position:center;
    box-shadow:20px 20px 30px rgba(0,0,0,0.08);
}

/* ============================================================
   ORÇAMENTO
   ============================================================ */
.orcamento-section { padding:5rem 0; background:#f2f6fa; }
.form-container {
    background:#fff; max-width:850px; margin:2rem auto 0;
    padding:3rem 2.5rem; border-radius:40px;
    box-shadow:0 25px 40px rgba(0,0,0,0.08);
}
.form-container h2 { font-size:2.2rem; color:#0a2b3c; margin-bottom:0.5rem; text-align:center; }
.form-container > p { text-align:center; color:#5a6c7a; margin-bottom:2.5rem; }
.form-row { display:flex; gap:1.5rem; flex-wrap:wrap; margin-bottom:1.5rem; }
.form-group { flex:1 1 200px; display:flex; flex-direction:column; }
.form-group.full-width { flex:1 1 100%; }
.form-group label { font-weight:600; margin-bottom:0.5rem; color:#0a2b3c; font-size:0.95rem; }
.form-group input, .form-group select, .form-group textarea {
    padding:0.9rem 1.2rem; border:2px solid #e2e8f0; border-radius:20px;
    font-size:1rem; background:#fbfdff; font-family:inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline:none; border-color:#c0392b; box-shadow:0 0 0 4px rgba(192,57,43,0.15);
}
.form-group textarea { resize:vertical; min-height:130px; }
.form-container .btn { width:100%; padding:1.1rem; font-size:1.2rem; margin-top:1rem; }

/* ============================================================
   ALERTAS
   ============================================================ */
.alert { padding:1rem 1.5rem; border-radius:16px; margin-bottom:1.5rem; font-weight:600; }
.alert-success { background:#d4edda; color:#155724; border:2px solid #27ae60; }
.alert-error { background:#f8d7da; color:#721c24; border:2px solid #c0392b; }

/* ============================================================
   ADMIN: CARTÕES E CAMPOS
   ============================================================ */
.admin-container {
    max-width:1100px; margin:3rem auto; padding:0 2rem;
}
.admin-container h1 { color:#0a2b3c; margin-bottom:2rem; }
.admin-card {
    background:#fff; border-radius:24px; padding:2rem;
    box-shadow:0 10px 30px rgba(0,0,0,0.08); margin-bottom:2rem;
}
.admin-card h3 { color:#0a2b3c; margin-bottom:1.5rem; font-size:1.4rem; border-bottom:2px solid #e2e8f0; padding-bottom:0.8rem; }
.admin-field { margin-bottom:1.2rem; }
.admin-field label { display:block; font-weight:600; font-size:0.9rem; color:#0a2b3c; margin-bottom:0.4rem; }
.admin-field input, .admin-field textarea, .admin-field select {
    width:100%; padding:0.7rem 1rem;
    border:2px solid #e2e8f0; border-radius:12px;
    font-size:0.95rem; font-family:inherit;
    color: #0a2b3c;
    background: #fff;
}
.admin-field input:focus, .admin-field textarea:focus, .admin-field select:focus {
    outline:none; border-color:#c0392b;
}
.admin-field textarea { min-height:80px; resize:vertical; }

.admin-portfolio-item {
    background:#f8faff; border:1px solid #e2e8f0;
    border-radius:16px; padding:1.2rem; margin-bottom:1rem;
}
.admin-portfolio-item h5 {
    display:flex; justify-content:space-between; align-items:center;
    color:#0a2b3c; margin-bottom:1rem; font-size:1rem;
}
.btn-danger {
    background:#e74c3c; color:#fff; border:none; border-radius:50%;
    width:30px; height:30px; cursor:pointer; font-size:1rem;
}
.btn-danger:hover { background:#c0392b; }
.btn-success { background:#27ae60; color:#fff; padding:0.8rem 1.8rem; border:none; border-radius:30px; cursor:pointer; font-weight:600; }
.btn-success:hover { background:#219a52; }
.btn-secondary { background:#95a5a6; color:#fff; padding:0.8rem 1.8rem; border:none; border-radius:30px; cursor:pointer; font-weight:600; text-decoration:none; display:inline-block; }
.btn-secondary:hover { background:#7f8c8d; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-box {
    max-width:400px; margin:5rem auto; background:#fff;
    padding:2.5rem; border-radius:24px;
    box-shadow:0 20px 40px rgba(0,0,0,0.1);
}
.login-box h1 { text-align:center; color:#0a2b3c; margin-bottom:2rem; }
.login-box .form-group { margin-bottom:1.2rem; }
.login-box .btn { width:100%; margin-top:1rem; }

/* ============================================================
   LAYOUT ADMIN (SIDEBAR + CONTENT)
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 80vh;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    gap: 2rem;
    align-items: flex-start;
}

.admin-sidebar {
    flex: 0 0 260px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}
.admin-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0a2b3c;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}
.admin-sidebar-header i { color: #c0392b; }

.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: #2e4050;
    font-weight: 600;
    transition: 0.2s;
    font-size: 0.95rem;
}
.admin-nav a i { width: 20px; text-align: center; color: #5a6c7a; transition: 0.2s; }
.admin-nav a:hover { background: #f0f4f8; color: #c0392b; }
.admin-nav a:hover i { color: #c0392b; }
.admin-nav a.active {
    background: #c0392b;
    color: #fff;
    box-shadow: 0 6px 14px rgba(192,57,43,0.3);
}
.admin-nav a.active i { color: #fff; }
.admin-nav a.logout { color: #c0392b; }
.admin-nav a.logout:hover { background: #ffe9e6; }

.admin-nav-section {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8fa7bb;
    padding: 1rem 1rem 0.4rem;
    margin-top: 0.5rem;
}
.admin-nav-section:first-child {
    margin-top: 0;
    padding-top: 0;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 2px solid #e2e8f0;
}
.admin-user i { font-size: 2rem; color: #c0392b; }
.admin-user strong { display: block; color: #0a2b3c; font-size: 0.95rem; }
.admin-user small { color: #5a6c7a; font-size: 0.8rem; }

.admin-content { flex: 1; min-width: 0; }
.admin-page-title {
    color: #0a2b3c;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-page-title i { color: #c0392b; }

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.admin-tile {
    display: block;
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: 0.3s;
    text-align: center;
}
.admin-tile:hover {
    transform: translateY(-4px);
    border-color: #c0392b;
    box-shadow: 0 15px 40px rgba(192,57,43,0.15);
}
.admin-tile i { font-size: 2.5rem; color: #c0392b; margin-bottom: 1rem; }
.admin-tile h3 { color: #0a2b3c; margin-bottom: 0.5rem; font-size: 1.2rem; }
.admin-tile p { color: #5a6c7a; font-size: 0.9rem; }

/* ============================================================
   BADGE DE CONTAGEM NO MENU
   ============================================================ */
.badge-count {
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
}
.admin-nav a { display: flex; align-items: center; gap: 12px; }
.admin-nav a .badge-count { margin-left: auto; }

/* ============================================================
   FILTROS DE PEDIDOS
   ============================================================ */
.pedidos-filtros {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.pedidos-filtros a {
    padding: 0.6rem 1.1rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    color: #2e4050;
    background: #fff;
    border: 2px solid #e2e8f0;
    font-size: 0.9rem;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pedidos-filtros a:hover {
    border-color: #c0392b;
    color: #c0392b;
    text-decoration: none;
}
.pedidos-filtros a.active {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}
.pedidos-filtros a small {
    opacity: 0.75;
    font-weight: 500;
    text-decoration: none;
}

/* ============================================================
   LISTA DE PEDIDOS
   ============================================================ */
.pedidos-lista {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.pedido-card {
    background: #fff;
    border-radius: 16px;
    padding: 1rem 1.3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: 0.2s;
    border-left: 5px solid #cbd5e0;
}
.pedido-card:hover {
    transform: translateX(4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.pedido-card.estado-novo { border-left-color: #3498db; }
.pedido-card.estado-contactado { border-left-color: #f39c12; }
.pedido-card.estado-combinado { border-left-color: #27ae60; }
.pedido-card.estado-descartado { border-left-color: #95a5a6; opacity: 0.7; }

.pedido-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.pedido-card-header strong { color: #0a2b3c; font-size: 1.05rem; }
.pedido-card-header small { color: #5a6c7a; font-size: 0.85rem; display: block; }
.pedido-card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
    color: #5a6c7a;
}
.pedido-card-body i { color: #c0392b; margin-right: 4px; }
.pedido-card-body .pedido-data { margin-left: auto; }

/* Badges de estado */
.estado-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.estado-badge.estado-novo { background: #d6eaf8; color: #1f618d; }
.estado-badge.estado-contactado { background: #fdebd0; color: #b9770e; }
.estado-badge.estado-combinado { background: #d4efdf; color: #1e8449; }
.estado-badge.estado-descartado { background: #eaeded; color: #566573; }

/* ============================================================
   PAINEL LATERAL DOS PEDIDOS
   ============================================================ */
.pedido-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998; opacity: 0; visibility: hidden; transition: 0.3s;
}
.pedido-overlay.open { opacity: 1; visibility: visible; }

.pedido-panel {
    position: fixed; top: 0; right: 0;
    width: 100%; max-width: 600px; height: 100%;
    background: #fff; z-index: 999;
    box-shadow: -10px 0 40px rgba(0,0,0,0.2);
    transition: transform 0.4s ease;
    overflow-y: auto; padding: 2.5rem 2rem;
    transform: translateX(105%);
    visibility: hidden;
    color: #0a2b3c;
}
.pedido-panel.open {
    transform: translateX(0);
    visibility: visible;
}

#novoPedidoPanel,
#editarPedidoPanel {
    max-width: 700px;
}

.pedido-close {
    position: absolute; top: 1.5rem; right: 1.5rem;
    background: transparent; border: none;
    font-size: 2rem; cursor: pointer; color: #5a6c7a;
    line-height: 1; padding: 0 8px;
    z-index: 2;
}
.pedido-close:hover { color: #c0392b; }

.pedido-panel h2 {
    color: #0a2b3c; margin-bottom: 0.8rem;
    padding-right: 2.5rem; font-size: 1.6rem;
}
.pedido-panel h4 {
    color: #0a2b3c; margin: 1.5rem 0 0.5rem;
    font-size: 1rem; border-top: 2px solid #e2e8f0; padding-top: 1rem;
}

.pedido-info {
    display: flex; flex-direction: column; gap: 0.7rem;
    margin: 1.2rem 0; font-size: 1rem;
}
.pedido-info div { display: flex; align-items: center; gap: 10px; }
.pedido-info i { color: #c0392b; width: 20px; text-align: center; }
.pedido-info a { color: #2e4050; text-decoration: none; }
.pedido-info a:hover { color: #c0392b; text-decoration: underline; }

.pedido-mensagem p {
    background: #f8faff;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    border-left: 4px solid #c0392b;
    color: #2e4050;
    line-height: 1.6;
}

.pedido-acoes {
    display: flex; gap: 0.5rem; flex-wrap: wrap;
    margin-top: 1rem;
}
.btn-acao {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0.7rem 1.2rem; border-radius: 30px;
    text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: 0.2s;
}
.btn-email { background: #3498db; color: #fff; }
.btn-email:hover { background: #2980b9; }
.btn-tel { background: #27ae60; color: #fff; }
.btn-tel:hover { background: #219a52; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5b; }

.pedido-mudar-estado form { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.btn-estado {
    padding: 0.5rem 1rem;
    border-radius: 30px;
    border: 2px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: #2e4050;
    transition: 0.2s;
}
.btn-estado:hover { border-color: #c0392b; color: #c0392b; }
.btn-estado.active {
    background: #c0392b; border-color: #c0392b; color: #fff;
}

.pedido-perigo {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}
.btn-apagar {
    background: transparent;
    color: #c0392b;
    border: 2px solid #c0392b;
    padding: 0.7rem 1.4rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    width: 100%;
}
.btn-apagar:hover { background: #c0392b; color: #fff; }

/* ============================================================
   BOTÃO "ADICIONAR PEDIDO MANUAL"
   ============================================================ */
.btn-novo-pedido {
    background: #0a2b3c;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    box-shadow: 0 6px 14px rgba(10,43,60,0.2);
}
.btn-novo-pedido:hover {
    background: #14405a;
    transform: translateY(-2px);
}
.btn-novo-pedido i { font-size: 1rem; }

/* ============================================================
   LINKS SOCIAIS NO FOOTER
   ============================================================ */
.social-link {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 0 !important;
    transition: 0.2s;
    text-decoration: none;
}
.social-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #1e4055;
    border-radius: 50%;
    color: #fff !important;
    font-size: 0.9rem;
    transition: 0.3s;
    flex-shrink: 0;
}
.social-link:hover i {
    background: #c0392b;
    transform: translateY(-2px);
}
.social-link:hover {
    color: #e74c3c !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer { background:#0a2b3c; color:#cddbe8; padding:3rem 2rem 2rem; margin-top:3rem; }
.footer-content {
    max-width:1300px; margin:0 auto;
    display:flex; flex-wrap:wrap; justify-content:space-between; gap:2rem;
}
.footer-col { flex:1 1 220px; }
.footer-logo { display:flex; align-items:center; gap:12px; margin-bottom:1rem; }
.footer-logo img {
    height:60px; width:auto; object-fit:contain;
    background:#fff; border-radius:10px; padding:6px 10px;
}
.footer-col h4 { color:#fff; margin-bottom:1.2rem; font-size:1.3rem; }
.footer-col p, .footer-col a {
    color:#b0c4d9; text-decoration:none; display:block;
    margin-bottom:0.5rem; transition:color 0.2s;
}
.footer-col a:hover { color:#e74c3c; }
.footer-bottom {
    text-align:center; border-top:1px solid #1e4055;
    margin-top:2.5rem; padding-top:1.8rem; color:#8fa7bb;
}

/* ============================================================
   EDITOR RICO
   ============================================================ */
.editor-rico { min-height: 250px; }

/* ============================================================
   MENU SANDUÍCHE DO ADMIN (MOBILE)
   ============================================================ */
.admin-menu-toggle {
    display: none;
    background: #fff;
    border: 2px solid #0a2b3c;
    color: #0a2b3c;
    padding: 0.7rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    transition: 0.2s;
}
.admin-menu-toggle:hover { background: #0a2b3c; color: #fff; }
.admin-menu-toggle i { font-size: 1.1rem; }

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
.admin-sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.admin-sidebar-close {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: auto;
    line-height: 1;
}

/* ============================================================
   DASHBOARD LIMPO
   ============================================================ */
.dash-header { margin-bottom: 2rem; }
.dash-header h1 {
    color: #0a2b3c;
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.dash-header h1 span { color: #c0392b; }
.dash-header p { color: #5a6c7a; font-size: 0.95rem; }

.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.dash-stat {
    background: #fff;
    padding: 1.3rem 1.5rem;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: 0.25s;
}
.dash-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.dash-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.dash-stat strong {
    display: block;
    color: #0a2b3c;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 0.3rem;
}
.dash-stat span { color: #5a6c7a; font-size: 0.85rem; }

.dash-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.8rem;
}
.dash-shortcut {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: #fff;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: 0.25s;
    border-left: 4px solid transparent;
}
.dash-shortcut:hover {
    border-left-color: #c0392b;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transform: translateX(3px);
}
.dash-shortcut-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f0f4f8;
    color: #c0392b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.dash-shortcut strong {
    display: block;
    color: #0a2b3c;
    font-size: 0.95rem;
    margin-bottom: 2px;
}
.dash-shortcut span { color: #5a6c7a; font-size: 0.82rem; }
.dash-shortcut-arrow {
    margin-left: auto;
    color: #cbd5e0;
    font-size: 0.9rem;
    transition: 0.25s;
}
.dash-shortcut:hover .dash-shortcut-arrow {
    color: #c0392b;
    transform: translateX(3px);
}
/* ============================================================
   SECÇÕES COLAPSÁVEIS NO MENU ADMIN
   ============================================================ */
.admin-nav-group {
    margin-bottom: 4px;
}

.admin-nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0.8rem 1rem;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: #2e4050;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
    text-align: left;
    font-family: inherit;
}
.admin-nav-group-toggle:hover {
    background: #f0f4f8;
    color: #c0392b;
}
.admin-nav-group-toggle.active {
    color: #c0392b;
}
.admin-nav-group-toggle.active .arrow {
    transform: rotate(90deg);
}
.admin-nav-group-toggle i {
    width: 20px;
    text-align: center;
    color: #5a6c7a;
    transition: 0.2s;
}
.admin-nav-group-toggle:hover i,
.admin-nav-group-toggle.active i {
    color: #c0392b;
}
.admin-nav-group-toggle span {
    flex: 1;
}
.admin-nav-group-toggle .arrow {
    width: auto;
    font-size: 0.75rem;
    color: #8fa7bb;
    transition: transform 0.25s ease;
}

.admin-nav-group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
    padding-left: 12px;
    border-left: 2px solid #e2e8f0;
    margin-left: 1rem;
}
.admin-nav-group.open .admin-nav-group-content {
    max-height: 500px;
    opacity: 1;
    padding-top: 4px;
    padding-bottom: 4px;
}

.admin-nav-group-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: #2e4050;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
}
.admin-nav-group-content a i {
    width: 20px;
    text-align: center;
    color: #8fa7bb;
    transition: 0.2s;
    font-size: 0.85rem;
}
.admin-nav-group-content a:hover {
    background: #f0f4f8;
    color: #c0392b;
}
.admin-nav-group-content a:hover i {
    color: #c0392b;
}
.admin-nav-group-content a.active {
    background: #c0392b;
    color: #fff;
    box-shadow: 0 4px 10px rgba(192,57,43,0.25);
}
.admin-nav-group-content a.active i {
    color: #fff;
}

/* ============================================================
   FATURAS: tabela em desktop, cartões em mobile
   ============================================================ */
.faturas-tabela { display: block; }
.faturas-cartoes { display: none; }

@media (max-width: 768px) {
    .faturas-tabela { display: none; }
    .faturas-cartoes { display: block; }
}

/* ============================================================
   CARTÕES DE PEDIDOS E FATURAS (dashboard) — ÚNICO BLOCO
   ============================================================ */
.faturas-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fat-card {
    background: #f8fafc;
    border: 1px solid #e8eef5;
    border-radius: 12px;
    padding: 14px 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    opacity: 0;
    transform: translateY(6px);
    animation: fatFadeIn 0.45s ease forwards;
}

.fat-card:hover {
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(30, 60, 90, 0.08);
    transform: translateY(-1px);
}

@keyframes fatFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.fat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.fat-mes {
    font-size: 0.92rem;
    font-weight: 600;
    color: #2e4050;
    letter-spacing: 0.2px;
}

.fat-total {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0a2b3c;
    font-variant-numeric: tabular-nums;
}

.fat-total small {
    font-size: 0.75rem;
    font-weight: 500;
    color: #5a6c7a;
    margin-left: 2px;
}

/* Barra fina (usada nas faturas) */
.fat-bar {
    display: flex;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e8eef5;
    margin-bottom: 10px;
}

/* Barras coloridas (faturas + pedidos) */
.fat-bar-paga,
.fat-bar-porpg,
.fat-bar-azul,
.fat-bar-novo,
.fat-bar-contactado,
.fat-bar-combinado {
    height: 100%;
    display: block;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(.22,.8,.36,1);
}

.fat-bar-paga       { background: linear-gradient(90deg, #2ecc71, #27ae60); }
.fat-bar-porpg      { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.fat-bar-azul       { background: linear-gradient(90deg, #3498db, #2980b9); }
.fat-bar-novo       { background: linear-gradient(90deg, #3498db, #2980b9); }
.fat-bar-contactado { background: linear-gradient(90deg, #f39c12, #e67e22); }
.fat-bar-combinado  { background: linear-gradient(90deg, #2ecc71, #27ae60); }

/* Legenda (faturas) */
.fat-legend {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.82rem;
    color: #4a5a68;
    flex-wrap: wrap;
}

.fat-leg-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}

.fat-leg-item strong {
    font-weight: 600;
    color: #2e4050;
}

.fat-leg-item em {
    font-style: normal;
    color: #8494a2;
    font-size: 0.78rem;
}

/* Linhas de estado dentro do cartão de pedidos */
.ped-estado-linhas {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.ped-estado-linha {
    display: grid;
    grid-template-columns: 110px 1fr 28px;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #4a5a68;
}

.ped-estado-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #2e4050;
    white-space: nowrap;
}

.ped-estado-bar {
    height: 8px;
    border-radius: 999px;
    background: #e8eef5;
    overflow: hidden;
    display: block;
}

.ped-estado-bar > div {
    height: 100%;
    display: block;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(.22,.8,.36,1);
}

.ped-estado-num {
    text-align: right;
    font-weight: 700;
    color: #0a2b3c;
    font-variant-numeric: tabular-nums;
}

/* Dots coloridos */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-green   { background: #27ae60; }
.dot-red     { background: #c0392b; }
.dot-azul    { background: #2980b9; }
.dot-laranja { background: #e67e22; }
.dot-verde   { background: #27ae60; }

/* ============================================================
   SELECTS DENTRO DOS PAINÉIS LATERAIS
   (corrige o texto branco em fundo branco)
   ============================================================ */
.pedido-panel select,
.pedido-panel select option,
.pedido-panel input,
.pedido-panel textarea,
select#regObra,
select#regObra option,
select#regEmp,
select#regEmp option {
    color: #0a2b3c !important;
    background: #ffffff !important;
    -webkit-text-fill-color: #0a2b3c !important;
    opacity: 1 !important;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 900px) {
    .nav-container {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        position: relative;
    }
    .logo img { height: 48px; }
    .menu-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
        margin-right: 0;
    }
    nav {
        order: 3;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        flex-basis: 100%;
    }
    nav.open { max-height: 600px; }
    nav ul {
        flex-direction: column;
        gap: 0;
        padding-top: 1.2rem;
        margin-top: 1.2rem;
        border-top: 2px solid #e2e8f0;
        width: 100%;
    }
    nav ul li {
        width: 100%;
        border-bottom: 1px solid #e2e8f0;
    }
    nav ul li:last-child { border-bottom: none; }
    nav a {
        display: block;
        padding: 1rem 0.5rem;
        font-size: 1.05rem;
        border-bottom: none !important;
        text-align: left;
    }
    nav a.admin-link,
    nav a.logout-link {
        border-radius: 12px;
        text-align: center;
        margin: 0.5rem 0;
        padding: 0.9rem 1rem;
    }

    .hero-text h1 { font-size: 2.4rem; }
    .footer-logo img { height: 55px; }
    .form-container { padding: 2rem 1.5rem; }
    .about-grid { flex-direction: column-reverse; }

    .about-image {
        width: 100%;
        min-height: 280px;
        background-size: cover;
        background-position: center;
    }

    .admin-layout {
        flex-direction: column;
        padding: 0 1rem;
        margin-top: 1.5rem;
    }
    .admin-content { width: 100%; }
    .admin-menu-toggle { display: inline-flex; }
    .admin-sidebar-overlay { display: block; }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        z-index: 999;
        border-radius: 0 24px 24px 0;
        padding: 1.5rem;
        overflow-y: auto;
        transition: left 0.35s ease;
        flex: none;
        box-shadow: 10px 0 40px rgba(0,0,0,0.2);
        display: flex !important;
        flex-direction: column;
    }
    .admin-sidebar.open { left: 0; }
    .admin-sidebar-header {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #fff;
        background: #0a2b3c;
        padding: 1rem 1.2rem;
        margin: -1.5rem -1.5rem 1.2rem -1.5rem;
        border-bottom: none;
        border-radius: 0 24px 0 0;
    }
    .admin-sidebar-header i { color: #c0392b; }
    .admin-sidebar-close { display: block; }

    .admin-sidebar .admin-nav {
        display: flex !important;
        flex-direction: column !important;
        max-height: none !important;
        overflow: visible !important;
        gap: 4px;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .admin-sidebar .admin-nav a {
        display: flex !important;
        padding: 0.9rem 1rem !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #2e4050 !important;
        background: transparent;
        text-decoration: none;
        font-weight: 600;
        border-radius: 12px;
        border-bottom: none !important;
    }
    .admin-sidebar .admin-nav a i {
        width: 20px;
        text-align: center;
        color: #5a6c7a;
    }
    .admin-sidebar .admin-nav a.active {
        background: #c0392b !important;
        color: #fff !important;
    }
    .admin-sidebar .admin-nav a.active i { color: #fff !important; }
    .admin-sidebar .admin-nav a.logout { color: #c0392b !important; }
    .admin-user { display: flex; }
}

@media (max-width: 768px) {
    .pedido-panel { max-width: 100%; padding: 2rem 1.3rem; }
    .pedido-card-body { font-size: 0.82rem; gap: 0.7rem; }
    .pedido-card-body .pedido-data { margin-left: 0; }
}

@media (max-width: 600px) {
    .dash-header h1 { font-size: 1.5rem; }
    .dash-stat { padding: 1rem 1.1rem; }
    .dash-stat-icon { width: 44px; height: 44px; font-size: 1.2rem; }
    .dash-stat strong { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 1.2rem; }
    .hero-text h1 { font-size: 2rem; }
    .logo-text { font-size: 1.3rem; }
    .logo img { height: 42px; }
    .footer-logo img { height: 48px; }
    .about-image { min-height: 220px; }

    .menu-toggle {
        width: 46px;
        height: 46px;
        font-size: 1.3rem;
    }
    .menu-toggle i { font-size: 1.3rem; }

    .fat-legend { flex-direction: column; gap: 4px; }
    .ped-estado-linha {
        grid-template-columns: 100px 1fr 24px;
        gap: 6px;
    }
    .ped-estado-bar { display: none; }
}
/* ============================================================
   LIGHTBOX DO PORTFÓLIO
   ============================================================ */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 30, 0.96);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox.open {
    display: flex;
    opacity: 1;
}

/* Botão fechar */
.lb-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
    z-index: 10;
}
.lb-close:hover { opacity: 1; transform: scale(1.1); }

/* Setas */
.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.lb-nav:hover { background: rgba(255,255,255,0.25); }
.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }

/* Conteúdo */
.lb-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#lbImg {
    max-width: 90vw;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    background: #111;
}

/* Info por baixo da imagem */
.lb-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: 90vw;
    color: #fff;
}

.lb-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}
.lb-text strong {
    font-size: 1.1rem;
    font-weight: 700;
}
.lb-text span {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.7);
}

.lb-counter {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.1);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Miniaturas */
.lb-thumbs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90vw;
}

.lb-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
    padding: 0;
}
.lb-thumb:hover { opacity: 0.9; }
.lb-thumb.active {
    border-color: #c0392b;
    opacity: 1;
}

/* Mobile */
@media (max-width: 768px) {
    .lightbox { padding: 1rem; }
    #lbImg { max-height: 60vh; }
    .lb-nav {
        width: 42px;
        height: 42px;
        font-size: 1.4rem;
    }
    .lb-prev { left: 0.5rem; }
    .lb-next { right: 0.5rem; }
    .lb-close { top: 0.8rem; right: 0.8rem; font-size: 2rem; }
    .lb-thumb { width: 44px; height: 44px; }
    .lb-text strong { font-size: 0.95rem; }
    .lb-text span { font-size: 0.78rem; }
    .lb-counter { font-size: 0.78rem; padding: 3px 9px; }
}