:root {
  --bg: #eef1f4;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --ink: #1c2430;
  --muted: #6b7785;
  --line: rgba(28, 36, 48, 0.08);
  --shadow: 0 10px 30px rgba(28, 36, 48, 0.06);
  --lime: #d7f071;
  --teal: #9fe3d8;
  --coral: #f3b7b0;
  --charcoal: #222831;
  --radius: 22px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 10% -10%, #f7fbf2 0%, transparent 55%),
    radial-gradient(700px 420px at 90% 0%, #e8f7f4 0%, transparent 50%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
  min-height: 100vh;
  gap: 0;
}

/* Sidebar */
.sidebar {
  padding: 1.25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(10px);
}
.logo {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.35rem 0.4rem;
}
.logo-mark {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--charcoal); color: white;
  font-family: "Sora", sans-serif; font-weight: 700; font-size: 0.85rem;
}
.logo-text {
  font-family: "Sora", sans-serif; font-weight: 700; font-size: 1.05rem;
}
.nav-group { display: flex; flex-direction: column; gap: 0.25rem; }
.nav-label {
  margin: 0.4rem 0.75rem 0.35rem;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.7rem 0.85rem; border-radius: 999px;
  color: var(--muted); font-weight: 600; font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: rgba(255,255,255,0.7); color: var(--ink); }
.nav-item.active {
  background: var(--charcoal); color: #fff;
  box-shadow: var(--shadow);
}
.nav-item .ico { width: 1.1rem; text-align: center; opacity: 0.9; }
.badge {
  margin-left: auto;
  background: var(--lime); color: var(--charcoal);
  font-style: normal; font-size: 0.72rem; font-weight: 800;
  min-width: 1.35rem; height: 1.35rem; border-radius: 999px;
  display: grid; place-items: center; padding: 0 0.35rem;
}
.nav-item.active .badge { background: var(--lime); }
.nav-meta {
  margin: 0.35rem 0.85rem; font-size: 0.8rem; color: var(--muted);
}

.user-card {
  margin-top: auto;
  background: var(--panel-solid);
  border-radius: 20px;
  padding: 0.85rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 0.7rem;
  align-items: center;
}
.avatar {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(145deg, var(--teal), #6ec4b8);
  display: grid; place-items: center; font-weight: 800;
  color: #10352f;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta strong { font-size: 0.9rem; }
.user-meta span { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-actions {
  grid-column: 1 / -1;
  display: flex; gap: 0.4rem;
}
.user-actions a {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--bg); font-size: 0.95rem;
}

/* Main */
.main { padding: 1rem 1.25rem 2rem; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem;
}
.search {
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 0.55rem;
  background: var(--panel-solid);
  border-radius: 999px;
  padding: 0.55rem 0.75rem 0.55rem 1rem;
  box-shadow: var(--shadow);
}
.search input {
  border: 0; outline: 0; background: transparent; flex: 1;
  color: var(--ink);
}
.search-ico { color: var(--muted); font-size: 0.85rem; }
.mic-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg);
}
.top-right { display: flex; align-items: center; gap: 0.55rem; }
.pill-status {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--panel-solid); border-radius: 999px;
  padding: 0.45rem 0.8rem; font-size: 0.82rem; font-weight: 600;
  box-shadow: var(--shadow); color: var(--muted);
}
.pill-status i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3ecf8e; box-shadow: 0 0 0 3px rgba(62,207,142,0.2);
}
.storage-chip {
  background: var(--charcoal); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  border-radius: 999px; padding: 0.45rem 0.7rem;
}

.content { animation: rise 0.45s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.page-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700; margin: 0 0 1rem; letter-spacing: -0.03em;
}

