/* =============================================================================
   NGZ DASHBOARD - LIQUID GLASSMORPHISM (macOS / CasaOS style)
   - Nền tối, kính mờ backdrop-filter: blur(16px)
   - Vòng tròn CPU/RAM bằng conic-gradient
   - Cửa sổ nổi kiểu macOS với nút traffic-light
   ========================================================================== */

/* ----------------------------- Biến chủ đề ------------------------------- */
:root {
  /* Chủ đề XANH MATCHA trên nền tối ngả xanh rêu (đã tăng độ sáng) */
  --bg-1: #121d16;
  --bg-2: #23392c;

  --accent: #a6c98b;    /* matcha */
  --accent-2: #63b3a1;  /* xanh ngọc trầm */
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;

  --text-1: #eef2ff;
  --text-2: rgba(238, 242, 255, 0.65);
  --text-3: rgba(238, 242, 255, 0.4);

  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-bg-strong: rgba(30, 48, 38, 0.8);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);

  --radius: 18px;
  --topbar-h: 46px;
}

/* ------------------------------- Reset gọn ------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-1);
  color: var(--text-1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.hidden {
  display: none !important;
}

/* --------------------------- Hình nền gradient --------------------------- */
.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 700px at 15% -10%, rgba(166, 201, 139, 0.3), transparent 60%),
    radial-gradient(900px 650px at 90% 20%, rgba(99, 179, 161, 0.26), transparent 55%),
    radial-gradient(800px 700px at 50% 110%, rgba(52, 211, 153, 0.18), transparent 60%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

/* --------------------------- Hiệu ứng kính mờ ---------------------------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

/* =========================================================================
   TOP BAR (macOS style)
   ========================================================================= */
.topbar {
  position: fixed;
  top: 10px;
  left: 12px;
  right: 12px;
  height: var(--topbar-h);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-radius: 14px;
}

.topbar-logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.topbar-logo em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-2);
}

/* Logo NGZ OS dạng ảnh (icons/NGZOS.png) - nhỏ gọn trong top bar */
.topbar-logo-img {
  display: block;
  height: 20px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.topbar-btn-icon {
  height: 15px;
  width: 15px;
  object-fit: contain;
  vertical-align: -3px;
  border-radius: 4px;
}

.topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  font-size: 13.5px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text-1);
  transition: background 0.18s ease;
}

.topbar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Menu tài khoản */
.account-menu {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  padding: 8px;
  background: var(--glass-bg-strong);
  z-index: 600;
}

.dropdown-user {
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-2);
}

.dropdown-sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--glass-border);
}

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-item.danger {
  color: var(--danger);
}

/* =========================================================================
   BỐ CỤC CHÍNH
   ========================================================================= */
.layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 22px;
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 32px) 24px 80px;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   CỘT TRÁI - WIDGETS
   ========================================================================= */
.widgets-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.widget {
  padding: 18px 20px;
}

.widget-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin-bottom: 14px;
}

/* ----- Widget Đồng hồ ----- */
.clock-widget {
  text-align: center;
  padding: 24px 20px;
}

.clock-time {
  font-size: 44px;
  font-weight: 200;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.clock-date {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 14px;
  text-transform: capitalize;
}

/* ----- Widget System: vòng tròn conic-gradient ----- */
.rings {
  display: flex;
  justify-content: space-around;
  gap: 12px;
}

/* Arc-gauge: vòng hở đáy 270°, đầu bo tròn, kim xanh matcha */
.gauge-box {
  position: relative;
  width: 118px;
  text-align: center;
}

.gauge {
  display: block;
  width: 118px;
  height: 118px;
}

.gauge-track,
.gauge-fill {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
}

.gauge-track {
  stroke: rgba(255, 255, 255, 0.16);
}

.gauge-fill {
  stroke: var(--ok);
  stroke-dasharray: 216.8;
  stroke-dashoffset: 216.8; /* JS tween về giá trị thật */
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.35));
}

.gauge-center {
  position: absolute;
  top: 0;
  left: 0;
  width: 118px;
  height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  pointer-events: none;
}

