/* =============================================================
   Custom Styles — viết theo phong cách Bootstrap
   Không sửa app.scss hay print.css, mọi thay đổi mới đặt ở đây
   File này load trực tiếp, không cần build lại.
   ============================================================= */


/* -------------------------------------------------------------
   Spacing utilities  (mb, mt, pb, pt, gap)
   ------------------------------------------------------------- */
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.pb-1 { padding-bottom: 4px; }
.pb-2 { padding-bottom: 8px; }
.pb-3 { padding-bottom: 16px; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }


/* -------------------------------------------------------------
   Flexbox utilities
   ------------------------------------------------------------- */
.d-flex      { display: flex; }
.flex-grow-1 { flex: 1 1 auto; }

.align-items-center { align-items: center; }
.align-items-end    { align-items: flex-end; }
.align-self-end     { align-self: flex-end; }

.justify-content-end     { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }


/* -------------------------------------------------------------
   Text utilities
   ------------------------------------------------------------- */
.text-right  { text-align: right; }
.text-small  { font-size: 0.75rem; }
.fw-bold     { font-weight: bold; }
.fw-semibold { font-weight: 600; }


/* -------------------------------------------------------------
   Form controls — thay thế inline style trên <input>
   (dùng trong order-items-list.blade.php)
   ------------------------------------------------------------- */
.form-control-inline {
    padding: 2px 4px;
    border-radius: 4px;
    border: thin solid rgba(0, 0, 0, 0.2);
    text-align: right;
    font-size: 0.8rem;
    line-height: 1.4;
    background: transparent;
}

.form-control-inline:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.4);
}

.form-control-inline--sm  { width: 50px; }
.form-control-inline--md  { width: 150px; }
.form-control-inline--lg  { width: 200px; }


/* -------------------------------------------------------------
   Order row — thay thế inline style trong
   order-payments-field.blade.php & order-technicians-field.blade.php
   ------------------------------------------------------------- */
.order-row {
    display: flex;
    margin-bottom: 24px;
    align-items: center;
    gap: 8px;
}

.order-row__index  { padding: 0 8px; }
.order-row__body   { flex: 1 1 auto; }
.order-row__action { align-self: flex-end; }


/* -------------------------------------------------------------
   Stats Overview — màu sắc từng card
   Dùng với ->extraAttributes(['class' => 'stat-*'])
   Dùng .fi-wi-stats-overview-stat.stat-* để tăng specificity
   đè qua Tailwind bg-white của Filament
   ------------------------------------------------------------- */
.fi-wi-stats-overview-stat.stat-primary,
.fi-wi-stats-overview-stat.stat-success,
.fi-wi-stats-overview-stat.stat-warning,
.fi-wi-stats-overview-stat.stat-info,
.fi-wi-stats-overview-stat.stat-danger {
    border-left: 4px solid transparent;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fi-wi-stats-overview-stat.stat-primary:hover,
.fi-wi-stats-overview-stat.stat-success:hover,
.fi-wi-stats-overview-stat.stat-warning:hover,
.fi-wi-stats-overview-stat.stat-info:hover,
.fi-wi-stats-overview-stat.stat-danger:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Primary — xanh dương */
.fi-wi-stats-overview-stat.stat-primary {
    border-left-color: #3b82f6 !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, #fff 60%) !important;
}
.fi-wi-stats-overview-stat.stat-primary .fi-wi-stats-overview-stat-icon  { color: #3b82f6 !important; }
.fi-wi-stats-overview-stat.stat-primary .fi-wi-stats-overview-stat-value { color: #1d4ed8 !important; }

/* Success — xanh lá */
.fi-wi-stats-overview-stat.stat-success {
    border-left-color: #22c55e !important;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, #fff 60%) !important;
}
.fi-wi-stats-overview-stat.stat-success .fi-wi-stats-overview-stat-icon  { color: #16a34a !important; }
.fi-wi-stats-overview-stat.stat-success .fi-wi-stats-overview-stat-value { color: #15803d !important; }

/* Warning — cam vàng */
.fi-wi-stats-overview-stat.stat-warning {
    border-left-color: #f59e0b !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, #fff 60%) !important;
}
.fi-wi-stats-overview-stat.stat-warning .fi-wi-stats-overview-stat-icon  { color: #d97706 !important; }
.fi-wi-stats-overview-stat.stat-warning .fi-wi-stats-overview-stat-value { color: #b45309 !important; }

/* Info — xanh cyan */
.fi-wi-stats-overview-stat.stat-info {
    border-left-color: #06b6d4 !important;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, #fff 60%) !important;
}
.fi-wi-stats-overview-stat.stat-info .fi-wi-stats-overview-stat-icon  { color: #0891b2 !important; }
.fi-wi-stats-overview-stat.stat-info .fi-wi-stats-overview-stat-value { color: #0e7490 !important; }

/* Danger — đỏ */
.fi-wi-stats-overview-stat.stat-danger {
    border-left-color: #ef4444 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, #fff 60%) !important;
}
.fi-wi-stats-overview-stat.stat-danger .fi-wi-stats-overview-stat-icon  { color: #dc2626 !important; }
.fi-wi-stats-overview-stat.stat-danger .fi-wi-stats-overview-stat-value { color: #b91c1c !important; }

/* Dark mode — Filament dùng class .dark, không dùng media query */
.dark .fi-wi-stats-overview-stat.stat-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, transparent 60%) !important;
}
.dark .fi-wi-stats-overview-stat.stat-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18) 0%, transparent 60%) !important;
}
.dark .fi-wi-stats-overview-stat.stat-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, transparent 60%) !important;
}
.dark .fi-wi-stats-overview-stat.stat-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.18) 0%, transparent 60%) !important;
}
.dark .fi-wi-stats-overview-stat.stat-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, transparent 60%) !important;
}


