* {
    box-sizing: border-box;
}

:root {
    
    --cor-primaria: #004175; 
    --cor-primaria-hover: #002a4d;
    --cor-destaque: #E31C23; 
    --cor-fundo: #eef6ff; 
    --cor-texto: #1a1a1a;
    --cor-texto-suave: #666;
    --branco: #ffffff;
    --borda: #d1d5db;
    
    
    --sombra-card: 0 4px 20px rgba(0, 65, 117, 0.12);
    --sombra-card-suave: 0 2px 12px rgba(0, 0, 0, 0.06);
    --sombra-input: 0 2px 8px rgba(0,0,0,0.04);
    
    
    --input-altura: 56px;
    --botao-altura: 56px;
    --raio: 12px; 
    
    --fonte: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --fonte-display: 'Fraunces', Georgia, serif;
    --gradient-hero: linear-gradient(135deg, #e8f4fc 0%, #cfe9ff 45%, #b8d9f5 100%);
    --mesh-1: radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0, 65, 117, 0.14), transparent 55%);
    --mesh-2: radial-gradient(ellipse 70% 50% at 90% 80%, rgba(227, 28, 35, 0.08), transparent 50%);
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: var(--fonte);
    background: var(--gradient-hero);
    background-attachment: fixed;
    color: var(--cor-texto);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: var(--mesh-1), var(--mesh-2);
}


.oculto { display: none !important; }
.centro { text-align: center; }


.conteiner {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    width: 100%;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}


.cabecalho-app {
    background: var(--branco);
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 80;
    height: 70px;
}

.cabecalho-app + .conteiner {
    padding-top: 90px; 
    justify-content: flex-start;
}


.tela {
    padding-top: 0;
}

.tela h2 {
    padding-top: 0;
    margin-top: 0;
    margin-bottom: 1.5rem;
    max-width: 100%;
    scroll-margin-top: 90px; 
}


.cabecalho-app:not(.oculto) ~ .conteiner .tela:not(.oculto) > h2:first-child,
.cabecalho-app:not(.oculto) ~ .conteiner .tela:not(.oculto) > div:first-child > h2:first-child {
    padding-top: 10px;
    margin-top: 0;
}

.logo-nav {
    font-weight: 800;
    color: var(--cor-primaria);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}


.banner-container {
    width: 100%;
    margin-bottom: 1rem;
    margin-top: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.banner-img {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.08));
}


.banner-container-menu {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.banner-img-menu {
    max-width: 220px;
    width: 100%;
    height: auto;
    max-height: 80px;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.08));
    object-fit: contain;
}


.card {
    background: var(--branco);
    border-radius: var(--raio);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--sombra-card-suave);
    position: relative;
    border-top: 4px solid var(--cor-primaria);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    box-sizing: border-box;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card {
    padding-top: 2rem;
    border-top: none; 
    overflow: hidden;
}


h2 {
    font-family: var(--fonte-display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--cor-primaria);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

p { font-size: 0.95rem; line-height: 1.5; color: var(--cor-texto-suave); }


.grupo-input {
    margin-bottom: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.grupo-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #555;
    letter-spacing: 0.5px;
}

.input-campo, .select-campo, .textarea-campo {
    width: 100%;
    max-width: 100%;
    height: var(--input-altura);
    padding: 0 1.2rem;
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    font-size: 1rem;
    background: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    margin: 0;
}

.textarea-campo {
    height: auto;
    padding-top: 1rem;
    min-height: 120px;
    resize: vertical;
}

.input-campo:focus, .select-campo:focus, .textarea-campo:focus {
    outline: none;
    border-color: var(--cor-primaria);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 65, 117, 0.12);
}


