:root {
  --primary: #6d28d9;
  --primary-soft: #f1eefe;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --white: #ffffff;
  --danger: #ef4444;
  --success: #10b981;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 22px 50px -12px rgba(15, 23, 42, 0.12);
  --radius-ui: 14px;
  --radius-pill: 999px;
  --header-blur: 16px;
}

body.dark-mode {
  --primary: #a78bfa;
  --primary-soft: #2a2240;
  --bg: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: #334155;
  --white: #111827;
  --shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow-x: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body.auth-mode {
  overflow-x: hidden;
  overflow-y: auto;
}

body.app-mode {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Footer sadece auth modda görünür */
body.app-mode #footer-placeholder {
  display: none;
}

body.auth-mode #footer-placeholder {
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  cursor: pointer;
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.hidden {
  display: none !important;
}

/* -------------------- LOADING -------------------- */
#loading-overlay,
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  z-index: 3000;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #1e293b);
  letter-spacing: 0.02em;
}

#loading-overlay::after,
.loading-overlay::after {
  content: "";
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid rgba(124, 58, 237, 0.2);
  border-top-color: #7c3aed;
  animation: authSpin 0.75s linear infinite;
}

body.dark-mode #loading-overlay,
body.dark-mode .loading-overlay {
  background: rgba(15, 23, 42, 0.96);
  color: var(--text);
}

/* -------------------- AUTH -------------------- */
#auth-screen,
#main-app {
  width: 100%;
  min-height: 100vh;
}

#auth-screen {
  display: flex;
  background: linear-gradient(180deg, #fafbfe 0%, #f1f5f9 100%);
  position: relative;
}

#auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(124, 58, 237, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(16, 185, 129, 0.1), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

#auth-screen > * {
  position: relative;
  z-index: 1;
}

.auth-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.auth-left {
  flex: 0 0 min(100%, 480px);
  max-width: 520px;
  padding: 40px 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
}

.auth-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 8px;
}

.auth-lead {
  color: var(--muted);
  line-height: 1.5;
  font-size: 1.02rem;
  max-width: 36ch;
}

.auth-brand-area {
  margin-bottom: 32px;
}

.auth-brand-area h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.15;
}

.auth-brand-area p {
  color: var(--muted);
}

.auth-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-hint {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 4px 0 14px;
}

.auth-row-between {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 8px;
}

.auth-link {
  background: none;
  border: none;
  padding: 6px 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-family: inherit;
}

.auth-link:hover {
  color: #5b21b6;
}

.auth-forms-container {
  width: 100%;
  max-width: 460px;
}

.auth-header {
  margin-bottom: 18px;
}

.auth-header h3 {
  margin-bottom: 6px;
  font-size: 1.4rem;
}

.auth-header p {
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-tab {
  padding: 14px;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.2s ease;
  text-align: center;
  color: var(--muted);
}

.auth-tab.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}

.auth-input {
  width: 100%;
  padding: 15px 16px;
  margin-bottom: 0;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 1rem;
  outline: none;
  transition: 0.2s;
  background: #fff;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.password-field {
  position: relative;
}

.password-input {
  padding-right: 52px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.06);
  border-radius: 10px;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.toggle-password:hover {
  background: rgba(124, 58, 237, 0.14);
  color: var(--primary);
}

#password-rules-container {
  display: none;
  margin-top: 6px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--primary-soft);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 12px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

#password-rules-container.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#password-rules-container.fade-out {
  opacity: 0;
  transform: translateY(-6px);
}

.rule-item {
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.rule-item:last-child {
  margin-bottom: 0;
}

.rule-item.valid {
  color: var(--success);
  font-weight: 700;
}

.rule-item.valid::after {
  content: " ✓";
}

#register-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  margin-bottom: 8px;
}

.micro-text {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.divider {
  text-align: center;
  margin: 16px 0;
  color: var(--muted);
  position: relative;
}

.divider span {
  background: #fff;
  padding: 0 10px;
  position: relative;
  z-index: 1;
}

.divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--border);
}

