/* ===== Veresiye Defteri — Mobil öncelikli stiller ===== */

:root {
  --color-primary: #1a9e5c;
  --color-primary-dark: #15804a;
  --color-primary-light: #e8f7ef;
  --color-bg: #f2f0eb;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --text3: #9aa3a0;
  --color-border: #e5e2db;
  --color-receivable: #1a9e5c;
  --color-payable: #d64545;
  /* Esnaf bakışı: müşteri borçlandı (alacak +) / ödedi (alacak −) */
  --color-alacak-artis: #1a9e5c;
  --color-alacak-azalis: #d64545;
  --bg-alacak-artis: #e8f7ef;
  --bg-alacak-azalis: #fdeaea;
  --color-warning: #e6a817;
  --color-whatsapp: #25d366;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --nav-height: 64px;
  --topbar-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --app-height: 100dvh;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --max-width: 430px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100dvh;
  height: 100%;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.is-pressed {
  transform: scale(0.97) !important;
  opacity: 0.85 !important;
  transition: transform 150ms ease, opacity 150ms ease;
}

[data-nav],
.chip,
.period-tab,
.customer-item,
.home-quick-btn,
.bottom-nav__item,
.home-header__avatar,
.topbar__back,
.type-toggle__option,
.settings-item__btn,
a.home-payment-banner {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

ul {
  list-style: none;
}

.hidden {
  display: none !important;
}

/* ===== App kabuğu ===== */

.app {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: var(--app-height, 100dvh);
  height: 100%;
  background: var(--color-bg);
  position: relative;
  box-shadow: 0 0 0 1px var(--color-border);
}

.screen {
  display: none;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 24px);
  animation: fadeIn 0.2s ease;
}

.screen--active {
  display: block;
}

#screen-login.screen--active {
  padding: 0;
  min-height: var(--app-height, 100dvh);
  overflow: hidden;
}

#screen-customer-detail.screen--active,
.screen--form.screen--active {
  padding-bottom: calc(32px + var(--safe-bottom));
}

#screen-new-transaction.screen--active {
  padding-bottom: 0;
}

#transaction-form.form-stack {
  padding-bottom: 80px;
}

.form-submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin-top: 8px;
  margin-left: -16px;
  margin-right: -16px;
  padding: 12px 16px calc(12px + var(--nav-height) + var(--safe-bottom));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.06);
}

.form-submit-bar .btn {
  margin: 0;
}

#screen-home.screen--active {
  padding: 0;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: var(--app-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}

.app-shell .screen--active {
  flex: none;
}

/* ===== Giriş ===== */

@keyframes loginSlideUp {
  from {
    opacity: 0;
    transform: translateY(48px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login {
  min-height: var(--app-height, 100dvh);
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #0f3d2b 0%, #1a6644 55%, #145238 100%);
}

.login__hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--safe-top) + 32px) 24px 16px;
  text-align: center;
  min-height: 0;
}

.login__hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.login__footer {
  flex-shrink: 0;
  width: 100%;
  padding-bottom: 8px;
  text-align: center;
}

.login__brand {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.01em;
}

.login__copyright {
  margin: 4px 0 0;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
}

.login__logo {
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login__logo svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.18));
}

.login__title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.login-onboarding {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  user-select: none;
  touch-action: pan-y;
}

.login-onboarding__viewport {
  overflow: hidden;
  width: 100%;
  cursor: grab;
}

.login-onboarding__viewport.is-dragging {
  cursor: grabbing;
}

.login-onboarding__track {
  display: flex;
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-onboarding__track--instant {
  transition: none;
}

.login-onboarding__slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 4px 4px 0;
  text-align: center;
}

.login-onboarding__icon {
  display: block;
  font-size: 44px;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.login-onboarding__slide-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.login-onboarding__slide-desc {
  margin: 0 auto;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.68);
  min-height: 2.95em;
}

.login-onboarding__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.login-onboarding__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 150ms ease;
}

.login-onboarding__dot--active {
  background: #5deca0;
  transform: scale(1.25);
}

.login__subtitle {
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.5;
  max-width: 260px;
  margin: 0 auto 16px;
}

