:root {
  color-scheme: light;
}

body {
  background: var(--bg);
}

button,
input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(255, 102, 0, 0.35);
  outline-offset: 2px;
}

button:hover {
  transform: translateY(-1px);
}

.text-link {
  color: var(--primary);
  font-weight: 600;
}

.app-shell {
  min-height: 100vh;
}

.page-shell {
  padding: 20px 24px 32px;
}

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

.section-header h2,
.section-header h3 {
  font-size: 1.05rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.btn {
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(100%, 480px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 12px;
  z-index: 40;
}

.search-group {
  margin-bottom: 12px;
}

.search-group:last-child {
  margin-bottom: 0;
}

.search-group-title {
  color: var(--text-secondary);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  padding: 0 8px;
}

.search-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
}

.search-item:hover {
  background: #f8fafc;
  border-color: var(--border);
}

.search-empty {
  padding: 10px 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

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

.btn-secondary {
  background: var(--white);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-small {
  padding: 0.5rem 0.7rem;
  font-size: 0.82rem;
}

.btn-large {
  padding: 0.85rem 1.15rem;
}

.w-100 {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-success {
  background: rgba(18, 183, 106, 0.12);
  color: var(--success);
}

.badge-warning {
  background: rgba(247, 144, 9, 0.12);
  color: var(--warning);
}

.badge-danger {
  background: rgba(240, 68, 56, 0.12);
  color: var(--danger);
}

.badge-info {
  background: rgba(46, 144, 250, 0.12);
  color: var(--info);
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 768px) {
  .page-shell {
    padding: 16px;
  }
}
