*{box-sizing:border-box}html,body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f3f6fb;color:#0f172a}.login-body{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#0f2742,#1e4f80)}.login-card{width:100%;max-width:430px;background:#fff;border-radius:22px;padding:32px;box-shadow:0 20px 60px rgba(0,0,0,.25)}.login-card h1{margin:0}.login-card p{color:#64748b;margin-top:5px}.login-card label{display:block;margin-top:16px;font-size:14px;color:#475569}.login-card input,.login-card select{width:100%;padding:13px;margin-top:6px;border:1px solid #cbd5e1;border-radius:12px}.login-card button{width:100%;margin-top:22px;padding:13px;background:#0f2742;color:white;border:0;border-radius:12px;cursor:pointer;font-weight:bold}.login-error{background:#fee2e2;color:#991b1b;padding:10px;border-radius:10px;margin:15px 0}.success{background:#dcfce7;color:#166534;padding:12px;border-radius:12px;margin-bottom:14px}.error{background:#fee2e2;color:#991b1b;padding:12px;border-radius:12px;margin-bottom:14px}.app{display:flex;min-height:100vh}.sidebar{width:235px;min-width:235px;background:#0f2742;color:white;padding:20px 16px}.logo{display:flex;align-items:center;gap:12px;margin-bottom:30px}.logo h1{margin:0;font-size:24px}.logo span{color:#b6c7d8;font-size:13px}.sidebar nav{display:flex;flex-direction:column;gap:8px}.sidebar nav a{color:#dbeafe;text-decoration:none;padding:12px 13px;border-radius:12px}.sidebar nav a:hover{background:#1e4f80}.menu-label{margin:16px 10px 4px;color:#93c5fd;font-size:12px;text-transform:uppercase;letter-spacing:.08em}.main{flex:1;min-width:0;padding:26px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.topbar h2{margin:0;font-size:28px}.topbar p{margin:5px 0 0;color:#64748b}.user-box{background:white;padding:12px 16px;border-radius:16px;box-shadow:0 6px 18px rgba(15,39,66,.08);text-align:right}.user-box span{display:block;color:#64748b;font-size:13px}.user-box a{display:inline-block;margin-top:6px;font-size:13px;color:#dc2626;text-decoration:none}.cards{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:14px;margin-bottom:22px}.card{background:white;border-radius:18px;padding:16px;display:flex;align-items:center;gap:12px;box-shadow:0 8px 20px rgba(15,39,66,.08);border-left:6px solid #2563eb}.card.green{border-left-color:#16a34a}.card.purple{border-left-color:#7c3aed}.card.orange{border-left-color:#f97316}.card.red{border-left-color:#dc2626}.card-icon{font-size:26px}.card h3{margin:0;font-size:28px}.card p{margin:3px 0 0;color:#64748b;font-size:13px}.panel{background:white;border-radius:20px;padding:18px;box-shadow:0 8px 20px rgba(15,39,66,.08);margin-bottom:18px}.panel-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;gap:12px}.btn{background:#1e4f80;color:white;border:0;border-radius:12px;padding:9px 13px;text-decoration:none;cursor:pointer;display:inline-block}.btn.full{width:100%;text-align:center;margin-top:14px}.table-wrap{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse}th{text-align:left;color:#475569;font-size:12px;padding:10px;border-bottom:1px solid #e5e7eb;white-space:nowrap}td{padding:12px 10px;border-bottom:1px solid #eef2f7;font-size:14px}.badge{display:inline-block;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:bold;background:#f1f5f9;color:#334155}.badge.ativo,.badge.concluido,.badge.publicada{background:#dcfce7;color:#15803d}.badge.inativo,.badge.bloqueado{background:#fee2e2;color:#991b1b}.badge.agendado{background:#dbeafe;color:#1d4ed8}.badge.atrasado,.badge.pendente{background:#ffedd5;color:#c2410c}.badge.critica,.badge.cancelado{background:#fee2e2;color:#991b1b}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.field label{display:block;font-size:13px;color:#475569;margin-bottom:6px}.field input,.field select{width:100%;padding:11px 12px;border:1px solid #cbd5e1;border-radius:12px}.form-actions{margin-top:18px}.note{font-size:13px;color:#64748b;margin-top:8px}@media(max-width:1200px){.cards{grid-template-columns:repeat(3,1fr)}}@media(max-width:850px){.app{flex-direction:column}.sidebar{width:100%;min-width:100%}.sidebar nav{flex-direction:row;overflow-x:auto}.cards{grid-template-columns:repeat(2,1fr)}.topbar{flex-direction:column;align-items:flex-start;gap:12px}.form-grid{grid-template-columns:1fr}}@media(max-width:560px){.cards{grid-template-columns:1fr}}

.btn.secondary {
    background: #64748b;
}

