﻿/* ============================================================
   iOS Native Dark — Tekin Medya Design System
   Font: Inter (Google Fonts) + System-UI fallback
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* High-Tech / Premium Dark Backgrounds (Deep Slate / Navy) */
  --bg: #09090b;
  --bg1: #13141a;
  --bg2: #1c1d24;
  --bg3: #272831;

  /* Glassmorphism Cards */
  --card: rgba(255, 255, 255, 0.03);
  --card2: rgba(255, 255, 255, 0.05);

  /* Premium Texts */
  --text: #f8fafc;
  --text2: #cbd5e1;
  --muted: #64748b;
  --muted2: rgba(100, 116, 139, 0.5);

  /* Neon Lights & Glows for UI Lines */
  --line: rgba(255, 255, 255, 0.08);

  /* Modern Vivid System Colors */
  --brand: #3b82f6;
  /* Electric Blue */
  --brand2: #10b981;
  /* Emerald Green */
  --danger: #ef4444;
  /* Neon Red */
  --warning: #f59e0b;
  /* Bright Amber */
  --indigo: #6366f1;
  /* Vivid Indigo */
  --teal: #06b6d4;
  /* Bright Cyan */
  --orange: #f97316;
  /* Sunset Orange */

  /* Deep Glowing Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --glow: 0 0 16px rgba(59, 130, 246, 0.4);
  --glow-danger: 0 0 16px rgba(239, 68, 68, 0.4);

  /* Refined Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ── Reset & Base ────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Outfit', 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  opacity: 0.8;
}

/* ── Typography ─────────────────────────────────────────── */
.h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  margin: 0 0 6px 0;
}

.h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.p {
  margin: 0 0 16px 0;
  color: var(--text2);
  line-height: 1.6;
}

.label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Layout Shell ───────────────────────────────────────── */
.shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.shell.sidebar-collapsed {
  grid-template-columns: 64px 1fr;
}

/* Flash/titreme önleyici — sidebar.js tarafından kısa süreliğine eklenir */
.shell.no-transition,
.shell.no-transition * {
  transition: none !important;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  background: rgba(19, 20, 26, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  position: relative;
  height: 100%;
}

.sidebar-toggle-wrapper {
  position: absolute;
  top: 18px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: opacity 0.2s;
  user-select: none;
}

.sidebar-toggle {
  width: 44px;
  height: 28px;
  border-radius: 14px;
  background: var(--brand);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: auto;
}

.sidebar-toggle:hover {
  background: var(--indigo);
  transform: scale(1.1);
  box-shadow: var(--glow);
}

.headerTitle {
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

.headerTitle-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
  margin-left: 12px;
}

.shell.sidebar-collapsed .nav-label,
.shell.sidebar-collapsed .sidebar-footer-text,
.shell.sidebar-collapsed .sidebar-toggle-label {
  opacity: 0;
  width: 0;
  display: none;
}

.shell.sidebar-collapsed .sidebar-footer {
  padding: 12px 8px;
}

.shell.sidebar-collapsed .small {
  display: none;
}

.shell.sidebar-collapsed .sidebar {
  padding: 16px 6px;
  align-items: center;
}

.shell.sidebar-collapsed .sidebar-toggle-wrapper {
  right: 18px;
}

.shell.sidebar-collapsed .nav a {
  padding: 10px;
  justify-content: center;
}

.shell.sidebar-collapsed .nav-icon {
  margin: 0;
}

.shell.sidebar-collapsed .sidebar-footer {
  justify-content: center;
  padding: 12px 0 4px 0;
}



.logoDot {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--indigo));
  box-shadow: 0 0 16px rgba(10, 132, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid transparent;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav a.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
  color: var(--brand);
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--glow);
}

.nav a.active .nav-icon {
  color: var(--brand);
}

.nav-icon {
  font-size: 17px;
  min-width: 20px;
  text-align: center;
}

.nav-label {
  transition: opacity 0.2s;
}

