: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;
}

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

.logo-seccion {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-seccion .titulo-tema {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--ms-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-seccion .subtitulo-tema {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
}

.nav-derecha {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-derecha form { margin: 0; }

.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;
}

/* =========================================
   MAIN Y TARJETAS
   ========================================= */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.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;
}

.card-center-text { text-align: center; } 
.text-center { text-align: center; } 

.logo-app-img {
    height: 40px;
    margin-bottom: 1rem;
}

.titulo-login {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1b1b1b;
}

.subtitulo-login {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* =========================================
   FORMULARIO E INPUTS
   ========================================= */
.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;
}

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

/* =========================================
   BOTONES
   ========================================= */
.acciones-login {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

span.btn-link {
    color: #666; 
    cursor: default;
    font-size: 0.9rem;
    text-decoration: none;
}

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

button.btn-link:hover {
    text-decoration: underline;
    color: #004d8a;
}
.btn-bold { font-weight: 600; }

.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-detalle {
    width: auto;
    padding: 10px 40px;
}

/* =========================================
   VISTAS PRIVADAS
   ========================================= */
.card-dashboard {
    max-width: 900px;
    border-top: 4px solid var(--ms-blue);
}

.card-wide {
    max-width: 60vw;
    width: 100%;     
    padding: 30px;   
}

.welcome-msg {
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.welcome-msg strong { color: var(--ms-blue); }
.welcome-msg p { margin-top: 10px; }

.info-conexion {
    background-color: #f0f6ff;
    padding: 15px;
    font-size: 0.95rem;
    margin-bottom: 20px;
    border-left: 3px solid var(--ms-blue);
}

.contenedor-boton-centro {
    text-align: center;
    margin-top: 40px;
}

.contenedor-volver {
    width: 100%;
    max-width: 900px;
    margin-bottom: 20px;
}
.btn-volver-color { color: #666; }

/* Tablas Detalle */
.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;
}

.titulo-tabla {
    color: var(--ms-blue);
    margin: 30px 0 15px;
}
.titulo-tabla-first { margin-bottom: 15px; } 

.phpinfo-container {
    overflow-x: auto;
    padding: 10px;
    border: 1px solid #ddd;
}

/* =========================================
   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 a {
    color: #605e5c;
    text-decoration: none;
    margin: 0 10px;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--ms-blue); }

.copy-text { font-weight: 500; }

/* =========================================
   INDEX PÚBLICO
   ========================================= */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.idioma-buttons {
    display: flex;
    gap: 8px;
    margin: 0;
}

.form-no-margin { margin: 0; }

.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;
}

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

.btn-flag.active {
    background-color: #e1dfdd;
    border-color: #d2d0ce;
}

.btn-flag img {
    height: 20px;
    width: auto;
    display: block;
}

.home-image-container {
    margin-top: 30px;
    text-align: center;
}


.home-image-container img {
    max-width: 100%;
    height: auto;
    max-height: 500px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    border-radius: 8px;
    display: inline-block; 
}

.home-image-container img[src=""], 
.home-image-container img:not([src]){ opacity:0; }


.btn-login-header {
    background-color: var(--ms-blue);
    color: white;
    border: none;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login-header:hover {
    background-color: var(--ms-blue-hover);
}