.profile-card {
  background: var(--panel-solid);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  margin-bottom: 1.1rem;
}
.profile-card .hero-av {
  width: 72px; height: 72px; border-radius: 22px;
  background: linear-gradient(145deg, #f0d5a8, #e8b86d);
  display: grid; place-items: center;
  font-family: "Sora", sans-serif; font-weight: 700; font-size: 1.4rem;
}
.profile-card h2 {
  font-family: "Sora", sans-serif; margin: 0 0 0.25rem;
  font-size: 1.35rem; letter-spacing: -0.02em;
}
.profile-card .meta { color: var(--muted); font-size: 0.9rem; margin: 0; }
.metrics {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
  border-top: 1px solid var(--line); padding-top: 0.9rem;
}
.metric strong { display: block; font-size: 1.25rem; font-family: "Sora", sans-serif; }
.metric span { color: var(--muted); font-size: 0.8rem; }
.metric:nth-child(1) strong { border-bottom: 3px solid var(--lime); display: inline-block; }
.metric:nth-child(2) strong { border-bottom: 3px solid var(--teal); display: inline-block; }
.metric:nth-child(3) strong { border-bottom: 3px solid var(--coral); display: inline-block; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 1.35rem 0 0.75rem;
}
.section-head h3 {
  margin: 0; font-family: "Sora", sans-serif; font-size: 1.05rem;
}

.summary-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem;
}
.summary-card {
  border-radius: 20px; padding: 1.1rem 1.15rem;
  min-height: 120px; position: relative;
  box-shadow: var(--shadow);
}
.summary-card.lime { background: var(--lime); }
.summary-card.teal { background: var(--teal); }
.summary-card.coral { background: var(--coral); }
.summary-card .label { font-size: 0.85rem; font-weight: 600; opacity: 0.75; }
.summary-card .value {
  font-family: "Sora", sans-serif; font-size: 2.2rem; font-weight: 700;
  margin: 0.35rem 0 0.15rem; letter-spacing: -0.03em;
}
.summary-card .sub { font-size: 0.78rem; opacity: 0.7; }
.summary-card .expand {
  position: absolute; right: 0.9rem; top: 0.9rem;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.45); display: grid; place-items: center;
  font-size: 0.85rem;
}

.object-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem;
}
.object-card {
  background: var(--panel-solid);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 0.15s ease;
}
.object-card:hover { transform: translateY(-2px); }
.object-card .thumb {
  height: 110px;
  background:
    linear-gradient(135deg, rgba(28,36,48,0.08), transparent),
    radial-gradient(circle at 30% 40%, #c8e7e1, #eef1f4 60%);
  display: grid; place-items: center;
  font-size: 2rem;
}
.object-card .thumb.pending { background: linear-gradient(145deg, #fff6d6, #f0e4b0); }
.object-card .body { padding: 0.9rem 1rem 1.05rem; }
.object-card .tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--bg); border-radius: 999px; padding: 0.2rem 0.55rem;
  color: var(--muted); margin-bottom: 0.4rem;
}
.object-card h4 {
  margin: 0 0 0.3rem; font-family: "Sora", sans-serif;
  font-size: 1rem; line-height: 1.3;
}
.object-card p { margin: 0; color: var(--muted); font-size: 0.85rem; }

/* Feed */
.feed {
  border-left: 1px solid var(--line);
  padding: 1.15rem 1rem 1.5rem;
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
}
.feed-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.feed-head strong { font-family: "Sora", sans-serif; }
.online {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; color: var(--muted); font-weight: 600;
}
.online i {
  width: 7px; height: 7px; border-radius: 50%; background: #3ecf8e;
}
.feed-list { display: flex; flex-direction: column; gap: 0.7rem; }
.feed-card {
  background: var(--panel-solid);
  border-radius: 18px;
  padding: 0.85rem 0.9rem;
  box-shadow: var(--shadow);
}
.feed-top {
  display: flex; justify-content: space-between; gap: 0.5rem;
  font-size: 0.72rem; color: var(--muted); font-weight: 600;
  text-transform: capitalize; margin-bottom: 0.35rem;
}
.feed-text {
  margin: 0 0 0.3rem; font-weight: 600; font-size: 0.92rem; line-height: 1.35;
}
.feed-sub { margin: 0; font-size: 0.78rem; color: var(--muted); }
.feed-action {
  display: inline-block; margin-top: 0.55rem;
  font-size: 0.8rem; font-weight: 700;
  background: var(--bg); border-radius: 999px; padding: 0.3rem 0.7rem;
}
.feed-empty { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

/* Forms / recording */
.panel {
  background: var(--panel-solid);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow);
}
.flash-text {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.55rem, 3.5vw, 2.1rem);
  line-height: 1.25; margin: 0.2rem 0 0.55rem;
  letter-spacing: -0.02em;
}
.en { color: var(--muted); margin: 0 0 0.85rem; line-height: 1.45; }
.field { display: block; margin: 0.75rem 0; }
.field > span {
  display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted);
  margin-bottom: 0.35rem;
}
input[type="text"], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.75rem 0.85rem; background: #f7f9fb; color: var(--ink);
}
.check {
  display: flex; gap: 0.65rem; align-items: flex-start;
  color: var(--muted); font-size: 0.92rem; line-height: 1.4; margin: 1rem 0;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem; border: 0; cursor: pointer; font-weight: 700;
  border-radius: 999px; padding: 0.8rem 1.2rem;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--charcoal); color: #fff; }
