
:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #172033;
  background: #f5f7fb;
  font-synthesis: none;
  --green: #16866a;
  --muted: #8590a3;
  --border: #e9edf4;
  --navy: #101827;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
}

button, input, select {
  font: inherit;
}

button, select {
  cursor: pointer;
}

.app {
  min-height: 100vh;
}

.sidebar {
  width: 248px;
  padding: 30px 20px;
  background: var(--navy);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  font-size: 22px;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.8px;
}

.brand-icon {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #16866a;
  font-size: 23px;
}

.brand-light {
  color: #63d5b0;
}

.nav-label {
  margin: 52px 0 16px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #77849a;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  padding: 13px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #aab4c6;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.nav-item:hover,
.nav-item.active {
  background: #202d40;
  color: #fff;
}

.nav-item.active {
  box-shadow: inset 3px 0 #50d3a6;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 18px 14px;
  border: 1px solid #29374b;
  border-radius: 13px;
  background: #172235;
}

.privacy-icon {
  margin-bottom: 12px;
}

.sidebar-bottom strong {
  font-size: 12px;
}

.sidebar-bottom p {
  color: #aab4c6;
  font-size: 11px;
  line-height: 1.7;
}

.local-status {
  display: block;
  margin-top: 15px;
  color: #67d6ae;
  font-size: 10px;
}

.main {
  max-width: 1800px;
  margin-left: 248px;
  padding: 36px 40px;
}

.topbar,
.topbar-right,
.card-heading,
.panel-heading,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 30px;
}

.eyebrow {
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.5px;
}

h1 {
  margin: 8px 0;
  font-size: clamp(25px, 3vw, 32px);
  letter-spacing: -1px;
}

.muted,
.card-foot {
  color: var(--muted);
  font-size: 12px;
}

.muted {
  margin: 6px 0 0;
}

.date-label {
  color: #6c7789;
  font-size: 12px;
}

.primary-btn {
  padding: 12px 17px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: white;
  font-weight: 650;
  font-size: 12px;
  transition: background 0.2s, transform 0.2s;
}

.primary-btn:hover {
  background: #106d56;
  transform: translateY(-1px);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 24px;
}

.summary-card,
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgb(28 43 67 / 3%);
}

.summary-card {
  padding: 22px 20px;
  min-width: 0;
}

.balance-card {
  background: #122a2a;
  color: white;
  border-color: #122a2a;
}

.card-heading {
  color: #7f899b;
  font-size: 12px;
}

.balance-card .card-heading {
  color: #c2d9d4;
}

.card-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  background: #edf8f3;
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
}

.balance-card .card-icon {
  background: #244542;
  color: #80e0be;
}

.expense-icon {
  color: #d65c68;
  background: #fff0f1;
}

.summary-card h2 {
  margin: 22px 0 12px;
  font-size: clamp(19px, 2vw, 27px);
  letter-spacing: -0.8px;
  overflow-wrap: anywhere;
}

.card-foot {
  margin: 0;
  line-height: 1.5;
}

.balance-card .card-foot {
  color: #bdd0cb;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}

.panel {
  padding: 23px;
  min-width: 0;
}

.panel-heading {
  margin-bottom: 23px;
}

.panel-heading h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.panel-heading select {
  max-width: 150px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #586477;
  background: white;
  font-size: 11px;
}

.transaction-head,
.transaction-row {
  display: grid;
  grid-template-columns: minmax(100px, 1.6fr) minmax(80px, 1fr) 88px minmax(85px, 1fr) 25px;
  align-items: center;
  gap: 10px;
}

.transaction-head {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  color: #98a1b1;
  font-size: 9px;
  letter-spacing: 0.6px;
}

.transaction-row {
  padding: 16px 0;
  border-bottom: 1px solid #f0f2f6;
  font-size: 11px;
}

.transaction-row:last-child {
  border-bottom: 0;
}

.transaction-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.transaction-name strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.transaction-name small {
  display: block;
  margin-top: 3px;
  color: #9aa3b2;
  font-size: 10px;
}

.transaction-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  background: #eff8f4;
  color: var(--green);
  font-size: 15px;
}

.transaction-icon.expense {
  background: #fff0f1;
  color: #d65c68;
}

.transaction-category,
.transaction-date {
  color: #7c8798;
}

