/* =============================================
   İHALECİM - Ana CSS Tasarım Sistemi
   Modern, Premium, Türkiye Kamu İhale Platformu
   ============================================= */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* ---- CSS Değişkenleri (Design Tokens) ---- */
:root {
  /* Renkler */
  --primary: #1a3c6e;
  --primary-light: #2563EB;
  --primary-dark: #0f2347;
  --secondary: #f59e0b;
  --secondary-dark: #d97706;
  --accent: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Arka Plan */
  --bg-dark: #060e1c;
  --bg-card: #0d1b2e;
  --bg-surface: #111f35;
  --bg-glass: rgba(13, 27, 46, 0.85);
  --bg-elevated: #162540;

  /* Metin */
  --text-primary: #f0f4fb;
  --text-secondary: #8ba3c7;
  --text-muted: #4e6480;
  --text-white: #ffffff;

  /* Kenarlık */
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(37, 99, 235, 0.4);

  /* Gölge */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.3);

  /* Font */
  --font: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transition */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 64px;
}

/* ---- Sıfırlama & Temel ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(245, 158, 11, 0.04) 0%, transparent 50%);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

/* ---- Layout ---- */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.sidebar-logo .logo-badge {
  font-size: 9px;
  color: var(--secondary);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-top: -2px;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover {
  background: rgba(37, 99, 235, 0.12);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(37, 99, 235, 0.1));
  color: #fff;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.nav-item .premium-tag {
  margin-left: auto;
  background: linear-gradient(135deg, var(--secondary), #f97316);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.nav-group {
  margin-bottom: 4px;
}

.nav-group-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  user-select: none;
}

.nav-group-trigger:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-group-trigger .chevron {
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.2s;
}

.nav-group.open .chevron {
  transform: rotate(90deg);
}

.nav-sub {
  display: none;
  padding-left: 32px;
  margin-top: 2px;
}

.nav-group.open .nav-sub {
  display: block;
}

.nav-sub .nav-item {
  font-size: 13px;
  padding: 8px 10px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}

.user-info .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-info .user-plan {
  font-size: 11px;
  color: var(--secondary);
  font-weight: 500;
}

/* ---- Topbar ---- */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: rgba(6, 14, 28, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 90;
}

.topbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 9px 16px 9px 40px;
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}

.topbar-search input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.topbar-search input::placeholder {
  color: var(--text-muted);
}

.topbar-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
  font-size: 16px;
}

.topbar-btn:hover {
  border-color: var(--primary-light);
  color: var(--text-primary);
}

.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  position: absolute;
  top: 6px;
  right: 6px;
}

