/* =====================================================
   PIXALIO HUB — Design System
   Brand: #3B82F6 → #8B5CF6 → #EC4899 gradient
   ===================================================== */

:root {
  --sidebar-w:      240px;
  --topbar-h:       60px;

  /* Brand Gradient */
  --grad:           linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);
  --grad-h:         linear-gradient(135deg, #2563EB 0%, #7C3AED 50%, #DB2777 100%);
  --accent:         #3B82F6;
  --accent-mid:     #8B5CF6;
  --accent-end:     #EC4899;

  /* Backgrounds */
  --bg:             #0d1117;
  --sidebar-bg:     #111827;
  --card-bg:        #161d2b;
  --card-hover:     #1c2538;
  --input-bg:       #1a2235;

  /* Borders */
  --border:         #1e2d42;
  --border-light:   #243352;

  /* Text */
  --text:           #e2e8f0;
  --text-muted:     #64748b;
  --text-dim:       #94a3b8;

  /* Status */
  --success:        #22c55e;
  --danger:         #ef4444;
  --warning:        #f59e0b;
  --info:           #38bdf8;

  /* Misc */
  --radius:         10px;
  --radius-sm:      6px;
  --shadow:         0 4px 24px rgba(0,0,0,.4);
  --transition:     .18s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-mid); }
img { max-width: 100%; }

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

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand-logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-logo em { font-style: normal; }
.brand-sub {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.nav-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 14px 20px 5px;
  text-transform: uppercase;
}
.nav-section { padding: 2px 10px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}
.nav-item:hover {
  background: var(--card-bg);
  color: var(--text);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(59,130,246,.18), rgba(139,92,246,.1));
  color: #fff;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}