/* =============================================================
   Order Create — cải thiện giao diện
   ============================================================= */

/* -------------------------------------------------------------
   Product card — hover lift, cursor, transition
   ------------------------------------------------------------- */
.product-item {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

.product-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Code — badge nhỏ màu xám */
.product-item .code {
    display: inline-block;
    background: rgba(0, 0, 0, 0.06);
    color: #6b7280;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
}

/* Price — nổi bật màu xanh lá */
.product-item .price {
    color: #16a34a;
    font-weight: 600;
    font-size: 0.8rem;
}

.product-item .price span {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.72rem;
}

/* Title */
.product-item .title {
    color: #111827;
    line-height: 1.3;
}


/* -------------------------------------------------------------
   Order items — mỗi dòng sản phẩm trong đơn
   ------------------------------------------------------------- */
.order-items--item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-left: 3px solid #6366f1;
    padding: 10px 10px 10px 12px !important;
    border-radius: 0 6px 6px 0;
    background: rgba(99, 102, 241, 0.02);
    margin-bottom: 4px;
    transition: background 0.15s ease;
}

.order-items--item:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* Tên sản phẩm trong đơn */
.order-items--item [x-text="item.product_name"] {
    font-weight: 600;
    color: #1e293b;
}


/* -------------------------------------------------------------
   Order total row — dòng tổng tiền cuối danh sách
   ------------------------------------------------------------- */
.order-items > div:last-child {
    margin-top: 8px;
    padding: 10px 12px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.03));
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    font-weight: 700;
    font-size: 1rem;
    color: #4338ca;
}


/* -------------------------------------------------------------
   Form control inline — focus state rõ hơn
   ------------------------------------------------------------- */
.form-control-inline:focus {
    outline: none;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}


/* -------------------------------------------------------------
   Dark mode
   ------------------------------------------------------------- */