.login__card {
  flex-shrink: 0;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 28px 24px calc(var(--safe-bottom) + 24px);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
  animation: loginSlideUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.login-tab {
  flex: 1;
  padding: 12px 8px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 200ms ease, border-color 200ms ease, transform 150ms ease, opacity 150ms ease;
}

.login-tab--active {
  color: #0f3d2b;
  border-bottom-color: #1a6644;
}

.login__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-height: 52px;
  background: #f7f9f8;
  border: 1.5px solid #e8eeeb;
  border-radius: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-field:focus-within {
  background: #fff;
  border-color: #1a6644;
  box-shadow: 0 0 0 3px rgba(26, 102, 68, 0.12);
}

.login-field__icon {
  flex-shrink: 0;
  width: 22px;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  user-select: none;
}

.login-field__input {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  outline: none;
}

.login-field__input::placeholder {
  color: #9aa8a1;
  font-weight: 400;
}

.login-field__input--password {
  padding-right: 4px;
}

.login-field__toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: #7a8a82;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.login-field__toggle:hover {
  color: #0f3d2b;
  background: rgba(15, 61, 43, 0.06);
}

.login-field__eye {
  display: block;
}

.login-message {
  margin: 0;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.45;
  border-radius: 12px;
}

.login-message--error {
  color: #b42318;
  background: #fff0f0;
  border: 1px solid #fecaca;
}

.login-message--success {
  color: #1a6644;
  background: #f0fff4;
  border: 1px solid #b8e6c8;
}

.login-submit {
  width: 100%;
  margin-top: 6px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0f3d2b 0%, #1a6644 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 61, 43, 0.28);
  transition: transform 150ms ease, opacity 150ms ease, box-shadow 150ms ease;
}

.login-submit:hover {
  box-shadow: 0 10px 28px rgba(15, 61, 43, 0.34);
}

.login-submit:disabled {
  opacity: 0.85;
  cursor: not-allowed;
  box-shadow: none;
}

.login-submit--loading {
  position: relative;
}

.login-submit--loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loginSpin 0.7s linear infinite;
}

@keyframes loginSpin {
  to { transform: rotate(360deg); }
}

.login__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 24px;
  margin-top: 2px;
}

.login__actions--reset {
  justify-content: flex-start;
}

.login__forgot {
  margin-left: auto;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: #1a6644;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease, opacity 150ms ease, transform 150ms ease;
}

.login__forgot:hover {
  color: #0f3d2b;
}

.login__back {
  margin-right: auto;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.login__back:hover {
  color: #0f3d2b;
}

.login__hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  color: #9aa8a1;
}

.login__card--reset .login-tabs {
  display: none;
}

.form-success {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #1a6644;
  background: #f0fff4;
  border-radius: var(--radius-sm);
  border: 1px solid #b8e6c8;
}

/* ===== Topbar ===== */

.topbar {
  position: relative;
  z-index: 10;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 8px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.topbar__back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text);
}

.topbar__back:active {
  background: var(--color-border);
}

.topbar__title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  padding-right: 40px;
}

.topbar__back:not(.hidden) + .topbar__title {
  padding-right: 0;
  text-align: left;
}

.main {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* ===== Form elemanları ===== */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.field__optional {
  font-weight: 400;
  color: var(--color-text-muted);
  opacity: 0.85;
}

.btn-add-customer {
  margin-bottom: 12px;
}

.field-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
}

.field-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.field-toggle__switch {
  width: 44px;
  height: 26px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}

.field-toggle__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.field-toggle__input:checked + .field-toggle__switch {
  background: var(--color-primary);
}

.field-toggle__input:checked + .field-toggle__switch::after {
  transform: translateX(18px);
}

.field-toggle__label {
  font-size: 15px;
  font-weight: 600;
}

.field--collapse {
  margin-top: -8px;
}

