/* Usta Chaqir Mini App: tokens and building blocks. Laid out for a 375 px phone; plain CSS, no build step. */
:root {
  --ink: #10233a; --ink-2: #3a4d64; --muted: #6b7a8c; --line: #e2e7ee; --bg: #f3f5f8; --card: #fff;
  --accent: #ff7a1a; --accent-2: #ff9a4a; --accent-ink: #a84300; --accent-bg: #fff1e6;
  --ok: #15803d; --ok-bg: #e5f6ea; --warn: #b45309; --warn-bg: #fff3dd; --bad: #c62828; --bad-bg: #fde9e9;
  --live: #1d5fd1; --live-bg: #e7efff; --radius: 16px; --shadow: 0 1px 2px rgba(16, 35, 58, 0.06), 0 6px 18px -10px rgba(16, 35, 58, 0.25);
  --font: -apple-system, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
}
.uc-root, .uc-app { font: 15px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-tap-highlight-color: transparent; }
.uc-root { min-height: 100dvh; }
.uc-app [hidden] { display: none !important; }
.uc-app { position: relative; display: flex; flex-direction: column; min-height: 100%; }
.uc-app *, .uc-app *::before, .uc-app *::after { box-sizing: border-box; }
.uc-app button, .uc-app input, .uc-app textarea { font: inherit; color: inherit; }
.uc-app button { cursor: pointer; }
.uc-app h2 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
.uc-app h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.uc-app p { margin: 0; }
.uc-outside { padding: 40px 24px; text-align: center; color: var(--muted); font: 15px/1.5 var(--font); }

/* header */
.uc-head {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 12px;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.uc-grow { flex: 1; }
.uc-title { font-size: 17px; }
.uc-back { border: 0; background: var(--bg); border-radius: 12px; padding: 8px 12px; font-weight: 650; }
.uc-lang { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; font-weight: 700; font-size: 13px; }
.uc-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--bg); overflow-x: auto; scrollbar-width: none; }
.uc-tabs button { border: 0; background: transparent; padding: 7px 10px; border-radius: 9px; font-weight: 650; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.uc-tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.uc-body { flex: 1; }
.uc-screen { display: grid; gap: 14px; padding: 14px 14px 28px; }
.uc-sec { display: grid; gap: 8px; }
.uc-muted { color: var(--muted); font-size: 14px; }

/* buttons, chips, inputs */
.uc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 10px 16px;
  border: 0; border-radius: 14px; font-weight: 700; font-size: 15.5px; background: var(--accent); color: #fff;
  box-shadow: 0 8px 18px -10px rgba(255, 122, 26, 0.9); transition: transform 0.12s, filter 0.12s, opacity 0.12s;
}
.uc-btn:active { transform: scale(0.98); }
.uc-btn:disabled { opacity: 0.55; cursor: default; }
.uc-btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.uc-btn.small { min-height: 38px; padding: 7px 12px; font-size: 14px; width: auto; }
.uc-btn .uc-ico { width: 20px; height: 20px; }
.uc-link { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 13.5px; justify-self: center; padding: 6px; }
.uc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.uc-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--bg); color: var(--ink-2); white-space: nowrap;
}
.uc-chip.ok { background: var(--ok-bg); color: var(--ok); }
.uc-chip.bad { background: var(--bad-bg); color: var(--bad); }
.uc-chip.live { background: var(--live-bg); color: var(--live); }
.uc-chip.off { color: var(--muted); }
.uc-chip.star { background: var(--accent-bg); color: var(--accent-ink); }
.uc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-pick {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13.5px; font-weight: 600;
}
.uc-pick.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.uc-input {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; outline: none; resize: vertical;
}
.uc-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18); }
.uc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #e8ecf1; }
.uc-seg button { border: 0; background: transparent; border-radius: 11px; padding: 9px; font-weight: 700; color: var(--ink-2); }
.uc-seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.uc-banner { padding: 10px 12px; border-radius: 12px; background: var(--live-bg); color: var(--live); font-size: 14px; font-weight: 600; }
.uc-banner.warn { background: var(--warn-bg); color: var(--warn); }
.uc-banner.ok { background: var(--ok-bg); color: var(--ok); }
.uc-banner.bad { background: var(--bad-bg); color: var(--bad); }

/* icons and avatars */
.uc-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; }
.uc-ico svg { width: 100%; height: 100%; }
.uc-ico.tile { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--accent-bg); color: var(--accent-ink); }
.uc-ico.big { width: 46px; height: 46px; padding: 10px; border-radius: 14px; background: var(--accent-bg); color: var(--accent-ink); }
.uc-star { display: inline-grid; width: 15px; height: 15px; color: #f5a524; }
.uc-star svg { width: 100%; height: 100%; }
.uc-ava {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; font-weight: 800; font-size: 14px;
  color: #fff; background: linear-gradient(140deg, #29476d, #10233a); letter-spacing: 0.02em;
}
.uc-ava.big { width: 52px; height: 52px; font-size: 17px; background: linear-gradient(140deg, var(--accent-2), var(--accent-ink)); }

/* list rows */
.uc-list { display: grid; gap: 8px; }
.uc-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); text-align: left;
}
.uc-row.static { cursor: default; }
.uc-row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.uc-row-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-row-main small { color: var(--muted); font-size: 13px; }
.uc-row-end { display: grid; justify-items: end; gap: 3px; }
.uc-chev { width: 8px; height: 8px; border-right: 2px solid #b5c0cc; border-top: 2px solid #b5c0cc; transform: rotate(45deg); flex: none; }

/* sheets and toasts */
.uc-sheet-wrap { position: absolute; inset: 0; z-index: 60; display: flex; align-items: flex-end; background: rgba(16, 35, 58, 0.42); animation: uc-fade 0.18s; }
.uc-sheet {
  width: 100%; max-height: 82%; overflow: auto; padding: 14px 14px 22px; border-radius: 22px 22px 0 0; background: #fff;
  display: grid; gap: 10px; animation: uc-up 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.uc-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.uc-x { border: 0; background: var(--bg); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; line-height: 1; flex: none; }
.uc-options { display: grid; gap: 6px; }
.uc-option { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; text-align: left; font-weight: 600; }
.uc-toasts { position: absolute; z-index: 70; left: 12px; right: 12px; bottom: 16px; display: grid; gap: 6px; pointer-events: none; }
.uc-toast {
  justify-self: center; max-width: 100%; padding: 10px 14px; border-radius: 12px; background: rgba(16, 35, 58, 0.94); color: #fff;
  font-size: 14px; animation: uc-up 0.2s; transition: opacity 0.4s;
}
.uc-toast.bad { background: #9b1c1c; }
.uc-toast.ok { background: #14532d; }
.uc-toast.out { opacity: 0; }
@keyframes uc-up { from { transform: translateY(14px); opacity: 0; } }
@keyframes uc-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .uc-sheet-wrap, .uc-sheet, .uc-toast { animation: none; }
}