.gauge-value {
  font-size: 23px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.gauge-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gauge-sub {
  margin-top: -8px;
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* ----- Biểu đồ mạng ----- */
.net-box {
  margin-top: 16px;
  padding: 10px 12px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.net-box canvas {
  display: block;
  width: 100%;
  height: 66px;
}

.net-text {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.net-down {
  color: var(--accent);
  font-weight: 600;
}

.net-up {
  color: var(--accent-2);
  font-weight: 600;
}

.sys-meta {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  border-top: 1px solid var(--glass-border);
  padding-top: 10px;
  word-break: break-word;
}

/* ----- Widget Storage: danh sách ổ cứng cuộn ----- */
.disk-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}

.disk-list::-webkit-scrollbar {
  width: 6px;
}

.disk-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.disk-loading {
  color: var(--text-3);
  font-size: 13px;
  padding: 8px 0;
}

.disk-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.disk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.disk-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disk-health {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.disk-health.healthy {
  color: var(--ok);
  background: rgba(52, 211, 153, 0.14);
}

.disk-health.failing {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.16);
}

.disk-health.unknown {
  color: var(--warn);
  background: rgba(251, 191, 36, 0.14);
}

/* Thanh dung lượng ngang */
.disk-bar {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.disk-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.7s ease;
}

.disk-bar-fill.hot {
  background: linear-gradient(90deg, var(--warn), var(--danger));
}

.disk-meta {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* =========================================================================
   CỘT PHẢI - APP GRID
   ========================================================================= */
.apps-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-1);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}

.app-icon {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
  transition: transform 0.18s ease, background 0.18s ease;
}

.app-icon:hover {
  transform: translateY(-4px) scale(1.02);
  background: rgba(255, 255, 255, 0.1);
}

.app-icon:active {
  transform: scale(0.97);
}

.app-emoji {
  font-size: 50px;
  line-height: 56px; /* cùng chiều cao với .app-img để lưới đều nhau */
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}

/* Icon ứng dụng dạng ảnh PNG - kích thước đồng bộ 56px */
.app-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}

/* Icon nhỏ trên thanh tiêu đề cửa sổ */
.window-title-icon {
  height: 15px;
  width: 15px;
  object-fit: contain;
  vertical-align: -2px;
}

.app-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.35;
}

/* =========================================================================
   CỬA SỔ NỔI (WINDOW MODAL) KIỂU MACOS
   ========================================================================= */
.window {
  position: fixed;
  z-index: 700;
  width: min(1020px, 94vw);
  height: min(660px, 84vh);
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: windowIn 0.22s ease;
}

.window.maximized {
  width: calc(100vw - 24px);
  height: calc(100vh - var(--topbar-h) - 34px);
  left: 50% !important;
  top: calc(50% + (var(--topbar-h) + 10px) / 2) !important;
  transform: translate(-50%, -50%) !important;
}

@keyframes windowIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--glass-border);
  cursor: move;
  user-select: none;
}

.traffic-lights {
  display: flex;
  gap: 7px;
}

.traffic {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  padding: 0;
  transition: filter 0.15s ease;
}

.traffic:hover {
  filter: brightness(1.25);
}

.traffic.close {
  background: #ff5f57;
}

.traffic.min {
  background: #febc2e;
}

.traffic.max {
  background: #28c840;
}

.window-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Chừa chỗ 2 bên để tiêu đề luôn giữa */
  margin-right: 52px;
}

.window-body {
  flex: 1;
  overflow: auto;
  position: relative;
}

.window-body iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0e1a14;
}

/* Nội dung dạng thông tin (FTP, Cài đặt) */
.window-content {
  padding: 26px 30px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-1);
}

.window-content h4 {
  font-size: 15px;
  margin-bottom: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px 16px;
  margin: 14px 0;
  font-variant-numeric: tabular-nums;
}

.info-grid dt {
  color: var(--text-2);
}

.info-grid dd {
  font-weight: 600;
  word-break: break-all;
}

.info-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(166, 201, 139, 0.1);
  border: 1px solid rgba(166, 201, 139, 0.25);
  font-size: 13px;
  color: var(--text-2);
}

/* =========================================================================
   DISK MANAGER (Quản lý ổ cứng)
   ========================================================================= */
.dm {
  padding-bottom: 34px;
}

.dm-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dm-disk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.dm-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.dm-badge.protected {
  color: var(--warn);
  background: rgba(251, 191, 36, 0.14);
}

.dm-badge.ok {
  color: var(--ok);
  background: rgba(52, 211, 153, 0.14);
}

.dm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.dm-path {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--accent);
}

.dm-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.dm-input,
.dm-select {
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  outline: none;
  width: 140px;
}

.dm-input:focus,
.dm-select:focus {
  border-color: var(--accent);
}

.dm-select option {
  background: #23392c;
  color: var(--text-1);
}

