@charset "UTF-8";

/* ==========================================================================
   Typography: LINE Seed Sans TH (Local Self-Hosted)
   ========================================================================== */
@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../fonts/LINESeedSansTH/LINESeedSansTH_Th.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: fallback;
}

@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../fonts/LINESeedSansTH/LINESeedSansTH_Rg.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: fallback;
}

@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../fonts/LINESeedSansTH/LINESeedSansTH_Bd.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: fallback;
}

@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../fonts/LINESeedSansTH/LINESeedSansTH_XBd.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: fallback;
}

@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../fonts/LINESeedSansTH/LINESeedSansTH_He.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: fallback;
}

:root {
    --cui-font-sans-serif: 'LINE Seed Sans TH', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --cui-body-font-family: var(--cui-font-sans-serif);

    /* Primary Theme Palette: #206bc4 */
    --cui-primary: #206bc4;
    --cui-primary-rgb: 32, 107, 196;
    --cui-primary-text-emphasis: #18549a;
    --cui-primary-bg-subtle: #d2e1f3;
    --cui-primary-border-subtle: #90b5e2;
    --cui-primary-contrast: #ffffff;
    --cui-link-color: #206bc4;
    --cui-link-color-rgb: 32, 107, 196;
    --cui-link-hover-color: #18549a;
    --cui-link-hover-color-rgb: 24, 84, 154;
    --cui-focus-ring-color: rgba(32, 107, 196, 0.25);

    /* Bootstrap 5 compatibility fallbacks */
    --bs-primary: #206bc4;
    --bs-primary-rgb: 32, 107, 196;
    --bs-primary-text-emphasis: #18549a;
    --bs-primary-bg-subtle: #d2e1f3;
    --bs-primary-border-subtle: #90b5e2;
    --bs-link-color: #206bc4;
    --bs-link-color-rgb: 32, 107, 196;
    --bs-link-hover-color: #18549a;
    --bs-link-hover-color-rgb: 24, 84, 154;
    --bs-focus-ring-color: rgba(32, 107, 196, 0.25);
}

:root {
    --cui-card-bg: #ffffff;
    --bs-card-bg: #ffffff;
}

[data-coreui-theme="light"],
[data-bs-theme="light"] {
    --cui-card-bg: #ffffff;
    --bs-card-bg: #ffffff;
    --cui-primary: #206bc4;
    --cui-primary-rgb: 32, 107, 196;
    --cui-primary-text-emphasis: #18549a;
    --cui-primary-bg-subtle: #d2e1f3;
    --cui-primary-border-subtle: #90b5e2;
    --cui-primary-contrast: #ffffff;
    --cui-link-color: #206bc4;
    --cui-link-color-rgb: 32, 107, 196;
    --cui-link-hover-color: #18549a;
    --cui-link-hover-color-rgb: 24, 84, 154;
    --cui-focus-ring-color: rgba(32, 107, 196, 0.25);

    --bs-primary: #206bc4;
    --bs-primary-rgb: 32, 107, 196;
    --bs-primary-text-emphasis: #18549a;
    --bs-primary-bg-subtle: #d2e1f3;
    --bs-primary-border-subtle: #90b5e2;
    --bs-link-color: #206bc4;
    --bs-link-color-rgb: 32, 107, 196;
    --bs-link-hover-color: #18549a;
    --bs-link-hover-color-rgb: 24, 84, 154;
    --bs-focus-ring-color: rgba(32, 107, 196, 0.25);
}

[data-coreui-theme="dark"],
[data-bs-theme="dark"] {
    --cui-card-bg: #2c313b;
    --bs-card-bg: #2c313b;
    --cui-primary: #206bc4;
    --cui-primary-rgb: 32, 107, 196;
    --cui-primary-text-emphasis: #6ea8fe;
    --cui-primary-bg-subtle: #0d2744;
    --cui-primary-border-subtle: #18549a;
    --cui-primary-contrast: #ffffff;
    --cui-link-color: #6ea8fe;
    --cui-link-color-rgb: 110, 168, 254;
    --cui-link-hover-color: #8bb9fe;
    --cui-link-hover-color-rgb: 139, 185, 254;
    --cui-focus-ring-color: rgba(110, 168, 254, 0.25);

    --bs-primary: #206bc4;
    --bs-primary-rgb: 32, 107, 196;
    --bs-primary-text-emphasis: #6ea8fe;
    --bs-primary-bg-subtle: #0d2744;
    --bs-primary-border-subtle: #18549a;
    --bs-link-color: #6ea8fe;
    --bs-link-color-rgb: 110, 168, 254;
    --bs-link-hover-color: #8bb9fe;
    --bs-link-hover-color-rgb: 139, 185, 254;
    --bs-focus-ring-color: rgba(110, 168, 254, 0.25);
}

/* Primary Button Styling */
.btn-primary {
    --cui-btn-color: #ffffff;
    --cui-btn-bg: #206bc4;
    --cui-btn-border-color: #206bc4;
    --cui-btn-hover-color: #ffffff;
    --cui-btn-hover-bg: #1b5bb0;
    --cui-btn-hover-border-color: #19549f;
    --cui-btn-focus-shadow-rgb: 64, 129, 205;
    --cui-btn-active-color: #ffffff;
    --cui-btn-active-bg: #19549f;
    --cui-btn-active-border-color: #174e94;
    --cui-btn-disabled-color: #ffffff;
    --cui-btn-disabled-bg: #206bc4;
    --cui-btn-disabled-border-color: #206bc4;

    --bs-btn-color: #ffffff;
    --bs-btn-bg: #206bc4;
    --bs-btn-border-color: #206bc4;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #1b5bb0;
    --bs-btn-hover-border-color: #19549f;
    --bs-btn-focus-shadow-rgb: 64, 129, 205;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #19549f;
    --bs-btn-active-border-color: #174e94;
    --bs-btn-disabled-color: #ffffff;
    --bs-btn-disabled-bg: #206bc4;
    --bs-btn-disabled-border-color: #206bc4;
}