.dark .product-item .code  { background: rgba(255,255,255,0.08); color: #9ca3af; }
.dark .product-item .title { color: #f1f5f9; }
.dark .product-item .price { color: #4ade80; }

.dark .order-items--item {
    border-left-color: #818cf8;
    background: rgba(99, 102, 241, 0.05);
}
.dark .order-items--item:hover { background: rgba(99, 102, 241, 0.1); }

.dark .order-items > div:last-child {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
    border-color: rgba(129, 140, 248, 0.25);
    color: #a5b4fc;
}


/* -------------------------------------------------------------
   Order items — inputs dùng inline style, target bằng x-model
   Chỉ thêm border + focus, không override width/padding inline
   ------------------------------------------------------------- */
[x-model="item.quantity"],
[x-model="item.price"],
[x-model="item.discount"],
[x-model="item.prepaid_quantity"],
[x-model="item.prepaid_expires_at"] {
    border: 1px solid rgb(32 20 221 / 53%) !important;
    border-radius: 4px !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: transparent;
    height: 33px;
}

[x-model="item.quantity"]:focus,
[x-model="item.price"]:focus,
[x-model="item.discount"]:focus,
[x-model="item.prepaid_quantity"]:focus,
[x-model="item.prepaid_expires_at"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Checkbox liệu trình */
[x-model="item.is_prepaid"] {
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
    cursor: pointer;
}


/* -------------------------------------------------------------
   Product price — giá gốc bị gạch ngang
   ------------------------------------------------------------- */
.price-original {
    text-decoration: line-through;
    color: #9ca3af;
    font-weight: 400;
}


/* -------------------------------------------------------------
   Empty state — "No product found"
   ------------------------------------------------------------- */
.product-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 16px;
    color: #9ca3af;
    font-size: 0.875rem;
}

.product-empty-state svg {
    width: 36px;
    height: 36px;
    opacity: 0.5;
}


/* -------------------------------------------------------------
   Dark mode bổ sung
   ------------------------------------------------------------- */
.dark [x-model="item.quantity"],
.dark [x-model="item.price"],
.dark [x-model="item.discount"],
.dark [x-model="item.prepaid_quantity"],
.dark [x-model="item.prepaid_expires_at"] {
    border-color: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

.dark .price-original { color: #6b7280; }


/* =============================================================
   Reservations — Repeater items & Section headers
   (cũng áp dụng cho các form khác trong hệ thống)
   ============================================================= */

/* -------------------------------------------------------------
   Repeater items — viền trái + nền nhẹ, hover shadow
   ------------------------------------------------------------- */
.fi-fo-repeater-item {
    border-left: 3px solid #6366f1 !important;
    transition: box-shadow 0.15s ease !important;
}

.fi-fo-repeater-item:hover {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.12) !important;
}

.fi-fo-repeater-item-header {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.04), transparent);
    border-radius: 0 !important;
}

.fi-fo-repeater-item-content {
    background: rgba(99, 102, 241, 0.01);
}

/* Dark mode */
.dark .fi-fo-repeater-item {
    border-left-color: #818cf8 !important;
}

.dark .fi-fo-repeater-item-header {
    background: linear-gradient(90deg, rgba(129, 140, 248, 0.08), transparent);
}


/* -------------------------------------------------------------
   Section headers — đường kẻ dưới + heading nổi bật hơn
   ------------------------------------------------------------- */
.fi-section-header {
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    padding-bottom: 10px !important;
    margin-bottom: 2px;
}

.fi-section-header-heading {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    letter-spacing: -0.01em;
}

/* Dark mode */
.dark .fi-section-header {
    border-bottom-color: rgba(129, 140, 248, 0.2);
}

.dark .fi-section-header-heading {
    color: #e2e8f0 !important;
}


/* =============================================================
   Topbar — border bottom phân tách với content
   ============================================================= */
.fi-topbar nav {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

.dark .fi-topbar nav {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}


/* =============================================================
   Table — hover row + header
   ============================================================= */
.fi-ta-row:hover td {
    background: rgba(99, 102, 241, 0.04) !important;
}

.fi-ta-header-cell-label {
    color: #4338ca !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dark .fi-ta-row:hover td {
    background: rgba(129, 140, 248, 0.07) !important;
}

.dark .fi-ta-header-cell-label {
    color: #a5b4fc !important;
}


/* =============================================================
   Chart widgets — shadow + border radius nhẹ
   ============================================================= */
.fi-wi-chart {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: box-shadow 0.2s ease;
}

.fi-wi-chart:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.1) !important;
}

.dark .fi-wi-chart {
    border-color: rgba(255, 255, 255, 0.06) !important;
}


/* =============================================================
   Sidebar — dark theme
   ============================================================= */
.fi-sidebar {
    background: #1e293b !important;
}

.fi-sidebar .fi-sidebar-header {
    background: #1e293b !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: none !important;
}

.fi-sidebar .fi-sidebar-nav {
    background: #1e293b !important;
}

.fi-sidebar .fi-sidebar-group-label {
    color: #64748b !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
}

.fi-sidebar .fi-sidebar-group-icon { color: #475569 !important; }

.fi-sidebar .fi-sidebar-item-button {
    transition: background 0.15s ease !important;
}

.fi-sidebar .fi-sidebar-item-button:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.fi-sidebar .fi-sidebar-item-label { color: #94a3b8 !important; }

.fi-sidebar .fi-sidebar-item-button:hover .fi-sidebar-item-label {
    color: #e2e8f0 !important;
}

.fi-sidebar .fi-sidebar-item-icon { color: #475569 !important; }

.fi-sidebar .fi-sidebar-item-button:hover .fi-sidebar-item-icon {
    color: #94a3b8 !important;
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-button {
    background: rgba(99, 102, 241, 0.2) !important;
    border-left: 2px solid #6366f1 !important;
    border-radius: 0 8px 8px 0 !important;
    padding-left: calc(0.5rem - 2px) !important;
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: #a5b4fc !important;
    font-weight: 600 !important;
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #818cf8 !important;
}

.fi-sidebar .fi-sidebar-item-grouped-border div {
    background: rgba(255, 255, 255, 0.12) !important;
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-grouped-border div {
    background: rgba(129, 140, 248, 0.4) !important;
}

.fi-sidebar .fi-sidebar-group-collapse-button svg {
    color: #475569 !important;
}

/* Sidebar width — thu nhỏ menu bên trái */
:root {
    --sidebar-width: 15rem !important;
}

.fi-sidebar,
.fi-sidebar-open,
.w-\[--sidebar-width\] {
    min-width: 15rem !important;
    width: 15rem !important;
    max-width: 15rem !important;
}

.fi-sidebar .fi-sidebar-nav,
.fi-sidebar .fi-sidebar-header {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}


/* =============================================================
   Page header — title + breadcrumb
   ============================================================= */
.fi-header-heading {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    letter-spacing: -0.02em;
}

.dark .fi-header-heading {
    color: #f1f5f9 !important;
}

.fi-header-subheading {
    color: #64748b !important;
    font-size: 0.95rem !important;
}

/* Breadcrumb */
.fi-breadcrumbs ol li a {
    color: #6366f1 !important;
    font-weight: 500;
}

.fi-breadcrumbs ol li a:hover {
    color: #4338ca !important;
}


/* =============================================================
   Modal / Dialog
   ============================================================= */
.fi-modal-window {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

.fi-modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 16px !important;
}

.fi-modal-heading {
    font-weight: 700 !important;
    color: #1e293b !important;
}

.fi-modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px 24px !important;
    background: rgba(248, 250, 252, 0.8);
}

.dark .fi-modal-header { border-bottom-color: rgba(255, 255, 255, 0.07); }
.dark .fi-modal-footer {
    border-top-color: rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
}
.dark .fi-modal-heading { color: #f1f5f9 !important; }


/* =============================================================
   Pagination
   ============================================================= */
.fi-pagination-items {
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}

.fi-pagination-item.fi-active .fi-pagination-item-button {
    background: #6366f1 !important;
}

.fi-pagination-item.fi-active .fi-pagination-item-label {
    color: #fff !important;
}

.fi-pagination-item.fi-active .fi-pagination-item-icon {
    color: #fff !important;
}

.fi-pagination-item-button:hover {
    background: rgba(99, 102, 241, 0.08) !important;
}

.fi-pagination-item-label {
    color: #374151 !important;
}

.dark .fi-pagination-item.fi-active .fi-pagination-item-button {
    background: #6366f1 !important;
}

.dark .fi-pagination-item-label { color: #d1d5db !important; }


/* =============================================================
   Badges
   ============================================================= */
.fi-badge {
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    border-radius: 6px !important;
}


/* =============================================================
   Notifications (toast)
   ============================================================= */
.fi-no-notification {
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.fi-no-notification-title {
    font-weight: 700 !important;
    color: #1e293b !important;
}

.dark .fi-no-notification {
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
}

.dark .fi-no-notification-title {
    color: #f1f5f9 !important;
}


/* =============================================================
   Tabs
   ============================================================= */
.fi-tabs {
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 0 !important;
    gap: 2px !important;
}

.fi-tabs-item {
    border-radius: 8px 8px 0 0 !important;
    position: relative;
    color: #64748b !important;
}

.fi-tabs-item:hover {
    background: rgba(99, 102, 241, 0.06) !important;
    color: #4338ca !important;
}

.fi-tabs-item.fi-active {
    background: rgba(99, 102, 241, 0.08) !important;
    color: #4338ca !important;
}

/* Indicator dưới tab active */
.fi-tabs-item.fi-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #6366f1;
    border-radius: 2px 2px 0 0;
}

.fi-tabs-item-label {
    font-weight: 500 !important;
}

.fi-tabs-item.fi-active .fi-tabs-item-label {
    font-weight: 600 !important;
    color: #4338ca !important;
}

.fi-tabs-item.fi-active .fi-tabs-item-icon {
    color: #6366f1 !important;
}

.dark .fi-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark .fi-tabs-item { color: #94a3b8 !important; }

.dark .fi-tabs-item:hover {
    background: rgba(129, 140, 248, 0.08) !important;
    color: #a5b4fc !important;
}

.dark .fi-tabs-item.fi-active {
    background: rgba(129, 140, 248, 0.1) !important;
    color: #a5b4fc !important;
}

.dark .fi-tabs-item.fi-active .fi-tabs-item-label { color: #a5b4fc !important; }
.dark .fi-tabs-item.fi-active .fi-tabs-item-icon  { color: #818cf8 !important; }


/* =============================================================
   Form inputs — focus ring đồng bộ màu indigo
   ============================================================= */
.fi-input-wrp:focus-within {
    --tw-ring-color: rgba(99, 102, 241, 0.4) !important;
    ring-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.fi-input-wrp {
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}


/* =============================================================
   Order item fields — Giá / Giảm giá / Liệu trình
   Gộp thành hàng ngang, label nhỏ trên input
   ============================================================= */
.oi-field-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.oi-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
}

.oi-field__label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding-left: 2px;
}

.oi-field__input {
    width: 140px;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    text-align: right;
    font-size: 0.8rem;
    line-height: 1.4;
    background: #f8fafc;
    color: #1e293b;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.oi-field__input--sm   { width: 64px; }
.oi-field__input--date { width: 148px; }

.oi-field__input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18);
    background: #fff;
}

/* Checkbox liệu trình */
.oi-field--checkbox {
    align-items: center;
    flex-direction: row;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    align-self: flex-end;
    margin-bottom: 1px;
}

.oi-field--checkbox .oi-field__label {
    text-transform: none;
    font-size: 0.8rem;
    color: #475569;
    letter-spacing: 0;
}

.oi-field--checkbox input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #6366f1;
    cursor: pointer;
}

/* Dark mode */
.dark .oi-field__input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
}

.dark .oi-field__input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #818cf8;
}

.dark .oi-field__label { color: #64748b; }

.dark .oi-field--checkbox {
    background: rgba(129, 140, 248, 0.08);
    border-color: rgba(129, 140, 248, 0.2);
}

.dark .oi-field--checkbox .oi-field__label { color: #94a3b8; }


/* =============================================================
   Login page — /backoffice/login
   ============================================================= */

/* Background gradient tím-xanh + hoa văn lưới chấm */
.fi-simple-layout {
    background:
        radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px),
        linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #1e40af 70%, #0369a1 100%) !important;
    background-size: 28px 28px, 100% 100% !important;
    position: relative;
    overflow: hidden;
}

/* Hiệu ứng blob nền — dùng pseudo element */
.fi-simple-layout::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.25);
    filter: blur(80px);
    pointer-events: none;
}

.fi-simple-layout::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(14, 116, 144, 0.2);
    filter: blur(80px);
    pointer-events: none;
}

/* Card login — glassmorphism */
.fi-simple-main {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
    padding: 48px 48px !important;
}

/* Logo + heading */
.fi-simple-page .fi-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.fi-simple-header-heading {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    letter-spacing: -0.02em !important;
    text-align: center;
}

.fi-simple-header-subheading {
    font-size: 0.875rem !important;
    color: #64748b !important;
    text-align: center;
}

/* Input fields */
.fi-simple-main .fi-input-wrp {
    border-radius: 10px !important;
    overflow: hidden;
}

.fi-simple-main .fi-input-wrp:focus-within {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
    border-color: #6366f1 !important;
}

/* Submit button — full gradient */
.fi-simple-main .fi-btn-color-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4) !important;
    transition: box-shadow 0.2s ease, transform 0.15s ease !important;
}

.fi-simple-main .fi-btn-color-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55) !important;
    transform: translateY(-1px) !important;
}

