:root {
  --bg: #f1f5f9;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --teal: #0d9488;
  --teal-2: #14b8a6;
  --blue: #0284c7;
  --border: #e2e8f0;
  --err: #b91c1c;
  --err-bg: #fef2f2;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --ring: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

.page-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(145deg, #ecfdf5, #f8fafc 50%, #e0f2fe);
}

.card {
  background: var(--card);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--border);
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.error {
  color: var(--err);
  font-size: 0.9rem;
}

.hint {
  font-size: 0.85rem;
  color: #0f766e;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.75rem;
}

.captcha-box {
  margin: 0.75rem 0;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #c4b5fd;
  background: #f5f3ff;
}

.captcha-box label {
  font-size: 1rem;
  font-weight: 700;
  color: #5b21b6;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

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

input[type='password'],
input[type='text'],
input[type='email'],
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

input[type='password']:focus,
input[type='text']:focus,
input[type='email']:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(20, 184, 166, 0.75);
  box-shadow: var(--ring);
  background: #fff;
}

button,
.btn {
  cursor: pointer;
  border-radius: 0.5rem;
  font-weight: 600;
  border: none;
  padding: 0.65rem 1rem;
}

button:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.login-card button[type='submit'] {
  width: 100%;
  background: var(--teal);
  color: #fff;
}

.page-apps {
  padding: 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.topbar h1 {
  margin: 0;
  font-size: 1.5rem;
}

.app-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.app-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
}

.app-tile.active {
  border-color: #99f6e4;
  background: linear-gradient(135deg, #f0fdfa, #ecfeff);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.12);
}

.app-tile.disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f8fafc;
  border-style: dashed;
}

.emoji {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.5rem;
}

.app-tile h2 {
  margin: 0;
  font-size: 1.1rem;
}

.btn-ghost {
  display: inline-block;
  background: #fff;
  border: 1px solid #cbd5e1;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
}

.btn-ghost:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-blue {
  background: #0369a1;
  color: #fff;
}

.btn-violet {
  background: #7c3aed;
  color: #fff;
}

.btn-danger {
  background: #b91c1c;
  color: #fff;
  border: 1px solid #991b1b;
}

.btn-danger:hover {
  background: #991b1b;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.35rem;
  cursor: pointer;
  border: none;
  font-weight: 600;
}

.notif-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.asm-cell-name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.asm-cell-loc {
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.msg-asm-block {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.35;
}

.msg-actions {
  margin-top: 0.45rem;
}

.page-admin {
  padding: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.admin-top {
  align-items: flex-start;
}

.admin-top .left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.admin-top h1 {
  margin: 0;
  font-size: 1.25rem;
}

.banner-error {
  background: var(--err-bg);
  border: 1px solid #fecaca;
  color: var(--err);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.banner-success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
}

.stat-box .label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.stat-box .val {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.row-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #f1f5f9;
}

th {
  border-bottom: 2px solid var(--border);
}

.form-grid {
  display: grid;
  gap: 0.5rem;
  max-width: 520px;
  margin-top: 0.5rem;
}

.form-grid textarea {
  margin-bottom: 0;
}

.notif-item {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.notif-item pre {
  margin: 0.5rem 0 0;
  white-space: pre-wrap;
  font-family: inherit;
}

.messages {
  max-height: 320px;
  overflow-y: auto;
  font-size: 0.9rem;
}

.msg {
  border-bottom: 1px solid #f1f5f9;
  padding: 0.65rem 0;
}

code {
  font-size: 0.8rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

/* —— Admin (ASM Gider) —— */
.admin-header {
  margin-bottom: 1.25rem;
}

.admin-header-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.admin-header h1 {
  margin: 0.35rem 0 0.25rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 36rem;
  line-height: 1.45;
}

.admin-back {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.admin-back:hover {
  text-decoration: underline;
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  background: #e2e8f0;
  border-radius: 0.75rem;
}

.admin-tab {
  flex: 1 1 auto;
  min-width: 7.5rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.admin-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
}

.admin-tab.is-active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.admin-tab-panels {
  min-height: 12rem;
}

.admin-tab-panel[hidden] {
  display: none !important;
}

.admin-panel {
  padding: 1.35rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.panel-lead {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 42rem;
}

.info-card {
  background: linear-gradient(135deg, #f0fdfa, #f8fafc);
  border: 1px solid #99f6e4;
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
}

.info-card strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f766e;
  margin-bottom: 0.5rem;
}

.manifest-summary {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}

.manifest-summary li {
  margin: 0.4rem 0;
  line-height: 1.4;
}

.manifest-ver {
  font-weight: 700;
  font-size: 1rem;
}

.form-stack {
  max-width: 32rem;
}

.form-stack-narrow {
  max-width: 28rem;
}

.form-stack .field {
  margin-bottom: 1.15rem;
}

.form-stack .field label {
  margin-bottom: 0.4rem;
}

.form-stack .field input,
.form-stack .field textarea,
.form-stack .field select {
  margin-bottom: 0;
}

.field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.file-drop {
  padding: 0.5rem 0;
}

.file-drop input[type='file'] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 2px dashed #cbd5e1;
  border-radius: 0.6rem;
  background: #f8fafc;
  cursor: pointer;
}

.file-drop input[type='file']:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.btn-wide {
  width: 100%;
  margin-top: 0.25rem;
}

.admin-details {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.admin-details summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}

.admin-details summary:hover {
  color: var(--text);
}

.subsection-title {
  margin: 1.75rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.notifications-stack {
  margin-top: 0.5rem;
}

.notifications-stack .notif-item:first-child {
  margin-top: 0;
}

.notifications-stack .notif-item {
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.notifications-stack .notif-item pre {
  margin-top: 0.65rem;
}

.messages-card {
  max-height: 480px;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

/* Liste içi kartlar (iletişim / ödemeler) */
.messages-card .msg {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 0.9rem;
  padding: 0.85rem 0.9rem;
  margin: 0.55rem 0;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.messages-card .msg:first-child {
  margin-top: 0;
}
.messages-card .msg:last-child {
  margin-bottom: 0;
}

.messages-card .msg pre {
  margin: 0.65rem 0 0;
}

/* —— ASM portal yönetim (admin_asmgider) —— */
.page-admin-portal {
  min-height: 100vh;
  position: relative;
  color: var(--text);
}

.portal-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 90% at 12% -25%, rgba(20, 184, 166, 0.16), transparent 55%),
    radial-gradient(ellipse 110% 70% at 105% 0%, rgba(59, 130, 246, 0.12), transparent 55%),
    radial-gradient(ellipse 80% 60% at 45% 120%, rgba(99, 102, 241, 0.10), transparent 50%),
    linear-gradient(180deg, #f8fafc 0%, #f3f6fb 35%, #eef2f7 100%);
  pointer-events: none;
}

.portal-layout {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
}

.portal-header {
  padding: 1.75rem 0 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  margin-bottom: 0.75rem;
}

.portal-header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .portal-header-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.portal-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: linear-gradient(145deg, #0d9488, #2563eb);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 14px 34px rgba(13, 148, 136, 0.18), 0 10px 26px rgba(37, 99, 235, 0.12);
}

.portal-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.portal-brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.portal-brand-sub {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.portal-tagline {
  margin: 0;
  font-size: 0.88rem;
  max-width: 22rem;
  line-height: 1.45;
}

.portal-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -1.25rem 1.25rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.06);
}

.portal-nav-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: 1080px;
  margin: 0 auto;
}

.portal-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.4rem;
  margin-left: 0.15rem;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #fb7185);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.18);
}

.portal-nav-badge[hidden] {
  display: none !important;
}

.pay-actions-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.pay-mini-stats {
  margin-top: 0.75rem;
}

.pay-mini-stats .stat-box {
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 38px rgba(15, 23, 42, 0.06);
}

.pay-mini-stats .stat-box .label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
}

.pay-mini-stats .stat-box .val {
  letter-spacing: -0.02em;
}

.pay-group {
  margin-top: 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 44px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.pay-group:first-child {
  margin-top: 0.75rem;
}

.pay-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(241, 245, 249, 0.88));
}

.pay-group-title strong {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.pay-group--ok .pay-group-head {
  border-bottom-color: rgba(134, 239, 172, 0.55);
}

.pay-group--err .pay-group-head {
  border-bottom-color: rgba(254, 202, 202, 0.75);
}

.pay-group--info .pay-group-head {
  border-bottom-color: rgba(125, 211, 252, 0.65);
}

.pay-group-list {
  padding: 0.65rem 0.75rem;
}

.pay-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 0.85rem 0.9rem;
  margin: 0.65rem 0;
}

.pay-card:first-child {
  margin-top: 0;
}

.pay-card:last-child {
  margin-bottom: 0;
}

.pay-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.pay-card-main {
  min-width: min(100%, 14rem);
  flex: 1;
}

.pay-card-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pay-meta {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.pay-amount strong {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.pay-card-name {
  margin-top: 0.3rem;
}

.pay-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pay-pill--ok {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.pay-pill--err {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.pay-pill--info {
  background: #e0f2fe;
  color: #075985;
  border-color: #7dd3fc;
}

.pay-details {
  margin-top: 0.6rem;
}

.pay-details-summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  color: #0369a1;
}

.pay-details-summary::-webkit-details-marker {
  display: none;
}

.pay-details-summary::before {
  content: '▸';
  color: var(--blue);
  font-weight: 900;
  transform: translateY(-0.5px);
}

.pay-details[open] .pay-details-summary::before {
  content: '▾';
}

.pay-details-body {
  margin-top: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.pay-details-actions {
  margin-top: 0.75rem;
  gap: 0.5rem;
}

.pay-group {
  margin-top: 0.75rem;
}

.pay-group:first-child {
  margin-top: 0;
}

.pay-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.25rem 0 0.35rem;
  padding: 0.35rem 0.25rem;
}

.pay-group-head strong {
  font-size: 0.85rem;
  letter-spacing: -0.01em;
}

.pay-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.9rem;
}

.pay-detail-grid .muted {
  display: block;
  font-size: 0.72rem;
  margin-bottom: 0.15rem;
}

.pay-detail-grid .val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.pay-detail-grid .span2 {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .pay-detail-grid {
    grid-template-columns: 1fr;
  }
  .pay-detail-grid .span2 {
    grid-column: auto;
  }
}

.pay-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.5rem 0 0.9rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 0.85rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.85), rgba(241, 245, 249, 0.85));
}

.pay-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: min(100%, 34rem);
  flex: 1;
}

.pay-toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.pay-search,
.pay-select {
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 0.82rem;
  outline: none;
}

.pay-search {
  min-width: min(100%, 22rem);
  flex: 1;
}

.pay-search:focus,
.pay-select:focus {
  border-color: rgba(45, 212, 191, 0.8);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

@media (max-width: 640px) {
  .pay-actions-head {
    justify-content: flex-start;
    width: 100%;
    margin-top: 0.5rem;
  }

  .msg[data-pid] .notif-item-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.portal-unseen-pill {
  display: inline-block;
  margin-right: 0.25rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  border-radius: 999px;
  vertical-align: middle;
}

.thank-preview-frame {
  width: 100%;
  min-height: 320px;
  max-height: 480px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.portal-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.95rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(203, 213, 225, 0.45);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.88);
  color: var(--muted);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.portal-nav-btn:hover {
  background: #fff;
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.portal-nav-btn.is-active {
  background: #fff;
  color: #0f172a;
  border-color: rgba(20, 184, 166, 0.55);
  box-shadow:
    0 10px 26px rgba(13, 148, 136, 0.10),
    0 6px 16px rgba(15, 23, 42, 0.06);
}

.portal-nav-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* Ödemeler (eski - geriye uyum, artık pay-card kullanılıyor) */
.pay-item {
  display: none;
}

.portal-nav-icon {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.9;
}

.portal-main {
  padding-top: 0.25rem;
}

.portal-banner-error,
.portal-banner-success {
  margin-bottom: 1rem;
  border-radius: 0.75rem;
}

.portal-panels {
  min-height: 12rem;
}

.portal-panel {
  display: none !important;
}

.portal-panel.is-visible {
  display: block !important;
  animation: portalFadeIn 0.22s ease;
}

@keyframes portalFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portal-card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 1rem;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 44px rgba(15, 23, 42, 0.08);
}

.portal-card--flush {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.portal-card--flush .portal-card-title {
  font-size: 1rem;
  margin-bottom: 0.55rem;
}

.portal-card--flush .portal-card-lead {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.portal-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.portal-card-lead {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 44rem;
}

.portal-card-lead code {
  background: rgba(226, 232, 240, 0.65);
}

.portal-card-lead strong {
  font-weight: 800;
}

.portal-stats.stats {
  margin-bottom: 0;
}

.portal-controls.row-controls {
  margin-bottom: 0.85rem;
}

.portal-table-wrap {
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.portal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.portal-table thead {
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0.95),
    rgba(241, 245, 249, 0.92)
  );
}

.portal-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.portal-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.portal-table th,
.portal-table td {
  padding: 0.7rem 0.75rem;
}

.portal-table th:first-child,
.portal-table td:first-child {
  padding-left: 0.9rem;
}

.portal-table th:last-child,
.portal-table td:last-child {
  padding-right: 0.9rem;
}

.portal-table td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.portal-table tbody tr:nth-child(2n) td {
  background: rgba(248, 250, 252, 0.65);
}

.portal-table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.06);
}

.portal-table tbody tr:last-child td {
  border-bottom: none;
}

.portal-info-card.info-card {
  margin-top: 0.25rem;
}

.portal-footer {
  text-align: center;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  margin-top: 1rem;
}

.portal-settings-grid {
  display: grid;
  gap: 0.85rem;
  max-width: 32rem;
}

@media (min-width: 520px) {
  .portal-settings-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    max-width: none;
  }
}

.portal-settings-tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.25rem 0.75rem;
  align-items: center;
  padding: 1.1rem 1.15rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.12s;
}

.portal-settings-tile:hover {
  border-color: #99f6e4;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.12);
  transform: translateY(-1px);
}

.portal-settings-tile--muted:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.portal-settings-tile-icon {
  grid-row: span 2;
  font-size: 1.35rem;
  line-height: 1;
}

.portal-settings-tile-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.portal-settings-tile-desc {
  grid-column: 2;
  font-size: 0.8rem;
  line-height: 1.35;
}

.portal-settings-tile-arrow {
  grid-row: span 2;
  font-size: 1.1rem;
  color: #94a3b8;
  font-weight: 300;
}

.portal-settings-tile:hover .portal-settings-tile-arrow {
  color: #0d9488;
}

/* =========================
   Genel (portal/public) UI
   ========================= */

:root {
  --surface: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.78);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius-sm: 0.6rem;
  --radius-md: 0.85rem;
  --radius-lg: 1.1rem;
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page {
  min-height: 100vh;
  position: relative;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 12% -20%, rgba(45, 212, 191, 0.18), transparent 52%),
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(56, 189, 248, 0.14), transparent 45%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 45%, #e2e8f0 100%);
}

.shell {
  position: relative;
  z-index: 1;
  padding: 1.75rem 0 2.5rem;
}

.page-center {
  min-height: calc(100vh - 3.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.hero-card {
  width: 100%;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), var(--shadow-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-head {
  padding: 1.1rem 1.25rem;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(2, 132, 199, 0.08));
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.hero-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-body {
  padding: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 820px) {
  .grid-2 {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
  }
}

.box {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.box-title {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #334155;
}

.kv {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
}

.kv b {
  color: var(--text);
}

.btn:hover,
button:hover {
  filter: brightness(0.98);
}

.btn:active,
button:active {
  transform: translateY(0.5px);
}

.btn {
  text-decoration: none;
}

.btn:disabled,
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.88);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.notice {
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(248, 250, 252, 0.8);
  font-size: 0.9rem;
}

.notice-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.notice-err {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.page-footer {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
}