.btn-ghost { background: var(--bg); color: var(--ink); }
.btn-ok { background: #1f6b4a; color: #eafff4; }
.btn-danger { background: #8b3a32; color: #ffe9e5; }
.btn-wide { width: 100%; }
.btn-record {
  width: 5.6rem; height: 5.6rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8f82, #d6453d 62%, #8f241e);
  color: #fff; font-size: 0.8rem; letter-spacing: 0.05em;
  box-shadow: 0 0 0 0 rgba(214, 69, 61, 0.35);
}
.btn-record.live { animation: pulse 1.35s ease infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(214, 69, 61, 0.4); }
  70% { box-shadow: 0 0 0 18px rgba(214, 69, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(214, 69, 61, 0); }
}
.meter {
  height: 8px; background: rgba(28,36,48,0.08); border-radius: 99px;
  overflow: hidden; margin: 0.75rem 0 1rem;
}
.meter > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #3ecf8e, #e8c17a, #e07a6a);
}
.row-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1rem; }
.pill-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill-grid label {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.7rem; color: var(--muted); cursor: pointer;
  font-size: 0.85rem; font-weight: 600; background: #fff;
}
.pill-grid input { display: none; }
.pill-grid label:has(input:checked) {
  background: var(--charcoal); color: #fff; border-color: var(--charcoal);
}
.msg-ok { color: #1f6b4a; font-weight: 600; }
.msg-bad { color: #8b3a32; font-weight: 600; }
.progress {
  color: var(--muted); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 0.5rem;
}
.steps {
  display: grid; gap: 0.65rem; margin: 1rem 0;
}
.step {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: #f7f9fb; border-radius: 14px; padding: 0.8rem 0.9rem;
}
.step b {
  width: 24px; height: 24px; border-radius: 8px;
  background: var(--charcoal); color: #fff;
  display: grid; place-items: center; font-size: 0.75rem; flex: 0 0 auto;
}
.step p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.step strong { color: var(--ink); display: block; margin-bottom: 0.15rem; }
audio { width: 100%; margin-top: 0.4rem; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 11px; border: 0;
  display: grid; place-items: center; background: var(--bg);
  cursor: pointer; font-size: 0.95rem;
}
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
}
.login-card {
  width: min(420px, 100%);
  background: var(--panel-solid);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
}
.user-table { display: flex; flex-direction: column; gap: 0.65rem; }
.user-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 0.85rem; border-radius: 14px; background: #f7f9fb;
}
.user-row .en { display: block; font-size: 0.8rem; }

@media (max-width: 1100px) {
  .app { grid-template-columns: 220px minmax(0, 1fr); }
  .feed { display: none; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    flex-direction: row; flex-wrap: wrap; align-items: center;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .nav-group { flex-direction: row; flex-wrap: wrap; }
  .user-card { display: none; }
  .summary-grid, .object-grid, .metrics { grid-template-columns: 1fr; }
}
