/* === RESET GENERAL === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(to bottom, #2f3542, #57606f);
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

/* === HEADER GLOBAL === */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(0, 0, 0, 0.6);
}

.header-left { flex: 1; text-align: left; }
.header-center { flex: 1; text-align: center; }
.header-right { flex: 1; text-align: right; }

a {
    color: #1e90ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === FOOTER GLOBAL === */
.main-footer {
    justify-content: center;
    margin-top: auto;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    text-align: center;
}

/* === SELECTOR DE IDIOMA === */
.language-form {
    display: inline-block;
    margin-left: 1rem;
    vertical-align: middle;
}

.language-form select {
    padding: 0.3rem;
    font-size: 0.95rem;
    border-radius: 4px;
    border: none;
    background-color: #fff;
    color: #000;
}

/* === MAIN === */
main {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* === LOGIN PAGE === */
body.login-page main {
    justify-content: center;
}

.login-form {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-form h2 {
    margin-bottom: 1.5rem;
}

.login-form input,
.login-form button {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

.login-form button {
    background: #1e90ff;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}

.login-form button:hover {
    background: #63b3ed;
}

/* === INDEX PAGE === */
body.index-page main {
    text-align: center;
    justify-content: center;
}

body.index-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

body.index-page p {
    font-size: 1.2rem;
    max-width: 600px;
}

/* === FORMULARIOS === */
.formulario {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.formulario input,
.formulario select,
.formulario textarea {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1rem;
}

.formulario textarea {
    min-height: 100px;
    resize: vertical;
}

.formulario input:focus,
.formulario select:focus,
.formulario textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.formulario button {
    background: #1e90ff;
    color: #fff;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}

.formulario button:hover {
    background: #63b3ed;
}

/* === TABLAS === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
    border-radius: 10px;
    overflow: hidden;
}

table th, table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
}

table th {
    background: rgba(0, 0, 0, 0.4);
}

/* === MENSAJES === */
.success { color: #00ff88; margin: 1rem 0; }
.error   { color: #ff5555; margin: 1rem 0; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .main-header, .main-footer {
        flex-direction: column;
        text-align: center;
    }

    .header-left, .header-center, .header-right {
        text-align: center;
    }

    .language-form {
        display: block;
        margin: 0.5rem auto 0;
    }

    .language-form select {
        width: 80%;
    }

    .login-form input,
    .login-form button {
        width: 100%;
    }

    .formulario {
        max-width: 100%;
        margin: 1rem auto;
    }
}

/* Alerts */
.alert{padding:12px 14px;border-radius:10px;margin:12px 0;font-size:0.95rem;}
.alert-success{border:1px solid #2d6a4f;background:rgba(45,106,79,0.10);}
.alert-error{border:1px solid #b02a37;background:rgba(176,42,55,0.10);}

.contact-form label{display:block;margin:10px 0;}
.contact-form input,.contact-form textarea{width:100%;box-sizing:border-box;padding:10px;border-radius:10px;border:1px solid rgba(0,0,0,0.2);}
.form-actions{display:flex;gap:10px;align-items:center;margin-top:14px;}
.btn-secondary{display:inline-block;padding:10px 14px;border-radius:10px;border:1px solid rgba(0,0,0,0.2);text-decoration:none;}


/* Dossier */
.dossier-container{max-width:1100px;margin:0 auto;padding:24px;}
.dossier-hero h1{margin:0 0 6px 0;}
.dossier-hero h2{margin:0 0 10px 0;font-weight:600;}
.dossier-meta{opacity:.85;margin:4px 0;}
.dossier-toc{margin:20px 0;padding:16px;border:1px solid rgba(255,255,255,.12);border-radius:10px;}
.dossier-toc ul{margin:8px 0 0 18px;}
.dossier-toc a{text-decoration:none;}
.dossier-toc a:hover{text-decoration:underline;}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0 6px;}
@media (max-width: 780px){.grid-2{grid-template-columns:1fr;}}
.card{padding:14px;border:1px solid rgba(255,255,255,.12);border-radius:10px;}
.table-wrap{overflow:auto;margin:10px 0 18px;}
.dossier-table{width:100%;border-collapse:collapse;min-width:820px;}
.dossier-table th,.dossier-table td{border:1px solid rgba(255,255,255,.14);padding:10px;vertical-align:top;}
.dossier-table th{font-weight:700;}
.dossier-close{margin-top:18px;padding-top:10px;border-top:1px solid rgba(255,255,255,.12);}
.dossier-contact{margin-top:10px;}
