﻿.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-5);
  height: 42px;
  min-width: 44px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: var(--fw-bold);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.28);
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(var(--accent-rgb), 0.38);
}
.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.24);
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--secondary:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}
.btn--ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn--success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 6px 18px rgba(var(--success-rgb), 0.24);
}
.btn--success:hover {
  filter: brightness(1.04);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(var(--success-rgb), 0.32);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 6px 18px rgba(var(--danger-rgb), 0.24);
}
.btn--danger:hover {
  filter: brightness(1.04);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(var(--danger-rgb), 0.32);
}

.btn--warning {
  background: var(--warning);
  color: #fff;
  box-shadow: 0 6px 18px rgba(var(--warning-rgb), 0.22);
}
.btn--warning:hover {
  filter: brightness(1.04);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(var(--warning-rgb), 0.3);
}

.btn--block { width: 100%; }
.btn--sm { height: 34px; padding: 0 var(--sp-3); font-size: var(--fs-xs); }
.btn--lg { height: 50px; padding: 0 var(--sp-6); font-size: var(--fs-md); }

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.card__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
}

.card__body { padding: var(--sp-5); }
.card__footer { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border); }

.icon-box {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.icon-box svg { width: 21px; height: 21px; }
.icon-box--success { background: var(--success-soft); color: var(--success); }

.icon-box--warning { background: var(--warning-soft); color: var(--warning); }
.icon-box--sm { width: 34px; height: 34px; border-radius: 9px; }
.icon-box--sm svg { width: 17px; height: 17px; }

.progress {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  overflow: hidden;
  margin-top: var(--sp-3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  background: var(--surface-2);
  color: var(--text-secondary);
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--offline {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.badge--offline::before { opacity: 0.55; }

.form-group { margin-bottom: var(--sp-4); }

.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  margin-bottom: var(--sp-2);
  color: var(--text-secondary);
}

.form-label .req { color: var(--danger); }

.form-control {
  width: 100%;
  height: 44px;
  padding: 0 var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--fs-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

textarea.form-control {
  height: auto;
  min-height: 110px;
  padding: var(--sp-3);
  resize: vertical;
  line-height: var(--lh-normal);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238593a4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-3) center;
  background-size: 18px 18px;
}
select.form-control option {
  color: var(--text);
  background: var(--surface);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-hint {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--sp-2);
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding: var(--sp-2) 0;
}
.check-item:first-child { padding-top: 0; }
.check-item:last-child { padding-bottom: 0; }

.check-item svg {
  width: 18px;
  height: 18px;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 1px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.table thead th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--transition-fast); }
.table tbody tr:hover { background: var(--surface-hover); }
.table td .fw-semibold { color: var(--text); }
.table th.text-right,
.table td.text-right { text-align: right; }

.tabs {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
  overflow-x: auto;
}

.tab {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.tab:hover { color: var(--text); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn 0.2s ease; }

.segment {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
}

.segment button {
  position: relative;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  color: var(--text-muted);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.segment button:hover:not(.is-active) { color: var(--text); background: var(--surface-hover); }

.segment button.is-active {
  color: #fff;
  background: var(--accent-grad);
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.32);
}

.alert {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  line-height: 1.55;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-secondary);
}

.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

.alert--warning { background: var(--warning-soft); border-color: transparent; border-left-color: var(--warning); color: var(--text); }
.alert--warning svg { color: var(--warning); }
.alert strong { color: inherit; font-weight: var(--fw-semibold); }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--overlay);
  backdrop-filter: blur(3px) saturate(110%);
  -webkit-backdrop-filter: blur(3px) saturate(110%);
  display: grid;
  place-items: center;
  padding: var(--sp-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.is-open { opacity: 1; visibility: visible; }

.modal {
  width: 100%;
  max-width: 460px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.98);
  transition: transform var(--transition);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.modal__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--text); }
.modal__body { padding: var(--sp-5); }
.modal__footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
}

.modal__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.modal__close:hover { background: var(--surface-hover); color: var(--text); }
.modal__close svg { width: 20px; height: 20px; }

.pagination {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  justify-content: center;
  flex-wrap: wrap;
}

