/* verle_os_web_interface.md, раздел 4: минималистичная тёмная тема, mobile-first */

:root {
  --bg: #1a1a2e;
  --card: #16213e;
  --accent: #0f3d3e;
  --accent-bright: #14b8a6;
  --text: #e0e0e0;
  --text-dim: #9a9ab0;
  --danger: #e74c3c;
  --success: #2ecc71;
  --border: #2a2a4a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  overflow-x: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
  font-size: 15px;
}

a { color: var(--accent-bright); }

.screen { display: none; min-height: 100vh; }
.screen.visible { display: block; }

/* --- Login --- */
#login-screen.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  width: min(340px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  text-align: center;
}

.login-card input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 12px;
}

.login-card button {
  background: var(--accent-bright);
  color: #06282a;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 12px;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  min-height: 16px;
  margin: 0;
  text-align: center;
}

/* --- App shell --- */
#app-screen.visible {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-title { font-weight: 600; }

.icon-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
}

.view {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
}

.capture-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.capture-bar input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  padding: 10px 16px;
}

.capture-bar button {
  background: var(--accent-bright);
  color: #06282a;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.bottom-nav {
  display: flex;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 8px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 18px;
}

.nav-btn span { font-size: 11px; }
.nav-btn.active { color: var(--accent-bright); }

/* --- Content building blocks --- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.row:last-child { border-bottom: none; }

.muted { color: var(--text-dim); font-size: 13px; }
.tag {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-bright);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  margin-right: 4px;
}

.btn {
  background: var(--accent);
  color: var(--accent-bright);
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-bright); color: #06282a; }
.btn.danger { background: rgba(231,76,60,.15); color: var(--danger); }
.btn.success { background: rgba(46,204,113,.15); color: var(--success); }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 30px 10px;
}

.list-item-title { font-weight: 500; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.text-input, textarea.text-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 18px 0 6px;
}

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-bright);
  color: #06282a;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 100;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.toast.visible { opacity: 1; }

@media (min-width: 640px) {
  .view { max-width: 640px; margin: 0 auto; width: 100%; }
  .capture-bar { max-width: 640px; margin: 0 auto; width: 100%; }
}
