﻿html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  background: #f4f8fb;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  color: #0d47a1; /* ✅ MÀU XANH ĐẬM CHO CONTENT */
  background: #f4f8fb;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  margin: 0;
  padding: 0;
  font-size: 12px !important;
}

.admin-header {
  background: #1976d2;
  color: #fff;
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
  padding: 0 54px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header .text-primary {
  color: #fff !important;
}

/* Footer - Đồng bộ với theme xanh */
.footer {
  background: linear-gradient(135deg, #4569a5 0%, #3a5a8f 100%) !important;
  border-top: 3px solid #1976d2 !important;
  color: #fff !important;
  padding: 12px 0 !important;
  box-shadow: 0 -2px 12px rgba(69, 105, 165, 0.15) !important;
}

.footer .footer-container {
  text-align: center !important;
  justify-content: center !important;
}

.footer .text-body {
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-align: center !important;
  width: 100% !important;
}

.footer .text-body span {
  color: #ffffff !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* ==================== SIDEBAR STYLES - ASHICO ADMIN (FIXED) ==================== */

.sidebar {
    font-size: 13px !important;
    font-weight: 700 !important;
    width: 225px !important;
    min-width: 225px !important;
    background: #4569a5;
    box-shadow: 0 2px 12px rgba(66,133,244,0.08);
    padding-top: 20px;
    overflow-y: auto;
    color: #fff !important; /* ✅ ĐẢM BẢO TEXT SIDEBAR LÀ TRẮNG */
}

/* Tiêu đề nhóm (CÀI ĐẶT CHUNG, CÀI ĐẶT BLOCK, QUẢN TRỊ) */
.sidebar-title {
    padding: 12px 20px 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    color: #fff !important;
    text-transform: uppercase !important;
    margin-top: 8px !important;
}

/* Tiêu đề phụ (Block chính, Các Block phụ, Các Block con) */
.sidebar-subtitle-block {
    padding: 8px 20px 4px !important;
    padding-left: 30px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    color: #e0e7ff !important;
    text-transform: uppercase !important;
    margin-top: 6px !important;
}

/* Divider xanh 2 dòng */
.sidebar-divider-blue {
    margin: 8px 15px !important;
    padding: 0 !important;
}

.sidebar-divider-blue .divider-line-top {
    height: 3px !important;
    background: #719de7 !important;
    border-radius: 2px !important;
    margin-bottom: 2px !important;
}

.sidebar-divider-blue .divider-line-bottom {
    height: 1px !important;
    background: #c0d0e9 !important;
    border-radius: 1px !important;
}

/* Divider vàng 2 dòng */
.sidebar-divider-yellow {
    margin: 8px 15px !important;
    padding: 0 !important;
}

.sidebar-divider-yellow .divider-line-top {
    height: 3px !important;
    background: #ede5b6 !important;
    border-radius: 2px !important;
    margin-bottom: 2px !important;
}

.sidebar-divider-yellow .divider-line-bottom {
    height: 1px !important;
    background: #e5e4e0 !important;
    border-radius: 1px !important;
}

/* Menu item chuẩn - ICON VÀ TEXT CÙNG HÀNG */
.sidebar .menu-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 20px !important;
    margin: 2px 8px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    gap: 0 !important;
}

.sidebar .menu-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    transform: translateX(4px) !important;
}

.sidebar .menu-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

/* Icon trong menu - INLINE VỚI TEXT */
.sidebar .menu-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    margin-right: 12px !important;
    width: 20px !important;
    height: 20px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    color: #fff !important;
}

/* Text trong menu - INLINE VỚI ICON */
.sidebar .menu-text {
    display: inline-block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
    color: #fff !important;
}

/* Block chính - dịch vào 1 level */
.sidebar .menu-block {
    padding-left: 28px !important;
    font-size: 12px !important;
    color: #fff !important;
}

.sidebar .menu-block .menu-icon {
    font-size: 14px !important;
}

/* Block phụ/con - dịch vào 2 level */
.sidebar .menu-blockchild {
    padding-left: 40px !important;
    font-size: 11px !important;
    color: #e0e7ff !important;
}

.sidebar .menu-blockchild .menu-icon {
    font-size: 13px !important;
}