.nav-item i { width: 18px; text-align: center; font-size: .85rem; }
.nav-item .badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-user {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.sidebar-logout {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 5px;
  border-radius: 5px;
  transition: color var(--transition);
}
.sidebar-logout:hover { color: var(--danger); }

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

/* =====================================================
   TOPBAR
   ===================================================== */
.topbar {
  height: var(--topbar-h);
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: none;
}
.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Topbar — Hava Durumu */
.topbar-weather {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: 20px;
}
.weather-icon { font-size: 1rem; line-height: 1; }
.weather-temp { font-size: .88rem; color: #fff; }
.weather-city { font-size: .72rem; color: var(--text-muted); }

/* Topbar — Döviz */
.topbar-rates {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rate-item {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: .88rem;
}
.rate-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 700;
}
.rate-item strong {
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
}

/* Topbar — Tarih */
.topbar-date {
  font-size: .88rem;
  color: #e2e8f0;
  font-weight: 500;
  white-space: nowrap;
}

/* =====================================================
   QUICK LINKS BAR
   ===================================================== */
.qlinks-bar {
  background: #1d2f4a;
  border-bottom: 1px solid rgba(59,130,246,.15);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.qlinks-bar::-webkit-scrollbar { display: none; }

.qlinks-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  flex-wrap: nowrap;
}

.qlink-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 5px;
  font-size: .88rem;
  color: #a8bdd4;
  white-space: nowrap;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
}
.qlink-item i { font-size: .82rem; }
.qlink-item:hover {
  background: var(--card-bg);
  color: var(--text);
}
.qlink-item i { font-size: .75rem; }

.qlink-del-form { display: inline; margin: 0; padding: 0; }
.qlink-del {
  display: none;
  position: absolute;
  top: -4px; right: -4px;
  width: 14px; height: 14px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: .6rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.qlink-item:hover .qlink-del { display: flex; }

/* Add button */
.qlinks-add {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
}
.qlink-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: transparent;
  border: 1px dashed var(--border-light);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: .75rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.qlink-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.qlink-add-form {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px;
  z-index: 200;
  box-shadow: var(--shadow);
  min-width: 300px;
}
.qlink-add-form.open { display: block; }
.qlink-add-form form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qlink-add-form input {
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  padding: 6px 9px;
  color: var(--text);
  font-size: .8rem;
  outline: none;
  flex: 1;
  min-width: 80px;
}
.qlink-add-form input:focus { border-color: var(--accent); }
.qlink-add-form button[type="submit"] {
  background: var(--grad);
  border: none;
  color: #fff;
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: .8rem;
}
.qlink-add-form button[type="button"] {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 5px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: .8rem;
}
.qlink-add-form button[type="button"]:hover { color: var(--danger); border-color: var(--danger); }

/* =====================================================
   CONTENT
   ===================================================== */
.content { padding: 28px 28px; }

/* =====================================================
   CARDS
   ===================================================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}

/* =====================================================
   STAT WIDGETS
   ===================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--accent); }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-icon.blue  { background: rgba(59,130,246,.15);  color: #3B82F6; }
.stat-icon.purple{ background: rgba(139,92,246,.15);  color: #8B5CF6; }
.stat-icon.pink  { background: rgba(236,72,153,.15);  color: #EC4899; }
.stat-icon.green { background: rgba(34,197,94,.15);   color: #22c55e; }
.stat-icon.yellow{ background: rgba(245,158,11,.15);  color: #f59e0b; }
.stat-icon.red   { background: rgba(239,68,68,.15);   color: #ef4444; }
.stat-info {}
.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* =====================================================
   TABLES
   ===================================================== */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
}
tbody tr:hover td { background: var(--card-hover); }
tbody tr:last-child td { border-bottom: none; }

/* =====================================================
   BADGES / STATUS
   ===================================================== */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .5px;
}
.badge-teklif    { background: rgba(245,158,11,.15); color: #f59e0b; }
.badge-devam     { background: rgba(59,130,246,.15);  color: #3B82F6; }
.badge-beklemede { background: rgba(100,116,139,.15); color: #94a3b8; }
.badge-tamamlandi{ background: rgba(34,197,94,.15);   color: #22c55e; }
.badge-iptal     { background: rgba(239,68,68,.15);   color: #ef4444; }

.badge-gelir { background: rgba(34,197,94,.15);  color: #22c55e; }
.badge-gider { background: rgba(239,68,68,.15);  color: #ef4444; }

/* Product type badges */
.badge-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(139,92,246,.15);
  color: #a78bfa;
}

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  color: var(--text);
  font-size: .9rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: #1a2235; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
}
.btn-primary:hover {
  background: var(--grad-h);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139,92,246,.4);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-dim);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: #ef4444;
}
.btn-danger:hover { background: #ef4444; color: #fff; }
.btn-sm { padding: 5px 11px; font-size: .78rem; }
.btn-icon { padding: 7px; border-radius: var(--radius-sm); }

/* =====================================================
   UTILS
   ===================================================== */
.flex        { display: flex; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2       { gap: 8px; }
.gap-3       { gap: 12px; }
.mb-1        { margin-bottom: 8px; }
.mb-2        { margin-bottom: 16px; }
.mb-4        { margin-bottom: 28px; }
.text-muted  { color: var(--text-muted); font-size: .85rem; }
.text-sm     { font-size: .82rem; }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.text-right  { text-align: right; }
.fw-bold     { font-weight: 700; }

/* Alert */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: rgba(34,197,94,.12); border-left: 3px solid var(--success); color: #4ade80; }
.alert-danger  { background: rgba(239,68,68,.12);  border-left: 3px solid var(--danger);  color: #f87171; }
.alert-info    { background: rgba(59,130,246,.12); border-left: 3px solid var(--accent);  color: #60a5fa; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; opacity: .3; display: block; }
.empty-state p { font-size: .9rem; }

/* Note cards */
.note-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all var(--transition);
}
.note-card:hover { border-color: var(--accent-mid); transform: translateY(-2px); }
.note-card.color-blue   { border-top: 3px solid #3B82F6; }
.note-card.color-purple { border-top: 3px solid #8B5CF6; }
.note-card.color-pink   { border-top: 3px solid #EC4899; }
.note-card.color-green  { border-top: 3px solid #22c55e; }
.note-card.color-yellow { border-top: 3px solid #f59e0b; }

/* Demo links */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.demo-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demo-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.demo-card-name { font-weight: 700; color: var(--text); font-size: .95rem; }
.demo-card-url  { font-size: .78rem; color: var(--text-muted); word-break: break-all; }
.demo-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-box {
  width: 100%;
  max-width: 380px;
  padding: 20px;
}
.login-brand {
  text-align: center;
  margin-bottom: 36px;
}
.login-brand .logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-brand .logo-sub {
  font-size: .7rem;
  letter-spacing: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}
.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}
.login-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}
.btn-login {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: .95rem;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  transition: all var(--transition);
}
.btn-login:hover {
  background: var(--grad-h);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139,92,246,.4);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
/* Web odaklı — mobil breakpoint yok */