.pagination button,
.pagination a {
  min-width: 38px;
  height: 38px;
  padding: 0 var(--sp-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.pagination button:hover:not(:disabled),
.pagination a:hover { border-color: var(--border-strong); color: var(--text); }
.pagination button.is-active,
.pagination a.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination button:disabled,
.pagination .is-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.pagination button svg,
.pagination a svg { width: 17px; height: 17px; }
.pagination__nav { gap: 4px; padding: 0 var(--sp-3) !important; }
.pagination__dots { border-color: transparent !important; background: transparent !important; pointer-events: none; }

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  width: 100%;
}
.table-foot__info { font-size: var(--fs-sm); color: var(--text-muted); }
.table-foot__info b { color: var(--text); font-weight: var(--fw-semibold); }

@media (max-width: 640px) {
  .table-foot { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  .table-foot__info { text-align: center; }
  .pagination { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: var(--sp-2); }
  .pagination > a:not(.pagination__nav):not(.is-active),
  .pagination > button:not(.pagination__nav):not(.is-active) { display: none; }
  .pagination__nav { flex: 1 1 0; max-width: 42%; justify-content: center; }
  .pagination > .is-active { min-width: 44px; flex-shrink: 0; }
}

.toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.filter-bar__select { flex: 0 0 auto; width: auto; min-width: 200px; max-width: 320px; }
.filter-bar__btn { flex: 0 0 auto; box-shadow: 0 8px 20px -8px var(--accent); }
.filter-bar__btn:hover { transform: translateY(-1px); }

@media (max-width: 640px) {
  .filter-bar { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  .filter-bar .search-box,
  .filter-bar__select,
  .filter-bar__btn { flex: 0 0 auto; width: 100%; max-width: none; min-width: 0; }
  .filter-bar__btn { justify-content: center; }
}

.search-box { position: relative; flex: 1 1 240px; min-width: 200px; }
.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}
.search-box .form-control { padding-left: 40px; }
.search-box:focus-within svg { color: var(--accent); }

.record-cards { display: none; flex-direction: column; gap: var(--sp-3); }

.record-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.record-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.record-card__time { font-size: var(--fs-xs); color: var(--text); font-weight: var(--fw-medium); }

.record-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  padding: 3px 0;
}
.record-card__row .label { color: var(--text-secondary); font-weight: var(--fw-medium); }
.record-card__row .value { color: var(--text); font-weight: var(--fw-medium); text-align: right; }

@media (max-width: 768px) {
  .table-wrap { display: none; }
  .record-cards { display: flex; }
}

.orders-card {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.orders-card .table-wrap { border-radius: 0; }
.orders-card .card__footer {
  margin-top: var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-4) var(--sp-5);
}

.table--orders {
  border-collapse: separate;
  border-spacing: 0 var(--sp-3);
  margin-top: calc(var(--sp-3) * -1);
}
.table--orders thead th {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.table--orders thead tr { box-shadow: var(--shadow-sm); }
.table--orders thead th:first-child {
  border-left: 1px solid var(--border);
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}
.table--orders thead th:last-child {
  border-right: 1px solid var(--border);
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}
.table--orders tbody td {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.table--orders tbody td:first-child {
  border-left: 1px solid var(--border);
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}
.table--orders tbody td:last-child {
  border-right: 1px solid var(--border);
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}
.table--orders tbody tr:last-child td { border-bottom: 1px solid var(--border); }
.table--orders tbody tr { box-shadow: var(--shadow-sm); }
.table--orders tbody tr:hover td { background: var(--surface-hover); }

.table--orders th:last-child,
.table--orders td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
}

.order-link { color: var(--text); white-space: nowrap; }
.order-link__a { color: inherit; text-decoration: none; }
.order-link__a:hover { text-decoration: none; }
.order-link__a:hover .order-link__id { text-decoration: none; }
.order-link__site { font-weight: var(--fw-bold); color: var(--text); }
.order-link__id { color: var(--accent); font-weight: var(--fw-medium); }

.comments-list { display: flex; flex-direction: column; gap: var(--sp-2); max-height: 360px; overflow-y: auto; }
.comment-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.comment-item__num { flex-shrink: 0; min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--warning-soft, rgba(245,159,0,.14)); color: var(--warning); font-weight: var(--fw-bold); font-size: var(--fs-xs); }
.comment-item__text { color: var(--text); font-size: var(--fs-sm); word-break: break-word; }
.comments-empty { padding: var(--sp-6) var(--sp-3); text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }

.rem-strong { color: var(--text); font-weight: var(--fw-bold); }

.td-amount { color: var(--text); font-weight: var(--fw-bold); }

.order-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  white-space: nowrap;
}
.order-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
}
.order-status--success .order-status__dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.order-status--info .order-status__dot { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.order-status--warning .order-status__dot { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.order-status--pending .order-status__dot { background: var(--text-muted); box-shadow: 0 0 0 3px var(--surface-2); }
.order-status--neutral .order-status__dot { background: var(--text-secondary); box-shadow: 0 0 0 3px var(--surface-2); }
.order-status--danger .order-status__dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.order-detail-btn svg { width: 15px; height: 15px; }
.record-card__btn { margin-top: var(--sp-3); justify-content: center; }

.modal--lg { max-width: 600px; }
.od-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  margin-bottom: var(--sp-3);
}
.od-field__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.od-field__value { font-weight: var(--fw-semibold); color: var(--text); word-break: break-word; min-width: 0; }
.od-field__link { color: var(--text); min-width: 0; max-width: 100%; }
.od-field__link .order-link__a { display: block; max-width: 100%; color: var(--accent); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-field__link .order-link__a:hover { text-decoration: none; }
.od-field--status { align-items: flex-end; text-align: right; }

.od-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.od-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.od-cell__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.od-cell__value { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--text); }

.od-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.od-split .od-field { margin-bottom: 0; }

@media (max-width: 560px) {
  /* Sipari\u015f detay\u0131: t\u00fcm gruplar mobilde birle\u015fik kart + "etiket sol / de\u011fer sa\u011f" sat\u0131r d\u00fczeni */
  .od-grid,
  .od-split {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: var(--sp-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    overflow: hidden;
  }
  .od-cell,
  .od-split .od-field {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .od-cell + .od-cell,
  .od-split .od-field + .od-field { border-top: 1px solid var(--border); }
  .od-cell__label,
  .od-split .od-field__label {
    font-size: 0.7rem;
    font-weight: var(--fw-semibold);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .od-cell__value,
  .od-split .od-field__value {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    text-align: right;
  }
  .od-field--status { align-items: center; text-align: right; }
  .od-split .order-status { font-size: var(--fs-sm); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