.period-tabs--scroll {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.period-tabs--scroll .period-tab {
  flex: 0 0 auto;
  min-width: 72px;
  white-space: nowrap;
}

.calendar-card__actions--three {
  grid-template-columns: repeat(3, 1fr);
}

.calendar-card__actions--two {
  grid-template-columns: 1fr 1fr;
}

.customer-item__phone--muted {
  font-style: italic;
  opacity: 0.7;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-stack .btn--block[type="submit"] {
  margin-top: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.field__phone {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.field__prefix {
  padding: 12px 14px;
  background: var(--color-bg);
  font-weight: 600;
  color: var(--color-text-muted);
  border-right: 1px solid var(--color-border);
}

.field__input {
  width: 100%;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s;
}

.field__phone .field__input {
  border: none;
  border-radius: 0;
}

.field__input:focus {
  border-color: var(--color-primary);
}

.field__input--otp {
  text-align: center;
  letter-spacing: 0.3em;
  font-size: 20px;
  font-weight: 600;
}

.field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.field__textarea {
  resize: vertical;
  min-height: 80px;
}

.form-error {
  font-size: 13px;
  color: var(--color-payable);
  text-align: center;
}

/* ===== Butonlar ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
}

.btn--block {
  width: 100%;
}

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
}

.customer-contact-actions .btn--whatsapp {
  margin-bottom: 0;
}

.btn--outline {
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn--ghost {
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 8px;
}

/* ===== Ana sayfa ===== */

.home-header {
  background: linear-gradient(160deg, #0f3d2b 0%, #1a6644 100%);
  padding: calc(var(--safe-top) + 16px) 20px 28px;
  border-radius: 0 0 24px 24px;
}

.home-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.home-header__hello {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 4px;
}

.home-header__business {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.home-header__avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #0f3d2b;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.home-header__avatar:active {
  background: rgba(255, 255, 255, 0.3);
}

.home-summary-card {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 20px 16px 16px;
  text-align: center;
}

.home-summary-card__label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}

.home-summary-card__net {
  font-size: 44px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.home-summary-card__net--negative {
  color: #ffc9c9;
}

.home-summary-card__net-desc {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin: -8px 0 16px;
  line-height: 1.35;
}

.home-summary-card__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.home-summary-card__box {
  background: #ffffff;
  opacity: 1;
  border: none;
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.home-summary-card__box-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 8px;
}

.home-summary-card__net-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.home-summary-card__net-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.home-summary-card__net-badge--credit {
  background: #dcfce7;
  color: #15803d;
}

.home-summary-card__net-badge--debt {
  background: #fee2e2;
  color: #b91c1c;
}

.home-summary-card__net--positive {
  color: var(--color-receivable);
}

.home-summary-card__box-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.home-summary-card__box-value {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.calendar-filter-chips .chip--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.home-summary-card__box-scope {
  display: block;
  margin-top: 0;
  font-size: 10px;
  font-weight: 500;
  color: rgba(51, 51, 51, 0.55);
  letter-spacing: 0.01em;
}

.home-summary-card__box--receivable .home-summary-card__box-value {
  color: var(--color-receivable);
}

.home-summary-card__box--payable .home-summary-card__box-value {
  color: var(--color-payable);
}

.home-body {
  padding: 20px 16px 0;
}

.home-payment-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff8e6 0%, #ffe8b8 100%);
  border: 1px solid #f0d080;
  border-radius: var(--radius-md);
  color: #7a5a00;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(230, 168, 23, 0.15);
  transition: transform 150ms ease, opacity 150ms ease, box-shadow 150ms ease;
}

.home-payment-banner__arrow {
  flex-shrink: 0;
  opacity: 0.7;
}

.home-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.home-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: var(--radius-lg);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 150ms ease, opacity 150ms ease, box-shadow 150ms ease;
}

.home-quick-btn__icon {
  font-size: 22px;
  line-height: 1;
}

.home-quick-btn--veresiye {
  background: #d64040;
}

.home-quick-btn--odeme {
  background: #1a9e5c;
}

.home-quick-btn--customer {
  background: linear-gradient(145deg, #4a8fe7 0%, #2563eb 100%);
}

.home-section__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
}

.home-tx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-tx-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.home-tx-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.home-tx-card[data-tx-type="receivable"],
.tx-item[data-tx-type="receivable"] {
  background: #fff0f0;
  box-shadow: none;
}

.home-tx-card[data-tx-type="payable"],
.tx-item[data-tx-type="payable"] {
  background: #f0fff4;
  box-shadow: none;
}

.home-tx-card[data-tx-type="borrowed"],
.tx-item[data-tx-type="borrowed"] {
  background: #f3f0ff;
  box-shadow: none;
}

.home-tx-card[data-tx-type="repaid"],
.tx-item[data-tx-type="repaid"] {
  background: #fff7ed;
  box-shadow: none;
}

.home-tx-card[data-tx-type="receivable"] .home-tx-card__icon,
.tx-item[data-tx-type="receivable"] .tx-item__icon {
  background: #ffe4e4;
  color: #d64545;
}

.home-tx-card[data-tx-type="payable"] .home-tx-card__icon,
.tx-item[data-tx-type="payable"] .tx-item__icon {
  background: #dff5e8;
  color: #1a9e5c;
}

.home-tx-card[data-tx-type="borrowed"] .home-tx-card__icon,
.tx-item[data-tx-type="borrowed"] .tx-item__icon {
  background: #e9e0ff;
  color: #7c3aed;
}

.home-tx-card[data-tx-type="repaid"] .home-tx-card__icon,
.tx-item[data-tx-type="repaid"] .tx-item__icon {
  background: #ffedd5;
  color: #ea580c;
}

.home-tx-card[data-tx-type="receivable"] .home-tx-card__amount,
.home-tx-card[data-tx-type="receivable"] .home-tx-card__tag,
.tx-item[data-tx-type="receivable"] .tx-item__amount {
  color: #d64545;
}

.home-tx-card[data-tx-type="payable"] .home-tx-card__amount,
.home-tx-card[data-tx-type="payable"] .home-tx-card__tag,
.tx-item[data-tx-type="payable"] .tx-item__amount {
  color: #1a9e5c;
}

.home-tx-card[data-tx-type="borrowed"] .home-tx-card__amount,
.home-tx-card[data-tx-type="borrowed"] .home-tx-card__tag,
.tx-item[data-tx-type="borrowed"] .tx-item__amount,
.tx-item[data-tx-type="borrowed"] .tx-item__tag {
  color: #7c3aed;
}

.home-tx-card[data-tx-type="repaid"] .home-tx-card__amount,
.home-tx-card[data-tx-type="repaid"] .home-tx-card__tag,
.tx-item[data-tx-type="repaid"] .tx-item__amount,
.tx-item[data-tx-type="repaid"] .tx-item__tag {
  color: #ea580c;
}

.home-tx-card__body {
  flex: 1;
  min-width: 0;
}

.home-tx-card__name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-tx-card__date {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.home-tx-card__amount-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.home-tx-card__amount {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  line-height: 1.2;
}

.home-tx-card__tag {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.home-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ===== Bölüm başlıkları ===== */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
}

.section-link {
  font-size: 13px;
  font-weight: 600;
}

/* ===== İşlem listesi ===== */

.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.tx-item__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tx-item__body {
  flex: 1;
  min-width: 0;
}

.tx-item__name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-item__meta {
  font-size: 12px;
  color: var(--color-text-muted);
}

.tx-item__amount {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  line-height: 1.2;
}

.tx-item__amount-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.tx-item__tag {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

/* ===== Uyarı listesi ===== */

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff8e6;
  border: 1px solid #f0e0b0;
  border-radius: var(--radius-md);
}

.alert-item__info {
  flex: 1;
}

.alert-item__name {
  font-weight: 600;
  font-size: 14px;
}

.alert-item__date {
  font-size: 12px;
  color: var(--color-warning);
  font-weight: 500;
}

/* ===== Arama & filtre ===== */

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.search-bar--with-sort {
  padding-right: 8px;
}

.search-bar--with-sort .search-bar__input {
  flex: 1;
  min-width: 0;
}

.btn-sort {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 18px;
  line-height: 1;
}

.btn-sort__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.search-bar__icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.search-bar__input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 0;
  outline: none;
}

.filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.chip--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ===== Müşteri listesi ===== */

.customer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}

.customer-item__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.customer-item__body {
  flex: 1;
  min-width: 0;
}

.customer-item__name {
  font-weight: 600;
  font-size: 15px;
}

.customer-item__phone {
  font-size: 12px;
  color: var(--color-text-muted);
}

.customer-item__balance {
  font-weight: 700;
  font-size: 14px;
  text-align: right;
}

.customer-item__balance--credit {
  color: var(--color-alacak-artis);
  font-weight: 700;
}

.customer-item__balance--owe {
  color: var(--color-alacak-azalis);
  font-weight: 700;
}

.customer-item__balance--closed {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 13px;
}

.customer-item__balance--overpaid {
  color: var(--color-warning);
  font-size: 13px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
}

.empty-state__icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ===== Müşteri detay ===== */

.customer-hero {
  text-align: center;
  padding: 24px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.customer-hero__name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.customer-hero__phone {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.customer-contact-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  margin-bottom: 16px;
}

.customer-contact-actions__btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 12px 10px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}

.customer-contact-actions__btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.customer-contact-actions .btn--whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
}

.customer-contact-actions .btn--mail {
  background: #2563eb;
  color: #fff;
}

.customer-contact-actions .btn--mail:hover {
  background: #1d4ed8;
}

.btn--mail {
  background: #2563eb;
  color: #fff;
}

.btn--mail:hover {
  background: #1d4ed8;
}

.customer-balances {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
  text-align: left;
}

.customer-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.customer-balance-row__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.customer-balance-row__value {
  font-size: 18px;
  font-weight: 800;
}

.customer-balance-row--theirs .customer-balance-row__value {
  color: var(--color-alacak-artis);
}

.customer-balance-row--mine .customer-balance-row__value {
  color: var(--color-alacak-azalis);
}

.customer-balance-net {
  padding: 14px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  text-align: center;
}

.customer-balance-net__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.customer-balance-net__text {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
}

.customer-balance-net__text--credit {
  color: var(--color-alacak-artis);
}

.customer-balance-net__text--owe {
  color: var(--color-alacak-azalis);
}

.customer-balance-net__text--closed {
  color: var(--color-text-muted);
}

.customer-hero__due {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ===== İşlem türü toggle ===== */

.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.type-toggle--quad {
  padding: 8px;
}

.tx-type-section__title {
  margin-bottom: 8px;
}

.tx-type-section.hidden {
  display: none;
}

.tx-date-block,
.tx-payment-block {
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.tx-date-block {
  border-left: 3px solid var(--color-primary);
}

.tx-payment-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 3px solid var(--color-warning);
}

.tx-payment-block .field--collapse {
  margin-top: 0;
  padding-top: 4px;
  border-top: 1px dashed var(--color-border);
}

.field__hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text3);
}

.type-toggle__option {
  position: relative;
  display: flex;
  min-width: 0;
}

.type-toggle__option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.type-toggle__face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s;
  flex: 1;
  width: 100%;
}

