:root {
  --bg-page: #f5f7fb;
  --bg-card: #ffffff;
  --bg-soft: #f9fafb;

  --text-main: #1f2937;
  --text-muted: #6b7280;

  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;

  --danger-bg: #fee2e2;
  --danger-text: #991b1b;
  --danger-hover: #fecaca;

  --success: #16a34a;
  --error: #dc2626;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --shadow-soft: 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.ui-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.ui-card-soft {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.ui-title-xl {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px 0;
  color: var(--text-main);
}

.ui-title-lg {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 14px 0;
  color: var(--text-main);
}

.ui-text-muted {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.ui-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.ui-input,
.ui-select,
.ui-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-main);
  background: #fff;
}

.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.ui-textarea {
  resize: vertical;
  min-height: 90px;
}

.ui-btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ui-btn:hover {
  transform: translateY(-1px);
}

.ui-btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.ui-btn-primary:hover {
  background: var(--primary-hover);
}

.ui-btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.ui-btn-secondary:hover {
  background: #d1d5db;
}

.ui-btn-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.ui-btn-danger:hover {
  background: var(--danger-hover);
}

.ui-btn-small {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .ui-title-xl {
    font-size: 30px;
  }

  .ui-title-lg {
    font-size: 26px;
  }

  .ui-label,
  .ui-text-muted,
  .ui-input,
  .ui-select,
  .ui-textarea,
  .ui-btn {
    font-size: 16px;
  }

  .ui-input,
  .ui-select,
  .ui-textarea,
  .ui-btn {
    padding: 13px;
  }

  .ui-btn-small {
    font-size: 13px;
    padding: 8px 10px;
  }
}
/* === UI POLISH === */

.ui-stack-sm > * + * {
  margin-top: 8px;
}

.ui-stack-md > * + * {
  margin-top: 14px;
}

.ui-stack-lg > * + * {
  margin-top: 20px;
}

.ui-section {
  margin-bottom: 20px;
}

.ui-title-xl,
.ui-title-lg {
  letter-spacing: -0.02em;
}

.ui-card,
.ui-card-soft {
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.ui-card-hover:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ui-meta {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.ui-divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 18px 0;
}

.ui-btn {
  line-height: 1.2;
}

.ui-btn-primary,
.ui-btn-secondary,
.ui-btn-danger {
  min-height: 42px;
}

@media (max-width: 768px) {
  .ui-section {
    margin-bottom: 16px;
  }

  .ui-meta {
    font-size: 14px;
  }

  .ui-btn-primary,
  .ui-btn-secondary,
  .ui-btn-danger {
    min-height: 46px;
  }
}
/* === ICON SYSTEM === */

.ui-icon-chip {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.ui-icon-chip-neutral {
  background: #eef2ff;
  color: #3730a3;
}

.ui-icon-chip-success {
  background: #dcfce7;
  color: #166534;
}

.ui-icon-chip-danger {
  background: #fee2e2;
  color: #991b1b;
  cursor: pointer;
}

.ui-icon-chip-danger:hover {
  background: #fecaca;
}

.ui-icon-chip-muted {
  background: #f3f4f6;
  color: #374151;
}

.legal-links {
  text-align: center;
  margin: 30px 0;
  font-size: 14px;
  opacity: 0.8;
}

.legal-links a {
  color: #888;
  text-decoration: none;
}

.legal-links a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .ui-icon-chip {
    width: 34px;
    height: 34px;
    font-size: 17px;
    border-radius: 10px;
  }
}