/* ============================================
   ABC Insurance - Professional Blue Theme
   Primary: #1B55A0 | Secondary/Accent: #E8A317
   ============================================ */

:root {
    --theme-deafult: #1B55A0;
    --theme-secondary: #E8A317;
}

/* ---- Page Background ---- */
.page-body {
    background: #f4f7fb;
}

/* ---- Buttons ---- */
.btn-primary {
    background-color: #1B55A0 !important;
    border-color: #1B55A0 !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #154680 !important;
    border-color: #154680 !important;
    box-shadow: 0 4px 12px rgba(27, 85, 160, 0.35) !important;
}
.btn-outline-primary {
    color: #1B55A0 !important;
    border-color: #1B55A0 !important;
}
.btn-outline-primary:hover {
    background-color: #1B55A0 !important;
    color: #fff !important;
}
.btn-secondary {
    background-color: #E8A317 !important;
    border-color: #E8A317 !important;
}
.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #d09215 !important;
    border-color: #d09215 !important;
}

/* ---- Form Focus States ---- */
.form-control:focus,
.form-select:focus {
    border-color: #1B55A0 !important;
    box-shadow: 0 0 0 0.2rem rgba(27, 85, 160, 0.18) !important;
}

/* ---- Table Styling ---- */
.table thead th {
    background-color: #eaf0f9;
    color: #1B55A0;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #1B55A0;
    white-space: nowrap;
}
.table tbody tr:hover {
    background-color: #f0f5fd;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #f8fafd;
}

/* ---- DataTable Export Buttons ---- */
.dt-buttons .dt-button,
.buttons-csv,
.buttons-excel,
.buttons-pdf,
.buttons-print {
    background-color: #1B55A0 !important;
    border-color: #1B55A0 !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 6px 16px !important;
    margin-right: 6px !important;
    font-size: 0.8rem !important;
}
.dt-buttons .dt-button:hover,
.buttons-csv:hover,
.buttons-excel:hover,
.buttons-pdf:hover,
.buttons-print:hover {
    background-color: #154680 !important;
    border-color: #154680 !important;
}

/* ---- Badge Colors ---- */
.badge.bg-primary,
.badge-primary {
    background-color: #1B55A0 !important;
}
.badge.bg-secondary,
.badge-secondary {
    background-color: #E8A317 !important;
}
.badge.bg-success,
.badge-success {
    background-color: #28a745 !important;
}
.badge.bg-warning,
.badge-warning {
    background-color: #E8A317 !important;
    color: #fff !important;
}

/* ---- Card Refinements ---- */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}
.card .card-header {
    background-color: #fff;
    border-bottom: 1px solid #e8eef5;
    padding: 16px 20px;
}
.card .card-header h4,
.card .card-header h5,
.card .card-header h6 {
    color: #1B55A0;
    font-weight: 600;
}

