/* ══════════════════════════════════════════════════════════════
   site.css — Amerilink Global Theme Overrides
   Grey-based dark mode · Stripe-inspired · Modern & Sleek
   Brand: #3870f9 (Blue) · #fe0403 (Red) · White
   ══════════════════════════════════════════════════════════════ */

/* ── Tabler Dark Theme Variable Overrides ── */
.theme-dark {
    --tblr-body-bg:        #0e0e10;
    --tblr-bg-surface:     #18181b;
    --tblr-bg-surface-secondary: #1e1e23;
    --tblr-bg-forms:       #18181b;
    --tblr-border-color:   #27272a;
    --tblr-body-color:     #e4e4e7;
    --tblr-muted:          #71717a;
    --tblr-secondary:      #a1a1aa;
    --tblr-primary:        #3870f9;
    --tblr-primary-rgb:    56, 112, 249;
    --tblr-blue:           #3870f9;
    --tblr-red:            #fe0403;
    --tblr-danger:         #fe0403;
    --tblr-dark:           #09090b;
    --tblr-light:          #fafafa;
    --tblr-card-bg:        #18181b;
    --tblr-card-border-color: #27272a;
    --tblr-btn-color:      #fafafa;
    color-scheme: dark;
}

/* ── Base Body ── */
body.theme-dark {
    background-color: #0e0e10;
    color: #e4e4e7;
}

/* ── Sidebar Navigation ── */
.navbar-vertical {
    background-color: #09090b !important;
    border-right: 1px solid #1e1e23;
}

.navbar-vertical .container-fluid {
    padding-inline: 0.75rem;
}

/* Expand sidebar width from Tabler default 15rem */
.navbar-vertical.navbar-expand-lg {
    width: 18rem;
}
.navbar-vertical.navbar-expand-lg ~ .navbar,
.navbar-vertical.navbar-expand-lg ~ .page-wrapper {
    margin-left: 18rem;
}

.navbar-vertical,
.navbar-vertical *,
.navbar-vertical .navbar-collapse,
.navbar-vertical .navbar-nav {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.navbar-vertical::-webkit-scrollbar,
.navbar-vertical *::-webkit-scrollbar,
.navbar-vertical .navbar-collapse::-webkit-scrollbar,
.navbar-vertical .navbar-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.navbar-vertical .navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 1rem 0.25rem 0.875rem;
    min-height: 5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-vertical .navbar-brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.navbar-vertical .navbar-brand-image {
    display: block;
    width: min(100%, 11.75rem);
    height: auto;
    max-height: 2.6rem;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.28));
}

