/* Custom CSS for PetruzCRM - Bootstrap 5 Enhanced */

/* Custom Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Root Variables */
:root {
    --bs-font-family-sans-serif: 'Inter', system-ui, -apple-system, sans-serif;
    --petruz-primary: #2b4f9c;
    --petruz-secondary: #d59e36;
    --petruz-success: #198754;
    --petruz-danger: #dc3545;
    --petruz-warning: #ffc107;
    --petruz-info: #0dcaf0;
    --petruz-light: #f8f9fa;
    --petruz-dark: #212529;
    --petruz-body-bg: #f8f9fa;
    --petruz-body-color: #495057;
}

.btn-success{
    background: #d59e36 !important;
    border: none !important;
}
/* Base Styles */
body {
    font-family: var(--bs-font-family-sans-serif);
    background-color: var(--petruz-body-bg);
    color: var(--petruz-body-color);
    line-height: 1.6;
}

/* Enhanced Cards */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1.25rem 1.5rem 1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Enhanced Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--petruz-primary);
    border-color: var(--petruz-primary);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Enhanced Form Controls */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 0.625rem 0.75rem;
    transition: all 0.15s ease-in-out;
    font-size: 0.9375rem;
}

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

.form-label {
    font-weight: 500;
    color: var(--petruz-dark);
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem 0 0 0.5rem;
    color: #6c757d;
}

/* Enhanced Navbar */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    background-color: #ffffff !important;
}

.navbar-brand img {
    transition: all 0.15s ease-in-out;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: #6c757d !important;
    transition: all 0.15s ease-in-out;
    border-radius: 0.375rem;
    margin: 0 0.25rem;
    padding: 0.5rem 0.75rem !important;
}

.nav-link:hover {
    color: var(--petruz-primary) !important;
    background-color: rgba(13, 110, 253, 0.1);
}

.nav-link.active {
    color: var(--petruz-primary) !important;
    background-color: rgba(13, 110, 253, 0.1);
    font-weight: 600;
}

/* Enhanced Tables */
.table {
    font-size: 0.9375rem;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: var(--petruz-dark);
    font-size: 0.875rem;
    padding: 1rem 0.75rem;
}

.table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f8f9fa;
}

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

/* Enhanced Alerts */
.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #d1ecf1;
    color: #055160;
}

/* Enhanced Badges */
.badge {
    font-weight: 500;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

/* Enhanced Dropdowns */
.dropdown-menu {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.15s ease-in-out;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--petruz-primary);
}

/* Enhanced Modals */
.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1.5rem 1.5rem 1rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem 1.5rem 1.5rem;
}

/* Enhanced Pills */
.nav-pills .nav-link {
    border-radius: 0.5rem;
    font-weight: 500;
    margin: 0 0.125rem;
    padding: 0.75rem 1.25rem;
    color: #495057;
    border: 1px solid #e9ecef;
    background-color: #ffffff;
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 0.875rem;
}

.nav-pills .nav-link:hover {
    background-color: #f8f9fa;
    color: var(--petruz-primary);
    border-color: #b3d7ff;
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--petruz-primary) 0%, #0b5ed7 100%);
    border-color: var(--petruz-primary);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    font-weight: 600;
}

.nav-pills .nav-link.active:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 100%);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.nav-pills .nav-link .badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
    margin-left: 0.5rem;
    line-height: 1;
}

.nav-pills .nav-link.active .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Custom Avatar Styles */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--petruz-primary) 0%, #0b5ed7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Custom Spacing */
.gap-2 {
    gap: 0.5rem !important;
}

.gap-3 {
    gap: 1rem !important;
}

.gap-4 {
    gap: 1.5rem !important;
}

/* Custom Text Utilities */
.fw-semibold {
    font-weight: 600 !important;
}

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

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

    .h3 {
        font-size: 1.5rem;
    }
}

/* Loading Animation */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* Status Indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-indicator.success {
    background-color: var(--petruz-success);
}

.status-indicator.warning {
    background-color: var(--petruz-warning);
}

.status-indicator.danger {
    background-color: var(--petruz-danger);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 80px;
    justify-content: center;
    transition: all 0.15s ease-in-out;
}

.status-badge.pending {
    background: linear-gradient(135deg, #ffc107 0%, #ffab00 100%);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-badge.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-badge.inactive {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-badge.unknown {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Role Badges */
.role-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    text-transform: capitalize;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 70px;
    justify-content: center;
    transition: all 0.15s ease-in-out;
}

.role-badge.admin {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.role-badge.staff {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* User Info Display */
.user-info {
    display: flex;
    align-items: center;
}

.user-info .user-details h4 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--petruz-dark);
}

.user-info .user-details p {
    margin: 0;
    font-size: 0.8125rem;
    color: #6c757d;
}

/* Action Dropdown */
.action-dropdown {
    position: relative;
    display: inline-block;
}

.gear-icon {
    background: none;
    border: none;
    padding: 0.375rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    color: #6c757d;
}

.gear-icon:hover {
    background-color: #f8f9fa;
    color: var(--petruz-primary);
}

.gear-icon svg {
    width: 1rem;
    height: 1rem;
}

.popover-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 10rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    display: none;
}

.popover-menu.show {
    display: block;
}

.menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.menu-item:hover {
    background-color: #f8f9fa;
    color: var(--petruz-primary);
}

.menu-item.danger:hover {
    background-color: #f8d7da;
    color: #842029;
}

.menu-item.success:hover {
    background-color: #d1e7dd;
    color: #0f5132;
}

.menu-item svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

.menu-divider {
    height: 0;
    margin: 0.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* Custom Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Smooth Transitions */
* {
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

/* DataTables Pagination Styling */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 1px;
    color: #6c757d;
    text-decoration: none;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: var(--petruz-primary);
    background-color: #f8f9fa;
    border-color: var(--petruz-primary);
    text-decoration: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    color: #ffffff !important;
    background-color: var(--petruz-primary) !important;
    border-color: var(--petruz-primary) !important;
    font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #adb5bd !important;
    background-color: #ffffff !important;
    border-color: #e9ecef !important;
    cursor: not-allowed;
    opacity: 0.5;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    width: auto;
    padding: 0 6px;
    font-size: 10px;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_info {
    padding: 1rem 0 0 0;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 400;
    text-align: left;
    margin: 0;
}

.dataTables_wrapper .dataTables_length {
    margin-bottom: 0;
    padding: 1rem 1rem 0 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.dataTables_wrapper .dataTables_length select {
    padding: 0.25rem 1.5rem 0.25rem 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background-color: #ffffff;
    color: #495057;
    font-size: 0.875rem;
    margin: 0 0.5rem;
    min-width: 70px;
}

.dataTables_wrapper .dataTables_length label {
    font-weight: 400;
    color: #6c757d;
    font-size: 0.875rem;
    margin: 0;
    display: flex;
    align-items: center;
}

/* DataTables wrapper layout */
.dataTables_wrapper .row {
    margin: 0;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dataTables_wrapper .row .col-sm-12.col-md-5 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    flex: 0 0 auto;
}

.dataTables_wrapper .row .col-sm-12.col-md-7 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    flex: 0 0 auto;
    margin-left: 1rem;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .dropdown-menu {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}
.dataTable a{
    color: #2b4f9c !important;
}
.text-primary{
     color: #2b4f9c !important;
}