/* Primary Outline Button Styling */
.btn-outline-primary {
    --cui-btn-color: #206bc4;
    --cui-btn-border-color: #206bc4;
    --cui-btn-hover-color: #ffffff;
    --cui-btn-hover-bg: #206bc4;
    --cui-btn-hover-border-color: #206bc4;
    --cui-btn-focus-shadow-rgb: 32, 107, 196;
    --cui-btn-active-color: #ffffff;
    --cui-btn-active-bg: #206bc4;
    --cui-btn-active-border-color: #206bc4;
    --cui-btn-disabled-color: #206bc4;
    --cui-btn-disabled-border-color: #206bc4;

    --bs-btn-color: #206bc4;
    --bs-btn-border-color: #206bc4;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #206bc4;
    --bs-btn-hover-border-color: #206bc4;
    --bs-btn-focus-shadow-rgb: 32, 107, 196;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #206bc4;
    --bs-btn-active-border-color: #206bc4;
    --bs-btn-disabled-color: #206bc4;
    --bs-btn-disabled-border-color: #206bc4;
}

/* Dark mode button overrides */
[data-coreui-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-primary {
    --cui-btn-bg: #206bc4;
    --cui-btn-border-color: #206bc4;
    --cui-btn-hover-bg: #1b5bb0;
    --cui-btn-hover-border-color: #19549f;
    --cui-btn-active-bg: #19549f;
    --cui-btn-active-border-color: #174e94;
}

[data-coreui-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-primary {
    --cui-btn-color: #6ea8fe;
    --cui-btn-border-color: #206bc4;
    --cui-btn-hover-bg: #206bc4;
    --cui-btn-hover-border-color: #206bc4;
    --cui-btn-active-bg: #206bc4;
    --cui-btn-active-border-color: #206bc4;
}

/* Form Controls Focus & Active */
.form-control:focus,
.form-select:focus {
    border-color: #90b5e2 !important;
    box-shadow: 0 0 0 0.25rem rgba(32, 107, 196, 0.25) !important;
}

.form-check-input:checked {
    background-color: #206bc4 !important;
    border-color: #206bc4 !important;
}

.form-check-input:focus {
    border-color: #90b5e2 !important;
    box-shadow: 0 0 0 0.25rem rgba(32, 107, 196, 0.25) !important;
}

/* Nav Pills, Tabs, & Active Indicators */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #206bc4 !important;
    color: #ffffff !important;
}

/* Pagination */
.page-item.active .page-link {
    background-color: #206bc4 !important;
    border-color: #206bc4 !important;
    color: #ffffff !important;
}

.page-link {
    color: #206bc4;
}

.page-link:hover {
    color: #18549a;
}

/* Progress bar */
.progress-bar {
    background-color: #206bc4;
}

/* Badge subtle primary */
.badge-subtle-primary {
    background-color: rgba(32, 107, 196, 0.15) !important;
    color: #206bc4 !important;
}

[data-coreui-theme="dark"] .badge-subtle-primary {
    color: #6ea8fe !important;
}

html, body, button, input, select, textarea {
    font-family: var(--cui-body-font-family) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ==========================================================================
   CoreUI Modern Dark Gradient Background & Sidebar Specification
   Reference: https://coreui.io/demos/bootstrap/latest/modern/?theme=light
   ========================================================================== */
:root {
    --cui-dark: #212631;
    --cui-dark-start: #3c4b64;
    --cui-dark-stop: #212333;
}

.bg-dark-gradient {
    background-color: var(--cui-dark);
    background-image: linear-gradient(45deg, var(--cui-dark-start) 0%, var(--cui-dark-stop) 100%);
}

.sidebar.bg-dark-gradient,
.sidebar-dark.bg-dark-gradient {
    background-color: var(--cui-dark);
    background-image: linear-gradient(45deg, var(--cui-dark-start) 0%, var(--cui-dark-stop) 100%);
    --cui-sidebar-bg: transparent;
}

/* ==========================================================================
   Sidebar & Header Perfect Alignment (64px / 4rem)
   ========================================================================== */
.sidebar-header {
    height: calc(4rem + 1px);
    min-height: calc(4rem + 1px);
    max-height: calc(4rem + 1px);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    height: 100%;
}

.sidebar-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--cui-sidebar-brand-color, #ffffff);
    text-decoration: none;
    line-height: 1;
}

.sidebar-brand img,
.sidebar-brand svg,
.sidebar-brand .theme-logo {
    max-height: 32px !important;
    height: 32px;
    width: auto;
    object-fit: contain;
}

.sidebar-brand .theme-icon {
    max-height: 32px !important;
    max-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    object-fit: contain;
}

/* Sidebar Brand Full vs Narrow (Collapsed) States */
.sidebar-brand-full {
    display: flex;
    align-items: center;
}

.sidebar-brand-narrow {
    display: none;
    align-items: center;
    justify-content: center;
}

.sidebar-narrow .sidebar-brand-full,
.sidebar-narrow-unfoldable:not(:hover) .sidebar-brand-full {
    display: none !important;
}

.sidebar-narrow .sidebar-brand-narrow,
.sidebar-narrow-unfoldable:not(:hover) .sidebar-brand-narrow {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.sidebar-narrow .sidebar-brand,
.sidebar-narrow-unfoldable:not(:hover) .sidebar-brand {
    margin-right: 0 !important;
    margin-left: 0 !important;
    justify-content: center !important;
    width: 100% !important;
}

.sidebar-narrow .sidebar-header,
.sidebar-narrow-unfoldable:not(:hover) .sidebar-header {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.sidebar-narrow .sidebar-header .btn-close,
.sidebar-narrow-unfoldable:not(:hover) .sidebar-header .btn-close {
    display: none !important;
}

/* ==========================================================================
   Sidebar Nav Custom Scrollbar (Pure CSS, Sleek Overlay Style)
   ========================================================================== */
.sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.45) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.45);
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Header Top Navbar: Lock height to 65px so border-bottom perfectly aligns with sidebar border-bottom */
.header > .container-fluid:first-child {
    height: calc(4rem + 1px);
    min-height: calc(4rem + 1px);
    max-height: calc(4rem + 1px);
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Header toggler & navigation */
.header-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-inline-start: -14px;
}

.header-nav-btn,
.header-nav .header-nav-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--cui-border-radius);
    color: var(--cui-header-color);
    line-height: 1;
    text-decoration: none;
    border: 0;
    background: transparent;
}

.header-nav .header-nav-btn.header-nav-text-btn {
    width: auto;
    min-width: 36px;
    padding: 0 0.5rem;
}

.header-nav-btn:hover,
.header-nav-btn:focus,
.header-nav .header-nav-btn:hover,
.header-nav .header-nav-btn:focus {
    color: var(--cui-header-hover-color);
    background-color: var(--cui-tertiary-bg);
}

