/* ── Partners Türkiye v2 ── Light Clean ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f4f6f9;
  --nav: #ffffff;
  --card: #ffffff;
  --card-border: #e4e8ef;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-pale: #eff6ff;
  --text: #111827;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  --sidebar-w: 240px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --transition: 0.16s ease;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

/* ── LAYOUT ── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--nav);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.sidebar-logo {
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--card-border);
}

.sidebar-logo .logo-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section {
  padding: 10px 16px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border-radius: 6px;
  margin: 1px 8px;
}

.nav-item:hover { color: var(--text); background: var(--bg); }

.nav-item.active {
  color: var(--accent);
  background: var(--accent-pale);
  font-weight: 600;
}

.nav-item .icon { width: 18px; text-align: center; font-size: 15px; }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--card-border);
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-footer .user-name { font-weight: 600; color: var(--text); }

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--nav);
  border-bottom: 1px solid var(--card-border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.page-title { font-size: 16px; font-weight: 600; color: var(--text); }

.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* Hamburger */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  margin-right: 8px;
}
.sidebar-toggle svg { display: block; }

.content { padding: 24px; flex: 1; }

/* Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title { font-size: 14px; font-weight: 600; color: var(--text); }

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
}

.stat-card .label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-card .value { font-size: 26px; font-weight: 700; color: var(--text); }
.stat-card .sub { font-size: 11px; color: var(--text-dim); }

.stat-card.accent { border-top: 3px solid var(--accent); }
.stat-card.accent .value { color: var(--accent); }
.stat-card.gold { border-top: 3px solid var(--warning); }
.stat-card.gold .value { color: var(--warning); }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--card-border);
  background: #fafbfc;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid #f0f2f5;
  transition: var(--transition);
}

tbody tr:hover { background: #fafbff; }
tbody tr:last-child { border-bottom: none; }

td { padding: 11px 14px; font-size: 13px; vertical-align: middle; }

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

/* ── BADGES ── */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-active    { background: #d1fae5; color: #065f46; }
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-suspended { background: #fee2e2; color: #991b1b; }
.badge-sold      { background: #dbeafe; color: #1e40af; }
.badge-reserved  { background: #fef3c7; color: #92400e; }
.badge-draft     { background: #f3f4f6; color: #6b7280; }
.badge-new       { background: #dbeafe; color: #1e40af; }
.badge-confirmed { background: #d1fae5; color: #065f46; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-primary   { background: var(--accent-pale); color: var(--accent); }
.badge-secondary { background: #f3f4f6; color: #6b7280; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

/* Legacy gold → blue */
.btn-gold {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-gold:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.btn-outline {
  background: #fff;
  color: var(--text-muted);
  border-color: var(--card-border);
}
.btn-outline:hover { color: var(--text); border-color: #c1c9d4; background: #f9fafb; }

.btn-danger {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fecaca;
}
.btn-danger:hover { background: #fecaca; }

.btn-success {
  background: #d1fae5;
  color: #065f46;
  border-color: #a7f3d0;
}
.btn-success:hover { background: #a7f3d0; }

.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.form-control {
  width: 100%;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.form-control::placeholder { color: var(--text-dim); }

textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control option { background: #fff; color: var(--text); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-full { grid-column: 1 / -1; }

/* ── FILTERS BAR ── */
.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filters select, .filters input[type=text], .filters input[type=date] {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 7px;
  padding: 7px 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.filters select:focus, .filters input:focus { border-color: var(--accent); }

/* ── ALERTS ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  border-left: 3px solid;
}
.alert-success { background: #f0fdf4; border-color: var(--success); color: #065f46; }
.alert-warning { background: #fffbeb; border-color: var(--warning); color: #92400e; }
.alert-danger   { background: #fef2f2; border-color: var(--danger);  color: #991b1b; }
.alert-info     { background: #eff6ff; border-color: var(--info);    color: #1e40af; }

/* ── AUTH PAGES ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.auth-box {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .brand { font-size: 18px; font-weight: 700; color: var(--accent); letter-spacing: 0.04em; }
.auth-logo .sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.auth-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.auth-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.auth-card .auth-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }

/* ── PROPERTY GRID ── */
.prop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.prop-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.prop-card:hover { border-color: #93c5fd; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.prop-card-img {
  height: 160px;
  background: #f3f4f6;
  overflow: hidden;
}
.prop-card-img img { width: 100%; height: 100%; object-fit: cover; }

.prop-card-body { padding: 14px 16px; }
.prop-card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.prop-card-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.prop-card-price { font-size: 15px; font-weight: 700; color: var(--accent); margin-top: 8px; }

/* ── PHOTO UPLOAD ── */
.photo-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photo-preview { position: relative; width: 80px; height: 60px; border-radius: 6px; overflow: hidden; border: 1px solid var(--card-border); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview .del-btn { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,0.5); color: white; border: none; border-radius: 3px; cursor: pointer; font-size: 10px; padding: 1px 4px; }

/* ── SELECTION PUBLIC PAGE ── */
.sel-header { text-align: center; padding: 40px 20px 20px; }
.sel-header h1 { font-size: 24px; font-weight: 700; }
.sel-message { color: var(--text-muted); font-size: 15px; margin-top: 10px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ── MISC ── */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--warning); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-semi { font-weight: 600; }
.small { font-size: 12px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 16px; }
  .sidebar-toggle { display: flex; align-items: center; }
  .topbar { padding: 0 16px; }
}
