/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* BODY */
body {
    min-height: 100vh;
    background: #eef3f8;
    color: #0b2f5b;
}

/* HEADER */
header {
    background: #003366;
    color: #fff;
    padding: 18px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
}

/* CONTAINER */
main {
    width: 100%;
    max-width: 1000px;
    margin: 30px auto;
    padding: 15px;
}

/* CARDS */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    margin-bottom: 25px;
}

/* TITULOS */
h1, h2 {
    margin-bottom: 15px;
    color: #003366;
}

/* FORM */
label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 15px;
}

/* BOTÕES */
button {
    background: #003366;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #0055a5;
}

/* BOTÃO VOLTAR */
.btn-voltar {
    display: inline-block;
    margin-bottom: 20px;
    background: #555;
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
}

.btn-voltar:hover {
    background: #333;
}

/* TABELA */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #003366;
    color: #fff;
    padding: 12px;
    text-align: left;
}

td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background: #f2f6fb;
}

/* MENU (INDEX) */
.menu {
    text-align: center;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.card-menu {
    background: #003366;
    color: #fff;
    text-decoration: none;
    padding: 25px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    transition: 0.3s;
}

.card-menu:hover {
    background: #0055a5;
    transform: scale(1.05);
}

/* RESPONSIVO */
@media (max-width: 600px) {
    header {
        font-size: 20px;
    }

    main {
        margin: 15px auto;
    }

    .card {
        padding: 18px;
    }

    button {
        width: 100%;
    }

    .btn-voltar {
        width: 100%;
        text-align: center;
    }
}
.topo {
    background: linear-gradient(135deg, #003366, #0055a5);
    color: #fff;
    padding: 28px 20px;
    text-align: center;
}

.topo h1 {
    color: #fff;
    margin-bottom: 6px;
    font-size: clamp(24px, 4vw, 34px);
}

.topo p {
    font-size: 15px;
    opacity: 0.9;
}

.container {
    max-width: 1100px;
}

.acoes-topo {
    margin-bottom: 20px;
}

.grid-duplo {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.descricao {
    color: #667085;
    font-size: 14px;
    margin-bottom: 18px;
}

.btn-principal {
    background: linear-gradient(135deg, #003366, #0055a5);
}

.alerta-sucesso {
    background: #d1fae5;
    color: #065f46;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: bold;
    border-left: 5px solid #10b981;
}

.card-indicador {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #003366, #0055a5);
    color: #fff;
    text-align: center;
}

.card-indicador strong {
    font-size: 54px;
    margin: 8px 0;
}

.card-indicador p,
.card-indicador .indicador-titulo {
    color: #fff;
    opacity: 0.9;
}

.cabecalho-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sem-registro {
    text-align: center;
    color: #777;
    padding: 25px;
}

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

    .card-indicador strong {
        font-size: 42px;
    }
}
.btn-editar {
    background: #f59e0b;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}

.btn-excluir {
    background: #ef4444;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}

.btn-editar:hover {
    background: #d97706;
}

.btn-excluir:hover {
    background: #dc2626;
}
.bg-home {
    background: url('../fundo-ma-fibra.png') no-repeat center center fixed;
    background-size: cover;
}

/* OVERLAY */
.overlay {
    min-height: 100vh;
    background: rgba(0, 25, 60, 0.65);
    display: flex;
    flex-direction: column;
}

/* HEADER HOME */
.header-home {
    padding: 25px;
    text-align: center;
    color: #fff;
    background: rgba(0, 35, 75, 0.8);
}

.header-home h1 {
    font-size: clamp(26px, 4vw, 38px);
}

.header-home p {
    font-size: 15px;
    opacity: 0.9;
}

/* CONTAINER */
.home-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* MENU */
.menu-home {
    width: 100%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 0 25px rgba(0,0,0,0.5);
    text-align: center;
}

.menu-home h2 {
    color: #fff;
    margin-bottom: 25px;
}

/* CARDS */
.cards-home {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
}

.card-home {
    background: rgba(255,255,255,0.95);
    color: #003366;
    text-decoration: none;
    padding: 25px 10px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    transition: 0.3s;
}

.card-home:hover {
    background: #003366;
    color: #fff;
    transform: translateY(-5px) scale(1.03);
}

/* FOOTER */
.footer-home {
    text-align: center;
    padding: 12px;
    color: #fff;
    font-size: 13px;
    background: rgba(0, 35, 75, 0.8);
}

/* RESPONSIVO */
@media (max-width: 600px) {
    .menu-home {
        padding: 20px;
    }

    .card-home {
        padding: 18px;
        font-size: 15px;
    }
}
.layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #003366, #002244);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
}

.logo img {
    max-width: 90px;
    object-fit: contain;
}

.logo {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo h2 {
    margin-bottom: 5px;
}

.logo span {
    font-size: 13px;
    opacity: 0.7;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.sidebar nav a {
    color: #fff;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: 0.3s;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* CONTEÚDO */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* TOPBAR */
.topbar {
    background: #fff;
    padding: 15px 25px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

/* MAIN */
.main-content {
    padding: 25px;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar nav a {
        text-align: center;
        font-size: 12px;
        padding: 10px 5px;
    }

    .logo h2,
    .logo span {
        display: none;
    }
}
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #003366, #002244);
    color: #fff;
    transition: 0.3s;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar .logo {
    padding: 20px;
    text-align: center;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    transition: 0.3s;
}

.sidebar nav a i {
    font-size: 18px;
}

.sidebar nav a span {
    transition: 0.3s;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* COLAPSADO */
.sidebar.collapsed nav a span {
    display: none;
}

.sidebar.collapsed .logo h2,
.sidebar.collapsed .logo span {
    display: none;
}

/* TOPBAR */
.topbar {
    background: #fff;
    padding: 12px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-menu {
    background: #003366;
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-menu:hover {
    background: #0055a5;
}

/* AJUSTE DO LAYOUT */
.layout {
    display: flex;
}

.content {
    flex: 1;
    transition: 0.3s;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -240px;
        top: 0;
        height: 100%;
        z-index: 999;
    }

    .sidebar.active {
        left: 0;
    }
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.tabela-pontuacao table {
    min-width: 1200px;
    border-collapse: collapse;
}

.tabela-pontuacao th {
    background: #8b0000;
    color: #fff;
    text-align: center;
    font-size: 13px;
    border: 1px solid #111;
}

.tabela-pontuacao td {
    text-align: center;
    border: 1px solid #111;
    background: #e99999;
    font-style: italic;
    color: #000;
}

.tabela-pontuacao tbody tr:nth-child(even) td {
    background: #f3caca;
}

.tabela-pontuacao .nome-tecnico {
    text-align: left;
    font-weight: bold;
    font-style: normal;
    background: #f5b0b0;
}

.tabela-pontuacao .pontos {
    color: blue;
    font-weight: bold;
}

.tabela-pontuacao .total-servicos {
    font-weight: bold;
}

.tabela-pontuacao tfoot th {
    background: #e99999;
    color: #000;
    font-weight: bold;
    border: 1px solid #111;
}
.valor-comissao {
    color: #006400;
    font-weight: bold;
    background: #d9f7d9 !important;
}
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    min-height: 100vh;
    flex-shrink: 0;
}

.content {
    flex: 1;
    min-width: 0;
}
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,0.95);
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 0 30px rgba(0,0,0,0.45);
}

.login-card h1 {
    text-align: center;
    color: #003366;
    margin-bottom: 5px;
}

.login-card p {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
}

.alerta-erro {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
}

.usuario-topo {
    margin-left: auto;
    font-size: 14px;
}

.usuario-topo a {
    color: #dc2626;
    font-weight: bold;
    text-decoration: none;
}
.chat-card {
    max-width: 900px;
}

.chat-mensagens {
    height: 420px;
    overflow-y: auto;
    background: #f8fafc;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.chat-msg {
    background: #fff;
    border-left: 4px solid #003366;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.chat-msg strong {
    color: #003366;
}

.chat-msg span {
    font-size: 12px;
    color: #777;
    margin-left: 8px;
}

.chat-msg p {
    margin-top: 6px;
    color: #222;
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-form input {
    flex: 1;
    margin-bottom: 0;
}

.chat-form button {
    width: 130px;
}

@media (max-width: 600px) {
    .chat-form {
        flex-direction: column;
    }

    .chat-form button {
        width: 100%;
    }
}
.minha-msg {
    margin-left: auto;
    border-left: none;
    border-right: 4px solid #16a34a;
    background: #dcfce7;
    max-width: 75%;
}

.outra-msg {
    margin-right: auto;
    border-left: 4px solid #003366;
    background: #fff;
    max-width: 75%;
}

.chat-msg {
    word-wrap: break-word;
}
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.card-kpi {
    text-align: center;
    border-top: 5px solid #003366;
}

.card-kpi span {
    font-size: 14px;
    color: #667085;
    font-weight: bold;
}

.card-kpi strong {
    display: block;
    font-size: clamp(24px, 3vw, 34px);
    color: #003366;
    margin: 10px 0;
}

.card-kpi p {
    color: #667085;
    font-size: 13px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.dashboard-grid canvas {
    max-height: 330px;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

input, select, button {
    font-size: 18px;
    padding: 12px;
}
.sidebar {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar nav {
    padding-bottom: 80px;
}

/* melhora a rolagem no celular */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}
@media (max-width: 768px) {
    .sidebar {
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
}
/* ============================= */
/* RESPONSIVO MOBILE - APP       */
/* ============================= */

@media (max-width: 768px) {

    .layout {
        display: block !important;
        width: 100% !important;
    }

    .content {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .main-content {
        padding: 12px !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .card {
        width: 100% !important;
        padding: 15px !important;
        box-sizing: border-box;
        overflow-x: hidden !important;
    }

    .form-grid,
    .grid-duplo {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
    }

    input,
    select,
    textarea,
    button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important;
    }

    textarea {
        min-height: 90px;
    }

    .tabela,
    table {
        width: 100% !important;
        border-collapse: collapse;
    }

    .tabela thead,
    table thead {
        display: none !important;
    }

    .tabela tbody,
    table tbody {
        display: block !important;
        width: 100% !important;
    }

    .tabela tr,
    table tr {
        display: block !important;
        width: 100% !important;
        margin-bottom: 14px !important;
        padding: 12px !important;
        background: #fff !important;
        border: 1px solid #ddd !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        box-sizing: border-box !important;
    }

    .tabela td,
    table td {
        display: block !important;
        width: 100% !important;
        border: none !important;
        padding: 7px 0 !important;
        box-sizing: border-box !important;
        text-align: left !important;
    }

    .tabela td input,
    .tabela td select,
    .tabela td textarea,
    table td input,
    table td select,
    table td textarea {
        width: 100% !important;
    }

    .center {
        text-align: left !important;
    }

    .bolinha-status {
        margin: 6px 0 !important;
    }

    #canvasAssinatura {
        width: 100% !important;
        height: 220px !important;
        touch-action: none;
    }

    .legenda-ca {
        display: block !important;
    }

    .legenda-item {
        margin-bottom: 8px;
    }

    .btn-primario,
    .btn-secundario,
    .btn-editar,
    .btn-excluir,
    .btn-voltar {
        display: block !important;
        width: 100% !important;
        margin-bottom: 8px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
}