.transaction-amount {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.transaction-amount.income {
  color: var(--green);
}

.transaction-amount.expense {
  color: #263247;
}

.delete-btn {
  border: 0;
  border-radius: 6px;
  padding: 5px;
  color: #9aa3b2;
  background: transparent;
  font-size: 15px;
}

.delete-btn:hover {
  color: #d34d5a;
  background: #fff0f1;
}

.empty-state {
  padding: 35px 12px;
  color: #8b95a6;
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
}

.category-list {
  display: grid;
  gap: 23px;
}

.category-item {
  display: grid;
  gap: 9px;
}

.category-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.category-meta strong {
  overflow-wrap: anywhere;
}

.category-meta span {
  color: #778397;
  white-space: nowrap;
}

.progress-track {
  height: 7px;
  border-radius: 20px;
  background: #edf0f5;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #39b68b;
}

.form-panel {
  margin-bottom: 25px;
}

.form-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #edf8f3;
  color: var(--green);
}

.type-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 23px;
}

.type-option {
  cursor: pointer;
}

.type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-option span {
  display: block;
  padding: 11px 24px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #778397;
  font-size: 12px;
}

.type-option input:checked + span {
  background: #eaf7f1;
  border-color: #9bd9bf;
  color: #127454;
  font-weight: 700;
}

.type-option input:focus-visible + span {
  outline: 2px solid #16866a;
  outline-offset: 3px;
}

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

.form-grid label {
  display: grid;
  gap: 9px;
  color: #475368;
  font-size: 11px;
  font-weight: 650;
}

.form-grid input,
.form-grid select {
  width: 100%;
  min-width: 0;
  padding: 13px 12px;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
  outline: none;
  background: white;
  color: #243047;
  font-size: 12px;
}

.form-grid input:focus,
.form-grid select:focus {
  border-color: #38a986;
  box-shadow: 0 0 0 3px rgb(56 169 134 / 10%);
}

.form-grid input::placeholder {
  color: #a8b0bd;
}

.form-actions {
  margin-top: 23px;
}

#form-message {
  margin: 0;
  color: var(--green);
  font-size: 12px;
}

#form-message.error {
  color: #c13c49;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
  color: #9aa3b2;
  font-size: 10px;
}