.type-toggle__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}

.type-toggle__hint {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0.85;
  max-width: 140px;
}

.type-toggle__icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.type-toggle__option input[value="receivable"]:checked + .type-toggle__face {
  background: #d64040;
  color: #fff;
}

.type-toggle__option input[value="payable"]:checked + .type-toggle__face {
  background: #1a9e5c;
  color: #fff;
}

.type-toggle__option input[value="borrowed"]:checked + .type-toggle__face {
  background: #2563eb;
  color: #fff;
}

.type-toggle__option input[value="repaid"]:checked + .type-toggle__face {
  background: #0d9488;
  color: #fff;
}

.type-toggle__option input:checked + .type-toggle__face .type-toggle__hint {
  opacity: 0.92;
}

/* ===== Takvim ===== */

.calendar-view-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.calendar-view-tab {
  flex: 1;
  padding: 10px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: calc(var(--radius-md) - 2px);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.calendar-view-tab--active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.calendar-view-panel.hidden {
  display: none;
}

.calendar-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.calendar-toolbar__btn {
  padding: 8px 16px;
  font-size: 13px;
}

.calendar-range-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.calendar-range-panel__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.field--compact .field__label {
  font-size: 12px;
}

.field--compact .field__input {
  padding: 10px;
  font-size: 14px;
}

.calendar-section-title {
  margin: 20px 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.calendar-card--overdue {
  border: 2px solid #dc2626;
  background: #fef2f2;
}

.calendar-card--completed {
  opacity: 0.85;
}

.badge--overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.badge--completed {
  background: #dcfce7;
  color: #15803d;
}

.period-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.calendar-filter-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.calendar-filter-chips {
  margin-bottom: 0;
}

.reminders-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reminder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.reminder-item__body {
  flex: 1;
  min-width: 0;
}

.reminder-item__name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.reminder-item__meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.reminder-item__delete {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-md);
  background: #fee2e2;
  color: #b91c1c;
  font-size: 16px;
}

.settings-item__desc--flush {
  margin-bottom: 0;
}

.period-tab {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.period-tab--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.calendar-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-card__name {
  font-weight: 700;
  font-size: 16px;
}

.calendar-card__amount {
  font-weight: 700;
  color: var(--color-receivable);
}

.calendar-card__meta {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.calendar-card__badges {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.calendar-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.calendar-card__actions .btn {
  font-size: 12px;
  padding: 10px 6px;
}

.btn--wa {
  background: var(--color-whatsapp);
  color: #fff;
}

.btn--remind {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.btn--paid {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

/* ===== Badge ===== */

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.badge--today {
  background: #fdeaea;
  color: var(--color-payable);
}

.badge--week {
  background: #fff3cd;
  color: #856404;
}

.badge--month {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge--sync {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge--sync-off {
  background: #fdeaea;
  color: var(--color-payable);
}

/* ===== Ayarlar ===== */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.settings-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  margin-bottom: 12px;
}

.settings-form {
  padding: 16px 20px;
  margin-bottom: 16px;
}

.settings-profile__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-profile__name {
  font-weight: 700;
  font-size: 17px;
}

.settings-profile__email {
  font-size: 14px;
  color: var(--color-text-muted);
}

.settings-list {
  margin-bottom: 24px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-card {
  margin-bottom: 16px;
  padding: 16px;
}

.settings-card__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.settings-item--flush {
  padding: 0;
  border: none;
}

/* ===== Hareketler listesi ===== */

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.activity-item__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--color-bg);
}

.activity-item[data-tx-type="receivable"] .activity-item__icon {
  background: #ecfdf5;
}

.activity-item[data-tx-type="payable"] .activity-item__icon {
  background: #eff6ff;
}

.activity-item[data-tx-type="borrowed"] .activity-item__icon {
  background: #eff6ff;
}

.activity-item[data-tx-type="repaid"] .activity-item__icon {
  background: #f0fdfa;
}

.activity-item__body {
  flex: 1;
  min-width: 0;
}

.activity-item__customer {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item__type {
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

.activity-item__meta {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item__amount-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.activity-item__amount {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.activity-item__tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.activity-item[data-tx-type="receivable"] .activity-item__amount {
  color: var(--color-alacak-artis);
}

.activity-item[data-tx-type="payable"] .activity-item__amount {
  color: var(--color-primary);
}

.settings-item__btn {
  width: 100%;
  text-align: center;
  font-weight: 600;
  padding: 4px 0;
}

.settings-item__btn--danger {
  color: var(--color-payable);
}

.settings-version {
  margin-top: 20px;
  padding: 0 8px 4px;
  text-align: center;
}

.settings-version__line {
  margin: 0;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}

.settings-version__line + .settings-version__line {
  margin-top: 6px;
}

/* ===== Plan kartları (Ayarlar) ===== */

.plan-card {
  position: relative;
  padding: 20px;
  margin-bottom: 12px;
}

.plan-card--current {
  border: 1px solid var(--color-border);
  border-left: 2px solid #1a9e5c;
}

.plan-card--premium {
  border: 2px solid transparent;
  background:
    linear-gradient(#fffef8, #fffef8) padding-box,
    linear-gradient(135deg, #f59e0b 0%, #fbbf24 45%, #d97706 100%) border-box;
  box-shadow: 0 8px 28px rgba(217, 119, 6, 0.18);
}

.plan-card__premium-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.06) 100%);
  pointer-events: none;
}

.plan-card__header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.plan-card__header--current {
  flex-wrap: wrap;
}

.plan-card__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.plan-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.plan-card__title--premium {
  font-size: 17px;
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan-badge {
  flex-shrink: 0;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.plan-badge--free {
  color: #15804a;
  background: #e8f7ef;
  border: 1px solid #b8e6c8;
}

.plan-badge--active {
  color: #15804a;
  background: #e8f7ef;
  border: 1px solid #1a9e5c;
  box-shadow: 0 1px 4px rgba(26, 158, 92, 0.15);
}

.plan-badge--premium {
  color: #78350f;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.plan-badge--premium-tag {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-width: 1.5px;
  box-shadow:
    0 2px 10px rgba(245, 158, 11, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.plan-features {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-features__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.35;
}

.plan-features__item--yes {
  color: var(--color-text);
}

.plan-features__item--no {
  color: var(--color-text-muted);
}

.plan-features__icon {
  flex-shrink: 0;
  width: 18px;
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.plan-card__cta {
  position: relative;
  width: 100%;
  margin-top: 10px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #451a03;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%);
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, box-shadow 150ms ease;
}

.plan-card__cta:hover {
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.42);
}

.plan-card__cta-note {
  position: relative;
  margin: 16px 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
  color: #92400e;
  opacity: 0.85;
}

.plan-card--current.plan-card--active-premium {
  border-left-color: #1a9e5c;
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffef8 0%, #fff 100%);
}

/* ===== Aylık özet kartı ===== */

.home-monthly-card {
  margin-bottom: 16px;
  padding: 16px;
}

.home-monthly-card__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.home-monthly-card__heading {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.home-monthly-card__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.home-monthly-card__subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  line-height: 1.3;
}

.home-monthly-card__arrow {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-monthly-card__arrow--disabled,
.home-monthly-card__arrow:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.home-monthly-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.home-monthly-card__stat {
  padding: 12px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.home-monthly-card__stat--net {
  grid-column: 1 / -1;
  background: var(--color-primary-light);
  border: 1px solid rgba(26, 158, 92, 0.15);
}

.home-monthly-card__net-summary {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--color-primary-dark);
  text-align: center;
}

.home-monthly-card__net-summary--paid {
  color: var(--color-primary);
}

.home-monthly-card__net-summary--even {
  color: var(--color-text-muted);
  font-weight: 600;
}

.home-monthly-card__stat-label {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.home-monthly-card__stat-value {
  font-size: 18px;
  font-weight: 700;
}

.home-monthly-card__stat-value--credit {
  color: var(--color-alacak-artis);
}

.home-monthly-card__stat-value--paid {
  color: var(--color-primary);
}

.home-monthly-card__stat-value--negative {
  color: var(--color-alacak-azalis);
}

/* ===== Müşteri menü & işlem silme ===== */

.customer-item__menu {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -4px;
}

.tx-item__menu {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -4px;
}

.customer-picker-trigger--locked {
  opacity: 0.72;
  pointer-events: none;
}

/* ===== Onay diyaloğu & action sheet ===== */

.confirm-dialog,
.action-sheet {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.confirm-dialog {
  align-items: center;
  padding: 24px;
}

.confirm-dialog.hidden,
.action-sheet.hidden {
  display: none;
}

.confirm-dialog__backdrop,
.action-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.confirm-dialog__panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.confirm-dialog__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.confirm-dialog__message {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.confirm-dialog__actions {
  display: flex;
  gap: 10px;
}

.confirm-dialog__btn {
  flex: 1;
}

.btn--danger {
  background: #dc2626;
  color: #fff;
  border: none;
}

.btn--danger:active {
  background: #b91c1c;
}

.action-sheet__panel {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 8px 0 calc(8px + var(--safe-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
}

.action-sheet__title {
  margin: 0;
  padding: 12px 20px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: center;
}

.action-sheet__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  border-top: 1px solid var(--color-border);
}

.action-sheet__item--check.action-sheet__item--selected {
  color: var(--color-primary);
  font-weight: 600;
}

.action-sheet__item--check.action-sheet__item--selected::after {
  content: "✓";
  margin-left: 8px;
  font-weight: 700;
}

.action-sheet__item--danger {
  color: #dc2626;
}

.action-sheet__item--cancel {
  margin-top: 8px;
  border-top: 8px solid var(--color-bg);
  font-weight: 600;
}

/* ===== İşlem ekranı müşteri seçici ===== */

.customer-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.customer-picker-trigger--selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-light);
}

.customer-picker-trigger__content {
  flex: 1;
  min-width: 0;
}

.customer-picker-trigger__name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-picker-trigger__name.customer-picker-trigger__placeholder {
  font-weight: 500;
  color: var(--color-text-muted);
}

.customer-picker-trigger__meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-picker-trigger__chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.customer-picker-sheet {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.customer-picker-sheet.hidden {
  display: none;
}

.customer-picker-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.customer-picker-sheet__panel {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  max-height: min(85dvh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.customer-picker-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px;
  flex-shrink: 0;
}

.customer-picker-sheet__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.customer-picker-sheet__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-picker-sheet__search {
  margin: 0 16px 12px;
  flex-shrink: 0;
}

.customer-picker-list {
  list-style: none;
  margin: 0;
  padding: 0 16px 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.customer-picker-item--selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.customer-picker-item__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.customer-picker-item--selected .customer-picker-item__avatar {
  background: var(--color-surface);
}

.customer-picker-item__body {
  flex: 1;
  min-width: 0;
}

.customer-picker-item__name {
  font-weight: 600;
  font-size: 15px;
}

.customer-picker-item__phone {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.customer-picker-item__phone--muted {
  font-style: italic;
}

.customer-picker-item__balance {
  font-weight: 700;
  font-size: 13px;
  text-align: right;
  flex-shrink: 0;
  max-width: 42%;
  line-height: 1.3;
}

.customer-picker-item__balance--credit {
  color: var(--color-alacak-artis);
}

.customer-picker-item__balance--owe {
  color: var(--color-alacak-azalis);
}

.customer-picker-item__balance--closed {
  color: var(--color-text-muted);
  font-weight: 600;
}

.customer-picker-item__balance--overpaid {
  color: var(--color-warning);
}

.customer-picker-list .empty-state {
  padding: 32px 16px;
}

/* ===== Bildirim toggle ===== */

.settings-item--toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-item__desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.settings-item__desc--warn {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fff8e6;
  border: 1px solid #f0e0b0;
  border-radius: var(--radius-md);
  color: #92400e;
  font-size: 13px;
  line-height: 1.45;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch__input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch__slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 28px;
  transition: background 0.2s;
  cursor: pointer;
}

.toggle-switch__slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch__input:checked + .toggle-switch__slider {
  background: var(--color-primary);
}

.toggle-switch__input:checked + .toggle-switch__slider::before {
  transform: translateX(20px);
}

.toggle-switch__input:disabled + .toggle-switch__slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Alt navigasyon (iOS tarzı tab bar) ===== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding: 0 4px var(--safe-bottom);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  background: #fff;
  border-top: 1px solid var(--color-border);
  z-index: 100;
  box-shadow: none;
}

.bottom-nav.hidden {
  display: none;
}

.bottom-nav__item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding: 8px 0 10px;
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.1;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__item span:not(.bottom-nav__fab-circle) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.bottom-nav__emoji {
  font-size: 22px;
  line-height: 1;
  display: block;
}

.bottom-nav__item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.bottom-nav__item--active {
  color: var(--color-primary);
}

.bottom-nav__item--fab {
  flex: 1;
  min-width: 0;
  padding: 0 0 10px;
  justify-content: flex-end;
  align-items: center;
  color: inherit;
}

.bottom-nav__fab-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  transform: translateY(-12px);
  box-shadow: 0 4px 14px rgba(26, 158, 92, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bottom-nav__item--fab svg {
  width: 24px;
  height: 24px;
}

.bottom-nav__item--fab:active .bottom-nav__fab-circle,
.bottom-nav__item--fab.is-pressed .bottom-nav__fab-circle {
  transform: translateY(-12px) scale(0.94);
  box-shadow: 0 2px 8px rgba(26, 158, 92, 0.35);
}

/* ===== Toast (üst — alt navigasyonu kapatmaz) ===== */

.toast {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(var(--max-width) - 32px);
  width: calc(100% - 32px);
  padding: 12px 16px;
  background: #333;
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  z-index: 300;
  pointer-events: none;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.25s ease;
}

.toast--success {
  background: #15803d;
  color: #fff;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
