﻿/* ===== Page Background ===== */
@import url('admin.css');
body {
    background: #f5f6fa;
    font-size:13px;
}

/* ===== Sidebar ===== */
.sidebar {
    font-size:12px;
    width: 230px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #ddd;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 20px;
}

    .sidebar a {
        display: block;
        padding: 12px 20px;
        color: #333;
        font-weight: 500;
        text-decoration: none;
    }

        .sidebar a:hover,
        .sidebar a.active {
            background: #e9ecef;
            color: #000;
        }
/* ===== NAVBAR===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
/* Thu nhỏ chiều cao Navbar */
.navbar {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    min-height: 44px !important; /* nhỏ hơn mặc định */
}

/* Thu nhỏ logo / chữ WeddingApp */
.navbar-brand {
    font-size: 18px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Thu nhỏ các item trong Navbar */
.navbar-nav .nav-link {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    font-size: 14px !important;
}

    /* Thu nhỏ icon */
    .navbar-nav .nav-link i {
        font-size: 14px !important;
        margin-right: 4px;
    }

/* Giữ Navbar cố định */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}


/* ===== GLOBAL TOOLBAR (Minimal Modern) ===== */
.global-toolbar-modern {
    position: sticky; /* bám theo cuộn */
    top: 40px; /* nằm dưới Navbar */
    z-index: 999;
    background: #fff;
    padding: 8px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
}

    /* Nút trong toolbar */
    .global-toolbar-modern .tb-btn {
        width: 30px;
        height: 30px;
        border-radius: 6px;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px; /* icon nhỏ */
        color: white;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        /* Hover */
        .global-toolbar-modern .tb-btn:hover {
            transform: translateY(-2px);
            filter: brightness(1.1);
        }

        /* Active */
        .global-toolbar-modern .tb-btn:active {
            transform: scale(0.90);
        }

/* Màu sắc */
.tb-green {
    background: #2ecc71;
}

.tb-blue {
    background: #3498db;
}

.tb-orange {
    background: #e67e22;
}

.tb-red {
    background: #e74c3c;
}

.tb-gray {
    background: #7f8c8d;
}

.tb-purple {
    background: #9b59b6;
}

.tb-teal {
    background: #1abc9c;
}

.tb-yellow {
    background: #f1c40f;
}


/* Nút chung */
.tb-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

    /* Hiệu ứng hover */
    .tb-btn:hover {
        transform: translateY(-2px);
        filter: brightness(1.1);
    }

    /* Hiệu ứng nhấn */
    .tb-btn:active {
        transform: scale(0.92);
    }

/* Màu sắc từng nút */
.tb-green {
    background: #2ecc71;
}

.tb-blue {
    background: #3498db;
}

.tb-orange {
    background: #e67e22;
}

.tb-red {
    background: #e74c3c;
}

.tb-gray {
    background: #7f8c8d;
}

.tb-purple {
    background: #9b59b6;
}

.tb-teal {
    background: #1abc9c;
}

.tb-yellow {
    background: #f1c40f;
}

/* Mobile tối ưu */
@media (max-width: 600px) {
    .tb-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
}










/* ===== Main Content ===== */
.main-content {
    margin-left: 230px;
    padding: 5px;
    margin-top: 120px;
    
}

.main-content {
    margin-left: 0 !important; /* bỏ khoảng trống sidebar cũ */
    padding-top: 20px;
    margin-top: 0px; /* phù hợp với Navbar + Toolbar nhỏ */
}



/* ===== Table Style ===== */
.table-hover tbody tr:hover {
    background-color: #f1f3f5;
}

.table thead {
    background: #f8f9fa;
    font-weight: 600;
}

/* ===== Buttons ===== */
.btn i {
    margin-right: 5px;
}

.selected-row {
    background: #d7e9ff !important;
}
.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

    .form-row label {
        width: 150px; /* độ rộng label */
        font-weight: 600;
        margin-right: 10px;
    }

    .form-row input,
    .form-row select,
    .form-row textarea {
        flex: 1;
    }
    /* Giảm chiều cao ghi chú */
    .form-row textarea {
        height: 38px; /* bằng chiều cao textbox */
        width: 550px;
        resize: vertical; /* cho phép kéo nếu muốn */
    }
    .form-row .select2-container {
        flex: 1 !important;
    }
    .row-selected {
        background-color: #ffeeba !important;
    }
    .select2-container .select2-search--dropdown .select2-search__field {
        display: block !important;
    }
    /* Tăng kích thước bảng */
    #modalGuestTable {
        width: 100% !important;
        table-layout: fixed;
        font-size: 13px;
    }

    /* Ô dạng lưới Excel */
    #modalGuestTable th,
    #modalGuestTable td {
        border: 1px solid #ccc !important;
        padding: 4px 6px;
    }

    /* Hover */
    #modalGuestTable tr:hover {
        background: #f7f7f7;
    }

    /* Input nhỏ gọn */
    #modalGuestTable input,
    #modalGuestTable select,
    #modalGuestTable .dropdown-toggle {
        width: 100% !important;
        font-size: 13px;
        padding: 2px 4px;
        height: 28px;
    }

    /* Ô tìm kiếm trong dropdown */
    #modalGuestTable .search-box {
        font-size: 12px;
        height: 26px;
    }