/* ---- Main Content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 28px;
  min-height: calc(100vh - var(--topbar-height));
  flex: 1;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
}

/* İhale Kartı */
.ihale-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.ihale-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.ihale-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.ihale-type-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.badge-yapim {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-mal {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-hizmet {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-dan {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-dt {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.ihale-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.ihale-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ihale-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.ihale-maliyet {
  font-size: 15px;
  font-weight: 700;
  color: var(--secondary);
  font-family: var(--font-mono);
}

/* ---- Butonlar ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light), #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-gold {
  background: linear-gradient(135deg, var(--secondary), #f97316);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--primary-light);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: var(--accent);
  color: #fff;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12.5px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

/* ---- Form Elemanları ---- */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

select option {
  background: var(--bg-card);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* ---- Hero Section ---- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #162540 50%, #0a1628 100%);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.hero h1 span {
  background: linear-gradient(135deg, #60a5fa, var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 540px;
}

/* Hero Search */
.hero-search {
  display: flex;
  gap: 10px;
  max-width: 600px;
  background: rgba(13, 27, 46, 0.8);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 8px;
  backdrop-filter: blur(10px);
}

.hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
}

.hero-search input::placeholder {
  color: var(--text-muted);
}

/* ---- Stats Bar ---- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-accent);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-white);
  font-family: var(--font-mono);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ---- Fiyat Planları ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pricing-card.popular {
  border-color: var(--secondary);
  background: linear-gradient(160deg, var(--bg-elevated), var(--bg-card));
}

.pricing-card.popular::before {
  content: '⭐ En Popüler';
  position: absolute;
  top: 14px;
  right: -28px;
  background: var(--secondary);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 40px;
  transform: rotate(35deg);
}

.pricing-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-white);
  font-family: var(--font-mono);
  margin: 16px 0 4px;
}

.pricing-price .currency {
  font-size: 18px;
  color: var(--text-secondary);
}

.pricing-price .period {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 20px 0 24px;
}

.pricing-features li {
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li .check {
  color: var(--accent);
  font-size: 14px;
}

.pricing-features li .cross {
  color: var(--text-muted);
  font-size: 12px;
}

/* ---- AI Chat ---- */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-height) - 100px);
  max-height: 700px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble-wrapper {
  display: flex;
  gap: 10px;
  max-width: 80%;
}

.chat-bubble-wrapper.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ai-avatar {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
}

.user-avatar-chat {
  background: linear-gradient(135deg, var(--secondary), #f97316);
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.6;
  max-width: 100%;
}

.ai-bubble {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.user-bubble {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(37, 99, 235, 0.15));
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-bottom-right-radius: 4px;
  color: var(--text-primary);
}

.chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.chat-input-area textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 10px 14px;
  resize: none;
  font-size: 14px;
  border-radius: var(--radius-md);
}

/* ---- Alert ---- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

/* ---- Table ---- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th {
  background: var(--bg-surface);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

td a {
  color: var(--primary-light);
  text-decoration: none;
}

td a:hover {
  color: var(--text-primary);
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

.page-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.page-link:hover,
.page-link.active {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: #fff;
}

/* ---- Filters ---- */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.filter-bar .filter-field {
  flex: 1;
  min-width: 140px;
}

.filter-bar label {
  font-size: 11px;
  margin-bottom: 4px;
}

.filter-bar select,
.filter-bar input {
  padding: 8px 12px;
  font-size: 13px;
}

/* ---- Bildirimler ---- */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: var(--transition);
}

.notif-item.unread {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.06);
}

.notif-icon {
  font-size: 20px;
  flex-shrink: 0;
}

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

.notif-text .notif-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- Premium Banner ---- */
.premium-banner {
  background: linear-gradient(135deg, #1a110a, #2a1a05);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.premium-crown {
  font-size: 36px;
}

.premium-banner h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
}

.premium-banner p {
  font-size: 14px;
  color: var(--text-secondary);
}

.premium-banner .btn {
  margin-left: auto;
  flex-shrink: 0;
}

/* ---- Loading Spinner ---- */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Typing Animation (AI) ---- */
.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--primary-light);
  border-radius: 50%;
  display: inline-block;
  animation: bounce 1.4s infinite ease-in-out;
  margin: 0 2px;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1.0);
    opacity: 1;
  }
}

/* ---- Yardımcı Sınıflar ---- */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

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

.text-primary {
  color: var(--primary-light);
}

.text-gold {
  color: var(--secondary);
}

.text-green {
  color: var(--accent);
}

.text-danger {
  color: var(--danger);
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.gap-8 {
  gap: 8px;
}

.d-flex {
  display: flex;
}

.d-grid {
  display: grid;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-1 {
  flex: 1;
}

.w-100 {
  width: 100%;
}

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

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ---- Mobil Responsive ---- */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
  }

  .topbar {
    left: 0;
    padding: 0 16px;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 16px 12px;
  }

  .hero {
    padding: 32px 16px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 14px;
  }

  .hero-search {
    flex-direction: column;
    width: 100%;
  }

  .hero-search input,
  .hero-search select,
  .hero-search button {
    width: 100%;
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .premium-banner {
    flex-direction: column;
    text-align: center;
  }

  .premium-banner .btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  /* Make cards fit in mobile */
  .stat-card {
    padding: 12px;
    gap: 8px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .stat-number {
    font-size: 18px;
  }

  /* Fix category grid overflow */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Fix title overflow */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-title {
    font-size: 20px;
  }
}

/* ---- Page Header ---- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ---- Toast Bildirimleri ---- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  font-size: 14px;
}

.toast.success {
  border-color: var(--accent);
}

.toast.error {
  border-color: var(--danger);
}

.toast.info {
  border-color: var(--info);
}

@keyframes slideInRight {
  from {
    transform: translateX(120%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ---- Dilekçe Önizleme ---- */
.document-preview {
  background: #fff;
  color: #111;
  padding: 48px;
  border-radius: var(--radius-md);
  font-family: 'Times New Roman', serif;
  font-size: 13px;
  line-height: 1.8;
  min-height: 600px;
  box-shadow: var(--shadow-lg);
}

.document-preview h4 {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 24px;
}

.document-preview p {
  margin-bottom: 12px;
  text-indent: 1.5em;
}

/* ---- No-sidebar pages (login, register) ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  background-image:
    radial-gradient(ellipse at 30% 40%, rgba(37, 99, 235, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
  padding: 24px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card .auth-logo .logo-text {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}