/* ---- THEME UNIFIED STYLES FOR BITÁCORA MD ---- */

/* Inputs & Form Elements */
.form-select-custom,
.form-control-custom {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease-in-out;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.form-select-custom:focus,
.form-control-custom:focus {
    background-color: #fff;
    border-color: #8474a1;
    box-shadow: 0 0 0 4px rgba(132, 116, 161, 0.15);
    outline: 0;
}

/* Specific Select Customization for icons within select fields */
.form-select-custom.with-icon {
    padding-left: 52px !important;
    font-size: 1.05rem;
}

.input-group-custom {
    position: relative;
}

.select-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #8474a1;
    font-size: 1.2rem;
    z-index: 10;
    pointer-events: none;
}

/* Primary Button Custom Style */
.btn-custom {
    background: linear-gradient(135deg, #8474a1, #6fc5cd);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    color: #fff !important;
    box-shadow: 0 8px 16px -4px rgba(132, 116, 161, 0.3);
    transition: all 0.2s ease-in-out;
}

.btn-custom:hover,
.btn-custom:focus {
    background: linear-gradient(135deg, #766394, #5eb0b8);
    box-shadow: 0 10px 20px -4px rgba(132, 116, 161, 0.4);
    color: #fff !important;
    transform: translateY(-1px);
}

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

/* Outline Secondary Style */
.btn-outline-custom {
    border: 2px solid #8474a1;
    background-color: transparent;
    color: #8474a1;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.btn-outline-custom:hover {
    background-color: rgba(132, 116, 161, 0.05);
    color: #766394;
    border-color: #766394;
}

/* Hover danger/logout action */
.hover-logout {
    color: #64748b;
    transition: all 0.2s;
    font-weight: 500;
}

.hover-logout:hover {
    color: #ef4444 !important;
}

/* Advanced Cards Style */
.ips-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 24px !important;
    border: 1px solid rgba(226, 232, 240, 0.6);
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.ips-card:hover {
    box-shadow: 0 25px 50px -12px rgba(132, 116, 161, 0.18);
    transform: translateY(-2px);
}

.ips-card-header {
    background: linear-gradient(135deg, #8474a1, #6fc5cd) !important;
    border-bottom: 0;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.ips-icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.btn-outline-danger:hover {
    background-color: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

/* Custom Pagination styling */
.pagination .page-link {
    color: #8474a1;
    border-color: #e2e8f0;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.pagination .page-link:hover {
    background-color: rgba(132, 116, 161, 0.05);
    color: #766394;
    border-color: #e2e8f0;
}

.pagination .page-item.active .page-link {
    background-color: #8474a1;
    border-color: #8474a1;
    color: #ffffff;
}

/* Override info/blue classes to use brand teal (#6fc5cd) instead of pure blue */
.text-info,
.text-cyan {
    color: #6fc5cd !important;
}

.bg-info {
    background-color: rgba(111, 197, 205, var(--bs-bg-opacity, 1)) !important;
}

.btn-info {
    background-color: #6fc5cd !important;
    border-color: #6fc5cd !important;
    color: #ffffff !important;
}

.btn-info:hover {
    background-color: #5eb0b8 !important;
    border-color: #5eb0b8 !important;
    color: #ffffff !important;
}

.btn-outline-info {
    color: #6fc5cd !important;
    border-color: #6fc5cd !important;
}

.btn-outline-info:hover {
    background-color: rgba(111, 197, 205, 0.1) !important;
    color: #5eb0b8 !important;
    border-color: #5eb0b8 !important;
}

/* Vibrant brand gradient background for headers */
.card-header-gradient,
.card-header:not(.bg-transparent):not(.bg-white):not([style*="background"]) {
    background: linear-gradient(135deg, rgba(132, 116, 161, 0.16), rgba(111, 197, 205, 0.22)) !important;
}

/* Primary color overrides to replace Bootstrap's blue with brand purple */
.text-primary {
    color: #8474a1 !important;
}

.bg-primary {
    background-color: rgba(132, 116, 161, var(--bs-bg-opacity, 1)) !important;
}

.btn-primary {
    background-color: #8474a1 !important;
    border-color: #8474a1 !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #766394 !important;
    border-color: #766394 !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: #8474a1 !important;
    border-color: #8474a1 !important;
}

.btn-outline-primary:hover {
    background-color: rgba(132, 116, 161, 0.1) !important;
    color: #766394 !important;
    border-color: #766394 !important;
}

/* Add custom transition and hover lift for dashboard cards */
.transition-card {
    transition: all 0.3s ease-in-out;
}

.transition-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(132, 116, 161, 0.15) !important;
}

/* Specific Badge colors for the different User Roles */
.badge.badge-role-super-admin, .badge.badge-role-superadmin {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #ef4444 !important;
}
.badge.badge-role-admin {
    background-color: rgba(245, 158, 11, 0.12) !important;
    color: #f59e0b !important;
}
.badge.badge-role-doctor {
    background-color: rgba(111, 197, 205, 0.12) !important;
    color: #5eb0b8 !important;
}
.badge.badge-role-assistant {
    background-color: rgba(132, 116, 161, 0.12) !important;
    color: #8474a1 !important;
}
.badge.badge-role-patient {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
}

/* Custom Navigation Tabs styling */
.nav-custom-tabs .nav-link {
    color: #5c677d !important;
    background-color: transparent !important;
    transition: all 0.3s ease;
    border: none !important;
}

.nav-custom-tabs .nav-link.active {
    background: linear-gradient(135deg, #8474a1, #6fc5cd) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(132, 116, 161, 0.25) !important;
}

.nav-custom-tabs .nav-link:hover:not(.active) {
    background-color: rgba(132, 116, 161, 0.06) !important;
    color: #8474a1 !important;
}

/* Custom Color Utilities allowing Bootstrap opacity helpers */
.bg-purple {
    background-color: rgba(132, 116, 161, var(--bs-bg-opacity, 1)) !important;
}

.text-purple {
    color: #8474a1 !important;
}