*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
}

/* ===== Editor de texto enriquecido (notas) ===== */
.rte-editor:empty:before {
    content: attr(data-placeholder);
    color: #94a3b8;
}
.rte-editor ul, .rte-editor ol {
    margin: 4px 0 4px 20px;
    padding: 0;
}
.rte-toolbar-btn {
    border: none;
    background: transparent;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}
.rte-toolbar-btn:hover {
    background: #e8eaed;
    color: #1e293b;
}

/* ===== LOGIN ===== */
.login-bg {
    min-height: 100vh;
    background-color: #eef1f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 48px 48px 36px;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    height: 80px;
    margin-bottom: 28px;
}

.login-subtitle {
    color: #6b7a8d;
    font-size: 14px;
    margin-bottom: 28px;
    text-align: center;
}

.login-field {
    width: 100%;
    margin-bottom: 16px;
}

.login-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #8a9bb0;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.login-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    font-size: 14px;
    color: #2d3748;
    outline: none;
    transition: border-color 0.2s;
}

.login-input:focus {
    border-color: #0d1b3e;
    box-shadow: 0 0 0 3px rgba(13,27,62,0.08);
}

.login-input::placeholder {
    color: #b0bbc8;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background-color: #0d1b3e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 20px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover:not(:disabled) {
    background-color: #1a2d5a;
}

.login-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.login-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-forgot {
    font-size: 13px;
    color: #4a6fa5;
    text-decoration: none;
}

.login-forgot:hover {
    text-decoration: underline;
}

.login-error {
    width: 100%;
    color: #c0392b;
    font-size: 13px;
    margin-bottom: 8px;
    text-align: center;
}

.login-footer {
    margin-top: 24px;
    font-size: 12px;
    color: #9aa5b4;
}

/* ===== EVENTOS DE PERSONA ===== */
.ep-persona-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s;
}
.ep-persona-item:hover { background: #f8fafc; }
.ep-persona-item--selected { background: #eff6ff; border-left: 3px solid #3b82f6; }

.ep-persona-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0d1b3e1a;
    color: #0d1b3e;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ep-persona-nombre {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
    line-height: 1.3;
}
.ep-persona-legajo {
    font-size: 11px;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
}

/* ── Gantt ── */
.gantt-wrap {
    overflow-x: auto;
    min-height: 40px;
}
.gantt-header-row {
    display: flex;
    align-items: center;
    height: 28px;
    border-bottom: 1px solid #e8eaed;
    background: #f8f9fb;
}
.gantt-event-row {
    display: flex;
    align-items: center;
    height: 40px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.1s;
}
.gantt-event-row:hover { background: #f8fafc; }
.gantt-label-col {
    width: 130px;
    min-width: 130px;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #e8eaed;
    overflow: hidden;
}
.gantt-event-code {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gantt-event-desc {
    font-size: 10px;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gantt-timeline-col {
    flex: 1;
    position: relative;
    height: 100%;
    min-width: 0;
}
.gantt-day-mark {
    position: absolute;
    font-size: 10px;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    pointer-events: none;
    user-select: none;
}
.gantt-day-today {
    color: #3b82f6;
    font-weight: 700;
}
.gantt-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    transition: filter 0.1s;
    min-width: 4px;
}
.gantt-bar:hover { filter: brightness(1.1); }
.gantt-dot {
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ── Form overlay panel ── */
.ep-form-panel {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

/* ===== HOME ===== */
.home-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 100vh;
}

.home-welcome {
    text-align: center;
}

.home-welcome h1 {
    font-size: 32px;
    font-weight: 700;
    color: #0d1b3e;
    margin: 0 0 10px;
}

.home-welcome p {
    font-size: 16px;
    color: #6b7a99;
    margin: 0;
}

/* ===== BLAZOR ERRORES ===== */
#blazor-error-ui {
    background: #ffcc00;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ===== Responsive: LOGIN ===== */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 24px 28px;
        max-width: 100%;
    }
    .login-logo {
        height: 64px;
    }
}