.header-nav-btn i,
.header-nav .nav-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
    font-size: 1.25rem;
}

.header-nav-btn .header-badge.badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(25%, -25%);
    padding: 0.15rem 0.35rem;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 1.15rem;
    height: 1.15rem;
    line-height: 1;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--cui-header-bg, #ffffff);
    box-sizing: border-box;
    pointer-events: none;
    z-index: 2;
}

[data-coreui-theme="dark"] .header-nav-btn .header-badge.badge {
    border-color: var(--cui-header-bg, #212631);
}

.header-nav .vr {
    height: 18px;
    align-self: center;
    margin: 0;
    opacity: 0.25;
}

/* CoreUI Search Button Component (Official Spec Implementation) */
.search-button {
    --cui-search-button-height: 2.375rem;
    --cui-search-button-padding-x: 0.75rem;
    --cui-search-button-font-size: 0.875rem;
    --cui-search-button-font-weight: 400;
    --cui-search-button-color: var(--cui-secondary-color);
    --cui-search-button-bg: var(--cui-body-bg);
    --cui-search-button-border-width: 1px;
    --cui-search-button-border-color: var(--cui-border-color);
    --cui-search-button-border-radius: var(--cui-border-radius);
    --cui-search-button-box-shadow: none;
    --cui-search-button-transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    --cui-search-button-focus-color: var(--cui-body-color);
    --cui-search-button-focus-bg: var(--cui-body-bg);
    --cui-search-button-focus-border-color: var(--cui-primary);
    --cui-search-button-focus-box-shadow: 0 0 0 0.2rem rgba(var(--cui-primary-rgb), 0.15);
    --cui-search-button-icon-size: 1.125rem;
    --cui-search-button-keys-gap: 0.25rem;
    --cui-search-button-key-width: auto;
    --cui-search-button-key-height: 1.5rem;
    --cui-search-button-key-padding-inline: 0.35rem;
    --cui-search-button-key-font-size: 0.75rem;
    --cui-search-button-key-bg: var(--cui-tertiary-bg);
    --cui-search-button-key-border-radius: var(--cui-border-radius-sm);
    --cui-search-button-key-active-bg: var(--cui-secondary-bg);
    --cui-search-button-placeholder-margin-inline: 0.55rem 2rem;

    display: inline-flex;
    align-items: center;
    height: var(--cui-search-button-height);
    padding: 0 var(--cui-search-button-padding-x);
    font-size: var(--cui-search-button-font-size);
    font-weight: var(--cui-search-button-font-weight);
    color: var(--cui-search-button-color);
    background-color: var(--cui-search-button-bg);
    border: var(--cui-search-button-border-width) solid var(--cui-search-button-border-color);
    border-radius: var(--cui-search-button-border-radius);
    cursor: pointer;
    user-select: none;
    transition: var(--cui-search-button-transition);
    text-decoration: none;
}

.search-button:hover {
    color: var(--cui-search-button-focus-color);
    background-color: var(--cui-search-button-focus-bg);
    border-color: var(--cui-search-button-focus-border-color);
}

.search-button:focus,
.search-button:focus-visible {
    color: var(--cui-search-button-focus-color);
    background-color: var(--cui-search-button-focus-bg);
    border-color: var(--cui-search-button-focus-border-color);
    box-shadow: var(--cui-search-button-focus-box-shadow);
    outline: 0;
}

.search-button-icon {
    width: var(--cui-search-button-icon-size);
    height: var(--cui-search-button-icon-size);
    flex-shrink: 0;
    fill: currentColor;
    font-size: var(--cui-search-button-icon-size);
    color: var(--cui-secondary-color);
}

.search-button-placeholder {
    margin-inline: var(--cui-search-button-placeholder-margin-inline);
    color: inherit;
    font-weight: 400;
    white-space: nowrap;
}

.search-button-keys {
    display: inline-flex;
    align-items: center;
    gap: var(--cui-search-button-keys-gap);
    margin-inline-start: auto;
}

.search-button-key,
.search-button-shortcut-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: var(--cui-search-button-key-height);
    padding: 0 var(--cui-search-button-key-padding-inline);
    font-family: inherit;
    font-size: var(--cui-search-button-key-font-size);
    font-weight: 600;
    line-height: 1;
    color: var(--cui-secondary-color);
    background-color: var(--cui-search-button-key-bg);
    border: 1px solid var(--cui-border-color);
    border-radius: var(--cui-search-button-key-border-radius);
    transition: background-color 0.1s ease, color 0.1s ease;
}

.search-button-key.active,
.search-button-key:active {
    background-color: var(--cui-search-button-key-active-bg);
    color: var(--cui-body-color);
}

.header-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.6rem;
    color: var(--cui-header-color);
}

.header-nav .nav-link:hover {
    color: var(--cui-header-hover-color);
}

/* Avatar Components (Clean CoreUI standard without clipping status indicator) */
.avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    border-radius: 50%;
    overflow: visible !important;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.875rem; }
.avatar-md { width: 40px; height: 40px; font-size: 1rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.35rem; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.75rem; }

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--cui-card-bg, #ffffff);
    z-index: 2;
}

/* Service Avatar Components (Modern squircle badge for services) */
.service-avatar {
    position: relative;
    border-radius: 0.625rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    line-height: 1;
}

.service-avatar-md {
    width: 40px;
    height: 40px;
    min-width: 40px;
}

.service-avatar-lg {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.35rem rgba(32, 107, 196, 0.08);
}

.service-avatar-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--cui-body-bg, #ffffff);
    z-index: 2;
}

.service-avatar-lg .service-avatar-status {
    width: 14px;
    height: 14px;
    border-width: 2.5px;
    bottom: -3px;
    right: -3px;
}