/* Toàn bộ bảng nhập liệu */
#modalGuestTable {
    width: 100% !important;
    table-layout: fixed;
    font-size: 13px;
}

    /* Ô dạng lưới Excel */
    #modalGuestTable th,
    #modalGuestTable td {
        border: 1px solid #ccc !important;
        padding: 2px 4px !important;
    }

    /* Input dạng Excel */
    #modalGuestTable input[type="text"],
    #modalGuestTable input[type="number"],
    #modalGuestTable input[type="tel"],
    #modalGuestTable textarea,
    #modalGuestTable select,
    #modalGuestTable .dropdown-toggle {
        width: 100% !important;
        font-size: 13px;
        padding: 2px 4px !important;
        height: 28px !important;
        border: 1px solid #bbb !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        outline: none !important;
    }

        /* Khi focus vào ô → giống Excel */
        #modalGuestTable input:focus,
        #modalGuestTable select:focus,
        #modalGuestTable textarea:focus,
        #modalGuestTable .dropdown-toggle:focus {
            border: 1px solid #4a89ff !important;
            box-shadow: 0 0 0 1px #4a89ff !important;
        }

    /* Dropdown search box */
    #modalGuestTable .search-box {
        font-size: 12px;
        height: 26px !important;
    }

    /* Hover giống Excel */
    #modalGuestTable tr:hover {
        background: #f7f7f7;
    }
    /* Ô tick trong bảng modal */
    #modalGuestTable input[type="checkbox"] {
        width: 14px;
        height: 14px;
        transform: scale(0.9);
        margin: 0 auto;
        display: block;
    }
        /* Nút X đỏ xóa dòng */
    #modalGuestTable .btn-remove {
        padding: 0 6px;
        font-size: 8px;
        line-height: 1.2;
    }

    #modalGuestTable .btn-remove i,
    #modalGuestTable .btn-remove span {
        font-size: 11px;
    }
    /* Thu nhỏ cột checkbox */
    #modalGuestTable td.checkbox-col,
    #modalGuestTable th.checkbox-col {
        width: 50px !important;
        text-align: center;
    }

    /* Thu nhỏ cột nút X */
    #modalGuestTable td.remove-col,
    #modalGuestTable th.remove-col {
        width: 30px !important;
        text-align: center;
    }
/* Viền cho dropdown tỉnh thành trong modal sửa */
#editProvinceDropdown .dropdown-toggle {
    border: 1px solid #bbb !important;
    border-radius: 0 !important;
    background-color: #fff !important;
    padding: 2px 6px !important;
    height: 28px !important;
    font-size: 13px;
}

/* Viền cho menu dropdown */
#editProvinceDropdown .dropdown-menu {
    border: 1px solid #bbb !important;
    border-radius: 0 !important;
}

/* Viền cho ô tìm kiếm */
#editProvinceDropdown .search-box {
    border: 1px solid #bbb !important;
    border-radius: 0 !important;
    height: 26px !important;
    font-size: 12px;
}

/* Viền cho từng item */
#editProvinceDropdown .dropdown-item {
    border-bottom: 1px solid #eee;
    padding: 4px 6px;
}

    #editProvinceDropdown .dropdown-item:last-child {
        border-bottom: none;
    }

.global-toolbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
}
#guestTable {
    position: relative;
    z-index: 1;
}
/* Viền giống form-control cho dropdown tùy chỉnh */
.searchable-dropdown .dropdown-toggle {
    border: 1px solid #ced4da; /* viền giống form-control */
    border-radius: 4px;
    background-color: #fff;
    text-align: left;
    padding: 6px 12px;
    height: 38px;
    color: #212529;
}

    /* Khi hover / focus */
    .searchable-dropdown .dropdown-toggle:hover,
    .searchable-dropdown .dropdown-toggle:focus {
        border-color: #86b7fe;
        box-shadow: 0 0 0 0.15rem rgba(13,110,253,0.15);
        outline: none;
    }

/* Chỉ áp dụng cho modal Edit (an toàn, không ảnh hưởng chỗ khác) */
#editGuestModal .searchable-dropdown .dropdown-toggle {
    border-width: 1px;
}

/* Nếu muốn viền nổi bật khi đã chọn giá trị */
.searchable-dropdown .selected-value:not([value=""]) + .dropdown-toggle,
.searchable-dropdown .dropdown-toggle[data-has-value="true"] {
    border-color: #198754; /* màu xanh khi đã chọn (tuỳ chỉnh) */
}

/* Tùy chọn: icon mũi tên nhỏ, căn phải */
.searchable-dropdown .dropdown-toggle .dropdown-label {
    display: inline-block;
    width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.btn-card-small {
    padding: 1px 4px !important;
    font-size: 11px !important;
    line-height: 1 !important;
}
















    