/* Giao dien khu vuc /quanly - gon, huong cong cu noi bo, dung chung token
   mau/font voi style.css (bien --do-son, --giay... da khai bao o do). */

.ql-body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--giay, #faf5ea);
  margin: 0;
}

.ql-shell { display: flex; min-height: 100vh; }

.ql-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--muc, #241a16);
  color: #f2ece3;
  display: flex;
  flex-direction: column;
  padding: 22px 0;
}

.ql-logo {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 12px;
}

.ql-menu { display: flex; flex-direction: column; flex: 1; }

.ql-menu-item {
  padding: 11px 22px;
  color: rgba(242,236,227,0.75);
  font-size: 0.92rem;
  border-left: 3px solid transparent;
}

.ql-menu-item:hover { background: rgba(255,255,255,0.05); color: #fff; }

.ql-menu-item.active {
  background: rgba(166,25,46,0.25);
  border-left-color: var(--do-son, #a6192e);
  color: #fff;
  font-weight: 600;
}

.ql-menu-item-web {
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 13px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  opacity: 0.85;
}

.ql-dang-xuat {
  padding: 16px 22px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 12px;
}

.ql-nguoi-dung { font-size: 0.82rem; color: rgba(242,236,227,0.6); margin-bottom: 8px; }

.ql-link-nho {
  background: none;
  border: none;
  color: #f2ece3;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}

.ql-main { flex: 1; min-width: 0; }
.ql-main-inner { max-width: 1600px; padding: 32px 40px 60px; }

.ql-main-inner h1 { font-size: 1.5rem; margin-bottom: 20px; }

.ql-card {
  background: var(--tram, #fff);
  border: 1px solid var(--vien, #e6d9c2);
  border-radius: var(--bo-tron-lon, 5px);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.ql-card h2 { font-size: 1.05rem; margin-bottom: 12px; }
.ql-card-hep { max-width: 520px; }

.ql-thong-ke-hang { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.ql-stat {
  flex: 1;
  min-width: 130px;
  text-align: center;
  padding: 18px 10px;
  background: var(--tram, #fff);
  border: 1px solid var(--vien, #e6d9c2);
  border-radius: var(--bo-tron-lon, 5px);
  font-size: 0.85rem;
  color: var(--muc-nhat, #7a6a5c);
  display: block;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.ql-stat:hover { border-color: var(--do-son, #a6192e); transform: translateY(-2px); }
.ql-stat-so { font-family: 'Be Vietnam Pro', sans-serif; font-size: 1.7rem; font-weight: 700; color: var(--do-son, #a6192e); }

.ql-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.ql-tab {
  padding: 9px 16px;
  border: 1px solid var(--vien, #e6d9c2);
  border-radius: var(--bo-tron, 3px) var(--bo-tron, 3px) 0 0;
  font-size: 0.88rem;
  background: var(--giay-dam, #f3ead9);
  color: var(--muc-nhat, #7a6a5c);
}
.ql-tab.active { background: var(--tram, #fff); color: var(--muc, #241a16); font-weight: 600; border-bottom-color: var(--tram, #fff); }
.ql-tab-so { color: inherit; opacity: 0.65; }

.ql-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--muc-nhat, #7a6a5c);
  margin-bottom: 14px;
}

.ql-form input,
.ql-form select,
.ql-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--vien, #e6d9c2);
  border-radius: var(--bo-tron, 3px);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--giay, #faf5ea);
}

.ql-form-hang { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.ql-form-hang label { min-width: 150px; margin-bottom: 0; }

.ql-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--vien, #e6d9c2);
  border-radius: var(--bo-tron, 3px);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  background: var(--giay, #faf5ea);
  resize: vertical;
}

.ql-fieldset {
  border: 1px solid var(--vien, #e6d9c2);
  border-radius: var(--bo-tron, 3px);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.ql-fieldset legend {
  font-size: 0.8rem;
  color: var(--muc-nhat, #7a6a5c);
  padding: 0 6px;
}
.ql-checkbox {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  margin-right: 16px;
  margin-bottom: 6px;
  color: var(--muc, #241a16);
}
.ql-checkbox input { width: auto; }
.ql-chon-tat-ca {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ql-xoa-theo-loc {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #fbeaec;
  border: 1px solid rgba(166,25,46,0.3);
  border-radius: var(--bo-tron, 3px);
}
.btn-nguy-hiem {
  color: var(--do-son-dam, #7e0f21);
  border-color: var(--do-son-dam, #7e0f21);
  font-weight: 600;
}
.btn-nguy-hiem:hover { background: var(--do-son-dam, #7e0f21); color: #fff; }

/* ---------- Trang dang nhap / doi mat khau ---------- */
.ql-dang-nhap-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ql-dang-nhap-form {
  background: var(--tram, #fff);
  border: 1px solid var(--vien, #e6d9c2);
  border-radius: var(--bo-tron-lon, 5px);
  padding: 36px 34px;
  width: 100%;
  max-width: 380px;
}

.ql-dang-nhap-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
}

.ql-dang-nhap-logo .logo-chu {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--muc, #241a16);
}

.ql-dang-nhap-form h1 { font-size: 1.25rem; margin-bottom: 16px; }

.ql-dang-nhap-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--muc-nhat, #7a6a5c);
  margin-bottom: 16px;
}

.ql-dang-nhap-form input {
  padding: 11px 13px;
  border: 1px solid var(--vien, #e6d9c2);
  border-radius: var(--bo-tron, 3px);
  font-size: 0.95rem;
  font-family: inherit;
}

/* ---------- Luoi the sim (man hinh Quan ly sim) ---------- */
/* Dung flexbox-wrap thay vi CSS grid: tuong thich rong hon (ke ca trinh
   duyet/engine cu), van cho hieu ung nhieu the tren 1 hang giong nhau. */
.ql-sim-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ql-sim-card {
  display: block;
  position: relative;
  flex: 1 1 220px;
  max-width: 280px;
  background: var(--giay, #faf5ea);
  border: 1px solid var(--vien, #e6d9c2);
  border-radius: var(--bo-tron, 3px);
  padding: 12px 14px 38px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.ql-sim-card:has(.chon-sim:checked) {
  border-color: var(--do-son, #a6192e);
  background: rgba(166,25,46,0.05);
}
.ql-sim-card .chon-sim { position: absolute; top: 12px; right: 12px; width: auto; }

.ql-sim-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
  padding-right: 22px;
}
.ql-sim-card-so {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  word-break: break-word;
}

.ql-tag-trang-thai {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--giay-dam, #f3ead9);
  color: var(--muc-nhat, #7a6a5c);
}
.trang-thai-con-hang { background: rgba(63,125,74,0.14); color: #3f7d4a; }
.trang-thai-da-ban { background: rgba(166,25,46,0.12); color: var(--do-son-dam, #7e0f21); }
.trang-thai-dang-coc { background: rgba(169,120,31,0.16); color: #a9781f; }

.ql-sim-card-meta {
  display: flex;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muc-nhat, #7a6a5c);
  margin-bottom: 6px;
}
.ql-sim-card-meta span:not(:last-child) { margin-right: 8px; }

.ql-sim-card-gia {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  color: var(--do-son, #a6192e);
  font-size: 0.95rem;
}

.ql-sim-card-nguon {
  font-size: 0.72rem;
  color: var(--muc-nhat, #7a6a5c);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ql-sim-card-sua {
  position: absolute;
  bottom: 10px;
  left: 14px;
  font-size: 0.78rem;
}

@media (max-width: 720px) {
  .ql-shell { flex-direction: column; }
  .ql-sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 12px; align-items: center; }
  .ql-logo { display: none; }
  .ql-menu { flex-direction: row; }
  .ql-menu-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .ql-menu-item.active { border-left-color: transparent; border-bottom-color: var(--do-son, #a6192e); }
  .ql-dang-xuat { border-top: none; margin-top: 0; padding: 0 0 0 12px; display: flex; align-items: center; gap: 8px; }
  .ql-nguoi-dung { margin-bottom: 0; white-space: nowrap; }
  .ql-main-inner { padding: 22px 18px 50px; }
}