.grupo-input > div[style*="position: relative"] {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.btn-toggle-senha {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cor-texto-suave);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.btn-toggle-senha:hover {
    color: var(--cor-primaria);
}

.btn-toggle-senha:focus {
    outline: 2px solid var(--cor-primaria);
    outline-offset: 2px;
    border-radius: 4px;
}


.btn {
    width: 100%;
    height: var(--botao-altura);
    border: none;
    border-radius: var(--raio);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primario {
    background: var(--cor-primaria);
    color: var(--branco);
}

.btn-primario:hover {
    background: var(--cor-primaria-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0, 65, 117, 0.25);
}

.btn-secundario {
    background: #EFF6FF;
    color: var(--cor-primaria);
}

.btn-outline {
    background: #fff;
    color: var(--cor-texto-suave);
    border: 1px solid var(--borda);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.btn-outline:hover {
    color: var(--cor-primaria);
    border-color: var(--cor-primaria);
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 65, 117, 0.1);
}


.item-lista {
    background: var(--branco);
    padding: 1.25rem;
    border-radius: var(--raio);
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #eee;
}

.item-lista.concluido { border-left-color: #10b981; }
.item-lista.pendente { border-left-color: #f59e0b; }


.accordion-item {
    padding: 0 !important;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    background: var(--branco);
    border: none;
    padding: 1rem 1.25rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    border-radius: var(--raio);
}

.accordion-header:hover {
    background: #f9fafb;
}

.accordion-header:focus {
    outline: 2px solid var(--cor-primaria);
    outline-offset: -2px;
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: var(--cor-primaria);
    flex-shrink: 0;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease;
    padding: 0 1.25rem;
}

.accordion-content.active {
    max-height: 2000px;
    padding: 0 1.25rem 1.25rem 1.25rem;
    transition: max-height 0.5s ease-in, padding 0.3s ease;
}


.menu-overlay { z-index: 100; position: fixed; inset: 0; background: rgba(0,40,80,0.6); backdrop-filter: blur(4px); }
.menu-conteudo { width: 300px; height: 100%; max-height: 100dvh; background: #fff; padding: 2rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: 10px 0 40px rgba(0,0,0,0.2); overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }


.menu-opcoes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.menu-card {
    background: var(--branco);
    border: none;
    border-radius: var(--raio);
    border-top: 4px solid var(--cor-primaria);
    box-shadow: var(--sombra-card-suave);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}


.menu-card-programacao {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-top: 4px solid #22c55e;
}
.menu-card-programacao .menu-card-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 65, 117, 0.15);
}

.menu-card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--cor-primaria), #0056b3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.menu-card-icon i {
    width: 32px;
    height: 32px;
}

.menu-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cor-primaria);
    margin: 0;
}


.menu-card-programacao h3 {
    color: #000000 !important;
}

.menu-card p {
    font-size: 0.9rem;
    color: var(--cor-texto-suave);
    margin: 0;
}


.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-ok {
    background: #d1fae5;
    color: #065f46;
}

.badge-wait {
    background: #fef3c7;
    color: #92400e;
}

.badge-programada {
    background: #fef9c3;
    color: #854d0e;
}

.badge-andamento {
    background: #dbeafe;
    color: #1e40af;
}

.badge-concluida {
    background: #dcfce7;
    color: #166534;
}

.badge-cancelada {
    background: #fee2e2;
    color: #991b1b;
}


.card-gestao-os {
    border-radius: 12px;
    overflow: hidden;
}
.gestao-os-topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.gestao-os-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.gestao-os-numero {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--cor-primaria);
    letter-spacing: 0.02em;
}
.gestao-os-solicitante {
    font-size: 0.9rem;
    color: #475569;
}
.gestao-os-meta {
    font-size: 0.8rem;
    color: #94a3b8;
}
.gestao-os-status-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.gestao-os-status-wrap .gestao-os-status {
    min-width: 140px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
}
.gestao-os-descricao {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 120px;
    overflow-y: auto;
    padding: 0.5rem 0;
    border-top: 1px solid #f1f5f9;
    margin-top: 0.5rem;
}
.gestao-os-descricao br { display: block; content: ""; margin-top: 0.25em; }
.gestao-os-rodape {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}


.card-minha-os {
    border-radius: 12px;
    padding: 1.25rem;
}
.minha-os-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.minha-os-numero {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--cor-primaria);
    letter-spacing: 0.02em;
}
.minha-os-descricao {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 100px;
    overflow-y: auto;
    margin: 0.5rem 0;
}
.minha-os-descricao br { display: block; content: ""; margin-top: 0.25em; }
.minha-os-meta {
    font-size: 0.8rem;
    color: #94a3b8;
}


.grid-duplo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}


.imgs-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.thumb-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--borda);
    cursor: pointer;
    transition: transform 0.2s;
}

.thumb-img:hover {
    transform: scale(1.05);
    border-color: var(--cor-primaria);
}


.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--cor-primaria);
    display: flex;
    align-items: center;
    justify-content: center;
}


