/* common.css */
:root { --bg:#f8fafc; --card:#ffffff; --border:#e2e8f0; --text:#1e293b; --muted:#64748b; --accent1:#2563eb; --accent2:#9333ea; --shadow:rgba(0,0,0,0.06); }
* { box-sizing:border-box; font-family:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
body { margin:0; background:var(--bg); color:var(--text); display:flex; justify-content:center; align-items:center; height:100vh; padding:16px; }
body.phone-page { display:block; height:auto; padding:24px; background:var(--bg); }
h1 { font-size:20px; margin:0 0 8px; }
p { margin:0; }
p.lead { color:var(--muted); margin-bottom:18px; font-size:14px; }
.right { float:right; }
@media(max-width:600px) { form { flex-direction:column; } button.search-btn { width:100%; } }

/*Css cho menu top*/
.menu-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.menu-left strong { font-size:16px; color:var(--accent1); }
.menu-right .menu-btn { background:var(--accent1); color:#fff; border:none; padding:6px 12px; border-radius:4px; cursor:pointer; font-size:14px; margin-left:8px; }
.menu-right .menu-btn:hover { background:var(--accent2); }

/*Popup Login*/
.unit-detail-popup { position: fixed; inset: 0; width: 100%; height: 100%; display: none; align-items: center; justify-content: center; z-index: 9999; backdrop-filter: blur(3px); }
.unit-detail-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); transition: opacity 0.3s ease; }
.unit-detail-content-wrapper { position: relative; background: #fff; border-radius: 14px; width: 460px; max-width: 92%; z-index: 10000; box-shadow: 0 10px 25px rgba(0,0,0,0.25); animation: popupFadeIn 0.3s ease; overflow: hidden; font-family: "Segoe UI", Arial, sans-serif; }
.unit-detail-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: linear-gradient(90deg,var(--accent1),var(--accent2)); color: #fff; font-size: 18px; font-weight: 600; letter-spacing: 0.3px; }
.close-btn { font-size: 26px; color: #fff; cursor: pointer; transition: 0.25s ease; }
.close-btn:hover { color: #ffdddd; transform: scale(1.1); }
.unit-detail-content { padding: 20px 12px; background: #fafafa; font-size: 15px; color: #333; line-height: 1.6; max-height: 70vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ccc #f5f5f5; }
.unit-detail-content::-webkit-scrollbar { width: 8px; }
.unit-detail-content::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 6px; }
.unit-detail-content::-webkit-scrollbar-thumb:hover { background: #b5b5b5; }
.unit-detail-content strong { display: block; font-size: 17px; color: #2c3e50; margin-bottom: 8px; }
.unit-detail-content div { margin-bottom: 6px; }
.unit-detail-content hr { margin: 16px 0; border: none; border-top: 1px dashed #ccc; }
#togglePass{position:absolute; right:10px; top:50%; transform:translateY(-50%);cursor:pointer; font-size:16px;}

/* Input login */
.login-input { width:100%; padding:10px 12px; margin:6px 0; border:1px solid var(--border); border-radius:8px; font-size:14px; transition:0.2s; }
.login-input:focus { border-color:var(--accent1); outline:none; box-shadow:0 0 0 2px rgba(37,99,235,0.2); }

/* Nút login */
#loginSubmit {
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  border: none;
  color: #fff;
  font-size: 15px; /* 👈 tăng nhẹ cho mobile */
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 12px;
  box-shadow: 0 4px 8px rgba(79,70,229,0.25);
  letter-spacing: 0.2px; /* 👌 cân đối text */
}

#loginSubmit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(79,70,229,0.35);
}

#loginSubmit:active {
  transform: translateY(0); /* 👈 nhấn xuống nhẹ */
  box-shadow: 0 3px 6px rgba(79,70,229,0.25);
  opacity: 0.95;
}


/* === Input + Clear Button === */
.input-wrapper {
  position: relative;
}
/* === Nút xoá tối giản kiểu Notion/Jotion === */
.clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: #9ca3af; /* xám nhạt */
  cursor: pointer;
  display: none;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.clear-btn:hover {
  color: #4b5563; /* xám đậm hơn khi hover */
}


/* === Nút đăng nhập với Google === */
.googleBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background-color: #fff;
  color: #444;
  border: 1px solid #dadce0;
  border-radius: 10px;
  font-weight: 600;
  padding: 10px 0;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.googleBtn:hover {
  background-color: #f8f9fa;
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

.google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  color: #fff;
  background: #4285F4; /* xanh Google */
  width: 26px;
  height: 26px;
  border-radius: 4px;
  flex-shrink: 0;
  font-family: 'Arial', sans-serif;
}

.googleBtn span:last-child {
  font-size: 15px;
  color: #202124;
}


/* === Gợi ý tạo tài khoản mới sau khi login fail === */
.signup-suggestion {
  text-align: center;
  margin-top: 12px;
}

.signup-or {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

/* === Nút tạo tài khoản mới === */
.signup-button {
  width: 100%;
  padding: 11px 0;
  background: linear-gradient(135deg, #10b981, #22c55e);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 8px rgba(16,185,129,0.25);
  font-size: 15px;
}

.signup-button:hover {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(16,185,129,0.35);
}

.signup-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(16,185,129,0.25);
}
