:root {
    --primary: #003366;
    --secondary: #4a5568;
    --accent: #e53e3e;
    --bg: #f7fafc;
    --border: #cbd5e0;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    margin: 0;
    padding: 30px;
}

.container {
    background: white;
    padding: 40px;
    max-width: 1100px;
    margin: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border-radius: 8px;
    position: relative;
}

.container::before {
    content: "CONFIDENCIAL";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 80px;
    color: rgba(0,0,0,0.02);
    pointer-events: none;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.logo-container {
    text-align: center;
}

#logoPreview {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border: 1px dashed #ccc;
    display: block;
    margin-bottom: 5px;
}

.header-info {
    flex-grow: 1;
    margin-left: 20px;
}

.header-info h2 {
    margin: 0 0 10px 0;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grid-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.grid-info label {
    font-weight: bold;
    font-size: 0.9em;
    color: var(--secondary);
}

input[type="text"],
input[type="date"],
input[type="number"] {
    border: 1px solid transparent;
    border-bottom: 1px solid #eee;
    padding: 4px;
    transition: 0.3s;
}

input:focus {
    outline: none;
    border-bottom: 1px solid var(--primary);
    background: #f0f4f8;
}

.actions {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    padding: 6px 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-add { background:#48bb78; color:white; }
.btn-pdf { background:var(--primary); color:white; }
.btn-del { background:#feb2b2; color:#c53030; padding:4px 8px; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    background: var(--primary);
    color: white;
    font-weight: 500;
    padding: 10px;
    font-size: 0.85em;
}

td {
    border-bottom: 1px solid #edf2f7;
    padding: 8px;
    text-align: center;
}

.nota-final {
    font-weight: bold;
    font-size: 1.1em;
}

.reprobado { color: var(--accent); }
.aprobado { color:#2f855a; }

textarea {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.85em;
}

.firmas {
    margin-top: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    text-align: center;
}

.linea-firma {
    border-top: 1px solid #000;
    padding-top: 8px;
    font-size: 0.9em;
    font-weight: bold;
}

#actividades-container {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.actividad-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.error {
    color: var(--accent);
    font-size: 0.85em;
    font-weight: bold;
}

@media print {
    body { background:white; padding:0; }
    .container { box-shadow:none; width:100%; }
    .actions, .btn-del, #fileInput { display:none !important; }
    input { border:none !important; }
}