/* ---- Sidebar Overrides ---- */
.sidebar-wrapper {
    background: linear-gradient(180deg, #0c2d54 0%, #123d6e 50%, #1B55A0 100%);
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
}

/* Logo area */
.sidebar-wrapper .logo-wrapper {
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 16px 20px;
}
.sidebar-wrapper .logo-wrapper a {
    color: #fff;
}
.sidebar-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    gap: 12px;
}
.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(232,163,23,0.2);
    border: 1px solid rgba(232,163,23,0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-logo-icon svg {
    width: 20px;
    height: 20px;
    stroke: #E8A317;
}
.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.sidebar-brand-name {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}
.sidebar-brand-sub {
    color: rgba(255,255,255,0.45);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* Sidebar links */
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link {
    color: rgba(255,255,255,0.75);
    padding: 10px 16px;
    margin: 2px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    position: relative;
}
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link.active {
    color: #fff;
    background: rgba(232,163,23,0.15);
    border-left: 3px solid #E8A317;
    padding-left: 13px;
}

/* Sidebar icons */
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link i,
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link svg {
    color: rgba(255,255,255,0.5);
    width: 18px;
    height: 18px;
    transition: color 0.2s ease;
}
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link:hover i,
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link:hover svg {
    color: rgba(255,255,255,0.9);
}
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link.active i,
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link.active svg {
    color: #E8A317;
}

/* Sidebar link text */
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link span {
    font-size: 0.855rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Dropdown arrow (Cuba's according-menu) */
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link .according-menu {
    margin-left: auto;
    line-height: 1;
}
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link .according-menu i {
    font-size: 0.7rem !important;
    opacity: 0.5;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link:hover .according-menu i {
    opacity: 0.8;
}
.sidebar-wrapper .sidebar-main .sidebar-links > li .sidebar-link.active .according-menu i {
    transform: rotate(90deg);
    opacity: 0.8;
}

/* Submenu */
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu {
    background: rgba(0,0,0,0.12);
    border-radius: 0 0 8px 8px;
    margin: 0 12px 4px;
    padding: 6px 0;
    border-left: 2px solid rgba(232,163,23,0.2);
    margin-left: 28px;
}
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu li a {
    color: rgba(255,255,255,0.55);
    padding: 7px 16px 7px 16px;
    font-size: 0.82rem;
    display: block;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 400;
}
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu li a::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
    transition: background 0.2s ease;
}
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu li a:hover {
    color: #fff;
    padding-left: 20px;
}
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu li a:hover::before {
    background: #E8A317;
}
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu li a.active {
    color: #E8A317;
    font-weight: 500;
}
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-submenu li a.active::before {
    background: #E8A317;
    box-shadow: 0 0 6px rgba(232,163,23,0.4);
}

/* Back button */
.sidebar-wrapper .back-btn a,
.sidebar-wrapper .back-btn i {
    color: rgba(255,255,255,0.8);
}

/* Toggle */
.toggle-sidebar .sidebar-toggle {
    color: rgba(255,255,255,0.8) !important;
}

/* Section titles */
.sidebar-section {
    pointer-events: none;
}
.sidebar-section-title {
    color: rgba(255,255,255,0.35);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-weight: 600;
    padding: 20px 20px 8px 28px;
    margin: 0;
    display: block;
}

/* ---- Header/Navbar ---- */
.page-header {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.page-header .header-wrapper {
    padding: 12px 20px;
}

/* ---- Breadcrumb ---- */
.breadcrumb .breadcrumb-item a {
    color: #1B55A0;
}
.breadcrumb .breadcrumb-item.active {
    color: #6c757d;
}
.page-title h4 {
    color: #1B55A0;
    font-weight: 600;
}

/* ---- Pagination ---- */
.page-item.active .page-link {
    background-color: #1B55A0 !important;
    border-color: #1B55A0 !important;
}
.page-link {
    color: #1B55A0;
}
.page-link:hover {
    color: #154680;
}

/* ---- Loader ---- */
.loader-wrapper {
    background-color: #1B55A0;
}

/* ---- Links ---- */
a {
    color: #1B55A0;
}
a:hover {
    color: #154680;
}

/* ---- Footer ---- */
.footer {
    background: #fff;
    border-top: 1px solid #e8eef5;
}
.footer p {
    color: #6c757d;
}

/* ---- Action Button Styling ---- */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.btn-action.btn-view {
    color: #1B55A0;
    border-color: #1B55A0;
    background: transparent;
}
.btn-action.btn-view:hover {
    background: #1B55A0;
    color: #fff;
}
.btn-action.btn-edit {
    color: #E8A317;
    border-color: #E8A317;
    background: transparent;
}
.btn-action.btn-edit:hover {
    background: #E8A317;
    color: #fff;
}
.btn-action.btn-delete {
    color: #dc3545;
    border-color: #dc3545;
    background: transparent;
}
.btn-action.btn-delete:hover {
    background: #dc3545;
    color: #fff;
}

/* ---- Stat Cards (Dashboard) ---- */
.stat-card {
    border-radius: 10px;
    padding: 22px 20px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 4px 0 0;
}

/* ---- Welcome Banner (Dashboard) ---- */
.welcome-banner {
    background: linear-gradient(135deg, #1B55A0 0%, #0f3a6e 100%);
    border-radius: 12px;
    padding: 32px;
    color: #fff;
    margin-bottom: 24px;
}
.welcome-banner h3 {
    font-weight: 600;
    margin-bottom: 6px;
}
.welcome-banner p {
    opacity: 0.85;
    margin: 0;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #a0aec0;
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}
.empty-state p {
    font-size: 0.95rem;
    margin: 0;
}

/* ---- DataTable Search/Length ---- */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #d0dae7;
    border-radius: 6px;
    padding: 6px 12px;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #1B55A0;
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(27, 85, 160, 0.15);
}
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #d0dae7;
    border-radius: 6px;
    padding: 4px 8px;
}

/* ---- Status Badges ---- */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-badge.status-completed {
    background: #d4edda;
    color: #155724;
}
.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}
.status-badge.status-active {
    background: #cce5ff;
    color: #004085;
}

/* ---- Scrollbar (sidebar) ---- */
.sidebar-wrapper::-webkit-scrollbar {
    width: 4px;
}
.sidebar-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}
.sidebar-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25);
}

/* ========================================
   Professional Form Page Styles
   ======================================== */