.sidebar .menu-blockchild:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Scrollbar tùy chỉnh cho sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px !important;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px !important;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Responsive */
@media (max-width: 1199.98px) {
    .sidebar {
        width: 200px !important;
    }
    
    .sidebar-title {
        font-size: 10px !important;
    }
    
    .sidebar-subtitle-block {
        font-size: 9px !important;
    }
    
    .sidebar .menu-item {
        font-size: 12px !important;
        padding: 8px 16px !important;
    }
}

.admin-logo {
  text-align: center;
  margin-bottom: 32px;
}
.admin-logo img {
  height: 60px;
  display: block;
  margin: 0 auto;
}

.admin-box {
  background: #e3f2fd;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.10);
  border: 2px solid #1976d2;
  padding: 24px 20px;
  margin-bottom: 32px;
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.admin-box:hover {
  box-shadow: 0 8px 32px rgba(25, 118, 210, 0.18);
  border-color: #1565c0;
}

.card {
    padding: 18px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(66,133,244,0.07);
}

.card {
    background: #f5f8ff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(66,133,244,0.07);
  padding: 24px;
  margin-bottom: 24px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  box-shadow: 0 8px 32px rgba(25, 118, 210, 0.15);
  border-color: #1565c0;
}

.table {
  background: #e3f2fd;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
  border: 2px solid #1976d2;
}
.table th {
  background: #1976d2;
  color: #fff;
  font-weight: 700;
  border-bottom: 1px solid #1565c0;
}
.table th, .table td {
    padding: 8px 10px;
}
.table td {
  border-bottom: 1px solid #bbdefb;
  color: #0d47a1; /* ✅ TEXT TABLE MÀU XANH ĐẬM */
}

.btn-primary {
    background: #4285f4;
    border-color: #4285f4;
    font-weight: 700;
}

.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    font-weight: 700;
}

.btn-success {
  background: #43a047;
  border-color: #43a047;
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.08);
}
.btn-success:hover, .btn-success:focus {
  background: #388e3c;
  border-color: #388e3c;
  box-shadow: 0 4px 16px rgba(67, 160, 71, 0.15);
}

input, select, textarea {
  border-radius: 6px;
  border: 1px solid #e0e6ed;
  padding: 8px 12px;
  font-size: 15px;
  background: #fff;
  color: #0d47a1; /* ✅ TEXT INPUT MÀU XANH ĐẬM */
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: #1976d2;
  outline: none;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.10);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: #0d47a1; /* ✅ PLACEHOLDER MÀU XANH ĐẬM */
  opacity: 0.7;
  text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.bg-primary {
  background: #1976d2 !important;
  color: #fff !important;
}
.bg-danger {
  background: #e53935 !important;
  color: #fff !important;
}
.bg-success {
  background: #43a047 !important;
  color: #fff !important;
}
.text-primary {
  color: #1976d2 !important;
}
.text-danger {
  color: #e53935 !important;
}
.text-success {
  color: #43a047 !important;
}
.border-primary {
  border-color: #1976d2 !important;
}
.border-danger {
  border-color: #e53935 !important;
}
.border-success {
  border-color: #43a047 !important;
}

::-webkit-scrollbar {
  width: 8px;
  background: #e0e6ed;
}
::-webkit-scrollbar-thumb {
  background: #b0bec5;
  border-radius: 8px;
}

.user-avatar {
    background: #1976d2;
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.avatar-status {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 10px;
    height: 10px;
    background: #4caf50;
    border: 2px solid #fff;
    border-radius: 50%;
    display: block;
}
.avatar-online {
    position: relative;
}

/* Avatar user trong navbar */
.avatar {
    display: inline-block;
    position: relative;
}
.avatar img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #1976d2;
    background: #fff;
}
.avatar-online::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 10px;
    height: 10px;
    background: #4caf50;
    border: 2px solid #fff;
    border-radius: 50%;
    display: block;
}

/* Dropdown user */
.dropdown-user .dropdown-menu {
    min-width: 220px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(25, 118, 210, 0.10);
    border: 1px solid #e0e6ed;
    padding: 8px 0;
}
.dropdown-user .dropdown-item {
    padding: 12px 20px;
    font-size: 15px;
    color: #0d47a1; /* ✅ TEXT DROPDOWN MÀU XANH ĐẬM */
    transition: background 0.2s, color 0.2s;
}
.dropdown-user .dropdown-item:hover {
    background: #e3f2fd;
    color: #1976d2;
}
.dropdown-user .dropdown-divider {
    margin: 8px 0;
    border-top: 1px solid #e0e6ed;
}