.dm-btn {
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  color: var(--text-1);
  background: rgba(166, 201, 139, 0.18);
  border: 1px solid rgba(166, 201, 139, 0.35);
  transition: background 0.15s ease;
}

.dm-btn:hover {
  background: rgba(166, 201, 139, 0.3);
}

.dm-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-1);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow-x: auto;
  max-width: 100%;
}

.dm-btn.danger {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.35);
}

.dm-btn.danger:hover {
  background: rgba(248, 113, 113, 0.28);
}

.dm-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.dm-form {
  border-top: 1px dashed var(--glass-border);
  background: transparent;
  padding-top: 12px;
}

.dm-form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.dm-section-title {
  margin-top: 24px;
  font-size: 15px;
  font-weight: 700;
}

.dm-muted {
  color: var(--text-3);
  font-size: 12px;
}

.dm-empty {
  margin-top: 10px;
  line-height: 1.6;
}

.dm-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.dm-check:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dm-check input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}

/* =========================================================================
   THIS PC (Tệp hệ thống) - thẻ ổ đĩa kiểu Windows
   ========================================================================= */
.pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.pc-card {
  padding: 16px 16px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.pc-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.09);
}

.pc-card:active {
  transform: scale(0.98);
}

.pc-card.offline {
  opacity: 0.55;
}

.pc-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 8px;
}

/* Icon ổ đĩa dạng ảnh (drive.png / system.png) */
.pc-icon-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.pc-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-mount {
  font-size: 11.5px;
  color: var(--text-3);
  margin: 2px 0 9px;
  word-break: break-all;
}

.pc-meta {
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* Thanh công cụ khi duyệt bên trong 1 ổ */
.pc-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}

.pc-bar-label {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-frame {
  flex: 1 1 auto;
  min-height: 0;
}

.pc-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0e1a14;
}

/* =========================================================================
   NGZ CHILLY - thư viện phim + trình phát
   ========================================================================= */
.chilly-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.chilly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.chilly-card {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.chilly-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
}

.chilly-card.disabled {
  opacity: 0.55;
  cursor: default;
}

.chilly-card.disabled:hover {
  transform: none;
}

.chilly-thumb {
  height: 96px;
  display: grid;
  place-items: center;
  font-size: 40px;
  background: linear-gradient(135deg, rgba(166, 201, 139, 0.25), rgba(99, 179, 161, 0.2));
}

.chilly-title {
  padding: 9px 11px 4px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chilly-status {
  padding: 0 11px 10px;
  font-size: 11px;
}

.chilly-status.ready { color: var(--ok); }
.chilly-status.proc { color: var(--warn); }
.chilly-status.error { color: var(--danger); }

.chilly-player {
  flex: 1 1 auto;
  min-height: 0;
  background: #000;
  display: grid;
  place-items: center;
}

.chilly-player video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  background: #000;
}

/* =========================================================================
   TRANG ĐĂNG NHẬP
   ========================================================================= */
.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-wrap {
  width: 100%;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(400px, 100%);
  padding: 40px 36px 30px;
  text-align: center;
}

.login-logo {
  font-size: 44px;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(166, 201, 139, 0.6);
}

.login-title {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 700;
}

.login-sub {
  margin: 6px 0 26px;
  color: var(--text-2);
  font-size: 13.5px;
}

.field {
  text-align: left;
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14.5px;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  border-radius: 11px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(166, 201, 139, 0.2);
}

.btn-primary {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 11px;
  transition: filter 0.18s ease, transform 0.12s ease;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.login-error {
  margin: 4px 0 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--danger);
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 10px;
  text-align: left;
}

.login-note {
  margin-top: 22px;
  font-size: 11.5px;
  color: var(--text-3);
}

/* =========================================================================
   CHỮ HIỆU GÓC DƯỚI TRÁI + LOGO TÙY CHỈNH GÓC DƯỚI PHẢI (opacity 0.6) + TOAST
   ========================================================================= */
.brand-logo {
  position: fixed;
  left: 24px;
  bottom: 16px;
  z-index: 400;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-1);
  opacity: 0.6;
  pointer-events: none;
}

/* Logo do người dùng upload (Cài đặt) - hiển thị trên mọi thiết bị */
.brand-image {
  position: fixed;
  right: 24px;
  bottom: 14px;
  z-index: 400;
  max-height: 48px;
  max-width: 170px;
  opacity: 0.6;
  border-radius: 8px;
  pointer-events: none;
  object-fit: contain;
}

.toast {
  position: fixed;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  padding: 11px 20px;
  font-size: 13.5px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