@media (min-width: 768px) {
    .conteiner {
        max-width: 600px;
    }
    
    .menu-opcoes {
        grid-template-columns: 1fr 1fr;
    }
    
    .card {
        padding: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .conteiner {
        max-width: 800px;
    }
}


@media (max-width: 480px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
    }
    
        #app {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        position: relative;
        box-sizing: border-box;
    }
    
    main {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .conteiner { 
        padding: 12px;
        padding-left: max(12px, env(safe-area-inset-left, 0px));
        padding-right: max(12px, env(safe-area-inset-right, 0px));
        padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }

    .cabecalho-app:not(.oculto) ~ .conteiner {
        justify-content: flex-start;
    }
    
    .card { 
        padding: 1.25rem; 
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }
    
    .menu-card {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .menu-card-icon {
        width: 56px;
        height: 56px;
    }
    
    .menu-card-icon i {
        width: 28px;
        height: 28px;
    }
    
    .menu-card h3 {
        font-size: 1.1rem;
    }
    
    .grid-duplo {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .imgs-galeria {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        width: 100%;
        max-width: 100%;
    }
    
    .thumb-img {
        height: 70px;
        max-width: 100%;
    }
    
    .item-lista {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    h2 {
        font-size: 1.3rem;
        line-height: 1.4;
        word-break: break-word;
        max-width: 100%;
        overflow-wrap: break-word;
    }
    
    .btn {
        height: 50px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .input-campo, .select-campo, .textarea-campo {
        height: 50px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 0.875rem;
        margin: 0;
    }
    
    .grupo-input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
    }
    
    .grupo-input > div[style*="position: relative"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
    }
    
    form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
    }
    
    .textarea-campo {
        height: auto;
        min-height: 120px;
    }
    
    .banner-img-menu {
        max-width: 360px;
        max-height: 140px;
    }
    
    .banner-img {
        max-height: 120px;
    }
    
    .banner-container {
        margin-bottom: 1rem;
        margin-top: 0;
    }
    
    .login-card {
        padding: 1.25rem;
        padding-top: 1.5rem;
    }
    
    .banner-container {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    
    section > div[style*="display: flex"] {
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    
    .accordion-header {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .accordion-content {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .accordion-content.active {
        padding: 0 1rem 1rem 1rem;
    }
    
    .accordion-icon {
        width: 18px !important;
        height: 18px !important;
    }
    
    
    .grupo-input > div[style*="position: relative"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    
    form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    
    .btn-toggle-senha {
        right: 8px;
        padding: 5px;
    }
    
    
    .grupo-input > div[style*="position: relative"] input {
        padding-right: 45px;
    }
    
    
    .cabecalho-app {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    
    .menu-overlay {
        width: 100vw;
        max-width: 100vw;
    }
    
    .menu-conteudo {
        width: 280px;
        max-width: 85vw;
        box-sizing: border-box;
    }
}


.tela {
    width: 100%;
    max-width: 100%;
    animation: fadeIn 0.3s ease;
    overflow-x: hidden;
    box-sizing: border-box;
}


#tela-login {
    background: transparent;
    position: relative;
    overflow: hidden;
}

#tela-login.oculto,
#tela-login[hidden] {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

#tela-login .conteiner {
    background: transparent;
}

/* Evita 100vw no mobile (barra de endereço / overflow lateral) */
.login-hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    height: min(42vw, 220px);
    background:
        linear-gradient(180deg, rgba(0, 65, 117, 0.12) 0%, transparent 65%),
        url('https://images.unsplash.com/photo-1581092160562-40aa08c7880a?auto=format&fit=crop&w=1200&q=70') center/cover no-repeat;
    border-radius: 0 0 28px 28px;
    z-index: 0;
    pointer-events: none;
}

#tela-login .login-card {
    position: relative;
    z-index: 1;
    margin-top: clamp(3.5rem, 20vw, 8rem);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 50px rgba(0, 65, 117, 0.15), 0 4px 20px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.94);
}


.tela:not(#tela-login) {
    background: transparent;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


.btn:focus,
.input-campo:focus,
.select-campo:focus {
    outline: 2px solid var(--cor-primaria);
    outline-offset: 2px;
}


::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cor-fundo);
}

::-webkit-scrollbar-thumb {
    background: var(--cor-primaria);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cor-primaria-hover);
}


img, video, iframe {
    max-width: 100%;
    height: auto;
}

input[type="file"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}


.grupo-input > div {
    max-width: 100%;
    box-sizing: border-box;
    width: 100%;
}


.card * {
    max-width: 100%;
}

.card input,
.card select,
.card textarea,
.card button {
    max-width: 100%;
    box-sizing: border-box;
}


.tela-hora-extra-responsiva .tela-he-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-top: 10px;
    width: 100%;
}

.tela-hora-extra-responsiva .tela-he-header h2 {
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.tela-hora-extra-responsiva .tela-he-botoes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
}


