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

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 20px; 
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); 
    color: #333; 
    min-height: 100vh;
}

/* HEADER Y NAV */

header { 
    background: rgba(255,255,255,0.95);
    padding: 10px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

header .logo-block {
    display: flex;
    align-items: center;
    gap: 15px;
}

header .logo-block img {
    height: 60px;
    border-radius: 10px;
}

h1 { 
    color: #e10600;
    font-size: 1.8em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

nav a { 
    background: #e10600;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s;
}

nav a:hover {
    background: #c50500;
    transform: translateY(-1px);
}

/* CONTENEDORES GENERALES */

.card { 
    background: rgba(255,255,255,0.97);
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* TABLAS */

.table-wrapper {
    width: 100%;
    overflow-x: auto;           /* clave para móvil */
    -webkit-overflow-scrolling: touch;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    background: white; 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 600px;           /* para que en móvil salga scroll horizontal */
}

th { 
    background: linear-gradient(135deg, #e10600, #ff4d4d); 
    color: white; 
    padding: 14px 10px; 
    text-align: center; 
    font-weight: bold; 
    font-size: 0.95em;
}

td { 
    padding: 10px; 
    text-align: center; 
    border-bottom: 1px solid #eee; 
    font-size: 0.9em;
}

tr:nth-child(even) { background: #f8f9fa; }
tr:hover { background: #e3f2fd; transition: 0.2s; }

/* FORMULARIOS */

form { 
    background: rgba(255,255,255,0.97); 
    padding: 25px; 
    border-radius: 15px; 
    box-shadow: 0 8px 32px rgba(0,0,0,0.1); 
    max-width: 800px; 
    margin: 20px auto;
}

label { 
    display: block; 
    margin: 12px 0 4px; 
    font-weight: bold; 
    color: #333; 
    font-size: 0.95em;
}

input, select { 
    width: 100%; 
    padding: 10px; 
    border: 2px solid #ddd; 
    border-radius: 8px; 
    font-size: 15px; 
    transition: border-color 0.3s;
}

input:focus, select:focus { 
    outline: none; 
    border-color: #e10600; 
    box-shadow: 0 0 8px rgba(225,6,0,0.2); 
}

button { 
    background: linear-gradient(135deg, #e10600, #ff4d4d); 
    color: white; 
    padding: 12px 24px; 
    border: none; 
    border-radius: 25px; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: all 0.2s; 
    margin: 10px 5px;
}

button:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 18px rgba(225,6,0,0.35); 
}

/* MENSAJES */

.error { 
    background: #fee; 
    color: #c33; 
    padding: 12px; 
    border-radius: 8px; 
    border-left: 5px solid #e74c3c; 
    margin-bottom: 10px;
}

.success { 
    background: #efe; 
    color: #2e7; 
    padding: 12px; 
    border-radius: 8px; 
    border-left: 5px solid #27ae60; 
    margin-top: 10px;
}

/* LOGIN ESPECÍFICO */

.login-wrapper {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo img {
    max-width: 160px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.login-title {
    text-align: center;
    margin-top: 10px;
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
}

/* RESPONSIVE */

@media (max-width: 768px) {
    body {
        padding: 10px;
        max-width: 100%;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
    }

    header .logo-block {
        width: 100%;
        justify-content: flex-start;
    }

    nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    nav a {
        font-size: 13px;
        padding: 6px 10px;
    }

    h1 {
        font-size: 1.4em;
    }

    form {
        padding: 20px;
        margin: 10px auto;
    }

    .card {
        padding: 18px;
        margin: 12px 0;
    }
}
