/* ══════════════ TRANG ĐĂNG NHẬP ══════════════ */

.fi-simple-layout {
    background:
        radial-gradient(900px 500px at 15% 10%, #e8eeff 0%, transparent 55%),
        radial-gradient(700px 450px at 85% 90%, #e6f9ef 0%, transparent 55%),
        #f3f6fd;
    min-height: 100vh;
}

.fi-simple-main {
    background: #fff;
    border-radius: 22px;
    border: 0;
    padding: 2.25rem 2rem;
    max-width: 26rem;
    box-shadow:
        0 24px 48px -20px rgba(51, 102, 255, .25),
        0 8px 20px -8px rgba(23, 32, 58, .1);
}

.fi-simple-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.fi-simple-header-heading {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #17203a;
}

.fi-simple-header-subheading {
    font-size: .875rem;
    color: #8a94ad;
    margin-top: .35rem;
}

/* Logo trên form */
.fi-simple-layout .fi-logo {
    color: #3366ff !important;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.03em;
    justify-content: center;
    margin-bottom: 1.25rem;
}

/* Ô nhập */
.fi-simple-main .fi-input-wrp {
    border-radius: 12px;
    border: 1px solid #e6eaf3;
    background: #fafbfe;
    box-shadow: none;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}

.fi-simple-main .fi-input-wrp:focus-within {
    border-color: #3366ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(51, 102, 255, .12);
}

.fi-simple-main .fi-input {
    padding-block: .7rem;
    font-size: .9375rem;
}

.fi-simple-main .fi-fo-field-label {
    font-size: .8125rem;
    font-weight: 600;
    color: #4b5670;
    margin-bottom: .35rem;
}

/* Nút đăng nhập */
.fi-simple-main .fi-btn {
    width: 100%;
    justify-content: center;
    padding-block: .75rem;
    border-radius: 12px;
    font-size: .9375rem;
    font-weight: 700;
    background-color: #3366ff !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 12px 24px -10px rgba(51, 102, 255, .7);
}

.fi-simple-main .fi-btn:hover {
    background-color: #2451e6 !important;
}

.fi-simple-main .fi-btn .fi-btn-label {
    color: #fff !important;
}

/* Checkbox nhớ đăng nhập */
.fi-simple-main .fi-checkbox-input {
    border-radius: 6px;
}

.fi-simple-main .fi-fo-checkbox-label {
    font-size: .875rem;
    color: #4b5670;
}

/* Link quên mật khẩu */
.fi-simple-main .fi-link {
    font-size: .8125rem;
    font-weight: 600;
    color: #3366ff !important;
}

/* Thông báo lỗi */
.fi-simple-main .fi-fo-field-error-message {
    font-size: .8125rem;
    color: #dc2626;
}

/* Ẩn footer mặc định của Filament nếu có */
.fi-simple-layout .fi-simple-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: .75rem;
    color: #a1a9bd;
}

/* --- Dark mode --- */
.dark .fi-simple-layout {
    background:
        radial-gradient(900px 500px at 15% 10%, #1a2547 0%, transparent 55%),
        radial-gradient(700px 450px at 85% 90%, #122a22 0%, transparent 55%),
        #0f1729;
}

.dark .fi-simple-main {
    background: #1a2338;
    box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .6);
}

.dark .fi-simple-header-heading {
    color: #f0f3fa;
}

.dark .fi-simple-main .fi-input-wrp {
    background: #151d2f;
    border-color: #2a3550;
}

.dark .fi-simple-main .fi-input-wrp:focus-within {
    background: #1a2338;
    border-color: #3366ff;
}
/* ══════════════ SIDEBAR ══════════════ */

.fi-sidebar {
    background: linear-gradient(180deg, #3a6cff 0%, #2f5df5 55%, #2451e6 100%);
    border-right: 0 !important;
    box-shadow: none;
}

/* --- Header / logo --- */
.fi-sidebar-header {
    background: transparent !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.fi-sidebar .fi-logo {
    color: #fff !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* --- Nhóm menu --- */
.fi-sidebar-group-label {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fi-sidebar-nav {
    gap: 0.15rem;
}

/* --- Mục menu thường --- */
.fi-sidebar-item-btn {
    border-radius: 14px;
    padding: 0.6rem 0.75rem;
    transition: background-color 0.15s ease;
}

.fi-sidebar-item-btn:hover {
    background-color: rgba(255, 255, 255, 0.13) !important;
}

.fi-sidebar-item .fi-sidebar-item-icon {
    color: rgba(255, 255, 255, 0.85) !important;
}

.fi-sidebar-item .fi-sidebar-item-label {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 500;
    font-size: 0.925rem;
}

/* --- Mục đang mở: nền trắng, chữ xanh --- */
.fi-sidebar-item.fi-active .fi-sidebar-item-btn {
    background-color: #fff !important;
    box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.45);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: #1b3fc4 !important;
    font-weight: 700;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #3366ff !important;
}

/* --- Badge số bên phải --- */
.fi-sidebar-item-badge-ctn .fi-badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 0 !important;
}

.fi-sidebar-item-badge-ctn .fi-badge-label {
    color: #fff !important;
    font-weight: 700;
}

/* Badge cảnh báo giữ đỏ */
.fi-sidebar-item-badge-ctn .fi-color-danger {
    background-color: #ff5a5a !important;
}

/* Badge trên mục đang mở */
.fi-sidebar-item.fi-active .fi-sidebar-item-badge-ctn .fi-badge {
    background-color: #e8eeff !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-badge-ctn .fi-badge-label {
    color: #1b3fc4 !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-badge-ctn .fi-color-danger {
    background-color: #ffe1e1 !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-badge-ctn .fi-color-danger .fi-badge-label {
    color: #b91c1c !important;
}

/* --- Nút đóng sidebar trên mobile --- */
.fi-sidebar-close-btn,
.fi-sidebar-close-btn .fi-icon {
    color: #fff !important;
}

/* --- Dark mode: giữ nguyên gradient --- */
.dark .fi-sidebar {
    background: linear-gradient(180deg, #2f5df5 0%, #2451e6 55%, #1b3fc4 100%);
}

/* ══════════════ NÚT ══════════════ */

.fi-btn {
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: -0.005em;
}

/* --- Nút primary: nền xanh đậm, chữ trắng --- */
.fi-btn.fi-color-primary {
    background-color: #3366ff !important;
    color: #fff !important;
    box-shadow: 0 10px 20px -10px rgba(51, 102, 255, 0.7);
    border-color: transparent !important;
}

.fi-btn.fi-color-primary:hover {
    background-color: #2451e6 !important;
    box-shadow: 0 12px 24px -10px rgba(51, 102, 255, 0.8);
}

.fi-btn.fi-color-primary .fi-btn-label,
.fi-btn.fi-color-primary .fi-icon {
    color: #fff !important;
}

/* --- Nút phụ: viền nhạt, nền trắng --- */
.fi-btn.fi-color-gray,
.fi-btn.fi-btn-outlined {
    background-color: #fff !important;
    border-color: #e6eaf3 !important;
    color: #17203a !important;
}

.fi-btn.fi-color-gray:hover,
.fi-btn.fi-btn-outlined:hover {
    background-color: #f7f9fd !important;
}

/* --- Nút nguy hiểm --- */
.fi-btn.fi-color-danger {
    background-color: #dc2626 !important;
    color: #fff !important;
    box-shadow: 0 10px 20px -10px rgba(220, 38, 38, 0.6);
    border-color: transparent !important;
}

.fi-btn.fi-color-danger:hover {
    background-color: #b91c1c !important;
}

.fi-btn.fi-color-danger .fi-btn-label,
.fi-btn.fi-color-danger .fi-icon {
    color: #fff !important;
}

/* --- Nút thành công --- */
.fi-btn.fi-color-success {
    background-color: #16a34a !important;
    color: #fff !important;
    box-shadow: 0 10px 20px -10px rgba(22, 163, 74, 0.6);
    border-color: transparent !important;
}

.fi-btn.fi-color-success:hover {
    background-color: #15803d !important;
}

.fi-btn.fi-color-success .fi-btn-label,
.fi-btn.fi-color-success .fi-icon {
    color: #fff !important;
}

/* --- Nút icon tròn --- */
.fi-icon-btn {
    border-radius: 12px;
}

/* --- Link action trong bảng (Sửa, Xoá) --- */
.fi-ac-link-action.fi-color-primary {
    color: #3366ff !important;
}

.fi-ac-link-action.fi-color-primary:hover {
    color: #2451e6 !important;
}

.fi-ac-link-action.fi-color-danger {
    color: #dc2626 !important;
}

/* nút action eweb */
.fi-badge {
    padding: 5px 10px;
}
.fi-ta-actions .fi-ac-link-action{
    border-radius: 8px;
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #E1E8E5;
}

/* ══════════════ FOOTER SIDEBAR ══════════════ */

.sw-sb-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0.5rem 0.75rem 0.25rem;
    padding: 0.625rem 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

.sw-sb-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #fff;
    color: #1b3fc4;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.95rem;
}

.sw-sb-info {
    min-width: 0;
    flex: 1;
}

.sw-sb-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sw-sb-role {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.sw-sb-out button {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    transition: background-color 0.15s, color 0.15s;
}

.sw-sb-out button:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* Ẩn phần chữ khi sidebar thu gọn */
.fi-sidebar:not(.fi-sidebar-open) .sw-sb-info,
.fi-sidebar:not(.fi-sidebar-open) .sw-sb-out {
    display: none;
}

.fi-sidebar:not(.fi-sidebar-open) .sw-sb-user {
    justify-content: center;
    padding: 0.5rem;
}
.fi-ta-text-has-descriptions {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.fi-ta-text-has-descriptions .fi-ta-text-description {
    margin: 0;
}

/* Màu viền nhẹ */
.fi-ta-table {
    --table-border-color: #e5e7eb;
    border-collapse: collapse;
}

/* Viền các ô tiêu đề và dữ liệu */
.fi-ta-table > thead > tr > th,
.fi-ta-table > tbody > tr > td {
    border: 1px solid var(--table-border-color);
}

/* Chế độ tối */
.dark .fi-ta-table {
    --table-border-color: rgba(255, 255, 255, 0.1);
}


/* Thu gọn nội dung từng ô */
.fi-ta-table .fi-ta-col {
    padding: 5px 10px !important;
}

/* Cột checkbox và thao tác */
.fi-ta-table > tbody > tr > td.fi-ta-selection-cell {
    padding: 5px 10px !important;
}

/* ══════════════ BẢNG ══════════════ */

.fi-ta-table {
    font-size: 0.875rem;
}

/* --- Header --- */
.fi-ta-header-cell {
    background-color: #f4f7fd !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.75rem;
    font-weight: 600;
    color: #5b6683 !important;
    white-space: nowrap;
    border-bottom: 2px solid #e3e9f5 !important;
}

.fi-ta-header-cell-sort-btn {
    gap: 0.25rem;
    font-weight: 600;
    padding: 0 !important;
}

/* --- Ô dữ liệu: padding nằm ở thẻ <a> bên trong --- */
.fi-ta-cell {
    padding: 0 !important;
    border-bottom: 1px solid #eef2f9;
}

.fi-ta-col {
    padding: 0.575rem 0.75rem !important;
    display: block;
    min-height: auto !important;
}

.fi-ta-cell.fi-ta-selection-cell {
    padding: 0.575rem 0.75rem !important;
    width: 1%;
}

/* Bỏ khoảng trắng thừa quanh nội dung */
.fi-ta-text,
.fi-ta-text-item {
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    min-height: auto !important;
}

/* --- Sọc xen kẽ --- */
.fi-ta-row.fi-striped,
.fi-ta-row:nth-child(even) {
    background-color: #fafbfe;
}

.fi-ta-row:hover {
    background-color: #eef3ff !important;
}

.fi-ta-row.fi-selected {
    background-color: #e3ebff !important;
}

/* --- Cột hành động --- */
.fi-ta-actions {
    padding: 0.575rem 0.75rem !important;
    gap: 0.625rem;
    white-space: nowrap;
    align-items: center;
}

.fi-ac-link-action {
    font-size: 0.8125rem;
    font-weight: 600;
    gap: 0.25rem;
    padding: 0 !important;
}

.fi-ac-link-action .fi-icon {
    width: 0.9rem;
    height: 0.9rem;
}

.fi-ta-actions .fi-icon-btn {
    padding: 0.25rem !important;
    width: auto;
    height: auto;
}

/* --- Badge --- */
.fi-ta-table .fi-badge {
    padding: 0.1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
}

/* --- Khung và phân trang --- */
.fi-ta-ctn {
    border-radius: 18px;
    overflow: hidden;
}

.fi-ta-header-ctn {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #eef2f9;
}

.fi-pagination {
    padding: 0.625rem 0.75rem;
    border-top: 1px solid #eef2f9;
    font-size: 0.8125rem;
}

.fi-pagination-item-btn {
    border-radius: 8px;
    min-width: 1.875rem;
    height: 1.875rem;
    font-size: 0.8125rem;
}

.fi-pagination-item.fi-active .fi-pagination-item-btn {
    background-color: #3366ff !important;
}

.fi-pagination-item.fi-active .fi-pagination-item-label {
    color: #fff !important;
}

/* --- Dark mode --- */
.dark .fi-ta-header-cell {
    background-color: #151d2f !important;
    color: #8a94ad !important;
    border-bottom-color: #263050 !important;
}

.dark .fi-ta-cell {
    border-bottom-color: #202a44;
}

.dark .fi-ta-row.fi-striped,
.dark .fi-ta-row:nth-child(even) {
    background-color: #16203a;
}

.dark .fi-ta-row:hover {
    background-color: #1e2a4a !important;
}

.dark .fi-ta-header-ctn,
.dark .fi-pagination {
    border-color: #202a44;
}