/* ===== Buttons ===== */
.btn-primary, .btn-secondary, .btn-ghost, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-medium);
}
.btn-secondary:hover { background: var(--bg-muted); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-muted); color: var(--text-primary); }
.btn-danger {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}
.btn-danger:hover { filter: brightness(0.92); }
@media (max-width: 900px) {
  .btn-primary, .btn-secondary, .btn-ghost, .btn-danger { height: 40px; }
}

/* ===== Card ===== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card + .card { margin-top: 16px; }

/* ===== Form ===== */
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-field label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}
.form-field input, .form-field select, .form-field textarea {
  height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field textarea { height: auto; min-height: 80px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14, 76, 129, 0.15);
}
.form-field.has-error input { border-color: var(--color-danger); }
.field-error { color: var(--color-danger); font-size: 12px; margin-top: 2px; }

/* ===== Tool row (dashboard liste satırı) ===== */
.tool-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.tool-row:hover { border-color: var(--color-primary); box-shadow: var(--shadow-sm); }
.tool-row .tool-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.tool-row .tool-main { flex: 1; min-width: 0; }
.tool-row .tool-title { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.tool-row .tool-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.tool-row .tool-stat { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.tool-row .tool-chevron { color: var(--text-muted); }

/* ===== Table ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
}
.data-table thead th {
  background: var(--bg-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  position: sticky; top: 0;
}
.data-table tbody tr:hover { background: var(--bg-muted); }
.data-table tbody tr:last-child td { border-bottom: 0; }

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--color-info);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  min-width: 240px;
  max-width: 360px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.success { border-left-color: var(--color-success); }
.toast.error   { border-left-color: var(--color-danger); }
.toast.warning { border-left-color: var(--color-warning); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  transition: opacity var(--transition);
}
.modal-overlay.visible { opacity: 1; }
.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: min(480px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
@media (max-width: 900px) {
  .modal-overlay { align-items: flex-end; }
  .modal {
    width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* ===== Login layout ===== */
.login-wrap {
  min-height: calc(100vh - var(--utility-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  width: min(420px, 100%);
}
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card .login-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.login-card .btn-primary { width: 100%; }

/* ===== Empty state ===== */
.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}
.empty .empty-icon { margin-bottom: 12px; opacity: 0.6; }