.navbar-vertical .nav-link {
    color: #a1a1aa !important;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: 8px;
    margin: 1px 0.5rem;
    padding: 0.5rem 0.75rem !important;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.navbar-vertical .nav-link:hover {
    color: #fafafa !important;
    background-color: rgba(255, 255, 255, 0.04);
}

.navbar-vertical .nav-link.active,
.navbar-vertical .nav-link[aria-expanded="true"] {
    color: #ffffff !important;
    background-color: rgba(56, 112, 249, 0.08);
}

.navbar-vertical .nav-link-icon {
    color: #52525b;
    transition: color 0.15s ease;
}

.navbar-vertical .nav-link:hover .nav-link-icon,
.navbar-vertical .nav-link.active .nav-link-icon {
    color: #3870f9;
}

.navbar-vertical .nav-link-title {
    font-size: 0.875rem;
}

.navbar-vertical .dropdown-menu {
    background-color: #131316 !important;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 0.25rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.navbar-vertical .dropdown-item {
    color: #a1a1aa !important;
    font-size: 0.8125rem;
    font-weight: 450;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.navbar-vertical .dropdown-item:hover,
.navbar-vertical .dropdown-item:focus {
    color: #fafafa !important;
    background-color: rgba(255, 255, 255, 0.04);
}

.navbar-vertical .dropdown-item.active {
    color: #ffffff !important;
    background-color: rgba(56, 112, 249, 0.1);
}

.navbar-vertical .dropdown-divider,
.navbar-vertical hr.dropdown-divider {
    border-color: #1e1e23;
    opacity: 1;
    margin: 0.25rem 0.75rem;
}

/* ── Top Header Bar ── */
.page-wrapper > .navbar {
    background-color: #0e0e10 !important;
    border-bottom: 1px solid #1e1e23;
}

/* ── Page Layout ── */
.page-wrapper .container-xl {
    margin-left: 13vw;
    margin-right: 13vw;
    max-width: 74vw;
}

.container-fluid {
    padding: 0 1rem;
}

.page-header {
    border-bottom: 1px solid #1e1e23;
}

.page-pretitle {
    color: #52525b;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-title {
    color: #fafafa;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ── Cards ── */
.theme-dark .card {
    background-color: #18181b;
    border: 1px solid #27272a;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-dark .card:hover {
    border-color: #303036;
}

.theme-dark .card-header {
    background-color: transparent;
    border-bottom: 1px solid #27272a;
    padding: 1rem 1.25rem;
}

.theme-dark .card-title {
    color: #fafafa;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

.theme-dark .card-body {
    padding: 1.25rem;
}

.theme-dark .card-footer {
    background-color: transparent;
    border-top: 1px solid #27272a;
}

/* ── Tables ── */
.card-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #71717a;
    border-bottom: 1px solid #27272a;
    background-color: #131316;
    padding: 0.75rem 1rem;
}

.card-table tbody td {
    border-bottom: 1px solid #1e1e23;
    color: #d4d4d8;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.card-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* DataTables integration */
.theme-dark table.dataTable {
    border-collapse: collapse !important;
}

.theme-dark table.dataTable thead th {
    background-color: #131316 !important;
    border-bottom: 1px solid #27272a !important;
    color: #71717a !important;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-dark table.dataTable tbody td {
    border-bottom: 1px solid #1e1e23 !important;
    color: #d4d4d8;
}

.theme-dark table.dataTable tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.theme-dark .dataTables_wrapper .dataTables_length,
.theme-dark .dataTables_wrapper .dataTables_filter,
.theme-dark .dataTables_wrapper .dataTables_info,
.theme-dark .dataTables_wrapper .dataTables_paginate {
    color: #71717a !important;
}

.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #a1a1aa !important;
    border-radius: 6px !important;
}

.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(56, 112, 249, 0.1) !important;
    color: #3870f9 !important;
    border-color: transparent !important;
}

/* ── Buttons ── */
.theme-dark .btn-primary {
    background-color: #3870f9;
    border-color: #3870f9;
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.theme-dark .btn-primary:hover {
    background-color: #2d5fd6;
    border-color: #2d5fd6;
    box-shadow: 0 2px 8px rgba(56, 112, 249, 0.25);
}

.theme-dark .btn-outline-primary {
    color: #3870f9;
    border-color: #27272a;
    background-color: transparent;
    border-radius: 8px;
    font-weight: 500;
}

.theme-dark .btn-outline-primary:hover,
.theme-dark .btn-outline-primary.active {
    background-color: rgba(56, 112, 249, 0.08);
    border-color: #3870f9;
    color: #3870f9;
}

.theme-dark .btn-outline-secondary {
    color: #71717a;
    border-color: #27272a;
    border-radius: 8px;
}

.theme-dark .btn-outline-secondary:hover {
    color: #d4d4d8;
    background-color: rgba(255, 255, 255, 0.04);
    border-color: #3f3f46;
}

.theme-dark .btn-danger {
    background-color: #fe0403;
    border-color: #fe0403;
    color: #ffffff;
}

.theme-dark .btn-danger:hover {
    background-color: #dc0302;
    border-color: #dc0302;
    box-shadow: 0 2px 8px rgba(254, 4, 3, 0.25);
}

.theme-dark .btn-ghost-primary {
    color: #3870f9;
}

.theme-dark .btn-ghost-primary:hover {
    background-color: rgba(56, 112, 249, 0.08);
}

/* ── Forms ── */
.theme-dark .form-control,
.theme-dark .form-select {
    background-color: #131316;
    border-color: #27272a;
    color: #e4e4e7;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-dark .form-control:focus,
.theme-dark .form-select:focus {
    background-color: #131316;
    border-color: #3870f9;
    color: #fafafa;
    box-shadow: 0 0 0 3px rgba(56, 112, 249, 0.15);
}

.theme-dark .form-control::placeholder {
    color: #52525b;
}

.theme-dark .form-label {
    color: #a1a1aa;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.theme-dark .form-check-input {
    background-color: #131316;
    border-color: #3f3f46;
}

.theme-dark .form-check-input:checked {
    background-color: #3870f9;
    border-color: #3870f9;
}

/* ── Select2 Dark-Theme Overrides ── */
.select2-container--bootstrap-5 .select2-selection {
    background-color: #131316 !important;
    border-color: #27272a !important;
    color: #e4e4e7 !important;
    min-height: 36px;
    border-radius: 8px !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
    background-color: #18181b !important;
    border-color: #27272a !important;
    color: #e4e4e7 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

.select2-container--bootstrap-5 .select2-results__option {
    color: #a1a1aa !important;
    border-radius: 6px;
    margin: 2px 4px;
    padding: 0.4rem 0.75rem;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected],
.select2-container--bootstrap-5 .select2-results__option--highlighted[data-selected] {
    background-color: rgba(56, 112, 249, 0.1) !important;
    color: #3870f9 !important;
}

.select2-container--bootstrap-5 .select2-search__field {
    background-color: #131316 !important;
    border-color: #27272a !important;
    color: #e4e4e7 !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #e4e4e7 !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: #52525b !important;
}

/* ── Badges ── */
.theme-dark .badge {
    font-weight: 600;
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
    border-radius: 6px;
    padding: 0.25em 0.5em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.theme-dark .badge.bg-primary,
.theme-dark .badge.bg-blue {
    background-color: rgba(56, 112, 249, 0.12) !important;
    color: #6b9afc !important;
}

.theme-dark .badge.bg-danger,
.theme-dark .badge.bg-red {
    background-color: rgba(254, 4, 3, 0.12) !important;
    color: #fe5c5b !important;
}

.theme-dark .badge.bg-secondary-lt {
    background-color: #27272a !important;
    color: #71717a !important;
}

/* ── Subheader / Stat Cards ── */
.subheader {
    color: #52525b;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.theme-dark .h1,
.theme-dark h1 {
    color: #fafafa;
}

.theme-dark .h2,
.theme-dark h2 {
    color: #fafafa;
}

.text-secondary,
.theme-dark .text-secondary {
    color: #71717a !important;
}

.text-muted,
.theme-dark .text-muted {
    color: #52525b !important;
}

/* ── Dropdown Menus ── */
.theme-dark .dropdown-menu {
    background-color: #18181b;
    border: 1px solid #27272a;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 0.375rem;
}

.theme-dark .dropdown-item {
    color: #a1a1aa;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 450;
    padding: 0.4rem 0.75rem;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.theme-dark .dropdown-item:hover,
.theme-dark .dropdown-item:focus {
    color: #fafafa;
    background-color: rgba(255, 255, 255, 0.04);
}

.theme-dark .dropdown-item.active {
    color: #3870f9;
    background-color: rgba(56, 112, 249, 0.08);
}

.theme-dark .dropdown-divider {
    border-color: #27272a;
}

/* ── List Groups ── */
.theme-dark .list-group-item {
    background-color: #18181b;
    border-color: #1e1e23;
    color: #e4e4e7;
}

.theme-dark .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* ── Avatars ── */
.theme-dark .avatar {
    background-color: #27272a;
    color: #a1a1aa;
    font-weight: 600;
    border-radius: 8px;
}

/* ── Status Indicators ── */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.theme-dark .bg-red {
    background-color: #fe0403 !important;
}

.theme-dark .bg-blue {
    background-color: #3870f9 !important;
}

.theme-dark .bg-green {
    background-color: #22c55e !important;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid #1e1e23;
    color: #3f3f46;
    font-size: 0.8125rem;
}

.footer .link-secondary {
    color: #52525b !important;
    transition: color 0.15s ease;
}

.footer .link-secondary:hover {
    color: #a1a1aa !important;
}

/* ── Scrollbar Styling ── */
.theme-dark ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.theme-dark ::-webkit-scrollbar-track {
    background: transparent;
}

.theme-dark ::-webkit-scrollbar-thumb {
    background-color: #27272a;
    border-radius: 3px;
}

.theme-dark ::-webkit-scrollbar-thumb:hover {
    background-color: #3f3f46;
}

/* ── Disabled / Coming Soon Items ── */
.demo-disabled-item {
    opacity: 0.45;
    cursor: not-allowed;
}

.dropdown-item.demo-disabled-item,
.nav-link.demo-disabled-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
}

.demo-disabled-item .badge,
.workflow-live-item .badge {
    flex-shrink: 0;
}

.navbar-vertical .dropdown-item.demo-disabled-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.5rem;
    width: calc(100% - 1rem);
    box-sizing: border-box;
    min-width: 0;
}

.navbar-vertical .nav-link.demo-disabled-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.75rem;
    min-width: 0;
}

.navbar-vertical .nav-link.demo-disabled-item .nav-link-title {
    min-width: 0;
}

.navbar-vertical .dropdown-item.demo-disabled-item .badge,
.navbar-vertical .nav-link.demo-disabled-item .badge {
    margin-left: 0;
    align-self: center;
    font-size: 0.625rem;
    padding: 0.28rem 0.42rem;
}

.navbar-vertical .nav-soon-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    min-width: 2.5rem;
    height: 1.2rem;
    padding: 0 0.4rem !important;
    line-height: 1 !important;
    white-space: nowrap;
    position: static !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
}

.workflow-live-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

/* ── Sidebar Dropdown Sections ── */

/* Parent item with dropdown: unified highlight on hover/active */
.navbar-vertical .nav-item.dropdown > .nav-link.dropdown-toggle {
    position: relative;
    cursor: pointer;
}

/* Chevron styling — sits at the right edge as a clickable toggle zone */
.navbar-vertical .nav-item.dropdown > .nav-link.dropdown-toggle::after {
    content: "";
    display: inline-block;
    position: absolute;
    right: 0.875rem;
    top: 50%;
    width: 0.4em;
    height: 0.4em;
    border-bottom: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
    border-top: none;
    border-right: none;
    margin: 0;
    transform: translateY(-50%) rotate(-45deg);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.35;
}

.navbar-vertical .nav-item.dropdown > .nav-link.dropdown-toggle:hover::after {
    opacity: 0.6;
}

/* Rotate chevron when open */
.navbar-vertical .nav-item.dropdown.show > .nav-link.dropdown-toggle::after {
    transform: translateY(-50%) rotate(135deg);
    opacity: 0.7;
}

/* Ensure enough right padding for the chevron click zone */
.navbar-vertical .nav-item.dropdown > .nav-link.dropdown-toggle {
    padding-right: 2.5rem !important;
}

/* Submenu: inline list with smooth slide animation */
.navbar-vertical .nav-item.dropdown > .dropdown-menu {
    position: static !important;
    float: none;
    border: none;
    background-color: transparent !important;
    box-shadow: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
    display: block !important;
    max-height: 0;
    opacity: 0;
    overflow-x: visible;
    overflow-y: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                padding 0.3s ease;
}

.navbar-vertical .nav-item.dropdown.show > .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    padding: 0.125rem 0 0.375rem 0;
}

/* Submenu items: indented under the parent */
.navbar-vertical .nav-item.dropdown > .dropdown-menu > .dropdown-item,
.navbar-vertical .nav-item.dropdown > .dropdown-menu > span.dropdown-item {
    padding-left: 2.75rem !important;
    margin: 1px 0.5rem;
    font-size: 0.8125rem;
}

/* Active sub-item: blue accent */
.navbar-vertical .nav-item.dropdown > .dropdown-menu > .dropdown-item.active {
    color: #3870f9 !important;
    background-color: rgba(56, 112, 249, 0.06);
    font-weight: 500;
}

/* Left accent bar on the active section's parent */
.navbar-vertical .nav-item.dropdown.show > .nav-link.active {
    border-left: 2px solid #3870f9;
    padding-left: calc(0.75rem - 2px) !important;
}

/* ── Attachment Dropzone Widget ── */
.uf-attachment-zone {
    border: 2px dashed #27272a;
    border-radius: 10px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    min-height: 90px;
    color: #52525b;
    background-color: #131316;
}

.uf-attachment-zone:hover,
.uf-attachment-zone.dz-drag-hover {
    border-color: #3870f9 !important;
    background-color: rgba(56, 112, 249, 0.04);
    color: #3870f9;
}

.uf-attachment-zone .dz-message {
    margin: 0;
    pointer-events: none;
}

.uf-attachment-zone .dz-preview .dz-image {
    border-radius: 6px;
    width: 48px;
    height: 48px;
}

.uf-attachment-zone .dz-preview .dz-filename,
.uf-attachment-zone .dz-preview .dz-size {
    font-size: 0.75rem;
}

.uf-attachment-zone .dz-preview .dz-success-mark svg,
.uf-attachment-zone .dz-preview .dz-error-mark svg {
    width: 24px;
    height: 24px;
}

/* ── Progress Bars ── */
.theme-dark .progress {
    background-color: #27272a;
    border-radius: 6px;
    height: 6px;
}

.theme-dark .progress-bar {
    background-color: #3870f9;
    border-radius: 6px;
}

/* ── Alerts ── */
.theme-dark .alert {
    border-radius: 10px;
    border: 1px solid;
    font-size: 0.875rem;
}

.theme-dark .alert-primary {
    background-color: rgba(56, 112, 249, 0.06);
    border-color: rgba(56, 112, 249, 0.15);
    color: #6b9afc;
}

.theme-dark .alert-danger {
    background-color: rgba(254, 4, 3, 0.06);
    border-color: rgba(254, 4, 3, 0.15);
    color: #fe5c5b;
}

.theme-dark .alert-success {
    background-color: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.theme-dark .alert-warning {
    background-color: rgba(234, 179, 8, 0.06);
    border-color: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

/* ── Tabs / Nav Pills ── */
.theme-dark .nav-tabs {
    border-bottom: 1px solid #27272a;
}

.theme-dark .nav-tabs .nav-link {
    color: #71717a;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1rem;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-dark .nav-tabs .nav-link:hover {
    color: #d4d4d8;
    border-bottom-color: #3f3f46;
}

.theme-dark .nav-tabs .nav-link.active {
    color: #fafafa;
    background-color: transparent;
    border-bottom-color: #3870f9;
}

/* ── Modal ── */
.theme-dark .modal-content {
    background-color: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
}

.theme-dark .modal-header {
    border-bottom: 1px solid #27272a;
}

.theme-dark .modal-footer {
    border-top: 1px solid #27272a;
}

.theme-dark .modal-title {
    color: #fafafa;
    font-weight: 600;
}

.theme-dark .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ── Pagination ── */
.theme-dark .page-link {
    background-color: transparent;
    border-color: #27272a;
    color: #a1a1aa;
    border-radius: 6px;
    font-size: 0.8125rem;
}

.theme-dark .page-link:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: #3f3f46;
    color: #fafafa;
}

.theme-dark .page-item.active .page-link {
    background-color: #3870f9;
    border-color: #3870f9;
    color: #ffffff;
}

/* ── Tooltip ── */
.theme-dark .tooltip-inner {
    background-color: #27272a;
    color: #e4e4e7;
    border-radius: 6px;
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
}

/* ── Link Colors ── */
.theme-dark a {
    color: #3870f9;
    text-decoration: none;
    transition: color 0.15s ease;
}

.theme-dark a:hover {
    color: #6b9afc;
}

.theme-dark .text-body {
    color: #e4e4e7 !important;
}

.theme-dark .text-body:hover {
    color: #fafafa !important;
}

/* ── Red accent utility classes ── */
.text-amerilink-red {
    color: #fe0403 !important;
}

.bg-amerilink-red {
    background-color: #fe0403 !important;
}

.text-amerilink-blue {
    color: #3870f9 !important;
}

.bg-amerilink-blue {
    background-color: #3870f9 !important;
}

/* ── Smooth focus ring for accessibility ── */
.theme-dark *:focus-visible {
    outline: 2px solid #3870f9;
    outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════
   Global Transitions & Animations
   Smooth, modern micro-interactions across the entire UI
   ══════════════════════════════════════════════════════════════ */

/* ── Universal smooth transitions ── */
.theme-dark .btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-dark .btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

.theme-dark .form-control,
.theme-dark .form-select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.theme-dark .form-check-input {
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.15s ease;
}

/* ── Cards: lift on hover ── */
.theme-dark .card {
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-dark .card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ── Dropdown menus (non-sidebar): fade + slide ── */
.theme-dark .page-wrapper .dropdown-menu,
.theme-dark .navbar:not(.navbar-vertical) .dropdown-menu {
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top center;
}

.theme-dark .page-wrapper .dropdown-menu:not(.show),
.theme-dark .navbar:not(.navbar-vertical) .dropdown-menu:not(.show) {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    pointer-events: none;
}

.theme-dark .page-wrapper .dropdown-menu.show,
.theme-dark .navbar:not(.navbar-vertical) .dropdown-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.theme-dark .dropdown-item {
    transition: color 0.15s ease, background-color 0.15s ease, padding-left 0.15s ease;
}

/* ── List group items ── */
.theme-dark .list-group-item {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* ── Badges: subtle pop ── */
.theme-dark .badge {
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

/* ── Alerts ── */
.theme-dark .alert {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Tabs ── */
.theme-dark .nav-tabs .nav-link {
    transition: color 0.2s ease, border-color 0.25s ease, background-color 0.2s ease;
}

/* ── Table rows ── */
.theme-dark table tbody tr {
    transition: background-color 0.15s ease;
}

/* ── Modal: smooth entrance ── */
.theme-dark .modal.fade .modal-dialog {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform: translateY(12px) scale(0.98);
}

.theme-dark .modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

/* ── Progress bars: smooth fill ── */
.theme-dark .progress-bar {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Avatars ── */
.theme-dark .avatar {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.theme-dark .avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── Pagination ── */
.theme-dark .page-link {
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* ── Status dots: pulse animation for animated ones ── */
.status-dot-animated {
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

/* ── Page content: subtle fade-in on load ── */
.page-body {
    animation: pageContentFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageContentFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Tooltip ── */
.theme-dark .tooltip {
    transition: opacity 0.15s ease;
}

/* ── Sidebar nav link: smooth icon color + background ── */
.navbar-vertical .nav-link {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease !important;
}

.navbar-vertical .nav-link-icon {
    transition: color 0.2s ease, transform 0.2s ease;
}

.navbar-vertical .nav-link:hover .nav-link-icon {
    transform: scale(1.08);
}

/* ── Scrollbar: smooth opacity ── */
.theme-dark ::-webkit-scrollbar-thumb {
    transition: background-color 0.2s ease;
}

/* ── Select2: smooth dropdown ── */
.select2-container--bootstrap-5 .select2-dropdown {
    transition: opacity 0.15s ease;
}

.select2-container--bootstrap-5 .select2-results__option {
    transition: color 0.15s ease, background-color 0.15s ease;
}

/* ── Dropzone: smooth border/bg on drag ── */
.uf-attachment-zone {
    transition: border-color 0.25s ease, background-color 0.25s ease, color 0.2s ease, box-shadow 0.25s ease;
}

.uf-attachment-zone:hover,
.uf-attachment-zone.dz-drag-hover {
    box-shadow: 0 0 0 4px rgba(56, 112, 249, 0.08);
}

/* ── Dashboard Carrier Filter ── */
.dashboard-carrier-filter {
    background-color: #18181b !important;
    border-color: #27272a !important;
    color: #e4e4e7 !important;
    border-radius: 8px !important;
    font-size: 0.8125rem !important;
    font-weight: 500;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dashboard-carrier-filter:hover {
    border-color: #3f3f46 !important;
}
.dashboard-carrier-filter:focus {
    border-color: #3870f9 !important;
    box-shadow: 0 0 0 2px rgba(56, 112, 249, 0.15) !important;
}
.btn-ghost-secondary {
    color: #a1a1aa;
    background: transparent;
    border: 1px solid #27272a;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.btn-ghost-secondary:hover {
    color: #e4e4e7;
    background: rgba(255, 255, 255, 0.04);
    border-color: #3f3f46;
}

/* ── Dashboard Filter Bar ── */
.dashboard-filter-bar {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 10px;
}
.dashboard-filter-divider {
    width: 1px;
    height: 1.5rem;
    background: #27272a;
    flex-shrink: 0;
}
.dashboard-date-input {
    background-color: #18181b !important;
    border-color: #27272a !important;
    color: #e4e4e7 !important;
    border-radius: 8px !important;
    font-size: 0.8125rem !important;
    font-weight: 500;
    width: 130px !important;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: center;
}
.dashboard-date-input:hover {
    border-color: #3f3f46 !important;
}
.dashboard-date-input:focus {
    border-color: #3870f9 !important;
    box-shadow: 0 0 0 2px rgba(56, 112, 249, 0.15) !important;
}
.dashboard-date-separator {
    color: #52525b;
    font-size: 0.8125rem;
    user-select: none;
}
.dashboard-preset-btn {
    padding: 0.25rem 0.625rem !important;
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.dashboard-preset-btn:hover {
    color: #fafafa !important;
    border-color: #3870f9 !important;
    background: rgba(56, 112, 249, 0.08) !important;
}
.dashboard-today-btn {
    color: #3870f9 !important;
    border-color: rgba(56, 112, 249, 0.3) !important;
}

/* ── Litepicker Dark Theme ── */
.litepicker {
    --litepicker-container-months-color-bg: #18181b;
    --litepicker-month-header-color: #fafafa;
    --litepicker-button-prev-month-color: #a1a1aa;
    --litepicker-button-next-month-color: #a1a1aa;
    --litepicker-button-prev-month-color-hover: #fafafa;
    --litepicker-button-next-month-color-hover: #fafafa;
    --litepicker-month-weekday-color: #52525b;
    --litepicker-month-week-number-color: #3f3f46;
    --litepicker-day-color: #e4e4e7;
    --litepicker-day-color-hover: #fafafa;
    --litepicker-is-today-color: #3870f9;
    --litepicker-is-start-color: #fafafa;
    --litepicker-is-start-color-bg: #3870f9;
    --litepicker-is-end-color: #fafafa;
    --litepicker-is-end-color-bg: #3870f9;
    --litepicker-is-in-range-color: #e4e4e7;
    --litepicker-is-locked-color: #3f3f46;
    --litepicker-highlight-color-bg: rgba(56, 112, 249, 0.08);
    --litepicker-highlight-color: #3870f9;
    font-family: 'Inter Var', Inter, -apple-system, sans-serif;
}
.litepicker .container__months {
    background-color: #18181b !important;
    border: 1px solid #27272a;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.litepicker .container__months .month-item-header {
    padding-top: 0.75rem;
}
.litepicker .container__months .month-item-header div > .month-item-name,
.litepicker .container__months .month-item-header div > .month-item-year {
    color: #fafafa;
    font-weight: 600;
    font-size: 0.875rem;
}
.litepicker .container__days > div,
.litepicker .container__days .day-item {
    color: #e4e4e7;
    border-radius: 6px;
    transition: background-color 0.1s ease, color 0.1s ease;
}
.litepicker .container__days .day-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #fafafa;
    box-shadow: none;
}
.litepicker .container__days .day-item.is-today {
    color: #3870f9;
    font-weight: 700;
}
.litepicker .container__days .day-item.is-start-date,
.litepicker .container__days .day-item.is-end-date {
    background-color: #3870f9;
    color: #fafafa;
}
.litepicker .container__days .day-item.is-locked {
    color: #3f3f46;
}
.litepicker .container__months .button-previous-month,
.litepicker .container__months .button-next-month {
    cursor: pointer;
}
.litepicker .container__months .button-previous-month > svg,
.litepicker .container__months .button-next-month > svg {
    fill: #a1a1aa;
}
.litepicker .container__months .button-previous-month:hover > svg,
.litepicker .container__months .button-next-month:hover > svg {
    fill: #fafafa;
}
.litepicker .month-item-weekdays-row > div {
    color: #52525b !important;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ── Reduce motion for users who prefer it ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
