:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #60707a;
  --line: #d9e0e4;
  --paper: #f7f9fa;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --blue: #1d4ed8;
  --amber: #b7791f;
  --danger: #b42318;
  --shadow: 0 18px 55px rgba(20, 32, 38, 0.14);
}

[data-theme="dark"] {
  --ink: #f7f9fa;
  --muted: #aab8bf;
  --line: #2d3b45;
  --paper: #1a242c;
  --panel: #11181d;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, #0f161a 0%, #172026 100%);
}

[data-theme="dark"] body {
  background: var(--panel);
}

[data-theme="dark"] .register-panel,
[data-theme="dark"] .status-panel,
[data-theme="dark"] .gift-panel,
[data-theme="dark"] .admin-panel {
  background: var(--paper);
  border-color: var(--line);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

[data-theme="dark"] .card-preview {
  background: var(--panel);
  border-color: var(--line);
}

[data-theme="dark"] table {
  background: var(--paper);
}

[data-theme="dark"] th {
  background: var(--panel);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

[data-theme="dark"] td {
  border-bottom: 1px solid var(--line);
}

[data-theme="dark"] .modal-panel {
  background: var(--paper);
}

[data-theme="dark"] .choice-button {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

[data-theme="dark"] .stats article {
  background: var(--panel);
  border-color: var(--line);
}

[data-theme="dark"] .gift-item {
  background: var(--panel);
  border-color: var(--line);
}

[data-theme="dark"] .success-message {
  background: rgba(15, 118, 110, 0.2);
  border-color: var(--accent);
}

[data-theme="dark"] label {
  color: var(--ink);
}

[data-theme="dark"] .promo-result {
  background: #2a2012;
  border-color: var(--amber);
  color: #e0cca7;
}

[data-theme="dark"] .promo-result strong {
  color: #fff;
}

[data-theme="dark"] .code-badge,
[data-theme="dark"] .promo-code {
  background: #112d28;
  border-color: #215a51;
  color: #6ee7b7;
}

.theme-toggle {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  margin-left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: var(--paper);
  border-color: var(--muted);
  color: var(--ink);
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.theme-toggle:active {
  transform: scale(0.92);
}

[data-theme="dark"] .theme-icon-sun {
  display: block !important;
}
[data-theme="dark"] .theme-icon-moon {
  display: none !important;
}
:root:not([data-theme="dark"]) .theme-icon-sun {
  display: none !important;
}
:root:not([data-theme="dark"]) .theme-icon-moon {
  display: block !important;
}

.lang-selector-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.header-lang-select {
  padding: 6px 30px 6px 34px !important;
  border-radius: 99px !important;
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  color: var(--ink) !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
  transition: all 0.2s ease !important;
  min-height: unset !important;
  width: auto !important;
}

.header-lang-select:hover {
  background: var(--paper) !important;
  border-color: var(--muted) !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06) !important;
}

.header-lang-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12) !important;
}

.header-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: unset;
  padding: 5px 12px 5px 6px;
  border-radius: 99px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}

