/**
 * Control Horario Pro - Panel de control
 */

.chp-panel {
    max-width: 420px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chp-panel-login {
    padding: 1.5rem;
    text-align: center;
    color: #64748b;
}

.chp-panel-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.chp-panel-status-label {
    font-weight: 600;
    color: #475569;
}

.chp-panel-status-value {
    color: #0f172a;
    font-weight: 500;
}

.chp-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.chp-panel-actions .chp-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.05s;
}

.chp-panel-actions .chp-btn:active {
    transform: scale(0.98);
}

.chp-panel-actions .chp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chp-btn-in {
    background: #2563eb;
    color: #fff;
}

.chp-btn-in:hover:not(:disabled) {
    background: #1d4ed8;
}

.chp-btn-out {
    background: #64748b;
    color: #fff;
}

.chp-btn-out:hover:not(:disabled) {
    background: #475569;
}

.chp-btn-break {
    background: #0d9488;
    color: #fff;
}

.chp-btn-break:hover:not(:disabled) {
    background: #0f766e;
}

.chp-btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.chp-btn-secondary:hover:not(:disabled) {
    background: #cbd5e1;
}

.chp-btn-primary {
    background: #2563eb;
    color: #fff;
}

.chp-panel-message {
    min-height: 1.5em;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #16a34a;
}

.chp-panel-message-error {
    color: #dc2626;
}

.chp-panel-history {
    margin-bottom: 1rem;
}

.chp-panel-history h4 {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #475569;
}

.chp-panel-events {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.chp-panel-events li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.chp-panel-events li:last-child {
    border-bottom: none;
}

.chp-panel-empty {
    color: #94a3b8;
    font-style: italic;
}

.chp-event-type {
    font-weight: 500;
    color: #334155;
}

.chp-event-time {
    color: #64748b;
}

.chp-panel-correction {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.chp-panel-correction .chp-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Modal */
.chp-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.chp-modal[hidden] {
    display: none;
}

.chp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.chp-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.chp-modal-content h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.chp-modal-content label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
}

.chp-modal-content input,
.chp-modal-content select,
.chp-modal-content textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
}

.chp-modal-content textarea {
    resize: vertical;
    min-height: 80px;
}

.chp-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

.chp-modal-actions .chp-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}