.fi-simple-main .fi-btn-color-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4) !important;
}

/* Label bên trong form */
.fi-simple-main .fi-fo-field-wrp-label label {
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    color: #374151 !important;
    letter-spacing: 0.01em;
}

/* Dark mode — giữ background gradient, card tối hơn */
.dark .fi-simple-layout {
    background:
        radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(135deg, #0f0e1a 0%, #1a1836 35%, #0c1c3d 70%, #03244f 100%) !important;
    background-size: 28px 28px, 100% 100% !important;
}

.dark .fi-simple-main {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
}

.dark .fi-simple-header-heading {
    color: #f1f5f9 !important;
}

.dark .fi-simple-header-subheading {
    color: #94a3b8 !important;
}

.dark .fi-simple-main .fi-fo-field-wrp-label label {
    color: #cbd5e1 !important;
}


/* =============================================================
   Role Edit — CheckboxList permissions
   (/backoffice/roles/{id}/edit)
   ============================================================= */

/* Mỗi ô permission — hover + checked state */
.fi-fo-checkbox-list > div {
    border-radius: 6px;
    transition: background 0.12s ease;
}

.fi-fo-checkbox-list > div:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* Label wrapper */
label.fi-fo-checkbox-list-option-label {
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s ease;
}

label.fi-fo-checkbox-list-option-label:hover {
    background: rgba(99, 102, 241, 0.07);
}

/* Checkbox — màu indigo */
label.fi-fo-checkbox-list-option-label input[type="checkbox"] {
    accent-color: #6366f1;
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Text label của mỗi option */
span.fi-fo-checkbox-list-option-label {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    line-height: 1.4 !important;
}

/* Checked — highlight xanh nhẹ */
label.fi-fo-checkbox-list-option-label:has(input[type="checkbox"]:checked) {
    background: rgba(99, 102, 241, 0.08);
}

label.fi-fo-checkbox-list-option-label:has(input[type="checkbox"]:checked) span.fi-fo-checkbox-list-option-label {
    color: #4338ca !important;
    font-weight: 600 !important;
}

/* Bulk toggle button — nhỏ gọn hơn */
.fi-fo-checkbox-list ~ div .fi-btn,
[wire\:key*="actions"] .fi-btn {
    font-size: 0.8rem !important;
}

/* Dark mode */
.dark label.fi-fo-checkbox-list-option-label:hover {
    background: rgba(129, 140, 248, 0.08);
}

.dark label.fi-fo-checkbox-list-option-label:has(input[type="checkbox"]:checked) {
    background: rgba(129, 140, 248, 0.12);
}

.dark span.fi-fo-checkbox-list-option-label {
    color: #cbd5e1 !important;
}

.dark label.fi-fo-checkbox-list-option-label:has(input[type="checkbox"]:checked) span.fi-fo-checkbox-list-option-label {
    color: #a5b4fc !important;
}


/* =============================================================
   Order Detail (Infolist) — /backoffice/orders/{id}
   Class names thực tế của Filament infolist:
     .fi-in-entry-wrp         — wrapper mỗi field
     .fi-in-entry-wrp-label   — <dt> chứa label
     .fi-in-text              — text entry container
     .fi-in-text-item         — <div> chứa giá trị text
     .fi-in-repeatable        — repeatable container
     .fi-in-repeatable-item   — <li> mỗi item repeatable
   ============================================================= */

/* Entry label — nhỏ, uppercase, màu nhạt */
.fi-in-entry-wrp-label span {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    color: #94a3b8 !important;
    line-height: 1.4 !important;
}

/* Entry content — rõ, font đẹp hơn mặc định */
.fi-in-text-item {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

/* RepeatableEntry items — viền trái indigo + nền nhẹ */
.fi-in-repeatable-item {
    border-left: 3px solid #6366f1 !important;
    border-radius: 0 10px 10px 0 !important;
    background: rgba(99, 102, 241, 0.02) !important;
    transition: box-shadow 0.15s ease, background 0.15s ease !important;
}

.fi-in-repeatable-item:hover {
    background: rgba(99, 102, 241, 0.05) !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1) !important;
}

/* Label bên trong repeatable item — tím nhạt */
.fi-in-repeatable-item .fi-in-entry-wrp-label span {
    color: #6366f1 !important;
}

/* Dark mode */
.dark .fi-in-entry-wrp-label span {
    color: #64748b !important;
}

.dark .fi-in-repeatable-item {
    border-left-color: #818cf8 !important;
    background: rgba(99, 102, 241, 0.05) !important;
}

.dark .fi-in-repeatable-item:hover {
    background: rgba(99, 102, 241, 0.09) !important;
}

.dark .fi-in-repeatable-item .fi-in-entry-wrp-label span {
    color: #a5b4fc !important;
}
