/* Mobile-first CSS for WebNppNuocGiaiKhac */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'Arial Unicode MS', 'Arial', 'Tahoma', 'Verdana', sans-serif !important;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

.container {
    max-width: 100%;
    padding: 10px;
    margin: 0 auto;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

/* Disable tooltips and autocomplete on all input fields and editboxes */
input, textarea, select {
    pointer-events: auto;
    /* Disable autocomplete */
    -webkit-autocomplete: off !important;
    -moz-autocomplete: off !important;
    autocomplete: off !important;
}

input:hover, textarea:hover, select:hover {
    pointer-events: auto;
}

/* Remove title attribute tooltips */
input[title], textarea[title], select[title] {
    position: relative;
}

input[title]:hover::after, textarea[title]:hover::after, select[title]:hover::after {
    display: none !important;
}

/* Hide all autocomplete dropdowns and suggestions */
datalist, 
[role="listbox"], 
.autocomplete-suggestions, 
.ui-autocomplete,
.ui-menu,
.ui-menu-item,
.ui-widget-content,
.ui-widget,
.ui-corner-all,
.ui-state-hover,
.ui-state-active,
.ui-state-focus {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

/* Hide browser autocomplete dropdowns */
input::-webkit-calendar-picker-indicator,
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
    display: none !important;
}

/* Disable autocomplete for all input types */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
textarea {
    -webkit-autocomplete: off !important;
    -moz-autocomplete: off !important;
    autocomplete: off !important;
    -webkit-autocorrect: off !important;
    -moz-autocorrect: off !important;
    autocorrect: off !important;
    -webkit-autocapitalize: off !important;
    -moz-autocapitalize: off !important;
    autocapitalize: off !important;
    -webkit-spellcheck: false !important;
    -moz-spellcheck: false !important;
    spellcheck: false !important;
}

/* Alternative method: completely disable tooltips */
input, textarea, select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Ensure input fields are still functional but without tooltips */
input:focus, textarea:focus, select:focus {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Hide any remaining autocomplete elements */
*[data-autocomplete],
*[data-suggestions],
*[data-dropdown] {
    display: none !important;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-block {
    width: 100%;
}

/* Navigation */
.navbar {
    background-color: #343a40;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-menu li {
    flex: 1;
    min-width: 120px;
}

.nav-menu a {
    display: block;
    padding: 10px;
    background-color: #495057;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: #007bff;
}

/* Dashboard */
.dashboard {
    padding: 20px 0;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

/* Charts */
.chart-container {
    height: 300px;
    margin: 20px 0;
}

/* Forms */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-col {
    flex: 1;
    padding: 0 10px;
    min-width: 250px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 5px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* Search and Filter */
.search-filter {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.search-item {
    flex: 1;
    min-width: 200px;
}

.search-item.button-group {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.search-item.button-group .btn {
    flex: 1;
    min-width: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-col {
        min-width: 100%;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .search-item {
        min-width: 100%;
    }
    
    .search-item.button-group {
        flex-direction: row;
        min-width: 100%;
    }
    
    .search-item.button-group .btn {
        flex: 1;
        min-width: 0;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-menu li {
        min-width: 100%;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Permission Info */
.permission-info {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-left: 10px;
}

/* Button Row for OrderDetail */
.button-row {
    gap: 15px;
}

.button-row .form-col {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .button-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .button-row .form-col {
        margin-bottom: 15px;
    }
    
    .button-row .btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Đảm bảo nút trong input-group có cùng chiều cao với input */
.input-group-append .btn,
.input-group-prepend .btn {
    height: calc(1.5em + 0.75rem + 2px) !important;
    line-height: 1.5 !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0 !important;
}

/* Đảm bảo nút tải lại danh sách thức uống có chiều cao chính xác */
.input-group .btn-outline-info {
    height: 100% !important;
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Đồng nhất font chữ tiêu đề cho tất cả GridView */
.table th {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #495057 !important;
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6 !important;
    padding: 12px 8px !important;
    text-align: center !important;
}

/* Đồng nhất font chữ nội dung cho tất cả GridView */
.table td {
    font-size: 13px !important;
    padding: 10px 8px !important;
    vertical-align: middle !important;
}

/* Đồng nhất font chữ footer cho tất cả GridView */
.table tfoot td {
    font-size: 14px !important;
    font-weight: 600 !important;
    background-color: #e9ecef !important;
    border-top: 2px solid #dee2e6 !important;
}
