/* ══════════════════════════════════════════════════════════════
   İş Takip Sistemi — Global Styles
   ══════════════════════════════════════════════════════════════ */
:root {
  --sidebar-width: 240px;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #3b82f6;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #fff;
  --topbar-h: 56px;
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --card-radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  margin: 0;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 1000;
  transition: transform .25s ease;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
}

.sidebar-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  min-height: var(--topbar-h);
  white-space: nowrap;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 8px;
  margin: 0 8px;
  font-size: .875rem;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}
.sidebar-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  font-weight: 600;
}
.sidebar-icon {
  width: 20px;
  text-align: center;
  margin-right: 12px;
  font-size: .9rem;
  flex-shrink: 0;
}
.sidebar-footer { color: #475569; font-size: .75rem; }

/* ── Main Content ──────────────────────────────────────────── */
.wrapper { min-height: 100vh; }
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ── Content Area ──────────────────────────────────────────── */
.content-area { flex-grow: 1; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
}
.card-header {
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: #fff;
  font-weight: 600;
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  border-radius: var(--card-radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: none;
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .8rem; color: #64748b; margin-top: 4px; }

/* ── Tables ─────────────────────────────────────────────────── */
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; }
.table td { vertical-align: middle; font-size: .875rem; }
.table-hover tbody tr:hover { background: #f8fafc; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge { font-weight: 500; font-size: .72rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn { border-radius: 8px; font-size: .875rem; }
.btn-sm { font-size: .8rem; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 8px;
  font-size: .875rem;
  border-color: #e2e8f0;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-label { font-size: .85rem; font-weight: 500; color: #374151; }

/* ── File Upload Zone ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--card-radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: #eff6ff;
}
.upload-zone i { font-size: 2.5rem; color: #94a3b8; }

/* ── Priority / Status ───────────────────────────────────────── */
.priority-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: 6px;
}
.priority-urgent { background: #ef4444; }
.priority-high   { background: #f59e0b; }
.priority-medium { background: #3b82f6; }
.priority-low    { background: #94a3b8; }

/* ── Task Checkbox ───────────────────────────────────────────── */
.task-check {
  width: 18px; height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}
.task-completed td { text-decoration: line-through; color: #94a3b8; }

/* ── Info Card (Bilgi Kasası) ────────────────────────────────── */
.info-card .password-mask { letter-spacing: 3px; color: #94a3b8; }

/* ── Stock Progress ──────────────────────────────────────────── */
.stock-bar {
  height: 6px; border-radius: 99px; background: #e2e8f0; overflow: hidden;
}
.stock-bar-fill { height: 100%; border-radius: 99px; transition: width .3s; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .3s ease; }

/* ── Utility ─────────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Login Page ──────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}
.login-card {
  width: 400px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-header {
  background: #3b82f6;
  padding: 32px 24px;
  text-align: center;
  color: white;
}

/* ── Photo Thumb ─────────────────────────────────────────────── */
.photo-thumb {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: 8px; cursor: pointer;
  border: 2px solid #e2e8f0;
}
.photo-thumb:hover { border-color: var(--accent); }