.access-denied-logo {
    width: 60px;
    height: 60px;
    background: #0f2742;
    color: white;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 30px;
    margin: 0 auto 16px;
}

.sidebar-logo-img {
    display: block;
    width: 85px;
    max-width: 80%;
    height: auto;
    margin: 0 auto 10px auto;
    object-fit: contain;
    border: none;
    box-shadow: none;
    background: transparent;
}

.sidebar .logo {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.login-body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(8,33,67,.64), rgba(8,33,67,.64)),
        url('../img/fundo_bvml_login.jpeg') center center / cover no-repeat;
    background-color: #0f2742;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.login-card {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.login-logo-img {
    display: block;
    margin: 0 auto 22px auto;
    width: 210px;
    max-width: 70%;
    height: auto;
    border: none;
    box-shadow: none;
    background: transparent;
    object-fit: contain;
}

.login-card h1 {
    margin-top: 0;
}

.login-card p {
    margin-bottom: 26px;
}

.login-card form {
    text-align: left;
}

@media(max-width: 850px) {
    .login-body {
        background-size: cover;
        background-position: center center;
        background-attachment: scroll;
    }

    .login-logo-img {
        width: min(160px, 42vw);
    }
}

@media(max-width: 560px) {
    .login-card {
        padding: 30px 24px;
    }

    .login-logo-img {
        width: min(130px, 52vw);
        max-height: 150px;
    }
}

td small {
    color: #64748b;
    font-size: 12px;
}

.table-wrap table td {
    max-width: 340px;
}

.note {
    color: #64748b;
    font-size: 13px;
}


.admin-cards {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.admin-block {
    background: white;
    border-radius: 20px;
    padding: 24px;
    min-height: 190px;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(15,39,66,.08);
    border-left: 7px solid #2563eb;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform .15s ease, box-shadow .15s ease;
}

.admin-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15,39,66,.14);
}

.admin-block h3 {
    margin: 10px 0 8px;
    font-size: 20px;
}

.admin-block p {
    margin: 0;
    color: #64748b;
    line-height: 1.4;
}

.admin-icon {
    font-size: 38px;
}