/* Page Header */
.form-page-header {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border-left: 4px solid #1B55A0;
}
.form-header-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, rgba(27,85,160,0.1) 0%, rgba(27,85,160,0.05) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.form-header-icon svg,
.form-header-icon i {
    width: 22px;
    height: 22px;
    color: #1B55A0;
    stroke: #1B55A0;
}
.form-header-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 2px;
}
.form-header-sub {
    font-size: 0.82rem;
    color: #6c757d;
    margin: 0;
}
.form-page-header .btn-back {
    border: 1px solid #d0dae7;
    color: #6c757d;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.form-page-header .btn-back:hover {
    border-color: #1B55A0;
    color: #1B55A0;
    background: rgba(27,85,160,0.04);
}

/* Form Card */
.form-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    overflow: hidden;
}
.form-card .card-body {
    padding: 28px;
}

/* Section Dividers inside forms */
.form-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1B55A0;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    margin-top: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(27,85,160,0.1);
}

/* Form Labels */
.form-card .form-label,
.form-card .col-form-label {
    font-weight: 500;
    font-size: 0.84rem;
    color: #374151;
    margin-bottom: 5px;
}
.form-card .form-label .text-danger {
    font-size: 0.75rem;
}

/* Form Controls */
.form-card .form-control,
.form-card .form-select {
    border: 1px solid #d0dae7;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}
.form-card .form-control:focus,
.form-card .form-select:focus {
    border-color: #1B55A0;
    box-shadow: 0 0 0 0.2rem rgba(27,85,160,0.12);
}
.form-card .form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
}
.form-card textarea.form-control {
    resize: vertical;
    min-height: 42px;
}

/* Card Footer */
.form-card-footer {
    background: #f8fafd;
    border-top: 1px solid #e8eef5;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.form-card-footer .btn-primary {
    padding: 9px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
}
.form-card-footer .btn-light {
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid #d0dae7;
    color: #6c757d;
    background: #fff;
}
.form-card-footer .btn-light:hover {
    background: #f1f3f5;
    color: #374151;
}

/* Alerts in forms */
.form-alerts .alert {
    border-radius: 8px;
    border: none;
    font-size: 0.855rem;
    padding: 12px 18px;
    margin-bottom: 16px;
}
.form-alerts .alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}
.form-alerts .alert-danger {
    background: #fde8e8;
    color: #991b1b;
    border-left: 4px solid #dc3545;
}
.form-alerts .alert ul {
    margin: 0;
    padding-left: 18px;
}
.form-alerts .alert ul li {
    margin-bottom: 2px;
}

/* Form Tables (for formField, profitMargin etc.) */
.form-card .table {
    margin-bottom: 0;
}
.form-card .table thead th {
    background: #f8fafd;
    border-bottom: 2px solid #e8eef5;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
}
.form-card .table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
    border-color: #f0f4f8;
}
.form-card .table .form-control {
    font-size: 0.84rem;
    padding: 7px 10px;
}

/* Dropdown select override (remove inline ▼) */
.form-card .form-select {
    appearance: auto;
}

/* ========================================
   View/Show Page Styles
   ======================================== */
.info-item {
    margin-bottom: 18px;
}
.info-item .info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.info-item .info-value {
    font-size: 0.92rem;
    font-weight: 500;
    color: #1a1a2e;
    padding: 8px 12px;
    background: #f8fafd;
    border-radius: 6px;
    border: 1px solid #e8eef5;
    min-height: 38px;
    display: flex;
    align-items: center;
}

/* ========================================
   Delete Confirmation Modal
   ======================================== */
.delete-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fde8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.delete-modal-icon svg,
.delete-modal-icon i {
    width: 28px;
    height: 28px;
    color: #dc3545;
    stroke: #dc3545;
}
.delete-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}
.delete-modal-msg {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0;
}
#deleteConfirmModal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
#deleteConfirmModal .modal-body {
    padding: 32px 28px 16px;
    text-align: center;
}
#deleteConfirmModal .modal-footer {
    border-top: 1px solid #e8eef5;
    padding: 16px 28px;
    justify-content: center;
    gap: 10px;
}
#deleteConfirmModal .btn-cancel-delete {
    padding: 8px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid #d0dae7;
    color: #6c757d;
    background: #fff;
}
#deleteConfirmModal .btn-cancel-delete:hover {
    background: #f1f3f5;
    color: #374151;
}
#deleteConfirmModal .btn-confirm-delete {
    padding: 8px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
#deleteConfirmModal .btn-confirm-delete:hover {
    background: #c82333;
    border-color: #c82333;
}

/* ========================================
   Index Page Header with Add Button
   ======================================== */
.form-page-header .btn-add-new {
    background: #1B55A0;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}
.form-page-header .btn-add-new:hover {
    background: #154680;
    color: #fff;
    box-shadow: 0 4px 12px rgba(27, 85, 160, 0.35);
}