.card .service-avatar-status,
.table .service-avatar-status {
    border-color: var(--cui-card-bg, #ffffff);
}

/* Support Ticket Attachments Progress & UI */
.sta-progress-wrap { margin-top: 10px; max-width: 100%; display: none; }
.sta-progress-label { display: flex; justify-content: space-between; font-size: .75rem; color: #6b7280; margin-bottom: .3rem; }
.sta-progress-track { height: 6px; background: var(--cui-border-color, #e5e7eb); border-radius: 99px; overflow: hidden; }
.sta-progress-bar { height: 100%; background: var(--cui-primary, #206bc4); border-radius: 99px; transition: width .2s linear; }

/* Stat Card Links (Dashboard top 4 cards) */
a.stat-card-link {
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    cursor: pointer;
    border: var(--cui-card-border-width, 1px) solid var(--cui-card-border-color, rgba(8, 10, 12, 0.175));
    border-radius: var(--cui-card-border-radius, 0.375rem);
    outline: none;
    --cui-card-color: #ffffff;
    color: #ffffff;
    text-decoration: none;
}

a.stat-card-link .card-body,
a.stat-card-link .fs-4,
a.stat-card-link .fw-semibold,
a.stat-card-link div:not(.progress):not(.progress-bar) {
    color: #ffffff;
}

a.stat-card-link small,
a.stat-card-link .text-white-75,
a.stat-card-link .text-opacity-75 {
    color: rgba(255, 255, 255, 0.75);
}

a.stat-card-link .progress.progress-white {
    background-color: rgba(255, 255, 255, 0.25);
}

a.stat-card-link .progress.progress-white .progress-bar {
    background-color: #ffffff;
}

a.stat-card-link:hover,
a.stat-card-link:focus {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.18);
    filter: brightness(1.05);
    border: var(--cui-card-border-width, 1px) solid var(--cui-card-border-color, rgba(8, 10, 12, 0.175));
    outline: none;
    color: #ffffff;
    text-decoration: none;
}

a.stat-card-link:active {
    transform: translateY(0);
    text-decoration: none;
    color: #ffffff;
}

/* Buttons and Badges Thai Glyph Accommodation */
.btn {
    line-height: 1.5;
    font-weight: 500;
    border-radius: var(--cui-border-radius, 0.375rem) !important;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.825rem;
    border-radius: var(--cui-border-radius, 0.375rem) !important;
}

.btn-lg {
    border-radius: var(--cui-border-radius, 0.375rem) !important;
}

/* Fix input-group button radius (prevents .btn !important from breaking input-group child curvature) */
.input-group > .btn:not(:first-child),
.input-group > :not(:first-child).btn {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group > .btn:not(:last-child),
.input-group > :not(:last-child).btn {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group > .form-control:not(:last-child),
.input-group > :not(:last-child).form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group > .form-control:not(:first-child),
.input-group > :not(:first-child).form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Password Eye Toggle Button Seamless Integration */
.input-group .toggle-pwd-btn {
    border-color: var(--cui-border-color) !important;
    background-color: var(--cui-tertiary-bg);
    color: var(--cui-secondary-color);
    border-left: 0 !important;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.input-group .toggle-pwd-btn:hover,
.input-group .toggle-pwd-btn:focus {
    background-color: var(--cui-secondary-bg);
    color: var(--cui-body-color);
    border-color: var(--cui-border-color) !important;
}

.input-group:focus-within .toggle-pwd-btn {
    border-color: #86b7fe !important;
}

.input-group:focus-within .form-control {
    border-color: #86b7fe !important;
}

/* Card header action button refinement (Blends with table) */
.card-header .btn-outline-secondary {
    border-color: var(--cui-border-color, #dbdfe6);
    color: var(--cui-secondary-color, #6b7785);
    background-color: var(--cui-body-bg, #ffffff);
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.card-header .btn-outline-secondary:hover {
    background-color: var(--cui-secondary-bg, #e7eaee);
    border-color: var(--cui-secondary, #6b7785);
    color: var(--cui-body-color, #212529);
}

[data-coreui-theme="dark"] .card-header .btn-outline-secondary {
    border-color: var(--cui-border-color, #323a49);
    color: var(--cui-secondary-color, rgba(255, 255, 255, 0.6));
    background-color: var(--cui-card-bg, #212631);
}

[data-coreui-theme="dark"] .card-header .btn-outline-secondary:hover {
    background-color: var(--cui-secondary-bg, #323a49);
    border-color: var(--cui-border-color, #4a566d);
    color: #ffffff;
}

.badge {
    line-height: 1.35;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

/* Gateway selection tiles in invoice & checkout */
.gateway-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gateway-btn {
    width: 105px;
    height: 85px;
    border: 1px solid var(--cui-border-color, #d8dbe0);
    background-color: #ffffff;
    border-radius: var(--cui-border-radius-lg, 0.5rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
    position: relative;
    user-select: none;
}

.gateway-btn:hover {
    border-color: var(--cui-primary) !important;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(var(--cui-primary-rgb), 0.18);
    transform: translateY(-2px);
}

.gateway-btn:has(input[type="radio"]:checked),
.gateway-btn.active {
    border-color: var(--cui-primary) !important;
    border-width: 2px !important;
    background-color: #ffffff;
    box-shadow: 0 0 0 1px var(--cui-primary), 0 4px 12px rgba(var(--cui-primary-rgb), 0.18);
    transform: translateY(-2px);
}

/* Small checkmark badge on active gateway in checkout */
.gateway-btn:has(input[type="radio"]:checked)::after,
.gateway-btn.active::after {
    content: "✓";
    position: absolute;
    top: 4px;
    right: 5px;
    width: 16px;
    height: 16px;
    background-color: var(--cui-primary);
    color: #ffffff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

[data-coreui-theme="dark"] .gateway-btn,
[data-bs-theme="dark"] .gateway-btn {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: #ffffff; /* keep white background so gateway logos (e.g. PromptPay, QR, banks) stay clearly legible */
}

[data-coreui-theme="dark"] .gateway-btn:hover,
[data-bs-theme="dark"] .gateway-btn:hover {
    border-color: var(--cui-primary) !important;
}

[data-coreui-theme="dark"] .gateway-btn:has(input[type="radio"]:checked),
[data-coreui-theme="dark"] .gateway-btn.active {
    border-color: var(--cui-primary) !important;
}

.gateway-btn img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.gateway-card {
    border: 1px solid var(--cui-border-color);
    border-radius: var(--cui-border-radius);
    padding: 1rem;
    background-color: var(--cui-card-bg, #ffffff);
    transition: all 0.2s ease-in-out;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.gateway-card:hover {
    border-color: var(--cui-primary);
    box-shadow: 0 0.25rem 0.75rem rgba(var(--cui-primary-rgb), 0.15);
}

.gateway-card img {
    max-height: 48px;
    max-width: 100%;
    object-fit: contain;
}

/* Subtle badge variants for CoreUI */
.badge-subtle-success { background-color: rgba(25, 135, 84, 0.15); color: #198754; }
.badge-subtle-warning { background-color: rgba(249, 177, 21, 0.2); color: #b78103; }
.badge-subtle-danger  { background-color: rgba(229, 83, 83, 0.15); color: #e55353; }
.badge-subtle-info    { background-color: rgba(51, 153, 255, 0.15); color: #0d6efd; }
.badge-subtle-secondary { background-color: rgba(107, 119, 133, 0.15); color: #6b7785; }

[data-coreui-theme="dark"] .badge-subtle-warning { color: #f9b115; }
[data-coreui-theme="dark"] .badge-subtle-info { color: #39f; }

/* ==========================================================================
   CoreUI Standard Table Styling (Eliminates Black/Dark Borders Completely)
   ========================================================================== */
.table {
    --cui-table-border-color: var(--cui-border-color, #dbdfe6);
    border-color: var(--cui-border-color, #dbdfe6);
    color: var(--cui-body-color);
}

.table > thead {
    vertical-align: middle;
    border-color: var(--cui-border-color, #dbdfe6);
}

.table > tbody {
    vertical-align: middle;
    border-color: var(--cui-border-color, #dbdfe6);
}

.table th {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    vertical-align: middle;
    color: var(--cui-body-color);
    border-color: var(--cui-border-color, #dbdfe6);
    border-bottom: 1px solid var(--cui-border-color, #dbdfe6);
}

.table th i,
.table td i {
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.table th.bg-body-secondary {
    background-color: var(--cui-tertiary-bg);
}

[data-coreui-theme="dark"] .table th.bg-body-secondary,
[data-bs-theme="dark"] .table th.bg-body-secondary {
    background-color: rgba(255, 255, 255, 0.05);
}

.table td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
    border-color: var(--cui-border-color, #dbdfe6);
}

/* Force all table rows and child cells to use CoreUI subtle border color, NEVER inherit currentcolor (black) */
.table > :not(caption) > * > * {
    border-color: var(--cui-border-color, #dbdfe6);
    border-bottom: 1px solid var(--cui-border-color, #dbdfe6);
}

.table tbody tr,
.table thead tr {
    border-color: var(--cui-border-color, #dbdfe6);
}

.table-group-divider {
    border-top: 1px solid var(--cui-border-color, #dbdfe6);
}

/* Card Table Integration (Eliminates "ขอบซ้อนขอบ" and double bottom borders) */
.card {
    border-radius: var(--cui-border-radius);
}

.card > .table-responsive,
.card > .table {
    margin-bottom: 0;
}

.card > .table-responsive > .table,
.card > .table {
    margin-bottom: 0;
    border: 0;
    border-color: var(--cui-border-color, #dbdfe6);
}

.card > .table-responsive > .table > thead > tr > th,
.card > .table > thead > tr > th {
    border-top: 0;
}

/* Remove bottom border on the last table row inside a card to prevent double border with the card border */
.card > .table-responsive > .table > tbody > tr:last-child > *,
.card > .table-responsive > .table > :last-child > :last-child > *,
.card > .table > tbody > tr:last-child > *,
.card > .table > :last-child > :last-child > *,
.card > .card-body > .table-responsive > .table > tbody > tr:last-child > *,
.card > .card-body > .table-responsive > .table > :last-child > :last-child > *,
.card > .card-body > .table > tbody > tr:last-child > *,
.card > .card-body > .table > :last-child > :last-child > * {
    border-bottom: 0;
    border-bottom-width: 0;
    border-bottom-color: transparent;
}

/* Card Bottom Corners Synchronization: Ensure table/card-body curves to match card's rounded bottom border */
.card > .table-responsive:last-child {
    border-bottom-left-radius: calc(var(--cui-border-radius) - var(--cui-border-width, 1px));
    border-bottom-right-radius: calc(var(--cui-border-radius) - var(--cui-border-width, 1px));
}

.card > .table-responsive:last-child > .table {
    border-bottom-left-radius: calc(var(--cui-border-radius) - var(--cui-border-width, 1px));
    border-bottom-right-radius: calc(var(--cui-border-radius) - var(--cui-border-width, 1px));
}

.card > .table-responsive:last-child > .table > tbody > tr:last-child > *:first-child,
.card > .table:last-child > tbody > tr:last-child > *:first-child {
    border-bottom-left-radius: calc(var(--cui-border-radius) - var(--cui-border-width, 1px)) !important;
}

.card > .table-responsive:last-child > .table > tbody > tr:last-child > *:last-child,
.card > .table:last-child > tbody > tr:last-child > *:last-child {
    border-bottom-right-radius: calc(var(--cui-border-radius) - var(--cui-border-width, 1px)) !important;
}

.card > .table-responsive:last-child > .table > tbody > tr:last-child > td[colspan],
.card > .table:last-child > tbody > tr:last-child > td[colspan] {
    border-bottom-left-radius: calc(var(--cui-border-radius) - var(--cui-border-width, 1px)) !important;
    border-bottom-right-radius: calc(var(--cui-border-radius) - var(--cui-border-width, 1px)) !important;
}

.card > .card-body:last-child,
.card > .list-group-flush:last-child,
.card > .list-group-flush:last-child > .list-group-item:last-child {
    border-bottom-left-radius: calc(var(--cui-border-radius) - var(--cui-border-width, 1px)) !important;
    border-bottom-right-radius: calc(var(--cui-border-radius) - var(--cui-border-width, 1px)) !important;
}

.card > .table-responsive > .table > :not(caption) > * > :first-child:not(.text-center),
.card > .table > :not(caption) > * > :first-child:not(.text-center) {
    padding-left: 1.25rem;
}

.card > .table-responsive > .table > :not(caption) > * > :first-child.text-center,
.card > .table > :not(caption) > * > :first-child.text-center {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.card > .table-responsive > .table > :not(caption) > * > :last-child:not(.text-center),
.card > .table > :not(caption) > * > :last-child:not(.text-center) {
    padding-right: 1.25rem;
}

.card > .table-responsive > .table > :not(caption) > * > :last-child.text-center,
.card > .table > :not(caption) > * > :last-child.text-center {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Dropdown Action Toggler matching CoreUI Demo */
.table .dropdown .btn-transparent {
    color: var(--cui-secondary-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--cui-border-radius-sm);
    line-height: 1;
}

.table .dropdown .btn-transparent:hover,
.table .dropdown .btn-transparent:focus {
    color: var(--cui-body-color);
    background-color: var(--cui-tertiary-bg);
}

/* Fix Table Dropdown Clipping & Overflow:
   Allow dropdown menus inside tables and cards to float freely without triggering
   vertical scrollbars or getting clipped by .table-responsive. */
.card:has(.dropdown-menu.show),
.card:has(.dropdown.show),
.card-dropdown-open,
.card-dropdown-open .table-responsive,
.card:has(.dropdown-menu.show) .table-responsive,
.card:has(.dropdown.show) .table-responsive,
.table-responsive:has(.dropdown-menu.show),
.table-responsive:has(.dropdown.show),
.table-responsive-dropdown-open {
    overflow: visible !important;
}

/* Ensure table dropdown menus sit safely on top of cards and tables */
.table-responsive .dropdown-menu,
.table .dropdown-menu {
    z-index: 1060 !important;
}

/* Table Hover Link Transition */
.table a.text-reset {
    transition: color 0.15s ease-in-out;
}
.table a.text-reset:hover {
    color: var(--cui-primary, #206bc4) !important;
}

/* CoreUI Chart Wrapper */
.c-chart-wrapper {
    position: relative;
    width: 100%;
}

/* Rounded Pill Subtle Badges for CoreUI */
.badge.rounded-pill {
    padding: 0.35em 0.85em;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Thin Progress Bars */
.progress.progress-thin {
    height: 4px;
}

/* Card Dropdown Menu */
.card .dropdown-menu {
    border-radius: var(--cui-border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Footer & Sidebar Footer Level Alignment
   Ensure .sidebar-footer and .footer share identical height and vertical alignment
   so their top borders form a single unbroken, level horizontal line.
   ========================================================================== */
:root {
    --app-bottom-bar-height: 3.5rem;
}

.sidebar-footer {
    height: var(--app-bottom-bar-height);
    min-height: var(--app-bottom-bar-height);
    max-height: var(--app-bottom-bar-height);
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Footer layout */
.footer {
    height: var(--app-bottom-bar-height);
    min-height: var(--app-bottom-bar-height);
    display: flex;
    align-items: center;
    background-color: var(--cui-tertiary-bg);
    margin-top: auto;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}

/* Footer Links & Navigation */
.footer a {
    color: var(--cui-secondary-color);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}
.footer a:hover,
.footer .hover-primary:hover {
    color: var(--cui-primary, #206bc4) !important;
}

/* Page Boundary, Flex & Mobile Viewport Normalization */
.min-w-0 {
    min-width: 0 !important;
}

html, body {
    max-width: 100vw;
    overflow-x: clip;
}

.wrapper {
    max-width: 100vw;
    overflow-x: clip;
    min-height: 100vh;
    min-height: 100dvh;
}

@supports (min-height: 100dvh) {
    .min-vh-100 {
        min-height: 100dvh !important;
    }
}

/* ==========================================================================
   CoreUI Toast & Alert Enhancements
   ========================================================================== */
.toast-container {
    z-index: 99999 !important;
}

.toast {
    border-radius: var(--cui-border-radius);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
    background-color: var(--cui-card-bg, #ffffff);
    color: var(--cui-body-color);
}

.toast-header {
    background-color: var(--cui-tertiary-bg);
    border-bottom: 1px solid var(--cui-border-color);
    border-top-left-radius: calc(var(--cui-border-radius) - 1px);
    border-top-right-radius: calc(var(--cui-border-radius) - 1px);
}

.toast-body {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.alert {
    border-radius: var(--cui-border-radius);
}

.alert-dismissible .btn-close {
    padding: 1rem 1rem;
}

/* ==========================================================================
   CoreUI Modern Ordering System & Stepper Architecture
   ========================================================================== */
.order-stepper-container {
    background-color: var(--cui-card-bg, #ffffff);
    border: 1px solid var(--cui-border-color);
    border-radius: var(--cui-border-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

[data-coreui-theme="dark"] .order-stepper-container,
[data-bs-theme="dark"] .order-stepper-container {
    background-color: #2c313b !important;
    border-color: var(--cui-border-color);
}

.order-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.order-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    position: relative;
    z-index: 2;
    background: transparent;
    color: var(--cui-secondary-color);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a.order-step {
    color: inherit;
    text-decoration: none;
}

a.order-step:hover {
    color: var(--cui-primary);
}

.order-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--cui-tertiary-bg);
    border: 1px solid var(--cui-border-color);
    color: var(--cui-secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
}

.order-step.active,
a.order-step.active {
    color: var(--cui-primary) !important;
    font-weight: 700;
}

.order-step.active .order-step-title .fw-bold {
    color: var(--cui-primary) !important;
}

.order-step.active .order-step-num {
    background-color: var(--cui-primary);
    border-color: var(--cui-primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(var(--cui-primary-rgb), 0.18);
}

.order-step.completed,
a.order-step.completed {
    color: var(--cui-body-color) !important;
}

.order-step.completed .order-step-title .fw-bold {
    color: var(--cui-body-color) !important;
}

.order-step.completed .order-step-num {
    background-color: var(--cui-success);
    border-color: var(--cui-success);
    color: #ffffff;
}

.order-step-title {
    line-height: 1.2;
}

.order-step-divider {
    flex-grow: 1;
    height: 2px;
    background-color: var(--cui-border-color);
    margin: 0 0.85rem;
    transition: background-color 0.2s ease;
}

.order-step-divider.completed {
    background-color: var(--cui-success);
}

@media (max-width: 767.98px) {
    .order-step-title {
        display: none;
    }
    .order-step {
        gap: 0;
    }
    .order-step-divider {
        margin: 0 0.4rem;
    }
}

/* CoreUI Modern Pricing Cards */
.order-pricing-card {
    border-radius: var(--cui-border-radius);
    border: 1px solid var(--cui-border-color);
    background-color: var(--cui-card-bg, #ffffff);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.order-pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(var(--cui-primary-rgb), 0.4);
}

.order-pricing-card.featured {
    border-color: var(--cui-primary) !important;
    box-shadow: 0 0.35rem 1.15rem rgba(var(--cui-primary-rgb), 0.14) !important;
}

/* Feature markdown lists styling */
.product-features ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.product-features ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--cui-body-color);
    line-height: 1.45;
}

.product-features ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--cui-success);
    font-weight: 700;
}

/* Billing Cycle Interactive Card */
.billing-cycle-card {
    border: 1px solid var(--cui-border-color);
    border-radius: var(--cui-border-radius);
    padding: 1rem 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--cui-card-bg, #ffffff);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.billing-cycle-card:hover {
    border-color: var(--cui-primary);
    background-color: var(--cui-tertiary-bg);
}

.billing-cycle-card.active,
.billing-cycle-card:has(input[type="radio"]:checked) {
    border-color: var(--cui-primary) !important;
    background-color: rgba(var(--cui-primary-rgb), 0.05);
    box-shadow: 0 0 0 1px var(--cui-primary);
}

/* Gateway selection card active state */
.gateway-card:has(input[type="radio"]:checked),
.gateway-card.active {
    border-color: var(--cui-primary) !important;
    background-color: rgba(var(--cui-primary-rgb), 0.05);
    box-shadow: 0 0 0 1px var(--cui-primary);
}

/* Dark mode overrides for cards outside .card */
[data-coreui-theme="dark"] .order-pricing-card,
[data-bs-theme="dark"] .order-pricing-card,
[data-coreui-theme="dark"] .billing-cycle-card,
[data-bs-theme="dark"] .billing-cycle-card,
[data-coreui-theme="dark"] .toast,
[data-bs-theme="dark"] .toast {
    background-color: #2c313b !important;
    border-color: var(--cui-border-color) !important;
}

[data-coreui-theme="dark"] .billing-cycle-card:hover,
[data-bs-theme="dark"] .billing-cycle-card:hover {
    background-color: #323844 !important;
}

[data-coreui-theme="dark"] .billing-cycle-card.active,
[data-bs-theme="dark"] .billing-cycle-card.active,
[data-coreui-theme="dark"] .billing-cycle-card:has(input[type="radio"]:checked),
[data-bs-theme="dark"] .billing-cycle-card:has(input[type="radio"]:checked) {
    background-color: rgba(var(--cui-primary-rgb), 0.15) !important;
    border-color: var(--cui-primary) !important;
}

/* CoreUI Icon Alias for Server/Hosting (Maps cil-server to storage rack \f157) */
.cil-server:before {
    content: "\f157";
}

/* CoreUI Missing Icons: cil-eye & cil-eye-slash */
.cil-eye,
.cil-eye-slash {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    font-family: inherit !important;
}

.cil-eye:before,
.cil-eye-slash:before {
    content: " " !important;
    display: inline-block;
    width: 1em;
    height: 1em;
}

.cil-eye {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.cil-eye-slash {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 2 20 20'/%3E%3Cpath d='M9.88 9.88a3 3 0 1 0 4.24 4.24'/%3E%3Cpath d='M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68'/%3E%3Cpath d='M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 2 20 20'/%3E%3Cpath d='M9.88 9.88a3 3 0 1 0 4.24 4.24'/%3E%3Cpath d='M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68'/%3E%3Cpath d='M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Optimizations (< 992px, < 768px, < 576px)
   ========================================================================== */

/* Domain Search Bar Standard (Desktop & Mobile) */
.domain-tld-select {
    max-width: 130px;
}

/* Header Sticky Guarantee (Ensures top bar stays fixed during scroll) */
.header.header-sticky {
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
}

/* Breadcrumb Bar: Smooth horizontal scrolling on small viewports */
.breadcrumb {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.breadcrumb::-webkit-scrollbar {
    display: none;
}
.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* Tablet & Mobile Breakpoint: < 768px */
@media (max-width: 767.98px) {
    /* Prevent iOS Safari 16px auto-zoom */
    input.form-control,
    select.form-select,
    textarea.form-control {
        font-size: 16px !important;
    }

    /* Compact Stepper */
    .order-stepper-container {
        padding: 0.75rem 0.85rem !important;
        margin-bottom: 1.25rem !important;
    }
    .order-step-title {
        display: none !important;
    }
    .order-step {
        gap: 0 !important;
    }
    .order-step-num {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem !important;
    }
    .order-step-divider {
        margin: 0 0.35rem !important;
    }

    /* Table Touch Scrolling and Compact Density */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    .table td {
        padding: 0.65rem 0.5rem !important;
        font-size: 0.85rem;
    }
    .table th {
        padding: 0.65rem 0.5rem !important;
        font-size: 0.8rem;
    }
    .table .avatar-md {
        width: 34px !important;
        height: 34px !important;
    }
    .table .avatar-md i {
        font-size: 1rem !important;
    }
}

/* Mobile Phone Breakpoint: < 576px */
@media (max-width: 575.98px) {
    /* Header Bar: Compact & Clean */
    .header > .container-fluid:first-child {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .header-toggler {
        margin-inline-start: -6px !important;
    }

    /* Search Button: Icon Only Mode (36x36px) */
    .search-button {
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }
    .search-button-icon {
        margin-right: 0;
    }
    .search-button-placeholder,
    .search-button-keys,
    .search-button-shortcut-key {
        display: none;
    }

    /* Header Nav items spacing */
    .header-nav {
        gap: 0.25rem !important;
    }
    .header-nav .nav-link {
        padding: 0.35rem 0.4rem !important;
    }

    /* Dropdown Menus: Screen-safe Boundary */
    .dropdown-menu {
        max-width: calc(100vw - 20px) !important;
    }
    .dropdown-menu-end {
        right: 0 !important;
        left: auto !important;
    }

    /* Card & Container Padding: Reclaim Screen Width */
    .card-body {
        padding: 1rem !important;
    }
    .card-header {
        padding: 0.75rem 1rem !important;
    }
    .card-footer {
        padding: 0.75rem 1rem !important;
    }

    /* Card Header Tabs: Horizontal Touch-Swipe Navigation */
    .card-header-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap !important;
        scrollbar-width: none;
        margin-bottom: -1px;
    }
    .card-header-tabs::-webkit-scrollbar {
        display: none;
    }
    .card-header-tabs .nav-item {
        flex-shrink: 0;
    }
    .card-header-tabs .nav-link {
        white-space: nowrap !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
    }

    /* Domain Search Input on Small Screens */
    .domain-search-form .domain-tld-select {
        max-width: 95px !important;
        font-size: 0.85rem !important;
        padding-left: 0.5rem !important;
        padding-right: 1.5rem !important;
    }
    .domain-search-form .domain-search-input {
        font-size: 0.9rem !important;
        padding-left: 0.5rem !important;
    }
    .domain-search-form .input-group-text {
        padding: 0.375rem 0.65rem !important;
    }

    /* Extension Chips */
    .select-tld-btn {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.8rem !important;
        min-height: 32px;
    }

    /* Stepper on ultra small phones (< 576px) */
    .order-stepper-container {
        padding: 0.65rem 0.75rem !important;
    }
    .order-step-num {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.75rem !important;
    }
    .order-step-divider {
        margin: 0 0.2rem !important;
    }

    /* Billing Cycle & Gateway Cards */
    .billing-cycle-card {
        padding: 0.65rem 0.6rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.4rem !important;
    }
    .billing-cycle-card .text-end {
        width: 100% !important;
        text-align: right !important;
    }
    .billing-cycle-card .fs-5,
    .billing-cycle-card .fs-6 {
        font-size: 1rem !important;
    }
    .gateway-card {
        padding: 0.65rem 0.5rem !important;
        min-height: 75px !important;
    }
    .gateway-card img {
        max-height: 32px !important;
    }

    /* List Footer Alignment */
    .card-footer.d-flex.flex-wrap {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    /* Invoice Gateway Buttons */
    .gateway-list {
        gap: 0.5rem !important;
    }
    .gateway-btn {
        width: 95px !important;
        height: 68px !important;
        padding: 0.35rem !important;
    }

    /* Dashboard Metric Numbers */
    .card .fs-4.fw-semibold {
        font-size: 1.35rem !important;
    }

    /* Footer on Mobile */
    .footer {
        min-height: auto !important;
        padding-top: 0.85rem !important;
        padding-bottom: 0.85rem !important;
        margin-top: auto;
        margin-bottom: 0 !important;
    }

    /* Announcements on Mobile */
    .list-group-item .avatar-md {
        width: 36px !important;
        height: 36px !important;
    }
    .list-group-item .avatar-md i {
        font-size: 1rem !important;
    }
}

/* Sticky Order/Invoice Summary Card (Clears the sticky top header + breadcrumbs) */
.order-summary-sticky {
    position: sticky !important;
    top: 135px !important;
    z-index: 1020;
}
@media (max-height: 700px) {
    .order-summary-sticky {
        top: 120px !important;
        max-height: calc(100vh - 130px);
        overflow-y: auto;
    }
}
@media (max-width: 991.98px) {
    .order-summary-sticky {
        position: static !important;
        top: auto !important;
    }
}

/* Order Management Note */
.order-note-content > :last-child {
    margin-bottom: 0 !important;
}

/* Disable native browser search cancel button to prevent duplicate clear buttons */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: none !important;
}

/* ==========================================================================
   Markdown Content Styling & Dark Mode Integration
   ========================================================================== */
.markdown-body {
    background-color: transparent !important;
    color: inherit !important;
    font-family: inherit !important;
}

[data-coreui-theme="dark"] .markdown-body,
[data-bs-theme="dark"] .markdown-body {
    color-scheme: dark !important;
    background-color: transparent !important;
    color: var(--cui-body-color, #c2c9d6) !important;
}

[data-coreui-theme="dark"] .markdown-body h1,
[data-coreui-theme="dark"] .markdown-body h2,
[data-coreui-theme="dark"] .markdown-body h3,
[data-coreui-theme="dark"] .markdown-body h4,
[data-coreui-theme="dark"] .markdown-body h5,
[data-coreui-theme="dark"] .markdown-body h6,
[data-bs-theme="dark"] .markdown-body h1,
[data-bs-theme="dark"] .markdown-body h2,
[data-bs-theme="dark"] .markdown-body h3,
[data-bs-theme="dark"] .markdown-body h4,
[data-bs-theme="dark"] .markdown-body h5,
[data-bs-theme="dark"] .markdown-body h6 {
    color: var(--cui-heading-color, #ffffff) !important;
    border-bottom-color: var(--cui-border-color, #3c434f) !important;
}

[data-coreui-theme="dark"] .markdown-body p,
[data-coreui-theme="dark"] .markdown-body ul,
[data-coreui-theme="dark"] .markdown-body ol,
[data-coreui-theme="dark"] .markdown-body li,
[data-coreui-theme="dark"] .markdown-body dl,
[data-bs-theme="dark"] .markdown-body p,
[data-bs-theme="dark"] .markdown-body ul,
[data-bs-theme="dark"] .markdown-body ol,
[data-bs-theme="dark"] .markdown-body li,
[data-bs-theme="dark"] .markdown-body dl {
    color: var(--cui-body-color, #c2c9d6) !important;
}

[data-coreui-theme="dark"] .markdown-body hr,
[data-bs-theme="dark"] .markdown-body hr {
    background-color: var(--cui-border-color, #3c434f) !important;
    border-color: var(--cui-border-color, #3c434f) !important;
}

[data-coreui-theme="dark"] .markdown-body pre,
[data-coreui-theme="dark"] .markdown-body code,
[data-bs-theme="dark"] .markdown-body pre,
[data-bs-theme="dark"] .markdown-body code {
    background-color: var(--cui-body-tertiary-bg, #212631) !important;
    color: var(--cui-body-color, #c2c9d6) !important;
    border-color: var(--cui-border-color, #3c434f) !important;
}

[data-coreui-theme="dark"] .markdown-body table tr,
[data-bs-theme="dark"] .markdown-body table tr {
    background-color: transparent !important;
    border-color: var(--cui-border-color, #3c434f) !important;
}

[data-coreui-theme="dark"] .markdown-body table th,
[data-coreui-theme="dark"] .markdown-body table td,
[data-bs-theme="dark"] .markdown-body table th,
[data-bs-theme="dark"] .markdown-body table td {
    border-color: var(--cui-border-color, #3c434f) !important;
    color: inherit !important;
}

[data-coreui-theme="dark"] .markdown-body table tr:nth-child(2n),
[data-bs-theme="dark"] .markdown-body table tr:nth-child(2n) {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

[data-coreui-theme="dark"] .markdown-body blockquote,
[data-bs-theme="dark"] .markdown-body blockquote {
    color: var(--cui-secondary-color, #8a93a2) !important;
    border-left-color: var(--cui-primary, #206bc4) !important;
    background-color: rgba(255, 255, 255, 0.02) !important;
}

[data-coreui-theme="dark"] .markdown-body a,
[data-bs-theme="dark"] .markdown-body a {
    color: var(--cui-link-color, #6ea8fe) !important;
}