.header-profile-btn:hover {
  background: var(--paper);
  border-color: var(--muted);
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.header-profile-btn:active {
  transform: scale(0.98);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 14%, rgba(15, 118, 110, 0.14), transparent 28rem),
    linear-gradient(135deg, #eef6f4 0%, #f9fbfc 46%, #f4f7fb 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.app-shell {
  width: 98%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 16px 0 32px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.register-panel,
.status-panel,
.gift-panel,
.admin-panel {
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(217, 224, 228, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.register-panel,
.gift-panel,
.admin-panel {
  padding: 24px;
}

.brand-row,
.admin-header,
.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.brand-row {
  justify-content: flex-start;
  margin-bottom: 22px;
}

.language-control {
  margin-left: auto;
  min-width: 150px;
  gap: 6px;
}

.language-control span {
  color: var(--muted);
  font-size: 0.82rem;
}

.language-control select {
  min-height: 42px;
  padding: 8px 10px;
}

.brand-mark {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), #22c55e);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark span {
  width: 32px;
  height: 42px;
  border-radius: 5px;
  border: 3px solid #fff;
  border-top-width: 9px;
  display: block;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: 1.25rem;
}

h2 {
  font-size: 1.45rem;
}

.visitor-form {
  display: grid;
  gap: 18px;
}

.mode-switch {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 8px;
}

.mode-switch label {
  position: relative;
  display: block;
}

.mode-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-switch span {
  min-height: 44px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.mode-switch input:checked + span {
  background: var(--accent);
  color: #fff;
}

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

label {
  display: grid;
  gap: 8px;
  color: #26343b;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 14px 15px;
  outline: none;
  min-height: 50px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.wide-label {
  grid-column: 1 / -1;
}

.business-card-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.card-preview {
  min-height: 82px;
  border: 1px dashed #aab8bf;
  border-radius: 8px;
  background: #f8fafb;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  overflow: hidden;
}

.card-preview img {
  width: 88px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.consent {
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-weight: 600;
  color: var(--muted);
}

.consent input {
  min-height: 22px;
  width: 22px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.primary-button,
.secondary-button,
.danger-button,
.mini-button,
.link-button,
.icon-button,
.camera-button,
.outline-button,
.primary-small-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  min-height: 58px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 1.06rem;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.status-panel {
  padding: 20px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.media-strip {
  min-height: 230px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(29, 78, 216, 0.2), rgba(15, 118, 110, 0.3)),
    linear-gradient(160deg, #15343f, #eefaf6);
  position: relative;
  overflow: hidden;
}

.badge-card {
  position: absolute;
  left: 22px;
  top: 30px;
  width: 138px;
  height: 96px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 30px rgba(23, 32, 38, 0.22);
  padding: 18px;
}

.badge-line,
.scan-lines span {
  display: block;
  height: 10px;
  border-radius: 99px;
  background: #172026;
  opacity: 0.74;
}

.badge-line.short {
  width: 58%;
  margin-top: 12px;
}

.badge-dot {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
}

.gift-box {
  position: absolute;
  right: 28px;
  top: 28px;
  width: 76px;
  height: 68px;
  border-radius: 7px;
  background: #f2b84b;
  box-shadow: 0 14px 28px rgba(23, 32, 38, 0.2);
}

.gift-box::before,
.gift-box::after {
  content: "";
  position: absolute;
  background: #fff;
}

.gift-box::before {
  width: 12px;
  height: 100%;
  left: 32px;
}

.gift-box::after {
  height: 12px;
  width: 100%;
  top: 18px;
}

.gift-box span {
  position: absolute;
  left: 22px;
  top: -16px;
  width: 34px;
  height: 20px;
  border: 6px solid #fff;
  border-bottom: 0;
  border-radius: 99px 99px 0 0;
}

.scan-lines {
  position: absolute;
  right: 24px;
  bottom: 30px;
  width: 130px;
  display: grid;
  gap: 12px;
}

.scan-lines span {
  background: #fff;
}

.scan-lines span:nth-child(2) {
  width: 74%;
}

.scan-lines span:nth-child(3) {
  width: 88%;
}

.scan-lines span:nth-child(4) {
  width: 54%;
}

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

.stats article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--paper);
}

.stats span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
}

.stats p,
.success-message {
  margin: 0;
  color: var(--muted);
}

.success-message {
  border-left: 4px solid var(--accent);
  background: #edf8f5;
  border-radius: 8px;
  padding: 16px;
  line-height: 1.45;
}

.gift-panel,
.admin-panel {
  grid-column: 1 / -1;
}

.gift-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 96px auto;
  gap: 10px;
}

.gift-form input,
.gift-form button {
  min-height: 44px;
}

.gift-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

#staff-list.gift-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.gift-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 14px;
  display: grid;
  gap: 12px;
}

#staff-list .gift-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gift-item strong,
[data-field="person"] strong {
  display: block;
}

.gift-item span,
[data-field="person"] span,
[data-field="person"] small,
.muted {
  color: var(--muted);
}

.gift-item input {
  min-height: 40px;
  padding: 9px 10px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-actions input {
  width: 220px;
  min-height: 44px;
  padding: 10px 12px;
}

.promo-result {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: #fffaf0;
  color: #5f4b1f;
  padding: 14px 16px;
  line-height: 1.45;
}

.promo-result strong {
  color: var(--ink);
}

.promo-result .promo-code {
  display: inline-block;
  margin-top: 8px;
}

.secondary-button,
.danger-button,
.mini-button,
.camera-button,
.outline-button,
.primary-small-button {
  min-height: 44px;
  padding: 0 14px;
}

.secondary-button,
.danger-button,
.mini-button,
.camera-button,
.primary-small-button {
  color: #fff;
}

.secondary-button {
  background: var(--blue);
}

.danger-button {
  background: var(--danger);
}

.mini-button {
  background: var(--accent);
}

.camera-button {
  background: var(--amber);
}

.outline-button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.primary-small-button {
  background: var(--accent);
}

.link-button {
  background: #e8f3ff;
  color: var(--blue);
  min-height: 36px;
  padding: 0 12px;
}

.icon-button {
  width: 38px;
  height: 38px;
  background: #edf1f3;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: #304149;
  background: #f1f5f7;
  font-size: 0.88rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-cell,
.empty-gift {
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.row-actions {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) auto;
  gap: 8px;
}

.code-badge,
.promo-code {
  border: 1px solid #bfd8d4;
  border-radius: 6px;
  background: #effaf7;
  color: var(--accent-strong);
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.special-promo {
  display: grid;
  gap: 6px;
}

.promo-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.row-actions select,
.row-actions button {
  min-height: 38px;
  padding: 7px 10px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(23, 32, 38, 0.64);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 14px;
  overflow: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-panel img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.choice-panel {
  width: min(560px, 100%);
}

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

.choice-button {
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  padding: 18px;
  text-align: left;
  display: grid;
  align-content: center;
  gap: 8px;
}

.choice-button:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.choice-button strong {
  font-size: 1.08rem;
}

.choice-button span {
  color: var(--muted);
  line-height: 1.4;
}

.camera-panel {
  width: min(820px, 100%);
}

.camera-panel video,
.camera-panel canvas {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: #101820;
  object-fit: cover;
}

.camera-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.camera-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: min(100% - 20px, 760px);
    padding: 10px 0 22px;
  }

  .register-panel,
  .status-panel,
  .gift-panel,
  .admin-panel {
    padding: 18px;
  }

  .form-grid,
  .stats,
  .mode-switch,
  .business-card-field,
  .gift-list,
  .choice-actions {
    grid-template-columns: 1fr;
  }

  .brand-row,
  .admin-header,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-mark {
    width: 100px !important;
    height: 100px !important;
    margin-bottom: 10px;
  }
  .brand-mark img {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
  }

  .language-control {
    margin-left: 0;
    width: 100%;
  }

  .gift-form,
  .admin-actions {
    width: 100%;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .admin-actions input,
  .admin-actions button {
    width: 100%;
  }
}


.detail-modal-panel {
  width: min(1000px, 100%);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  padding: 0 !important;
  max-height: 85vh;
  overflow-y: auto;
  scrollbar-width: thin;
}
.detail-modal-panel::-webkit-scrollbar {
  width: 8px;
}
.detail-modal-panel::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 4px;
}
.detail-modal-panel .modal-header {
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 10;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 24px;
}
[data-theme="dark"] .detail-modal-panel .modal-header {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
[data-theme="dark"] .detail-modal-panel::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.2);
}

[data-theme="dark"] .detail-modal-panel {
  background: rgba(26, 36, 44, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 24px;
}

@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

[data-theme="dark"] .detail-card {
  background: rgba(17, 24, 29, 0.6);
}

.detail-card h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.detail-item {
  margin-bottom: 14px;
}
.detail-item:last-child {
  margin-bottom: 0;
}
.detail-item span.label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.detail-item span.value {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 600;
}

.detail-photo-wrapper {
  grid-column: 1 / -1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 10px;
}
.detail-photo-wrapper img {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  .admin-actions input[type="search"], .admin-actions button {
    flex: 1 1 100%;
  }
  .detail-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  opacity: 0;
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  font-weight: bold;
}
.toast-message {
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 500;
}
[data-theme="dark"] .toast {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Table Toolbar Styles */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  margin-bottom: 12px;
  background: var(--paper);
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.toolbar-center {
  flex: 1;
  max-width: 450px;
}
.toolbar-center input {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9rem;
}
.toolbar-right {
  display: flex;
  gap: 6px;
}
.success-small-button {
  background: #10b981 !important;
  color: #fff !important;
  border: none !important;
}
.success-small-button:hover {
  background: #059669 !important;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.25);
}
@media (max-width: 768px) {
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .toolbar-center {
    max-width: 100%;
  }
  .toolbar-right {
    justify-content: flex-end;
  }
}

/* --- Sekmeli Tasarım (Tabbed Layout) Stilleri --- */
.app-header {
  width: 98%;
  max-width: 1800px;
  margin: 16px auto 0 auto;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(217, 224, 228, 0.9);
  border-radius: 12px;
  padding: 16px 16px 0 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  overflow: visible;
}
[data-theme="dark"] .app-header {
  background: rgba(26, 36, 44, 0.93);
  border-color: rgba(45, 59, 69, 0.9);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0 !important;
  flex-shrink: 0;
}

.tab-navigation {
  display: flex;
  gap: 8px;
  border-bottom: none;
  padding-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
  width: 100%;
  align-items: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}
.tab-navigation::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 18px 12px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease-in-out;
  margin-bottom: -2px;
  outline: none;
}
.tab-btn:hover {
  color: var(--ink);
  border-bottom-color: var(--line);
}
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-icon {
  stroke: currentColor;
  transition: transform 0.2s ease;
}
.tab-btn:hover .tab-icon {
  transform: translateY(-1px);
}
.tab-btn.active .tab-icon {
  stroke: var(--accent);
}

/* Tab içerik geçişleri ve gizleme */
.tab-content {
  display: none !important;
}
.tab-content.active {
  display: block !important;
  opacity: 0;
  transform: translateY(8px);
  animation: tabFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#register-tab.active {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

@keyframes tabFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .app-header {
    width: min(100% - 20px, 760px);
    margin: 6px auto 0 auto;
    padding: 8px 12px 4px 12px;
    border-radius: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .tab-navigation {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 4px;
    width: 100%;
  }
  #register-tab.active {
    grid-template-columns: 1fr !important;
  }
  .tab-btn {
    padding: 8px 12px 10px 12px;
    font-size: 0.9rem;
  }
}

