:root {
    --ms-blue: #0078D4;
    --ms-blue-hover: #0067b8;
    --bg-body: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #323130;
    --input-bg-yellow: #fff9c4;
    --border-color: #8a8886;
    --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --error-color: #e00;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    background-image: radial-gradient(circle at 50% 50%, #ffffff 0%, #f0f2f5 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* =========================================
    HEADER Y NAVEGACIÓN
   ========================================= */
.header-app {
    background-color: white;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 10px;
}

.marca-corporativa-ms {
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
    flex-shrink: 0;
}

.logo-icono-ms {
    background-color: var(--ms-blue);
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-size: 1.2rem;
}

.logo-texto-ms {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.marca-corporativa-ms .texto-principal {
    color: #242424;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.2px;
}

.marca-corporativa-ms .texto-secundario {
    color: #605e5c;
    font-weight: 400;
    font-size: 0.95rem;
}

/* Título Central */
.header-titulo-central {
    flex-grow: 1;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #323130;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 15px;
    cursor: default;
}

/* Navegación Derecha */
.nav-derecha {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.form-header {
    margin: 0;
    display: inline;
}

.separador-header {
    width: 1px;
    height: 24px;
    background: #e1dfdd;
    margin: 0 5px;
}

/* Botones del Header */
.btn-header {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 6px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 2px;
}

.btn-header:hover {
    background-color: #edebe9;
    border-color: #323130;
}

.btn-login-header {
    background-color: var(--ms-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-login-header:hover {
    background-color: var(--ms-blue-hover);
}

/* Contenedor de las banderas */
.idioma-buttons {
    display: flex;
    gap: 5px;
    margin: 0;
    align-items: center;
}

.btn-cuenta-circular {
    background-color: var(--ms-blue); 
    color: white !important;          
    border: none !important;          
    border-radius: 50%;               
    width: 32px;                      
    height: 32px;                   
    padding: 0;                       
    display: flex;                 
    align-items: center;
    justify-content: center;
    margin-right: 5px;                
    transition: background-color 0.2s;
}

.btn-cuenta-circular:hover {
    background-color: var(--ms-blue-hover);
    opacity: 1;
}

.letra-inicial {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;     
    text-transform: uppercase;
}

.btn-cuenta-circular:hover .letra-inicial {
    color: white;
}

/* Botón individual de bandera */
.btn-flag {
    background-color: transparent;
    border: 1px solid transparent;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}

.btn-flag:hover {
    background-color: #f3f2f1;
    opacity: 1;
}

.btn-flag.active {
    background-color: white;
    border-color: #d2d0ce;
    opacity: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-flag img {
    height: 18px;
    width: auto;
    display: block;
    border-radius: 2px;
}

@media (max-width: 400px) {
    .idioma-buttons {
        display: none;
    }
}

/* =========================================
    FOOTER
   ========================================= */
.footer-microsoft {
    background-color: #f3f2f1;
    font-size: 0.85rem;
    padding: 20px 0;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid #e1dfdd;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #605e5c;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #605e5c;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
}
.footer-links a:hover {
    color: var(--ms-blue);
}

.footer-links a.link-destacado {
    font-size: 0.9rem;
    font-weight: 600;
    background-color: white;
    padding: 5px 12px;
    border-radius: 15px;
    border: 1px solid #e1dfdd;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.footer-links a.link-destacado:hover {
    background-color: var(--ms-blue);
    color: white;
    border-color: var(--ms-blue);
    transform: translateY(-2px);
}

.separador-footer {
    color: #ccc;
    font-size: 1.2rem;
    margin: 0 5px;
}
.copy-text {
    font-weight: 500;
}

/* =========================================
    FORMULARIOS Y COMPONENTES GLOBALES
   ========================================= */
.grupo-input {
    margin-bottom: 15px;
}

.input-microsoft {
    width: 100%;
    height: 38px;
    padding: 8px 10px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg-yellow);
    border-radius: 0;
    outline: none;
    transition: border 0.2s;
}
.input-microsoft:focus {
    border-bottom: 2px solid var(--ms-blue);
}
.input-microsoft::placeholder {
    color: #666;
    opacity: 0.7;
}
.input-microsoft[readonly], .input-microsoft:disabled {
    background-color: #f3f2f1;
    cursor: not-allowed;
    border-color: #e1dfdd;
}

.error-msg {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.btn-primary {
    background-color: var(--ms-blue);
    color: white;
    border: none;
    padding: 8px 36px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 100px;
}
.btn-primary:hover {
    background-color: var(--ms-blue-hover);
}
.btn-primary:disabled {
    background-color: #c8c6c4;
    cursor: not-allowed;
}

.btn-link {
    background: none;
    border: none;
    color: var(--ms-blue-hover);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}
.btn-link:hover {
    text-decoration: underline;
    color: #004d8a;
}

/* =========================================
    REGISTRO
   ========================================= */

.logo-app-img .fa-user-plus {
    font-size: 2.5rem;
    color: var(--ms-blue);
}

.acciones-registro {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

.enlace-login-registro {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.texto-gris {
    color: #666;
}

/* =========================================
    VISTAS PÚBLICAS (Login / Inicio)
   ========================================= */
.card-central {
    background-color: var(--card-bg);
    padding: 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: left;
}

.titulo-login {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1b1b1b;
}
.subtitulo-login {
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.logo-app-img {
    height: 40px;
    margin-bottom: 1rem;
}
.logo-app-img i {
    font-size: 2.5rem;
    color: var(--ms-blue);
}
.acciones-login {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    flex-direction: row-reverse;
}

/* =========================================
    CARRUSEL (Inicio Público)
   ========================================= */

.intro-inicio {
    margin-bottom: 20px;
    text-align: center;
}
.titulo-grande-ms {
    font-size: 1.5rem;
    color: #1b1b1b;
    margin-bottom: 5px;
    font-weight: 600;
}
.subtitulo-ms {
    font-size: 1.1rem;
    color: #605e5c;
}

/* Contenedor Principal del Carrusel */
.contenedor-carrusel-ms {
    position: relative;
    width: 95%;              
    max-width: 1400px;       
    height: 66vh;           
    min-height: 600px;       
    background-color: white;
    box-shadow: 0 6.4px 14.4px 0 rgba(0,0,0,0.13), 0 1.2px 3.6px 0 rgba(0,0,0,0.11);
    border-radius: 4px;
    overflow: hidden;       
    border: 1px solid #edebe9;
    margin-bottom: 20px;
}

.contenedor-carrusel-ms input[type="radio"] {
    display: none;
}

.carrusel-slides {
    display: flex;
    width: 500%;  
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide-item {
    width: 20%;
    height: 100%;
    position: relative;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 40px;       
}

.etiqueta-diagrama {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-weight: 600;
    color: var(--ms-blue);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#slide1:checked ~ .carrusel-slides { transform: translateX(0%); }
#slide2:checked ~ .carrusel-slides { transform: translateX(-20%); }
#slide3:checked ~ .carrusel-slides { transform: translateX(-40%); }
#slide4:checked ~ .carrusel-slides { transform: translateX(-60%); }
#slide5:checked ~ .carrusel-slides { transform: translateX(-80%); }

.carrusel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
    background-color: rgba(0,0,0,0.1);
    padding: 10px 20px;
    border-radius: 20px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    background-color: white;
    border: 2px solid #605e5c;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-dot:hover {
    background-color: var(--ms-blue);
    border-color: var(--ms-blue);
}

#slide1:checked ~ .carrusel-nav label[for="slide1"],
#slide2:checked ~ .carrusel-nav label[for="slide2"],
#slide3:checked ~ .carrusel-nav label[for="slide3"],
#slide4:checked ~ .carrusel-nav label[for="slide4"],
#slide5:checked ~ .carrusel-nav label[for="slide5"] {
    background-color: var(--ms-blue);
    border-color: var(--ms-blue);
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .contenedor-carrusel-ms {
        height: 50vh;
    }
    .slide-item img {
        padding: 10px;
    }
    .etiqueta-diagrama {
        font-size: 0.8rem;
        padding: 5px 10px;
        bottom: 60px;
    }
}

/* =========================================
    VISTAS PRIVADAS (Dashboard)
   ========================================= */
.card-dashboard {
    max-width: 900px;
    border-top: 4px solid var(--ms-blue);
}
.welcome-msg {
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.welcome-msg strong {
    color: var(--ms-blue);
}
.info-conexion {
    background-color: #f0f6ff;
    padding: 15px;
    font-size: 0.95rem;
    margin-bottom: 20px;
    border-left: 3px solid var(--ms-blue);
}

.dashboard-menu {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.btn-dashboard {
    border: none;
    color: white;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 2px;
    transition: transform 0.1s;
}
.btn-dashboard:active {
    transform: scale(0.98);
}
.btn-blue {
    background-color: var(--ms-blue);
}
.btn-blue:hover {
    background-color: var(--ms-blue-hover);
}
.btn-gray {
    background-color: #605e5c;
}
.btn-gray:hover {
    background-color: #484644;
}
.btn-red {
    background-color: #d13438;
}
.btn-red:hover {
    background-color: #a4262c;
}
.card-wide {
    max-width: 1400px;
    width: 95%;
    padding: 30px;
    margin-bottom: 20px;
}

/* =========================================
    VISTA REST (Estilo Tarjetas)
   ========================================= */
.contenedor-rest {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 98%;
    max-width: 1800px;
    justify-content: center;
    align-items: stretch;
    padding-bottom: 40px;
    margin-top: 10px;
}

.columna-api {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
}

.tarjeta-api {
    background-color: var(--card-bg);
    box-shadow: 0 1.6px 3.6px 0 rgba(0,0,0,0.13), 0 0.3px 0.9px 0 rgba(0,0,0,0.11);
    border-radius: 4px;
    overflow: hidden;
    height: 100%;
    border: 1px solid #edebe9;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}
.tarjeta-api:hover {
    box-shadow: 0 6.4px 14.4px 0 rgba(0,0,0,0.13), 0 1.2px 3.6px 0 rgba(0,0,0,0.11);
}

.seccion-input {
    margin-bottom: 20px;
    border-bottom: 1px solid #f3f2f1;
    padding-bottom: 15px;
}
.grupo-input-api {
    display: flex;
    gap: 5px;
    height: 40px;
}
.grupo-input-api .input-microsoft {
    flex-grow: 1;
}
.btn-api {
    padding: 0 25px;
    min-width: auto;
}

.seccion-titulo {
    background-color: var(--ms-blue);
    color: white;
    padding: 12px 15px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 2px;
}
.seccion-titulo h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seccion-contenido {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background-color: #faf9f8;
    border-radius: 2px;
}
.seccion-contenido.sin-fondo {
    background-color: transparent;
}

.media-nasa {
    width: 100%;
    height: 100%;
    min-height: 400px;
    max-height: 600px;
    object-fit: cover;
    border: 1px solid #e1dfdd;
}
.icono-api-vacia {
    font-size: 5rem;
    color: var(--ms-blue);
    opacity: 0.3;
    margin-bottom: 15px;
}
.texto-vacio {
    color: var(--ms-blue);
    font-size: 1.1rem;
    font-weight: 500;
}

/* =========================================
    VISTAS ESPECIALES (Error / WIP / Tablas)
   ========================================= */
body.view-error, body.view-wip {
    background-color: #ffffff;
}

.pantalla-completa {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    width: 100%;
    text-align: center;
    padding: 20px;
}
.icono-grande {
    font-size: 6rem;
    margin-bottom: 25px;
}
.icono-rojo {
    color: #d13438;
}
.icono-amarillo {
    color: #ffc107;
}
.titulo-grande {
    font-size: 5rem;
    font-weight: 300;
    line-height: 1;
    color: #323130;
}
.subtitulo-mensaje {
    font-size: 1.5rem;
    color: #323130;
    font-weight: 600;
    margin: 10px 0 20px;
}
.texto-descripcion {
    color: #605e5c;
    margin-bottom: 30px;
    font-size: 1.1rem;
    max-width: 600px;
    line-height: 1.5;
}

.caja-detalles-tecnicos {
    background-color: #f3f2f1;
    border-left: 5px solid #d13438;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    text-align: left;
    margin-bottom: 40px;
    font-size: 0.95rem;
    color: #605e5c;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.tabla-microsoft {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 0.9rem;
}
.tabla-microsoft th {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ccc;
    background-color: #f8f8f8;
}
.tabla-microsoft td {
    padding: 10px;
    border-bottom: 1px solid #e1dfdd;
    font-family: 'Consolas', monospace;
    word-break: break-all;
}

/* =========================================
    RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    /* Header */
    .header-titulo-central {
        display: none;
    }
    .logo-texto-ms {
        display: none;
    }
    .btn-header .btn-text-responsive {
        display: none;
    }
    .header-app {
        padding: 0 15px;
    }

    /* REST */
    .columna-api {
        width: 100%;
        max-width: none;
    }
    .contenedor-rest {
        flex-direction: column;
        align-items: center;
    }
}
/* =========================================
   ESTILOS PERFIL / MI CUENTA
   ========================================= */

.perfil-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.avatar-grande {
    width: 80px;
    height: 80px;
    background-color: var(--ms-blue);
    color: white;
    font-size: 3rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: white;
    color: #323130;
    border: 1px solid #8a8886;
    padding: 8px 24px; 
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 2px;
}

.btn-secondary:hover {
    background-color: #edebe9;
    border-color: #323130;
}

.acciones-login {
    display: flex;
    justify-content: flex-start; 
    gap: 15px; 
    margin-top: 25px;
    align-items: center;
}

.input-disabled {
    background-color: #f3f2f1;
    color: #605e5c;
    border-color: #e1dfdd;
}

.opciones-seguridad {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1dfdd;
}

/* ========================
   MTO. DEPARTAMENTOS
   ======================== */

.form-busqueda {
    margin-bottom: 30px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #edebe9;
}

.grupo-busqueda {
    display: flex;
    gap: 10px;
}

.grupo-busqueda .input-microsoft {
    flex-grow: 1;
}

.btn-search {
    padding: 0 25px;
    display: flex;            
    flex-direction: row;      
    align-items: center;     
    justify-content: center;
    gap: 8px;
}

/* Tabla mejorada */
.tabla-microsoft {
    width: 100%;
    border-collapse: collapse;
}

.tabla-microsoft th {
    background-color: white;
    border-bottom: 2px solid #0078D4;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #323130;
}
.tabla-microsoft th i{
    text-align: right;
}

.tabla-microsoft td {
    padding: 12px 10px;
    border-bottom: 1px solid #e1dfdd;
    color: #323130;
}

.tabla-microsoft tr:hover {
    background-color: #f3f2f1;
}

.td-codigo {
    color: #0078D4;
}

.texto-rojo {
    color: #d13438;
}

.btn-icon {
    background: none;
    border: none;
    color: #605e5c;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: color 0.2s;
}
.btn-icon:hover {
    color: #0078D4;
}

.mensaje-vacio {
    text-align: center;
    padding: 40px;
    color: #605e5c;
    font-style: italic;
}