/* ── Sidebar Footer (Powered by) ────────────────────────── */
.sidebar-footer {
  padding: 12px 8px 12px 8px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
  white-space: normal;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.sidebar-footer:hover {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sidebar-footer-logo {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #FF9F0A, #FF453A);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: #fff;
}

.sidebar-footer-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s;
}

.sidebar-footer-text span:first-child {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}

.sidebar-footer-text span:last-child {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

/* ── Main Content ───────────────────────────────────────── */
.main {
  padding: 24px;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent 40%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.03), transparent 40%),
    var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card2 {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

/* ── Form Layout (Login/Auth) ───────────────────────────── */
.container {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(800px 600px at 20% 15%, rgba(10, 132, 255, 0.15), transparent 65%),
    radial-gradient(600px 500px at 85% 70%, rgba(94, 92, 230, 0.12), transparent 65%),
    var(--bg);
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }

  .brandPanel {
    display: none;
  }
}

.brandPanel {
  padding: 36px;
  background:
    radial-gradient(700px 500px at 10% 10%, rgba(10, 132, 255, 0.25), transparent 60%),
    radial-gradient(600px 400px at 80% 80%, rgba(94, 92, 230, 0.20), transparent 60%),
    var(--bg1);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brandTitle {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0 0 12px 0;
}

.brandSubtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 20px 0;
}

.badgeRow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.badge {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text2);
}

.formPanel {
  padding: 36px;
  background: var(--bg1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Fields / Inputs ─────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted2);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

.textarea {
  min-height: 92px;
  resize: vertical;
}

select.select option,
select.input option {
  background: var(--bg2);
  color: var(--text);
}

.row {
  display: flex;
  gap: 12px;
}

.row>* {
  flex: 1;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btnRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: scale(0.97);
}

.btnPrimary {
  background: linear-gradient(135deg, var(--brand), #2563eb);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: var(--glow);
}

.btnPrimary:hover {
  background: linear-gradient(135deg, #60a5fa, var(--brand));
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.btnGreen {
  background: linear-gradient(135deg, var(--brand2), #059669);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.btnGreen:hover {
  background: linear-gradient(135deg, #34d399, var(--brand2));
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}

.btnDanger {
  background: linear-gradient(135deg, var(--danger), #be123c);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

.btnDanger:hover {
  background: linear-gradient(135deg, #f87171, var(--danger));
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.btnSecondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text2);
}

.btnSecondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* ── Divider ─────────────────────────────────────────────── */
.hr {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

/* ── Messages ────────────────────────────────────────────── */
.msg {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.msg.error {
  color: #FF6B6B;
}

.msg.ok {
  color: var(--brand2);
}

/* ── Tables ──────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.table th,
.table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text2);
}

.table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* ── Grid ────────────────────────────────────────────────── */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 900px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 600px;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg2);
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: var(--bg3);
  color: var(--text);
}

/* ── Mobile Responsive (max-width: 768px) ──────────────── */
@media (max-width: 768px) {
  .shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }

  /* Hamburger Header Mode */
  .sidebar {
    width: 100%;
    height: auto;
    max-height: 100vh;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .sideTitle {
    margin-bottom: 0;
    border-bottom: none;
    padding: 0;
    height: 36px;
  }

  .logoDot {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 14px;
  }

  .sideTitle-text {
    font-size: 16px;
  }

  .sidebar-toggle-wrapper {
    position: absolute;
    top: 14px;
    left: 16px;
    right: 16px;
  }

  .sidebar-toggle-label {
    display: none;
  }

  .sidebar-toggle {
    width: 52px;
    height: 36px;
    font-size: 20px;
    border-radius: 18px;
  }

  /* Mobil gizlenen içerikler */
  .small,
  .nav,
  .sidebar>div[style*="margin-top:auto"] {
    display: none !important;
  }

  /* Mobil Menü Açık (mobile-open) */
  .shell.mobile-open .small,
  .shell.mobile-open .nav,
  .shell.mobile-open .sidebar>div[style*="margin-top:auto"] {
    display: flex !important;
    animation: fadeIn 0.3s forwards;
  }

  .shell.mobile-open .small {
    margin-top: 20px;
  }

  .shell.mobile-open .sidebar {
    position: fixed;
    height: 100vh;
    border-bottom: none;
  }

  .shell.mobile-open .sidebar>div[style*="margin-top:auto"] {
    flex-direction: column;
    margin-top: 20px !important;
  }

  /* İçerik Ekran Daraltmaları */
  .main {
    padding: 16px;
    height: calc(100vh - 61px);
  }

  .finance-grid,
  .units-grid,
  .split {
    grid-template-columns: 1fr !important;
  }

  .brandPanel {
    display: none;
    /* Mobilde auth yan panelini sakla */
  }

  .h1 {
    font-size: 20px;
  }

  .property-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}