:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --color-oscuro: #2b2b2b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
}

.sidebar {
    min-height: 100vh;
    background-color: var(--dark-color);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    transition: all 0.3s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.main-content {
    min-height: 100vh;
    background-color: #f8f9fa;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
    cursor: pointer;
}

.btn {
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

.input-group-text {
    border-right: none;
}

.input-group .form-control:focus {
    border-color: #dee2e6;
    box-shadow: none;
}

.input-group:focus-within .input-group-text {
    border-color: #198754;
}

.input-group:focus-within .form-control {
    border-color: #198754;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 250px;
        height: 100vh;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    .btn-nuevo-container {
        order: -1;
        margin-top: 0 !important;
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    .sidebar {
        display: block !important;
        transform: translateX(0);
    }
}

.btn-primary {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.btn-primary:hover {
    background-color: #157347 !important;
    border-color: #146c43 !important;
}

.btn-outline-primary {
    color: #198754 !important;
    border-color: #198754 !important;
}

.btn-outline-primary:hover {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: white !important;
}

.text-primary {
    color: #198754 !important;
}

.spinner-border.text-primary {
    color: #198754 !important;
}

.form-floating {
    margin-bottom: 1rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-control,
.form-select {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.toast {
    min-width: 300px;
}

.toast-container {
    z-index: 1100;
}

.modal-backdrop {
    z-index: 1040;
}

.modal {
    z-index: 1060;
}

.border-bottom {
    border-color: #e9ecef !important;
}

.form-control-label-inbox {
    margin-top: -0.8rem !important;
    min-height: 1.8rem !important;
    padding-top: 0.8rem !important;
    padding-bottom: 0.2rem !important;
    border-color: #2b2b2b;
    font-size: 0.88rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.form-control-label-inbox:focus {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
}

textarea.form-control-label-inbox {
    padding-top: 1.2rem !important;
    min-height: 3.2rem !important;
}

.label-inbox {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    background: white;
    color: #198754;
    text-transform: none;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    margin-left: 0.6rem;
    margin-bottom: 0;
    position: relative;
    top: -0.2rem;
    z-index: 1;
    display: inline-block;
}

.campo-obligatorio::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.deshabilitada-hf {
    background-color: #e9ecef !important;
    cursor: not-allowed;
}

.seccion-titulo-verde {
    color: #198754;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
    margin-top: 0;
}

.contenedor-seccion {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin-bottom: 0.4rem;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

#contratosTable {
    width: 100% !important;
    min-width: 1400px !important; 
}

#contratosTable th,
#contratosTable td {
    white-space: nowrap !important;
}

