/* Unificación de tablas y encabezados */
table, th, td {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif !important;
    font-size: 0.97em;
    color: #222;
    max-width: 100vw;
    box-sizing: border-box;
}
.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6 {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    color: #010066;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 0.7em;
}
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
body, html, input, button, select, textarea {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif !important;
}
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f8;
}
.login-container {
    width: 350px;
    margin: 80px auto;
    background: #fff;
    padding: 2em 2.5em;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    text-align: center;
}
.login-container h2 {
    margin-bottom: 1.5em;
    color: #2d3e50;
}
.login-container input {
    width: 90%;
    padding: 0.8em;
    margin-bottom: 1em;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 1em;
}
.login-container button {
    width: 100%;
    padding: 0.8em;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s;
}
.login-container button:hover {
    background: #125ea2;
}
.error {
    color: #fff;
    background: #e53935;
    padding: 0.5em;
    border-radius: 5px;
    margin-top: 1em;
}
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 220px;
    background: #222d32;
    color: #fff;
    padding: 2em 0 0 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
    z-index: 100;
}
.sidebar h2 {
    text-align: center;
    margin-bottom: 2em;
    font-size: 1.3em;
    letter-spacing: 1px;
}
.sidebar ul {
    list-style: none;
    padding: 0;
}
.sidebar ul li {
    margin: 1em 0;
}
.sidebar ul li a {
    color: #b8c7ce;
    text-decoration: none;
    padding: 0.7em 2em;
    display: block;
    transition: background 0.2s, color 0.2s;
}
.sidebar ul li a:hover, .sidebar ul li a.active {
    background: #1976d2;
    color: #fff;
}
/* Main content: responsivo igual en dashboard y todos los módulos */
/* Main content: responsivo igual en dashboard y todos los módulos */
.main-content {
    margin-left: 240px;
    padding: 1.5em 1.5em;
    transition: margin-left 0.2s;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
}
body, html {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    position: relative;
}
table, th, td {
    max-width: 100vw;
    box-sizing: border-box;
    word-break: break-word;
}
@media (max-width: 900px) {
    .main-content {
        margin-left: 0 !important;
        padding: 0.7em !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        box-sizing: border-box;
        overflow-x: hidden !important;
        margin-top: 100px !important;
    }
    table {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        overflow-x: hidden;
        display: block;
        max-width: 100vw !important;
        word-break: break-word;
    }
}
@media (max-width: 900px) {
    .main-content {
        margin-left: 0 !important;
        padding: 1em !important;
        margin-top: 100px !important;
    }
}
.dashboard-widgets {
    display: flex;
    gap: 2em;
    margin-top: 2em;
}
.widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.5em 2em;
    min-width: 180px;
    text-align: center;
}
.widget h3 {
    margin-bottom: 0.5em;
    color: #1976d2;
}
.widget .big {
    font-size: 2.5em;
    color: #2d3e50;
    font-weight: bold;
}
.main-content.modern-main.dashboard-premium {
    margin-left: 240px;
    width: calc(100vw - 240px);
    max-width: calc(100vw - 240px);
    min-width: 320px;
    box-sizing: border-box;
    overflow-x: auto;
    padding: 64px;
}
@media (max-width: 900px) {
    .main-content.modern-main.dashboard-premium {
        margin-left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        box-sizing: border-box;
        overflow-x: auto !important;
        padding: 32px !important;
        margin-top: 100px !important;
    }
}
.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: auto;
}
.dashboard-card {
    flex: 1 1 260px;
    min-width: 220px;
    max-width: 100%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px #01006611;
    padding: 1.2em 1em;
    margin-bottom: 1em;
}
@media (max-width: 900px) {
    .main-content.modern-main.dashboard-premium {
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        box-sizing: border-box;
        overflow-x: auto !important;
        margin-left: 0 !important;
        margin-top: 100px !important;
        padding: 16px !important;
    }
    .dashboard-grid {
        flex-direction: column;
        gap: 1em;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        overflow-x: auto !important;
    }
    .dashboard-card {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
}
/* Estilos específicos para el módulo de ambulancias */
.ambulancias-title {
    margin-bottom: 0.7em;
    font-size: 1.2em;
    color: #010066;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.3em;
}
.ambulancias-table-wrap {
    overflow-x: auto;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
}
.ambulancias-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px #01006611;
    overflow: hidden;
    font-size: 0.78em;
}
.ambulancias-table th {
    background: #010066;
    color: #fff;
    font-weight: 600;
    padding: 0.3em 0.2em;
    border-bottom: 1px solid #00bfae;
    text-align: left;
    font-size: 0.8em;
}
.ambulancias-table td {
    padding: 0.2em 0.2em;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
    font-size: 0.78em;
}
.ambulancias-table tr:nth-child(even) {
    background: #f8fafc;
}
.ambulancias-table tr:hover {
    background: #e3f6f3;
    transition: background 0.2s;
}
.btn-main {
    background: #010066;
    color: #fff;
    padding: 0.4em 0.8em;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 1px 4px #01006622;
    transition: background 0.2s;
    display: inline-block;
    margin-bottom: 0.7em;
    font-size: 0.95em;
}
.btn-main:hover {
    background: #00bfae;
    color: #fff;
}
.action-btn {
    display: inline-block;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    margin-right: 0.1em;
    text-decoration: none;
    font-size: 0.95em;
    transition: background 0.2s, color 0.2s;
    border: none;
    background: none;
    cursor: pointer;
}
.action-btn.edit {
    color: #1976d2;
}
.action-btn.edit:hover {
    background: #e3f6f3;
    color: #010066;
}
.action-btn.delete {
    color: #e53935;
}
.action-btn.delete:hover {
    background: #fdecea;
    color: #fd0800;
}
.action-btn.docs {
    color: #00bfae;
}
.action-btn.docs:hover {
    background: #e3f6f3;
    color: #00bfae;
}
.ambulancias-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(1,0,102,0.18);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.3s;
}
@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}
.ambulancias-modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 32px #01006622;
    padding: 1.2em 1.2em 0.7em 1.2em;
    min-width: 320px;
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    font-size: 0.95em;
}
.ambulancias-modal-close {
    position: absolute;
    top: 10px; right: 18px;
    font-size: 1.5em;
    color: #fd0800;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
}
.ambulancias-modal-close:hover {
    color: #010066;
}
.ambulancias-modal-content label {
    display: block;
    margin-top: 0.5em;
    margin-bottom: 0.2em;
    font-weight: 600;
    color: #010066;
    font-size: 0.95em;
}
.ambulancias-modal-content input, .ambulancias-modal-content select {
    width: 100%;
    padding: 0.4em 0.8em;
    border-radius: 7px;
    border: 1px solid #bdbdbd;
    font-size: 0.92em;
    background: #f8fafc;
    margin-bottom: 0.3em;
    transition: border 0.2s;
}
.ambulancias-modal-content input:focus, .ambulancias-modal-content select:focus {
    border: 1px solid #00bfae;
    outline: none;
}
.ambulancias-modal-content button {
    width: 100%;
    padding: 0.7em;
    background: linear-gradient(90deg, #010066 0%, #00bfae 100%);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px #01006622;
    transition: background 0.2s;
    margin-top: 0.7em;
}
.ambulancias-modal-content button:hover {
    background: linear-gradient(90deg, #00bfae 0%, #010066 100%);
}
@media (max-width: 900px) {
    .ambulancias-modal-content {
        padding: 0.7em 0.3em 0.3em 0.3em;
        min-width: 0;
        max-width: 96vw;
        font-size: 0.9em;
        margin: 0 auto;
    }
}
/* Modales pequeños y centrados para agregar/editar en todo el sistema */
.ambulancias-modal-content,
.usuarios-modal-content,
.generic-modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 32px #01006622;
    padding: 1.2em 1.2em 0.7em 1.2em;
    min-width: 260px;
    max-width: 340px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    font-size: 0.95em;
}
@media (max-width: 900px) {
    .ambulancias-modal-content,
    .usuarios-modal-content,
    .generic-modal-content {
        padding: 0.7em 0.3em 0.3em 0.3em;
        min-width: 0;
        max-width: 96vw;
        font-size: 0.9em;
        margin: 0 auto;
    }
}
.ambulancias-table td .action-btn {
    margin-right: 0.1em;
    padding: 0.2em 0.4em;
    font-size: 0.95em;
    border-radius: 4px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.ambulancias-table td .action-btn.edit {
    color: #1976d2;
}
.ambulancias-table td .action-btn.edit:hover {
    background: #e3f6f3;
    color: #010066;
}
.ambulancias-table td .action-btn.delete {
    color: #e53935;
}
.ambulancias-table td .action-btn.delete:hover {
    background: #fdecea;
    color: #fd0800;
}
.ambulancias-table td .action-btn.docs {
    color: #00bfae;
}
.ambulancias-table td .action-btn.docs:hover {
    background: #e3f6f3;
    color: #00bfae;
}

/* Estilos para tablas de catálogo de inventario */
.catalogo-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.78em;
}
.catalogo-table th {
    background: #010066;
    color: #fff;
    font-weight: 600;
    padding: 0.3em 0.2em;
    border-bottom: 1px solid #00bfae;
    text-align: left;
    font-size: 0.8em;
}
.catalogo-table td {
    padding: 0.2em 0.2em;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
    font-size: 0.78em;
}
.catalogo-table tr:nth-child(even) {
    background: #f8fafc;
}
.catalogo-table tr:hover {
    background: #e8f4fd;
}