.blue-block { border-left-color: #2563eb; }
.green-block { border-left-color: #16a34a; }
.red-block { border-left-color: #dc2626; }
.gray-block { border-left-color: #64748b; }

.disabled-block {
    opacity: .65;
    cursor: not-allowed;
}

.btn.danger {
    background: #dc2626;
}

@media(max-width: 1100px) {
    .admin-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 560px) {
    .admin-cards {
        grid-template-columns: 1fr;
    }
}

textarea {
    width: 100%;
    min-height: 90px;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-family: Arial, Helvetica, sans-serif;
}

.actions-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn.small {
    padding: 6px 9px;
    font-size: 12px;
}

.btn.success {
    background: #16a34a;
}

.btn.warning {
    background: #f97316;
}

.two-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr);
    gap: 18px;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 16px;
}

.report-card {
    background: white;
    border-radius: 20px;
    padding: 22px;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(15,39,66,.08);
    border-left: 7px solid #1e4f80;
}

.report-card h3 {
    margin: 8px 0;
}

.report-card p {
    margin: 0;
    color: #64748b;
}

@media(max-width: 950px) {
    .two-panels,
    .report-grid {
        grid-template-columns: 1fr;
    }
}


.reports-dashboard {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.report-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.report-option {
    background: white;
    border-radius: 20px;
    padding: 22px;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(15,39,66,.08);
    border-left: 7px solid #1e4f80;
    min-height: 170px;
}

.report-option:hover {
    transform: translateY(-2px);
    transition: .15s;
}

.report-option .icon {
    font-size: 34px;
    margin-bottom: 10px;
}

.report-option h3 {
    margin: 0 0 8px;
}

.report-option p {
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.report-option.green { border-left-color: #16a34a; }
.report-option.purple { border-left-color: #7c3aed; }
.report-option.orange { border-left-color: #f97316; }
.report-option.red { border-left-color: #dc2626; }

.report-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media(max-width: 1100px) {
    .reports-dashboard,
    .report-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-panels {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 600px) {
    .reports-dashboard,
    .report-options {
        grid-template-columns: 1fr;
    }
}


.report-filter-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 18px;
}

.report-title {
    margin-top: 0;
    color: #0f2742;
}

.report-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}


.search-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 18px;
}

.search-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.filter-summary {
    color: #64748b;
    font-size: 13px;
}


/* ============================================================
   SIGCU BVML — V15 MOBILE RESPONSIVO
   ============================================================ */

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img, table, input, select, textarea, button {
    max-width: 100%;
}

input, select, textarea, button {
    font-size: 16px;
}

.main {
    min-width: 0;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    min-width: 760px;
}

.btn {
    min-height: 40px;
}

@media (max-width: 900px) {
    .app {
        flex-direction: column;
        min-height: 100vh;
    }

    .sidebar {
        width: 100% !important;
        min-width: 100% !important;
        height: auto !important;
        position: relative !important;
        padding: 14px;
    }

    .logo {
        margin-bottom: 12px;
    }

    .sidebar nav {
        display: flex;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: thin;
    }

    .sidebar nav a {
        white-space: nowrap;
        flex: 0 0 auto;
        padding: 11px 13px;
        font-size: 14px;
        background: rgba(255,255,255,.06);
    }

    .menu-label {
        display: none;
    }

    .main {
        padding: 16px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 18px;
    }

    .topbar h2 {
        font-size: 23px;
        line-height: 1.2;
    }

    .user-box {
        width: 100%;
        text-align: left;
    }

    .cards,
    .reports-dashboard,
    .report-options,
    .report-grid,
    .admin-cards,
    .form-grid,
    .operational-report-grid,
    .km-row,
    .two-panels,
    .report-panels,
    .grid {
        grid-template-columns: 1fr !important;
    }

    .card {
        padding: 16px;
        min-height: 90px;
    }

    .card h3 {
        font-size: 25px;
    }

    .panel {
        padding: 15px;
        border-radius: 16px;
        margin-bottom: 14px;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn,
    button.btn,
    .panel-header button {
        width: 100%;
        text-align: center;
        padding: 12px 14px;
        font-size: 15px;
    }

    .field {
        margin-bottom: 12px;
    }

    .field input,
    .field select,
    .field textarea,
    input,
    select,
    textarea {
        width: 100%;
        min-height: 44px;
        border-radius: 12px;
        padding: 12px;
        font-size: 16px;
    }

    textarea {
        min-height: 110px;
    }

    .login-card {
        margin: 16px;
        padding: 24px;
        max-width: calc(100% - 32px);
    }

    th, td {
        font-size: 13px;
        padding: 9px;
    }

    .badge {
        font-size: 11px;
        padding: 5px 8px;
    }

    .actions-inline {
        flex-direction: column;
    }

    .actions-inline .btn {
        width: 100%;
    }

    .report-option,
    .admin-block {
        min-height: auto;
        padding: 18px;
    }

    .operational-section {
        padding: 14px;
    }
}

.app-logout-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b91c1c;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.app-logout-modal[hidden] {
    display: none;
}

.app-logout-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.app-logout-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
}

.app-logout-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    padding: 28px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}

.app-logout-dialog h3 {
    margin: 12px 36px 8px 0;
    font-size: 22px;
}

.app-logout-dialog p {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.app-logout-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1e4f80;
    font-size: 18px;
}

.app-logout-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
}

.app-logout-warning {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #fdba74;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
}

.app-logout-warning[hidden] {
    display: none;
}

.app-logout-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.app-logout-actions .btn.secondary {
    background: #64748b;
}

.app-logout-actions .btn.danger {
    background: #b91c1c;
}

.app-modal-open {
    overflow: hidden;
}

@media (max-width: 560px) {
    .app-logout-dialog {
        padding: 22px 18px;
    }

    .app-logout-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .app-logout-actions .btn {
        width: 100%;
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 12px;
    }

    .logo h1 {
        font-size: 21px;
    }
.topbar h2 {
        font-size: 21px;
    }

    .card h3 {
        font-size: 22px;
    }

    table {
        min-width: 700px;
    }
}

.calendar-subtitle {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.calendar-actions {
    justify-content: flex-end;
}

.calendar-month {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #f8fafc;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.calendar-weekdays div {
    padding: 11px 12px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.calendar-day {
    min-height: 148px;
    padding: 10px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.calendar-day:nth-child(7n) {
    border-right: 0;
}

.calendar-day.muted {
    background: #f8fafc;
    color: #94a3b8;
}

.calendar-day.today {
    box-shadow: inset 0 0 0 2px #2563eb;
}

.calendar-day-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.calendar-day-head .weekday {
    color: #64748b;
    font-size: 11px;
    line-height: 1.25;
}

.calendar-day-head strong {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #0f2742;
    font-size: 15px;
}

.calendar-day.today .calendar-day-head strong {
    background: #2563eb;
    color: #fff;
}

.month-label {
    display: block;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 9px;
}

.calendar-event {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 7px;
    padding: 7px 8px;
    border-radius: 8px;
    background: #dbeafe;
    color: #0f2742;
    text-decoration: none;
    border-left: 4px solid #2563eb;
}

.calendar-event:hover {
    background: #bfdbfe;
}

.event-time {
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.event-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
}

.event-meta {
    grid-column: 1 / -1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #475569;
    font-size: 11px;
}

@media (max-width: 1100px) {
    .calendar-month {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-weekdays,
    .calendar-grid {
        min-width: 840px;
    }
}

@media (max-width: 900px) {
    .calendar-actions {
        width: 100%;
    }

    .calendar-actions .btn {
        width: auto;
    }
}
