/* Utility Classes based on Blueprint */

.rounded-xl { border-radius: 15px !important; }
.rounded-2xl { border-radius: 20px !important; }
.rounded-lg { border-radius: 10px !important; }
.card-hover-translate { transition: transform 0.2s ease; }
.card-hover-translate:hover { transform: translateY(-5px); }

:root {
    --primary-bg: #4f46e5; /* example primary */
}

.bg-primary-bg { background: var(--primary-bg) !important; }
.bg-info-dim { background: rgba(13, 110, 253, 0.1) !important; }
.bg-warning-dim { background: rgba(255, 193, 7, 0.1) !important; }
.bg-success-dim { background: rgba(25, 135, 84, 0.1) !important; }
.bg-danger-dim { background: rgba(220, 53, 69, 0.1) !important; }

.card-tale { background: linear-gradient(135deg, #1e3a8a, #4c1d95) !important; color: white; }
.card-dark-blue { background: linear-gradient(135deg, #1e3a8a, #3b82f6) !important; color: white; }
.card-light-danger { background: linear-gradient(135deg, #fca5a5, #ef4444) !important; color: white; }

.icon-md { font-size: 1.5rem !important; }
.hover-bg-light { transition: background 0.2s ease; }
.hover-bg-light:hover { background: #f8fafc !important; }
.transition-200 { transition: all 0.2s ease !important; }
.shadow-primary { box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3), 0 2px 4px -1px rgba(79, 70, 229, 0.1) !important; }
.extra-small { font-size: 0.75rem !important; }
.fs-30 { font-size: 28px !important; font-weight: bold !important; }

/* Badge Premium */
.badge-premium {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    display: inline-block;
}
.badge-premium-green { background: #d1fae5; color: #065f46; border: 1px solid #10b981; }
.badge-premium-red { background: #fee2e2; color: #991b1b; border: 1px solid #ef4444; }
.badge-premium-blue { background: #dbeafe; color: #1e40af; border: 1px solid #3b82f6; }
.badge-premium-gray { background: #f3f4f6; color: #374151; border: 1px solid #9ca3af; }

/* Table Action Group */
.btn-action-group {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.btn-action-edit { color: #3b82f6; }
.btn-action-edit:hover { background: #dbeafe; }
.btn-action-delete { color: #ef4444; }
.btn-action-delete:hover { background: #fee2e2; }

/* =========================================
   DataTables & Table Refinements
   ========================================= */

.dataTables_wrapper {
    padding: 1rem 0;
}

.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1.5rem;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dfe5ef;
    border-radius: 7px;
    padding: 6px 12px;
    margin-left: 10px;
    outline: none;
    transition: all 0.2s;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #5d87ff;
    box-shadow: 0 0 0 3px rgba(93, 135, 255, 0.1);
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 1.5rem;
}

.dataTables_wrapper .dataTables_paginate .pagination {
    gap: 5px;
    justify-content: flex-end;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item {
    margin: 0 !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-link {
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe5ef !important;
    background: #fff !important;
    border-radius: 8px !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease;
    outline: none !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item.active .page-link {
    background: #5d87ff !important;
    border-color: #5d87ff !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-link:hover:not(.active) {
    background: #f6f9fc !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item.disabled .page-link {
    background: #f8fafc !important;
    border-color: #f1f5f9 !important;
    color: #cbd5e1 !important;
    opacity: 0.6;
}

/* Ensure no double borders from DataTables default classes */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 1.5rem !important;
    color: #64748b !important;
    font-size: 0.85rem !important;
}

table.dataTable thead th {
    background-color: #f6f9fc !important;
    border-bottom: 1px solid #dfe5ef !important;
    font-weight: 600 !important;
    color: #2a3547 !important;
    padding: 15px !important;
}

table.dataTable tbody td {
    padding: 15px !important;
    border-bottom: 1px solid #dfe5ef !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(93, 135, 255, 0.02) !important;
}

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

.modal-header {
    border-bottom: 1px solid #f1f1f1;
    padding: 20px 25px;
}

.modal-footer {
    border-top: 1px solid #f1f1f1;
    padding: 15px 25px;
}

/* Gradient Add Button */
.btn-premium-add {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    color: white;
    font-weight: 600;
    border-radius: 12px;
}

.btn-premium-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.5);
    color: white;
}

/* =========================================
   Premium Tab Navigation (Spike Style)
   ========================================= */
.nav-pills.nav-fill {
    background: #f8fafc !important;
    border-radius: 14px !important;
    padding: 6px !important;
    border: 1px solid #f1f5f9;
}

.nav-pills.nav-fill .nav-link {
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 10px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none !important;
}

.nav-pills.nav-fill .nav-link.active {
    background: #fff !important;
    color: #4f46e5 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
}

.nav-pills.nav-fill .nav-link:hover:not(.active) {
    background: #f1f5f9;
    color: #475569;
}

/* =========================================
   Premium Modal & Form Styles
   ========================================= */
.modal-content {
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.modal-header {
    padding: 1.5rem 1.5rem 0.5rem !important;
    border-bottom: none !important;
}

.modal-footer {
    padding: 0.5rem 1.5rem 1.5rem !important;
    border-top: none !important;
}

.modal-title {
    font-size: 1.25rem;
    color: #1e293b;
    font-weight: 700;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem !important;
    transition: all 0.2s !important;
    background-color: #f8fafc !important;
}

.form-control:focus, .form-select:focus {
    border-color: #4f46e5 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1) !important;
    outline: none !important;
}

.card {
    border: none !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04) !important;
    border-radius: 1.25rem !important;
}

/* =========================================
   Setup Wizard Styles
   ========================================= */
body.setup-wizard-page { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; }

.wizard-card {
    max-width: 760px;
    margin: 0 auto;
    border-radius: 24px;
    border: 0;
    box-shadow: 0 32px 80px rgba(0,0,0,0.25);
    overflow: hidden;
}

/* Step Indicators */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0;
    margin-bottom: 2rem;
}
.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 100px;
}
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}
.step-item.done:not(:last-child)::after { background: #4f46e5; }
.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}
.step-item.active .step-circle { background: #4f46e5; color: #fff; box-shadow: 0 0 0 4px rgba(79,70,229,0.2); }
.step-item.done .step-circle { background: #10b981; color: #fff; }
.step-label { font-size: 0.65rem; margin-top: 4px; color: #94a3b8; font-weight: 600; text-align: center; }
.step-item.active .step-label { color: #4f46e5; }
.step-item.done .step-label { color: #10b981; }

/* Dynamic list inputs */
.input-tag-group { display: flex; flex-direction: column; gap: 8px; }
.input-row { display: flex; align-items: center; gap: 8px; }
.input-row input { flex: 1; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; font-size: 0.9rem; transition: border-color 0.2s; }
.input-row input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.btn-remove { background: #fee2e2; border: 0; border-radius: 8px; padding: 8px; color: #dc2626; cursor: pointer; flex-shrink: 0; }
.btn-remove:hover { background: #fca5a5; }
.btn-add { background: #ede9fe; border: 1.5px dashed #a78bfa; border-radius: 10px; padding: 10px 16px; color: #7c3aed; font-weight: 600; font-size: 0.85rem; cursor: pointer; text-align: center; transition: all 0.2s; display: flex; align-items: center; gap: 6px; justify-content: center; }
.btn-add:hover { background: #ddd6fe; }

.step-panel { display: none; }
.step-panel.active { display: block; }

.step-header { border-bottom: 1px solid #f1f5f9; padding-bottom: 1rem; margin-bottom: 1.5rem; }
.step-header .step-icon { width: 52px; height: 52px; border-radius: 16px; background: #ede9fe; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.step-header h5 { font-weight: 800; color: #1e293b; margin-bottom: 4px; }
.step-header p { color: #64748b; font-size: 0.875rem; margin: 0; }

.btn-wizard-next { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border: 0; border-radius: 12px; padding: 12px 32px; font-weight: 700; transition: all 0.2s; }
.btn-wizard-next:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(79,70,229,0.4); color: #fff; }
.btn-wizard-prev { background: #f1f5f9; color: #64748b; border: 0; border-radius: 12px; padding: 12px 24px; font-weight: 600; }
.btn-wizard-prev:hover { background: #e2e8f0; }

/* =========================================
   Datepicker Premium Styles
   ========================================= */
.datepicker {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    padding: 12px !important;
    font-family: 'Inter', sans-serif;
}
.datepicker table tr td.active, 
.datepicker table tr td.active:hover, 
.datepicker table tr td.active.disabled, 
.datepicker table tr td.active.disabled:hover {
    background-image: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    background-color: #4f46e5 !important;
    color: #fff !important;
    text-shadow: none !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 10px rgba(79,70,229,0.3) !important;
}
.datepicker table tr td.today,
.datepicker table tr td.today:hover {
    background-color: #f1f5f9 !important;
    background-image: none !important;
    color: #4f46e5 !important;
    font-weight: 700;
    border-radius: 8px !important;
}
.datepicker table tr td {
    border-radius: 8px !important;
    transition: all 0.2s;
}
.datepicker table tr td:hover {
    background: #ede9fe !important;
    color: #4f46e5 !important;
}
.datepicker .datepicker-switch:hover, 
.datepicker .prev:hover, 
.datepicker .next:hover, 
.datepicker tfoot tr th:hover {
    background: #f1f5f9 !important;
    border-radius: 8px !important;
}
