/* Barbancho Legal Tech - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

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

main {
    flex: 1;
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
}

/* Button Enhancements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-success {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border: none;
    color: #000;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
    border: none;
}

/* Table Enhancements */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

/* Badge Enhancements */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

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

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

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
}

/* Modal Enhancements */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
}

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

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Stats Cards - Fixed contrast issues */
.card.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%) !important;
    color: white !important;
}

.card.bg-primary .card-title,
.card.bg-primary h2,
.card.bg-primary h6 {
    color: white !important;
}

.card.bg-primary .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.card.bg-success {
    background: linear-gradient(135deg, #198754 0%, #157347 100%) !important;
    color: white !important;
}

.card.bg-success .card-title,
.card.bg-success h2,
.card.bg-success h6 {
    color: white !important;
}

.card.bg-success .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.card.bg-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%) !important;
    color: white !important;
}

.card.bg-info .card-title,
.card.bg-info h2,
.card.bg-info h6 {
    color: white !important;
}

.card.bg-info .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.card.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    color: #000 !important;
}

.card.bg-warning .card-title,
.card.bg-warning h2,
.card.bg-warning h6 {
    color: #000 !important;
}

.card.bg-warning .text-white-50 {
    color: rgba(0, 0, 0, 0.7) !important;
}

.card.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%) !important;
    color: white !important;
}

.card.bg-danger .card-title,
.card.bg-danger h2,
.card.bg-danger h6 {
    color: white !important;
}

.card.bg-danger .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Avatar Styles */
.avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Alert Enhancements */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Pagination Enhancements */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
}

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

.pagination .page-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

/* Dropdown Enhancements */
.dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

/* Input Group Enhancements */
.input-group-text {
    border-radius: 8px 0 0 8px;
    border: 2px solid #e9ecef;
    background-color: #f8f9fa;
}

.input-group .form-control {
    border-radius: 0 8px 8px 0;
}

/* List Group Enhancements */
.list-group-item {
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Modal Document Titles - Fix overflow */
.modal .card-title {
    word-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    line-height: 1.4;
}

/* Modal Document Cards */
.modal .card {
    max-width: 100%;
    overflow: hidden;
}

.modal .card-body {
    padding: 1rem;
}

/* Ensure modal content doesn't overflow */
.modal-body {
    overflow-x: hidden;
}

/* Document filename styling */
.modal .card-title i {
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.modal .card-title .badge {
    flex-shrink: 0;
    margin-left: 0.5rem;
} 