/* ═══════════════════════════════════════════
   Site layout — Template reset + app shell
   ═══════════════════════════════════════════ */

/* Reset (template uyumlu) */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; }

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--app-bg);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  line-height: 1.5;
  height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

/* Scrollbar (template uyumlu) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

.app-shell {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.app-sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-link {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.app-sidebar .nav-link {
  color: var(--sidebar-text);
  border-radius: var(--radius-sm);
  margin-bottom: 0.2rem;
  padding: 0.55rem 0.7rem;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
}

.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.4rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--surface-bg);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Toast ve overlay'ler navbar (z-index: 100) üstünde görünsün */
#app-toast-container {
  z-index: 1100;
}

.topbar-right {
  display: flex;
  align-items: center;
}

.page-body {
  padding: 1.2rem 1.4rem 1.8rem;
}

.page-body-public {
  max-width: 1150px;
  width: 100%;
  margin: 0 auto;
}

.public-mode .topbar {
  border-bottom: 1px solid var(--border-color);
}

.auth-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
}

.auth-hero {
  background: linear-gradient(135deg, #4338ca 0%, #7c3aed 100%);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 2rem;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel {
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.section-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--surface-bg);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.empty-state {
  background: var(--surface-bg);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.board-link {
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}

.board-link:hover {
  transform: translateY(-2px);
}

.kanban-list-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.kanban-list {
  background: var(--surface-muted);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  width: 320px;
  min-width: 320px;
  padding: 0.75rem;
}

.kanban-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  cursor: grab;
}

.kanban-card-list {
  min-height: 36px;
}

.kanban-card {
  cursor: pointer;
  border-radius: var(--radius-sm);
}

/* Drag & drop görsel durumlari */
.dnd-ghost {
  opacity: 0.55;
  transform: rotate(1deg);
}

.dnd-chosen {
  box-shadow: var(--sh-2, 0 18px 40px rgba(15, 23, 42, 0.12));
}

.dnd-drag {
  cursor: grabbing;
}

.form-loading {
  opacity: 0.75;
  pointer-events: none;
}

/* Template responsive (mobile) */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    z-index: 100;
    height: 100vh;
    transition: left 0.25s var(--ease);
  }
  .sidebar.open {
    left: 0;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
  }
  .kanban-col {
    min-width: 260px;
    max-width: 260px;
  }
  .detail-panel {
    width: 100%;
  }
  .boards-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .app-shell {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    height: auto;
    position: static;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }
}