.ya-comieron-app {
  --yc-bg: #f6f3ed;
  --yc-card: #fffaf2;
  --yc-card-strong: #ffffff;
  --yc-text: #231f20;
  --yc-muted: #736b60;
  --yc-border: rgba(35, 31, 32, 0.12);
  --yc-shadow: 0 18px 45px rgba(35, 31, 32, 0.10);
  --yc-ok: #1f8a4c;
  --yc-yellow: #b7791f;
  --yc-red: #bd2f2f;
  --yc-primary: #231f20;
  --yc-radius: 22px;
  color: var(--yc-text);
  background: radial-gradient(circle at top left, #fff4d8, transparent 36%), var(--yc-bg);
  min-height: 100vh;
  margin: 0 calc(50% - 50vw);
  padding: 22px 14px 42px;
  font-family: inherit;
  box-sizing: border-box;
}

.ya-comieron-app * {
  box-sizing: border-box;
}

.yc-app-shell {
  width: min(880px, 100%);
  margin: 0 auto;
}

.yc-app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.yc-eyebrow {
  margin: 0 0 4px;
  color: var(--yc-muted);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.75rem;
  font-weight: 800;
}

.yc-app-header h1 {
  margin: 0;
  font-size: clamp(2.1rem, 8vw, 4rem);
  line-height: 0.95;
}

.yc-subtitle {
  margin: 8px 0 0;
  color: var(--yc-muted);
  font-size: 1rem;
}

.yc-icon-btn,
.yc-primary,
.yc-secondary {
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.yc-icon-btn:active,
.yc-primary:active,
.yc-secondary:active {
  transform: scale(0.98);
}

.yc-icon-btn {
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--yc-card);
  color: var(--yc-text);
  box-shadow: var(--yc-shadow);
  font-size: 1.3rem;
}

.yc-primary {
  background: var(--yc-primary);
  color: #fff;
}

.yc-secondary {
  background: #ece4d6;
  color: var(--yc-text);
}

.yc-busy {
  cursor: wait;
}

.yc-busy button,
.yc-busy input,
.yc-busy select {
  opacity: 0.68;
  cursor: wait;
}

.yc-app-alert {
  border-radius: 18px;
  padding: 12px 14px;
  margin: 12px 0;
  font-weight: 700;
  white-space: pre-line;
}

.yc-alert-success { background: rgba(31, 138, 76, 0.12); color: var(--yc-ok); }
.yc-alert-error { background: rgba(189, 47, 47, 0.12); color: var(--yc-red); }
.yc-alert-info { background: rgba(35, 31, 32, 0.08); color: var(--yc-text); }

.yc-login-card,
.yc-controls,
.yc-history-card,
.yc-cat-card {
  background: var(--yc-card);
  border: 1px solid var(--yc-border);
  border-radius: var(--yc-radius);
  box-shadow: var(--yc-shadow);
}

.yc-login-card,
.yc-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  margin: 12px 0;
}

.yc-login-card label,
.yc-controls label {
  color: var(--yc-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.yc-login-card input,
.yc-login-card select,
.yc-controls input,
.yc-controls select {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  border: 1px solid var(--yc-border);
  border-radius: 14px;
  background: #fff;
  color: var(--yc-text);
  padding: 9px 12px;
  font-size: 1rem;
}

.yc-login-card .yc-secondary {
  align-self: end;
}

.yc-fast-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 12px 0 16px;
}

.yc-fast-actions .yc-primary,
.yc-fast-actions .yc-secondary {
  min-height: 56px;
  font-size: 1.05rem;
}

.yc-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.yc-cat-card {
  position: relative;
  padding: 14px;
  overflow: hidden;
}

.yc-cat-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--yc-muted);
}

.yc-status-ok::before { background: var(--yc-ok); }
.yc-status-yellow::before { background: var(--yc-yellow); }
.yc-status-red::before { background: var(--yc-red); }

.yc-cat-card.yc-focused {
  outline: 3px solid rgba(35, 31, 32, 0.22);
}

.yc-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 4px;
}

.yc-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #f0e7d8;
  overflow: hidden;
  font-size: 2rem;
  flex: 0 0 auto;
}

.yc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yc-cat-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.yc-cat-status {
  margin: 4px 0 0;
  font-weight: 900;
  color: var(--yc-muted);
}

.yc-status-ok .yc-cat-status { color: var(--yc-ok); }
.yc-status-yellow .yc-cat-status { color: var(--yc-yellow); }
.yc-status-red .yc-cat-status { color: var(--yc-red); }

.yc-cat-meta {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding-left: 4px;
}

.yc-cat-meta div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.yc-cat-meta strong {
  color: var(--yc-muted);
  font-size: 0.82rem;
}

.yc-cat-meta span {
  text-align: right;
  font-weight: 800;
}

.yc-cat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.yc-history-card {
  margin-top: 16px;
  padding: 16px;
}

.yc-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.yc-section-title h2 {
  margin: 0;
  font-size: 1.25rem;
}

.yc-section-title a {
  font-weight: 800;
  text-decoration: none;
}

.yc-history {
  display: grid;
  gap: 8px;
}

.yc-history-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--yc-border);
}

.yc-history-row:last-child {
  border-bottom: 0;
}

.yc-history-row strong {
  min-width: 120px;
}

.yc-history-row span {
  color: var(--yc-muted);
  text-align: right;
}

.yc-empty {
  color: var(--yc-muted);
  margin: 0;
}

@media (max-width: 720px) {
  .ya-comieron-app {
    padding: 18px 10px 36px;
  }

  .yc-login-card,
  .yc-controls,
  .yc-cats,
  .yc-fast-actions {
    grid-template-columns: 1fr;
  }

  .yc-fast-actions .yc-secondary {
    min-height: 48px;
  }

  .yc-history-row {
    display: grid;
  }

  .yc-history-row span {
    text-align: left;
  }
}
