/*
 * Serlac Servicio Técnico - Estilos personalizados
 */

:root {
    --serlac-primary: #0d6efd;
    --serlac-secondary: #1e3c72;
    --serlac-accent: #2a5298;
}

/* General */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-brand img {
    /* Logo en color original */
}

.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

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

/* Section cards con borde lateral */
.section-card {
    border-left: 4px solid var(--serlac-primary);
}

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

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.6rem 1rem;
}

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

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

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

.table th {
    font-weight: 600;
    color: #495057;
    border-bottom-width: 1px;
}

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

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 6px;
}

/* Stats Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info {
    border-radius: 15px;
}

/* Signature Pad */
.signature-pad {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signature-pad canvas {
    width: 100%;
    height: 200px;
    border-radius: 8px;
}

.signature-pad img {
    max-height: 200px;
    border-radius: 8px;
}

/* Photo Gallery */
.photo-container {
    position: relative;
    display: inline-block;
}

.photo-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.photo-preview:hover {
    transform: scale(1.05);
}

.photo-delete {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: 12px;
    line-height: 1;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: var(--serlac-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--serlac-primary);
}

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

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        border-radius: 8px !important;
        margin-bottom: 5px;
    }

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

    .photo-preview {
        width: 80px;
        height: 80px;
    }
}

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

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

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

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

/* GPS Map placeholder */
#map-container {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Form required indicator */
.form-label-required::after {
    content: " *";
    color: #dc3545;
}

/* Stock alerts */
.stock-low {
    background-color: #fff3cd;
}

.stock-critical {
    background-color: #f8d7da;
}

/* Dashboard quick actions */
.list-group-item-action {
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.list-group-item-action:hover {
    background-color: rgba(13, 110, 253, 0.1);
    transform: translateX(5px);
}

/* Modal improvements */
.modal-content {
    border: none;
    border-radius: 15px;
}

.modal-header {
    border-bottom: 1px solid #eee;
}

.modal-footer {
    border-top: 1px solid #eee;
}