@media (max-width: 1250px) {
  .sidebar {
    width: 205px;
    padding-inline: 15px;
  }

  .main {
    margin-left: 205px;
    padding: 28px 24px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 14px 17px;
  }

  .brand {
    font-size: 20px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .nav-label,
  .sidebar-bottom {
    display: none;
  }

  .sidebar nav {
    display: flex;
    gap: 6px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .nav-item {
    flex-shrink: 0;
    padding: 10px;
    font-size: 12px;
  }

  .nav-item.active {
    box-shadow: inset 0 -3px #50d3a6;
  }

  .main {
    margin-left: 0;
    padding: 23px 15px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-right {
    align-items: flex-end;
    flex-direction: column;
    gap: 9px;
  }

  .date-label {
    display: none;
  }

  .primary-btn {
    padding: 11px 12px;
    white-space: nowrap;
  }

  .summary-grid {
    gap: 10px;
  }

  .summary-card {
    padding: 15px 13px;
    border-radius: 12px;
  }

  .card-heading {
    align-items: flex-start;
    font-size: 11px;
  }

  .card-icon {
    width: 27px;
    height: 27px;
  }

  .summary-card h2 {
    margin: 16px 0 9px;
    font-size: clamp(17px, 4.7vw, 23px);
  }

  .card-foot {
    font-size: 10px;
  }

  .panel {
    padding: 16px 12px;
    border-radius: 12px;
  }

  .transaction-head,
  .transaction-row {
    grid-template-columns: minmax(90px, 1.5fr) minmax(68px, 1fr) minmax(72px, 1fr) 24px;
    gap: 6px;
  }

  .transaction-head span:nth-child(3),
  .transaction-date {
    display: none;
  }

  .transaction-head {
    font-size: 8px;
  }

  .transaction-row {
    font-size: 10px;
  }

  .transaction-icon {
    width: 27px;
    height: 27px;
  }

  .transaction-name {
    gap: 6px;
  }

  .transaction-amount {
    font-size: 10px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  footer {
    flex-direction: column;
  }
}

/* Bulut hesabı */
[hidden] { display: none !important; }
.auth-screen { min-height:100vh;display:grid;place-items:center;padding:24px;background:#f5f7fb; }
.auth-card {width:min(100%,430px);padding:32px;background:white;border:1px solid #e9edf4;border-radius:18px;box-shadow:0 12px 45px #17203312;}
.auth-brand {font-size:23px;font-weight:800;color:#16866a;margin-bottom:22px;}
.auth-card h1 {font-size:25px;}
.auth-card form {display:grid;gap:16px;margin-top:25px;}
.auth-card label {display:grid;gap:7px;font-size:13px;font-weight:600;}
.auth-card input {width:100%;padding:13px;border:1px solid #d9e0e9;border-radius:9px;}
.auth-card .primary-btn {font-size:14px;}
.text-btn {border:0;background:transparent;color:#16866a;font-weight:650;cursor:pointer;padding:10px;}
#auth-message,#import-message {font-size:12px;line-height:1.6;overflow-wrap:anywhere;}
#import-panel {margin-bottom:22px;}
#import-panel h3 {margin-top:0;}
#import-panel .primary-btn {margin-top:14px;}

.choices {
  margin-bottom: 0;
}

.choices__inner {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #e1e6ee;
  border-radius: 12px;
  background: #ffffff;
  color: #243047;
  font-size: 14px;
  display: flex;
  align-items: center;
  box-shadow: none;
}

.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
  border-color: #38a986;
  box-shadow: 0 0 0 3px rgb(56 169 134 / 10%);
}

.choices__list--single {
  padding: 0;
}

.choices[data-type*="select-one"]::after {
  right: 16px;
  margin-top: -3px;
  border-color: #6e7a8d transparent transparent transparent;
}

.choices.is-open[data-type*="select-one"]::after {
  margin-top: -7px;
  border-color: transparent transparent #6e7a8d transparent;
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
  margin-top: 8px;
  border: 1px solid #e7edf3;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 18px 40px rgb(15 23 42 / 12%);
}

.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
  padding: 12px 14px;
  font-size: 14px;
  color: #243047;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
  background: #eaf7f1;
  color: #127454;
}

.choices__placeholder {
  color: #9aa3b2;
  opacity: 1;
}

.form-field {
  display: grid;
  gap: 9px;
}

.field-label {
  color: #475368;
  font-size: 11px;
  font-weight: 650;
}

.form-field .choices {
  width: 100%;
  margin: 0;
}

.user-greeting {
  color: #243047;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.profile-menu-wrapper {
  position: relative;
}

.profile-button {
  border: 1px solid #e1e6ee;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 9px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgb(15 23 42 / 5%);
  transition: 0.2s ease;
}

.profile-button:hover {
  background: #f7faf9;
  border-color: #b8dccc;
  box-shadow: 0 4px 14px rgb(15 23 42 / 8%);
}

.profile-button:focus-visible {
  outline: 2px solid #16866a;
  outline-offset: 2px;
}

.profile-arrow {
  font-size: 12px;
  color: #7c8798;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid #e7edf3;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgb(15 23 42 / 12%);
  overflow: hidden;
  z-index: 9999;
}

.profile-menu-header {
  padding: 14px;
  border-bottom: 1px solid #eef1f5;
}

.profile-menu-header strong {
  display: block;
  font-size: 13px;
  color: #243047;
}

.profile-menu-header span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #8a95a6;
  overflow-wrap: anywhere;
}

.profile-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  cursor: pointer;
  color: #354156;
}

.profile-menu-item:hover {
  background: #f5f7fa;
}

.profile-menu-item.danger {
  color: #c13c49;
}

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;

  background: #eaf7f1;
  color: #16866a;

  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 45%);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 10000;
}

.modal-card {
  width: min(100%, 430px);
  background: #ffffff;
  border: 1px solid #e7edf3;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgb(15 23 42 / 20%);
  padding: 22px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #243047;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f2f5f8;
  color: #667085;
  cursor: pointer;
  font-size: 20px;
}

.modal-close:hover {
  background: #e9edf2;
}

#profile-form {
  display: grid;
  gap: 16px;
}

#profile-form label {
  display: grid;
  gap: 7px;
  color: #475368;
  font-size: 12px;
  font-weight: 650;
}

#profile-form input {
  width: 100%;
  padding: 13px 12px;
  border: 1px solid #e1e6ee;
  border-radius: 9px;
  outline: none;
  background: white;
  color: #243047;
}

#profile-form input:focus {
  border-color: #38a986;
  box-shadow: 0 0 0 3px rgb(56 169 134 / 10%);
}

#profile-form-message {
  margin: 0;
  min-height: 18px;
  font-size: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

#password-form {
  display: grid;
  gap: 16px;
}

#password-form label {
  display: grid;
  gap: 7px;
  color: #475368;
  font-size: 12px;
  font-weight: 650;
}

#password-form input {
  width: 100%;
  padding: 13px 12px;
  border: 1px solid #e1e6ee;
  border-radius: 9px;
  outline: none;
  background: white;
  color: #243047;
}

#password-form input:focus {
  border-color: #38a986;
  box-shadow: 0 0 0 3px rgb(56 169 134 / 10%);
}

#password-form-message {
  margin: 0;
  min-height: 18px;
  font-size: 12px;
}