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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

header .subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.card h2 {
    color: #1a237e;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #e8eaf6;
    padding-bottom: 0.5rem;
}

.card p {
    margin-bottom: 0.8rem;
    font-size: 0.93rem;
}

.info {
    background: #e8eaf6;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    font-size: 0.88rem;
}

code {
    background: #263238;
    color: #80cbc4;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.88rem;
}

.form-group {
    margin-bottom: 0.8rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 0 2px rgba(63,81,181,0.15);
}

button {
    background: #3f51b5;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

button:hover {
    background: #303f9f;
}

button:disabled {
    background: #9fa8da;
    cursor: not-allowed;
}

.resultado {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
}

.resultado.exito {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.resultado.error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

.hidden {
    display: none;
}

.logs {
    margin-top: 0.8rem;
    max-height: 300px;
    overflow-y: auto;
}

.log-entry {
    padding: 0.5rem 0.8rem;
    margin-bottom: 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
}

.log-entry.request {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.log-entry.response-ok {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
}

.log-entry.response-error {
    background: #ffebee;
    border-left: 3px solid #f44336;
}

.log-entry .timestamp {
    color: #757575;
    font-size: 0.78rem;
}

/* Tabla de estudiantes */
.tabla-estudiantes {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.tabla-estudiantes th,
.tabla-estudiantes td {
    padding: 0.5rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.88rem;
}

.tabla-estudiantes th {
    background: #e8eaf6;
    color: #1a237e;
    font-weight: 600;
}

.tabla-estudiantes tr:hover {
    background: #f5f5f5;
}

footer {
    text-align: center;
    padding: 1.5rem;
    color: #757575;
    font-size: 0.85rem;
    margin-top: 2rem;
}