/* -------------------- RIGHT SHOWCASE -------------------- */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.16), transparent 35%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.16), transparent 35%),
    linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  overflow: hidden;
  flex: 1;
}

.phone-showcase {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.phone-mockup {
  position: relative;
  width: 320px;
  min-width: 320px;
  height: 650px;
  border-radius: 42px;
  padding: 14px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  box-shadow:
    0 30px 60px rgba(15, 23, 42, 0.22),
    0 10px 30px rgba(124, 58, 237, 0.18);
  animation: floatPhone 4s ease-in-out infinite;
}

.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 26px;
  background: #0f172a;
  border-radius: 0 0 18px 18px;
  z-index: 3;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(180deg, #fcfcff 0%, #f8fafc 100%);
  padding: 32px 18px 18px;
  overflow: hidden;
  position: relative;
}

.mockup-header {
  margin-bottom: 18px;
}

.mockup-badge {
  display: inline-block;
  padding: 6px 12px;
  background: #ede9fe;
  color: #7c3aed;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.mockup-header h3 {
  font-size: 24px;
  line-height: 1.15;
  margin-bottom: 8px;
  color: #1e293b;
}

.mockup-header p {
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}

.mockup-balance-card {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #fff;
  padding: 18px;
  border-radius: 24px;
  margin-bottom: 16px;
  box-shadow: 0 14px 28px rgba(124, 58, 237, 0.24);
}

.mockup-balance-card span {
  display: block;
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 6px;
}

.mockup-balance-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.mockup-balance-card small {
  font-size: 12px;
  opacity: 0.95;
}

.mockup-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.mini-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.mini-stat span {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.mini-stat strong {
  font-size: 16px;
  color: #1e293b;
}

.mockup-chart-card,
.mockup-list-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.mockup-chart-card {
  margin-bottom: 16px;
}

.chart-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.chart-title-row span {
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
}

.chart-title-row small {
  color: #64748b;
  font-size: 12px;
}

.fake-chart {
  height: 120px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
}

.fake-chart .bar {
  flex: 1;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, #34d399 0%, #7c3aed 100%);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.16);
  animation: growBar 1s ease forwards;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

.list-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.list-row b {
  display: block;
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 3px;
}

.list-row small {
  color: #64748b;
  font-size: 12px;
}

.list-row span {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
}

.planned-pill {
  background: #ede9fe;
  color: #7c3aed !important;
  padding: 8px 10px;
  border-radius: 999px;
}

.showcase-text {
  max-width: 280px;
}

.showcase-text h2 {
  font-size: 34px;
  line-height: 1.1;
  margin-bottom: 14px;
  color: #1e293b;
}

.showcase-text p {
  font-size: 15px;
  line-height: 1.7;
  color: #64748b;
}

/* -------------------- APP LAYOUT -------------------- */
#main-app {
  background: var(--bg);
}

.app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.sidebar-v2 {
  width: 260px;
  min-width: 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fafaff 100%);
  border-right: 1px solid var(--border);
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px -12px rgba(15, 23, 42, 0.06);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 28px 40px;
  min-width: 0;
  width: 100%;
  background: radial-gradient(ellipse 100% 80% at 100% 0%, #ede9fe 0%, transparent 52%),
    radial-gradient(ellipse 80% 50% at 0% 20%, #dbeafe 0%, transparent 45%),
    var(--bg);
}

.header-slot {
  width: 100%;
  flex-shrink: 0;
}

.header-slot > * {
  width: 100%;
}

.sidebar-brand h2 {
  font-size: 1.5rem;
}

.sidebar-brand p {
  color: var(--muted);
  margin-top: 4px;
  margin-bottom: 24px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.menu-item.active,
.menu-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---- App shell: sticky üst bar (2026 SaaS) ---- */
.app-top-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: calc(100% + 56px);
  max-width: none;
  margin: 0 -28px 8px;
  padding: 16px 28px 14px;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(var(--header-blur)) saturate(1.15);
  -webkit-backdrop-filter: blur(var(--header-blur)) saturate(1.15);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

@supports not (background: color-mix(in srgb, white, black)) {
  .app-top-header {
    background: rgba(255, 255, 255, 0.88);
  }
}

.app-top-header__row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.topbar,
.topbar-with-user {
  position: static;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  width: 100%;
}

.topbar-with-user {
  z-index: auto;
}

.topbar-intro {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(100%, 640px);
}

.topbar h1,
.page-welcome {
  margin: 0 0 4px 0;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 48ch;
  margin: 0;
}

/* ---- Kullanıcı menüsü (sağ üst) ---- */
.user-menu-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: min(100%, 300px);
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  text-align: left;
}

.user-menu-trigger:hover {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.12);
}

.user-menu-trigger[aria-expanded="true"] {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px var(--primary-soft, #ede9fe);
}

.user-menu-trigger[aria-expanded="true"] .user-menu-chevron {
  transform: rotate(180deg);
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6d28d9, #a78bfa);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.user-menu-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.user-menu-chevron {
  font-size: 0.65rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
  margin-left: 2px;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 2500;
}

.user-menu-dropdown.is-open {
  display: block;
  animation: userMenuIn 0.2s ease;
}

@keyframes userMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.user-menu-item:hover {
  background: var(--primary-soft, #f3f0ff);
  color: #5b21b6;
}

.user-menu-item-danger {
  color: #dc2626;
}

.user-menu-item-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.toolbar-controls {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.toolbar-controls select {
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.stat-card:hover,
.card:hover {
  border-color: #ddd6fe;
  box-shadow: 0 4px 20px -2px rgba(79, 70, 229, 0.12);
}

.stat-card label {
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}

.stat-card p {
  font-size: 1.3rem;
  font-weight: 800;
}

.input-area-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 14px;
  align-items: start;
  margin-top: 16px;
}

.lists-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.item-list {
  margin-top: 18px;
}

.item-card {
  border: 1px solid #ede9f9;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-main span {
  color: var(--muted);
  font-size: 0.95rem;
}

.item-actions {
  display: flex;
  gap: 8px;
}

.mini-btn {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}

.mini-btn.done {
  background: var(--primary-soft);
  color: var(--primary);
}

.mini-btn.delete {
  background: #fef2f2;
  color: var(--danger);
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

#report-card h3 {
  margin-bottom: 12px;
}

#report-card p {
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.5;
}

#report-card p:last-child {
  margin-bottom: 0;
}

/* -------------------- BUTTONS -------------------- */
.primary-btn,
.secondary-btn,
.google-btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 16px;
  transition: transform 0.18s ease, opacity 0.18s ease;
  cursor: pointer;
  border: none;
}

.primary-btn {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  color: #fff;
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:active,
.secondary-btn:active {
  transform: translateY(0);
}

.secondary-btn {
  color: #6d28d9;
  background: #f3e8ff;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFC107' d='M43.6 20.5H42V20H24v8h11.3c-1.6 4.1-5.1 6.9-9.2 6.9-5.2 0-9.4-4.2-9.4-9.4s4.2-9.4 9.4-9.4c2.3 0 4.4.8 6 2.1l5.6-5.6C32.1 5.1 28.2 3.5 24 3.5 12.7 3.5 3.5 12.7 3.5 24S12.7 44.5 24 44.5 44.5 35.3 44.5 24c0-1.2-.1-2.3-.3-3.4z'/%3E%3Cpath fill='%23FF3D00' d='M6.3 14.7l6.6 4.8C14.3 16.4 18.6 12.5 24 12.5c2.3 0 4.4.8 6 2.1l5.6-5.6C32.1 5.1 28.2 3.5 24 3.5 12.7 3.5 3.5 12.7 3.5 24c0 1.2.1 2.3.3 3.4z'/%3E%3Cpath fill='%234CAF50' d='M24 44.5c4.1 0 7.8-1.3 10.5-3.5l-6.1-4.2c-1.7 1.1-3.7 1.7-4.4 1.7-4.1 0-7.2-2.5-8.3-5.6L6.3 36.1C9.1 40.4 16.1 44.5 24 44.5z'/%3E%3Cpath fill='%231976D2' d='M43.6 20.5H42V20H24v8h11.3c-.8 1.7-1.6 2.5-2.3 2.5h.1l6.1 4.2c-1.4 1.1-1.2 1.1-1.1 1.1 2.1-1.5 3.2-2.1 3.2-2.1 0.5-0.1 0.7-0.1 0.3-0.1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.purple-pulse-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #4a00e0 100%);
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.purple-pulse-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(91, 33, 182, 0.3);
}

.purple-pulse-btn:active {
  transform: translateY(1px);
}

.purple-pulse-btn.active {
  background: linear-gradient(135deg, #5b21b6 0%, #6d28d9 100%);
  box-shadow: 0 6px 20px rgba(91, 33, 182, 0.45);
  outline: 2px solid rgba(167, 139, 250, 0.5);
  outline-offset: 2px;
}

/* -------------------- SETTINGS PAGE -------------------- */
.page-section {
  display: none;
  padding-top: 12px;
  flex: 1;
  min-width: 0;
}

.settings-page {
  padding: 24px;
}

.settings-header {
  margin-bottom: 24px;
}

.settings-header h1 {
  font-size: 32px;
  font-weight: 800;
  color: #1f2a44;
  margin-bottom: 8px;
}

.settings-header p {
  font-size: 16px;
  color: #667085;
}

.settings-card {
  background: #ffffff;
  border: 1px solid #ece8f7;
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(109, 40, 217, 0.05);
}

.settings-card h2 {
  font-size: 28px;
  font-weight: 800;
  color: #1f2a44;
  margin-bottom: 8px;
}

.settings-card p {
  font-size: 15px;
  color: #667085;
  margin-bottom: 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.settings-grid .form-group:only-child,
.settings-grid .form-group.full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #475467;
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  height: 52px;
  padding: 0 16px;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  font-size: 16px;
  background: #fff;
  color: #1f2a44;
  outline: none;
  transition: 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #6d28d9;
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.10);
}

.settings-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.settings-actions .primary-btn,
.settings-actions .secondary-btn {
  min-width: 220px;
  height: 54px;
  width: auto;
}

/* -------------------- MODALS -------------------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.modal-content h3 {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 500px;
  background: #1a1a1a;
  border: 2px solid #ba55d3;
  padding: 30px;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 0 30px rgba(75, 0, 130, 0.6);
  position: relative;
}

.modal-box h2 {
  margin-bottom: 14px;
  color: #fff;
}

.modal-box p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 10px;
}

.modal-box p:last-child {
  margin-bottom: 0;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #ba55d3;
}

/* -------------------- FOOTER -------------------- */
.footer-section {
  background: rgba(15, 10, 40, 0.6);
  color: #94a3b8;
  padding: 14px 24px;
  border-top: 1px solid rgba(124, 58, 237, 0.15);
  margin-top: auto;
}

#footer-placeholder {
  /* Normal akışta — fixed DEĞİL */
  position: static;
  width: 100%;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer-brand {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.footer-copy {
  font-size: 0.78rem;
  color: #64748b;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* -------------------- COOKIE POPUP -------------------- */
.cookie-popup {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(75, 0, 130, 0.95);
  color: #fff;
  padding: 15px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid #ba55d3;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cookie-text {
  font-size: 13px;
  font-family: sans-serif;
}

.cookie-link {
  color: #ffd700;
  text-decoration: underline;
  margin-left: 5px;
}

.cookie-btn {
  background: #fff;
  color: #4b0082;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
  margin-left: 10px;
}

/* -------------------- PUSH NOTIFICATIONS -------------------- */
.push-wrap {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.push {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  border: 1px solid #e2e8f0;
  font-weight: 700;
  color: #1e293b;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.25s ease;
}

.push.show {
  opacity: 1;
  transform: translateY(0);
}

.push-success {
  border-left: 4px solid #10b981;
}

.push-error {
  border-left: 4px solid #ef4444;
}

.push-info {
  border-left: 4px solid #7c3aed;
}

/* -------------------- MISC -------------------- */
.main-content-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* -------------------- TAP HIGHLIGHT -------------------- */
button,
a,
.auth-tab,
.menu-item,
.mini-btn,
.primary-btn,
.secondary-btn,
.google-btn,
.user-menu-trigger,
.user-menu-item {
  -webkit-tap-highlight-color: transparent;
}

/* -------------------- DARK MODE -------------------- */
body.dark-mode .sidebar-v2,
body.dark-mode .card,
body.dark-mode .stat-card,
body.dark-mode .item-card,
body.dark-mode .modal-content,
body.dark-mode .footer-section,
body.dark-mode .google-btn,
body.dark-mode .auth-input {
  background: #111827;
  color: var(--text);
  border-color: var(--border);
}

body.dark-mode .content-wrapper {
  background: radial-gradient(ellipse 100% 80% at 100% 0%, rgba(88, 28, 135, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 0% 30%, rgba(30, 58, 138, 0.2) 0%, transparent 45%),
    var(--bg);
}

body.dark-mode .app-top-header {
  background: color-mix(in srgb, #111827 92%, transparent);
  border-color: var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

@supports not (background: color-mix(in srgb, white, black)) {
  body.dark-mode .app-top-header {
    background: rgba(15, 23, 42, 0.92);
  }
}

/* Auth — dark */
body.dark-mode #auth-screen {
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
}

body.dark-mode #auth-screen::before {
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(124, 58, 237, 0.25), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(16, 185, 129, 0.12), transparent 45%);
}

body.dark-mode .auth-left {
  background: rgba(17, 24, 39, 0.92);
  border-color: var(--border);
}

body.dark-mode .auth-tab {
  background: #1e293b;
  border-color: var(--border);
  color: var(--muted);
}

body.dark-mode .auth-tab.active {
  background: #312e81;
  color: #c4b5fd;
  border-color: #7c3aed;
}

body.dark-mode .auth-hint,
body.dark-mode .auth-lead {
  color: var(--muted);
}

body.dark-mode .auth-link {
  color: #a78bfa;
}

body.dark-mode .auth-link:hover {
  color: #c4b5fd;
}

body.dark-mode .user-menu-trigger,
body.dark-mode .user-menu-dropdown {
  background: #111827;
  border-color: var(--border);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

body.dark-mode .user-avatar {
  background: linear-gradient(135deg, #5b21b6, #6d28d9);
}

body.dark-mode .user-menu-item:hover {
  background: #1e1b4b;
  color: #e9d5ff;
}

body.dark-mode .user-menu-item-danger:hover {
  background: #450a0a;
  color: #fecaca;
}

body.dark-mode .menu-item.active,
body.dark-mode .menu-item:hover {
  background: #312e81;
  color: #e9d5ff;
}

/* -------------------- ANIMATIONS -------------------- */
@keyframes authSpin {
  to { transform: rotate(360deg); }
}

@keyframes floatPhone {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes growBar {
  from { height: 0; }
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 1200px) {
  .phone-showcase {
    gap: 24px;
  }

  .showcase-text h2 {
    font-size: 28px;
  }
}

@media (max-width: 1024px) {
  .auth-left {
    flex: 0 0 400px;
    padding: 32px 36px;
  }

  .lists-container {
    grid-template-columns: 1fr;
  }

  .auth-right {
    padding: 20px;
  }

  .phone-showcase {
    flex-direction: column;
  }

  .showcase-text {
    max-width: 420px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .app-top-header {
    width: calc(100% + 40px);
    margin: 0 -20px 8px;
    padding: 12px 20px 10px;
  }

  .app-top-header__row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .user-menu-wrap {
    width: 100%;
    margin-left: 0;
  }

  .user-menu-trigger {
    max-width: none;
    width: 100%;
    justify-content: space-between;
  }

  .user-menu-dropdown {
    left: 0;
    right: 0;
    width: 100%;
  }

  body.auth-mode {
    overflow-y: auto;
  }

  .auth-layout {
    flex-direction: column;
  }

  .auth-left {
    flex: none;
    width: 100%;
    min-height: 100vh;
    padding: 32px 20px;
    justify-content: flex-start;
    border-right: none;
  }

  .auth-right {
    display: none;
  }

  .app-layout {
    flex-direction: column;
  }

  .sidebar-v2 {
    width: 100%;
    min-height: auto;
    position: relative;
    top: auto;
    padding: 20px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .content-wrapper {
    padding: 20px;
    padding-bottom: 40px;
  }

  #footer-placeholder {
    left: 0;
  }

  .input-area-row {
    grid-template-columns: 1fr;
  }

  .cookie-popup {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-btn {
    margin-left: 0;
  }

  .settings-page {
    padding: 16px;
  }

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

  .settings-card h2 {
    font-size: 22px;
  }

  .settings-header h1 {
    font-size: 26px;
  }

  .settings-actions .primary-btn,
  .settings-actions .secondary-btn {
    width: 100%;
    min-width: 100%;
  }
}
/* -------------------- SIDEBAR CONTROLS -------------------- */
.sidebar-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.control-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 4px 6px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
  line-height: 1;
}

.ctrl-btn:hover {
  background: rgba(124, 58, 237, 0.12);
  transform: scale(1.12);
}

.ctrl-btn.ctrl-active {
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
  transform: scale(1.08);
}

body.dark-mode .control-pill {
  background: #1e1b4b;
}

body.dark-mode .ctrl-btn.ctrl-active {
  background: #7c3aed;
}
/* ============================================================
   APPEARANCE BUTTON & GLASSMORPHISM PANEL
   style.css'in sonuna ekle
   ============================================================ */

/* --- Görünüm Butonu --- */
.appearance-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}

.appearance-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.appearance-btn.open {
  background: var(--primary);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}

/* --- Glassmorphism Panel --- */
.appearance-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
  padding: 16px;
  border-radius: 20px;

  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 8px 32px rgba(124, 58, 237, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.25);

  animation: apFadeIn 0.22s ease;
}

.appearance-panel.open {
  display: flex;
}

@keyframes apFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Dark modda panel */
body.dark-mode .appearance-panel {
  background: rgba(15, 10, 40, 0.55);
  border-color: rgba(167, 139, 250, 0.22);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(167,139,250,0.15);
}

/* --- Bölüm --- */
.ap-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ap-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* --- Seçenek Butonları --- */
.ap-options {
  display: flex;
  gap: 6px;
}

.ap-opt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.12);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
}

.ap-opt:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-1px);
}

.ap-opt.ap-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

body.dark-mode .ap-opt {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
  color: var(--text);
}

body.dark-mode .ap-opt:hover {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.35);
}

.ap-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* --- Ayırıcı --- */
.ap-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
}

body.dark-mode .ap-divider {
  background: rgba(167, 139, 250, 0.15);
}
#calendar {
  user-select: auto;
}
/* =========================
   TAKVIM FINAL
========================= */

/* =========================
   GLASSMORPHISM TAKVİM & MODAL
========================= */

:root {
  --glass-bg: rgba(255, 255, 255, 0.45); /* Şeffaf beyaz */
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --glass-blur: blur(10px); /* Meşhur buzlu cam efekti */
}

#takvim-konteynir {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  z-index: 4000;
  padding: 15px;
  border-radius: 24px;
  
  /* Glassmorphism Gövdesi */
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Pop-up (Modal) Overlay */
.calendar-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px); /* Arkayı hafif flulaştır */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.calendar-modal-overlay.show {
  display: flex;
}

/* Pop-up Cam Kutusu */
.calendar-modal-box {
  width: 90%;
  max-width: 350px;
  padding: 25px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  text-align: center;
}

.calendar-modal-input {
  width: 100%;
  padding: 15px;
  margin: 15px 0;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.5);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}

.save-btn {
  background: #db2777; /* Senin pembe */
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}
/* Takvim toggle butonu */
#takvim-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 16px;
}

#takvim-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.4);
}

#takvim-toggle-btn:active {
  transform: translateY(0);
}

/* Takvimin Gizli/Açık Halleri */
.hidden-calendar {
  display: none;
}

.show-calendar {
  display: block;
  margin-top: 8px;
  margin-bottom: 20px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

#takvim-konteynir {
  transition: all 0.3s ease;
}