/* tai-khoan.css — portal tài khoản, palette MIMIR (xanh #2979FF) */
* { box-sizing: border-box; margin: 0; }
:root {
  --accent: #2979ff;
  --bg: #f7f8fa;
  --surface: #fff;
  --text: #1f2123;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #d93025;
  --ok: #137333;
}
html, body { height: 100%; }
body {
  font-family: 'Google Sans Flex', system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  display: flex; flex-direction: column;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; letter-spacing: .5px; }
.brand img { border-radius: 8px; }
.topnav { display: flex; gap: 18px; align-items: center; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.topnav a:hover { color: var(--text); }

.wrap { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 48px 20px; gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px; max-width: 560px; width: 100%;
}
.center { text-align: center; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; margin-top: 18px; }
h1 { font-size: 26px; font-weight: 600; }
h2 { font-size: 20px; }
.sect { margin: 8px 0 14px; font-size: 16px; font-weight: 600; }

.actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; border: 1px solid var(--border);
  font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer;
  text-decoration: none; color: var(--text); background: var(--surface);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: #f3c0ba; }
.btn.sm { padding: 8px 14px; font-size: 13.5px; }

.spin {
  width: 34px; height: 34px; margin: 12px auto;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: sp .8s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

.profile { display: flex; gap: 18px; align-items: center; max-width: 760px; }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff; font-size: 26px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.pinfo { flex: 1; min-width: 0; }
.pinfo h2 { margin-bottom: 2px; }
.pactions { display: flex; flex-direction: column; gap: 8px; }
.badges { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.badge {
  font-size: 12px; padding: 3px 10px; border-radius: 20px;
  background: #eef2f7; color: var(--muted); border: 1px solid var(--border);
}
.badge.ok { background: #e6f4ea; color: var(--ok); border-color: #b7e0c4; }
.badge.warn { background: #fef7e0; color: #b06000; border-color: #f0d89a; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px; width: 100%; max-width: 760px;
}
.app {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; text-decoration: none; color: var(--text);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s;
}
.app:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(41,121,255,.12); border-color: var(--accent); }
.achu {
  width: 38px; height: 38px; border-radius: 10px;
  background: #e8f0fe; color: var(--accent); font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.aten { font-weight: 600; font-size: 15px; margin-top: 4px; }
.ades { font-size: 12.5px; color: var(--muted); }

/* ---- portal tabs ---- */
.wide { width: 100%; max-width: 860px; display: flex; flex-direction: column; gap: 18px; }
.tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--border);
  overflow-x: auto; margin-top: 4px;
}
.tabs a {
  padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--muted);
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabpane { display: flex; flex-direction: column; gap: 14px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px;
}
.item .il { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.item .ir { display: flex; gap: 8px; flex-shrink: 0; }
.item .roles { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }

.card.slim { padding: 20px; max-width: none; }
.card.slim h4 { font-size: 15px; margin-bottom: 10px; }
.card.slim input, .card.slim select, .formrow input, .formrow select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; font-size: 14px; background: var(--surface);
}
.card.slim input { margin-bottom: 10px; }
.formrow { display: flex; gap: 10px; margin-bottom: 10px; }
.formrow > * { flex: 1; }
.rolearray { margin-bottom: 10px; }

.rowhead { display: flex; align-items: center; justify-content: space-between; }
.actions.left { justify-content: flex-start; margin-top: 4px; }
.errline {
  color: var(--danger); font-size: 13.5px; padding: 10px 14px;
  background: #fcecea; border: 1px solid #f3c0ba; border-radius: 10px;
}
.danger-zone { border-color: #f3c0ba; }
.danger-zone h4 { color: var(--danger); }

@media (max-width: 620px) {
  .profile { flex-direction: column; text-align: center; }
  .pactions { flex-direction: row; }
  .formrow { flex-direction: column; }
  .item { flex-direction: column; align-items: flex-start; }
}