.conteiner:has(#tela-hora-extra:not(.oculto)) {
    max-width: 600px;
}


#tela-hora-extra {
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
    padding-bottom: 2rem;
}

.card-tabela-escala {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}

.card-tabela-escala .tabela-escala {
    table-layout: auto;
}

.tabela-escala {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tabela-escala thead tr {
    background: var(--cor-primaria);
    color: white;
}

.tabela-escala th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    white-space: nowrap;
}

.tabela-escala th .sort-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-left: 4px;
    opacity: 0.8;
}

.tabela-escala tbody tr:nth-child(even) {
    background: #dcfce7;
}

.tabela-escala tbody tr:nth-child(odd) {
    background: #ffffff;
}

.tabela-escala tbody tr:hover {
    background: #e0f2fe;
}

.tabela-escala td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tabela-escala td:nth-child(2) {
    max-width: 200px;
}

.tabela-escala td.col-folga {
    color: var(--cor-destaque);
    font-weight: 600;
}

.tabela-escala .th-acoes,
.tabela-escala .td-acoes {
    text-align: center;
    width: 90px;
}

.tabela-escala .btn-editar-linha,
.tabela-escala .btn-excluir-linha {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: var(--cor-primaria);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
}

.tabela-escala .btn-excluir-linha {
    color: var(--cor-destaque);
}

.tabela-escala .btn-editar-linha:hover,
.tabela-escala .btn-excluir-linha:hover {
    text-decoration: underline;
}


.grid-veiculos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.card-veiculo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
}

.veiculo-foto {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    margin-bottom: 1rem;
}

.veiculo-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

.foto-placeholder i {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}


.placa-moldura {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    margin-bottom: 1rem;
    background: #ffffff;
    border: 3px solid #1f2937;
    border-radius: 6px;
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.06),
        inset 0 0 0 1px rgba(255,255,255,0.8);
    font-family: 'Inter', 'SF Mono', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #1f2937;
    min-width: 150px;
}

.veiculo-documento {
    margin-bottom: 0.75rem;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.veiculo-documento.img-expansivel {
    aspect-ratio: 4/3;
    min-height: 90px;
}

.veiculo-documento .doc-thumb {
    width: 100%;
    height: 100%;
    min-height: 90px;
    object-fit: cover;
    display: block;
}

.veiculo-documento.img-expansivel:hover {
    opacity: 0.9;
}

.veiculo-foto.img-expansivel:hover {
    opacity: 0.9;
}

.veiculo-foto.img-expansivel,
.veiculo-documento.img-expansivel {
    transition: opacity 0.2s ease;
}

.veiculo-foto.img-expansivel::after,
.veiculo-documento.img-expansivel::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    border-radius: 8px;
}

.veiculo-foto.img-expansivel:hover::after,
.veiculo-documento.img-expansivel:hover::after {
    opacity: 1;
}

.veiculo-foto.img-expansivel,
.veiculo-documento.img-expansivel {
    position: relative;
}

.swal-lightbox {
    padding: 0 !important;
    max-width: 95vw !important;
}

.swal-lightbox img {
    cursor: zoom-out;
}

.veiculo-acoes {
    margin-top: auto;
}

.btn-excluir-veiculo {
    color: var(--cor-destaque);
    padding: 0.4rem;
}


.veiculo-lavagem {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.lavagem-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.lavagem-item span {
    color: #666;
    font-size: 0.8rem;
}
.lavagem-item strong {
    color: var(--cor-primaria);
}


.tela-programar-admin .prog-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.5rem;
}
.tela-programar-admin .prog-admin-titulo {
    flex: 1;
    min-width: 180px;
}
.tela-programar-admin .prog-admin-botoes {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.lista-programacoes-compacta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}


.card-programacao {
    margin-bottom: 0;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}


.tela-programacao-diaria .prog-diaria-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-top: 10px;
}
.tela-programacao-diaria .prog-diaria-titulo {
    flex: 1;
    min-width: 200px;
}
.tela-programacao-diaria .titulo-verde,
.tela-programacao-diaria h2 {
    color: #22c55e !important;
}


.card-programacao-diaria {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-top-color: #22c55e;
    box-shadow: 0 2px 12px rgba(34, 197, 94, 0.15);
}

.prog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.prog-os-badge {
    font-weight: 700;
    font-size: 1.15rem;
    color: #166534;
    background: rgba(34, 197, 94, 0.15);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
}

.prog-data {
    font-size: 0.85rem;
    color: #4b5563;
}

