/**
 * Estilos principales del Sistema de Gestión ISO
 */

/* Variables CSS */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

/* Layout general */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-card .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card .logo i {
    font-size: 3rem;
    color: var(--primary-color);
}

/* Cards y paneles */
.card {
    border: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

/* Tablas */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Botones */
.btn {
    border-radius: 5px;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
}

.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Estados de órdenes */
.badge-pendiente {
    background-color: var(--warning-color);
    color: #000;
}

.badge-en_proceso {
    background-color: var(--info-color);
    color: #000;
}

.badge-completada {
    background-color: var(--success-color);
}

.badge-cancelada {
    background-color: var(--danger-color);
}

/* Formularios */
.form-label {
    font-weight: 500;
    color: #495057;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Dashboard stats */
.stat-card {
    border-left: 4px solid var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    color: var(--secondary-color);
    font-size: 0.875rem;
    text-transform: uppercase;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

/* Documentos */
.document-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.document-list li {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.document-list li:last-child {
    border-bottom: none;
}

.document-list .doc-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary-color);
}

.document-list .doc-info {
    flex: 1;
}

.document-list .doc-name {
    font-weight: 500;
}

.document-list .doc-meta {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* Dropzone */
.dropzone {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.dropzone i {
    font-size: 3rem;
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-action {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* Animaciones */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
