/* Ingreso de Libros - Estilos específicos */

/* Page Header */
.page-header {
    margin-top: 70px;
    padding: 60px 20px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-header h1 i {
    margin-right: 15px;
    color: #f39c12;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Section */
.form-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: calc(100vh - 200px);
}

.form-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Form Styles */
.ingreso-form {
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label i {
    color: #3498db;
    width: 16px;
}

.form-input,
.form-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-input:hover,
.form-select:hover {
    border-color: #bdc3c7;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid #e1e8ed;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

/* Message Container */
.message-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.message.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-left: 4px solid #1e8449;
}

.message.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-left: 4px solid #a93226;
}

.message.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border-left: 4px solid #d35400;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Validation Styles */
.form-input.invalid,
.form-select.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-input.valid,
.form-select.valid {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Loading State */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading i {
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        min-width: auto;
    }
    
    .message-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1rem;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .form-actions,
    .message-container {
        display: none;
    }
    
    .form-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* === THEME OVERRIDES (Ingreso) === */
.page-header {
  background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800)) !important;
  color: #fff !important;
}
.page-header h1, .page-header p { color: #fff !important; }
.page-header h1 i { color: var(--color-accent-yellow) !important; }

.form-container {
  background: var(--color-bg) !important;
  border: 1px solid var(--color-border) !important;
}

.form-label { color: var(--color-text) !important; }
.form-label i { color: var(--color-primary-600) !important; }

.form-input:focus,
.form-select:focus {
  border-color: var(--color-primary-600) !important;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.2) !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700)) !important;
  border-color: var(--color-primary-700) !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.25) !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800)) !important;
  border-color: var(--color-primary-800) !important;
  box-shadow: 0 6px 20px rgba(27, 67, 50, 0.35) !important;
}

.btn-secondary {
  background: var(--color-accent-yellow) !important;
  border-color: #d4a20b !important;
  color: #1f2937 !important;
  box-shadow: 0 4px 15px rgba(241, 196, 15, 0.25) !important;
}
.btn-secondary:hover {
  background: #e2b40e !important;
  border-color: #c7960a !important;
  box-shadow: 0 6px 20px rgba(226, 180, 14, 0.35) !important;
}

/* Mensajes */
.message.success {
  background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700)) !important;
  color: #fff !important;
  border-left: 4px solid var(--color-primary-800) !important;
}
.message.warning {
  background: linear-gradient(135deg, #ffd873, #f1c40f) !important;
  color: #1f2937 !important;
  border-left: 4px solid #d4a20b !important;
}
/* Mantenemos error en rojo para claridad */
/* .message.error se deja como esta */