.prog-linha {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin: 0.75rem 0;
    font-size: 0.9rem;
}
.prog-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.prog-item span {
    color: #666;
    font-size: 0.8rem;
}
.prog-item strong {
    color: #166534;
}
.prog-problema {
    margin-top: 0.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
}
.prog-btn-apontar {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
.prog-btn-apontar i {
    width: 16px;
    height: 16px;
}
.btn-excluir-prog {
    padding: 0.35rem;
    color: var(--cor-destaque);
}


.select-os-programada {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.select-os-programada option:not([value=""]):not([value="__outra__"]) {
    background: #f0fdf4;
}


@media (max-width: 480px) {
    .tela-hora-extra-responsiva .tela-he-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tela-hora-extra-responsiva .tela-he-botoes {
        justify-content: flex-start;
    }
    
    .tela-hora-extra-responsiva .tela-he-botoes .btn {
        flex: 1;
        min-width: 0;
        font-size: 0.85rem;
        padding: 0 0.75rem;
    }
    
    .tabela-escala {
        font-size: 0.85rem;
        min-width: 380px;
    }
    
    .tabela-escala th,
    .tabela-escala td {
        padding: 10px 8px;
    }
}


.admin-cabecalho {
    margin-bottom: 1rem;
}
.admin-sub {
    margin: 0;
    font-size: 0.9rem;
    color: var(--cor-texto-suave);
}
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    border: 1px solid rgba(0, 65, 117, 0.12);
    box-shadow: var(--sombra-card-suave);
}
.admin-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 0.5rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-family: var(--fonte);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--cor-texto-suave);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.admin-tab i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.admin-tab-ativo {
    background: var(--branco);
    color: var(--cor-primaria);
    box-shadow: 0 2px 10px rgba(0, 65, 117, 0.12);
}
.admin-tab:hover:not(.admin-tab-ativo) {
    color: var(--cor-primaria);
    background: rgba(255, 255, 255, 0.5);
}
.admin-painel-bloco {
    animation: fadeIn 0.35s ease;
}
.card-relatorio-os .relatorio-os-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.lista-preview-os {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 0.75rem;
}
.preview-os-item {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid var(--cor-primaria);
    font-size: 0.88rem;
}
.preview-os-item strong {
    display: block;
    color: var(--cor-primaria);
    margin-bottom: 0.25rem;
}
.preview-os-setor {
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.preview-os-desc {
    margin: 0.35rem 0 0;
    color: #334155;
    line-height: 1.45;
}
.preview-os-vazio,
.preview-os-mais {
    font-size: 0.88rem;
    color: #64748b;
    text-align: center;
    padding: 0.5rem;
}
.relatorio-os-resumo {
    font-size: 0.92rem;
    color: #475569;
    margin: 0;
}


.foto-upload-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
@media (min-width: 480px) {
    .foto-upload-box {
        flex-direction: row;
        align-items: flex-start;
    }
}
.foto-preview-wrap {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    background: linear-gradient(145deg, #e0f2fe, #f0f9ff);
    border: 2px dashed rgba(0, 65, 117, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.foto-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.foto-placeholder-txt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #64748b;
    padding: 0.5rem;
    text-align: center;
}
.foto-placeholder-txt i {
    width: 32px;
    height: 32px;
    color: var(--cor-primaria);
    opacity: 0.6;
}
.foto-upload-actions {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.btn-foto-limpar {
    font-size: 0.8rem;
    text-transform: none;
}
.hint-foto {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0.35rem 0 0;
}


.limite-dia-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: var(--raio);
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border: 1px solid rgba(0, 65, 117, 0.15);
    font-size: 0.82rem;
    line-height: 1.45;
    color: #1e3a5f;
    margin-bottom: 1rem;
}
.limite-dia-banner i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--cor-primaria);
    margin-top: 2px;
}
.limite-dia-alerta {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: rgba(227, 28, 35, 0.35);
    color: #7f1d1d;
}
.limite-dia-alerta i {
    color: var(--cor-destaque);
}


.menu-card-relatorio {
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
    border-top-color: #ea580c;
}
.menu-card-relatorio .menu-card-icon {
    background: linear-gradient(135deg, #ea580c, #c2410c);
}
.menu-card-relatorio h3 {
    color: #9a3412 !important;
}


.avatar-usuario-admin {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}
.avatar-usuario-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
}
.avatar-usuario-placeholder i {
    width: 20px;
    height: 20px;
}


.card {
    border-top-width: 3px;
}
.menu-card h3 {
    font-family: var(--fonte);
}