/* User info trong dropdown */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-info .user-avatar {
    background: #1976d2;
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Navbar dropdown item: icon + text ngang hàng */
.dropdown-menu .dropdown-item.d-flex {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
}

.dropdown-menu .dropdown-item i {
    font-size: 18px;
    min-width: 22px;
    text-align: center;
}

.dropdown-menu .dropdown-item span {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.table, .card, .form-select, .btn, .sidebar .menu-item, .sidebar .menu-text {
    font-size: 11px !important;
}
.btn:hover, .btn:focus {
    filter: brightness(0.95);
    box-shadow: 0 2px 8px rgba(66,133,244,0.12);
}

.table tbody tr:hover {
    background: #eaf3ff;
    transition: background 0.2s;
}

.badge.bg-warning {
    color: #333 !important;
    background: #ffd700 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

img[alt="Logo"], img[alt="Icon"] {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Content area responsive fix */
.admin-content-full {
    width: calc(100vw - 225px);
    min-width: 0;
    max-width: 100%;
    margin-left: 0;
    padding: 0;
    transition: width 0.2s;
}

/* Responsive for tablets and small screens */
@media (max-width: 1200px) {
    .sidebar {
        width: 180px !important;
        min-width: 180px !important;
    }
    .admin-content-full {
        width: calc(100vw - 180px);
    }
}
@media (max-width: 992px) {
    .sidebar {
        width: 140px !important;
        min-width: 140px !important;
    }
    .admin-content-full {
        width: calc(100vw - 140px);
    }
}
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        left: 0;
        top: 80px;
        width: 100vw !important;
        min-width: 0 !important;
        height: auto;
        z-index: 100;
        box-shadow: 0 2px 12px rgba(66,133,244,0.08);
    }
    .admin-content-full {
        width: 100vw;
        margin-left: 0;
        padding-top: 120px;
    }
    #headerSettingForm {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    #headerSettingForm .form-control {
        min-width: 0 !important;
        flex: 1 1 100% !important;
    }
    #headerSettingForm .btn {
        width: 100%;
        margin-left: 0 !important;
    }
}
@media (max-width: 900px) {
    #headerSettingForm,
    .d-flex,
    .responsive-btn-group {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    #headerSettingForm .btn,
    .d-flex .btn,
    .responsive-btn-group .btn {
        width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        text-align: center !important;
        display: block !important;
    }
    #headerSettingForm .form-control,
    #headerSettingForm .btn {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    #headerSettingForm .d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
    }
}

/* ⭐ Toggle Section */
.sidebar-title-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.sidebar-title-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.sidebar-title-toggle span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
}

.toggle-icon {
    font-size: 14px;
    color: #fff;
    transition: transform 0.3s ease;
}

.sidebar-section-content {
    display: block;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Khi collapse, ẩn nội dung */
.sidebar-section-content[style*="display: none"] {
    max-height: 0;
}

/* ⭐ Cập nhật sidebar-title để không bị trùng */
.sidebar-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 10px 16px;
    color: #fff;
}

/* ==================== COLOR SWATCH DISPLAY ==================== */
.color-swatch-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-swatch {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.color-swatch-container .badge {
    background: #f5f5f5 !important;
    color: #0d47a1 !important; /* ✅ MÃ MÀU XANH ĐẬM */
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-family: 'Courier New', monospace !important;
    border: 1px solid #e0e0e0 !important;
}

/* ==================== TEXT COLOR - XANH ĐẬM CHO CONTENT ==================== */
label:not(.text-white):not(.text-danger):not(.text-success) {
    color: #0d47a1 !important;
}

small {
    color: #0d47a1 !important;
}

.text-muted {
    color: #0d47a1 !important;
    opacity: 0.8;
}

/* ⭐ GIỮ SIDEBAR HOÀN TOÀN TRẮNG */
.sidebar,
.sidebar *,
.sidebar .menu-item,
.sidebar .menu-text,
.sidebar .menu-icon,
.sidebar-title,
.sidebar-subtitle-block,
.sidebar-title-toggle,
.sidebar-title-toggle span,
.toggle-icon {
    color: #fff !important;
}

/* ⭐ GIỮ HEADER VÀ FOOTER TRẮNG */
.admin-header,
.admin-header *,
.footer,
.footer * {
    color: #fff !important;
}