/* ============================================================
   ROTA Kuyumcu Panel - Ana Stil Dosyası
   ============================================================ */

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

/* ---- CSS Değişkenleri ---- */
:root {
  --primary:        #F97316;
  --primary-dark:   #EA580C;
  --primary-light:  #FFF7ED;
  --primary-border: #FDBA74;
  --success:        #22C55E;
  --success-dark:   #16A34A;
  --danger:         #EF4444;
  --danger-dark:    #DC2626;
  --warning:        #F59E0B;
  --info:           #3B82F6;
  --purple:         #8B5CF6;
  --dark:           #1E293B;
  --gray-50:        #F8FAFC;
  --gray-100:       #F1F5F9;
  --gray-200:       #E2E8F0;
  --gray-300:       #CBD5E1;
  --gray-400:       #94A3B8;
  --gray-500:       #64748B;
  --gray-700:       #334155;
  --gray-900:       #0F172A;
  --white:          #FFFFFF;
  --sidebar-w:      250px;
  --topbar-h:       68px;
  --radius:         10px;
  --radius-lg:      14px;
  --shadow:         0 1px 4px rgba(0,0,0,.08), 0 2px 12px rgba(0,0,0,.05);
  --shadow-md:      0 4px 16px rgba(0,0,0,.10);
  --transition:     .2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--gray-100);
  color: var(--gray-700);
  min-height: 100vh;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }
input, textarea, select, button { font-family: inherit; }

/* ============================================================
   LOGIN SAYFASI
   ============================================================ */
.login-body {
  background: linear-gradient(135deg, #FFF7ED 0%, #FED7AA 40%, #F97316 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.login-logo .logo-icon svg { color: white; }
.login-logo h1 { font-size: 1.6rem; font-weight: 700; color: var(--dark); }
.login-logo p { color: var(--gray-400); font-size: .88rem; margin-top: 2px; }
.login-form .form-group { margin-bottom: 18px; }
.login-form label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--gray-700); font-size: .9rem; }
.login-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .95rem;
  transition: border-color var(--transition);
  outline: none;
}
.login-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249,115,22,.12); }
.login-form .btn-login {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  margin-top: 6px;
}
.login-form .btn-login:hover { background: var(--primary-dark); }
.login-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--danger-dark);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: .88rem;
  margin-bottom: 16px;
}
.login-footer { text-align: center; margin-top: 28px; color: var(--gray-400); font-size: .8rem; }

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

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-logo {
  padding: 0 20px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}
.sidebar-logo .logo-mark {
  width: 36px; height: 36px;
  background: var(--dark);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo .logo-text { font-size: 1.1rem; font-weight: 700; color: var(--dark); letter-spacing: .5px; }
.sidebar-logo .logo-sub { font-size: .68rem; color: var(--gray-400); }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section-label {
  padding: 16px 20px 6px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-400);
}
.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--gray-500);
  font-size: .88rem;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover { background: var(--gray-50); color: var(--gray-700); }
.nav-link.active { background: var(--primary-light); color: var(--primary); }
.nav-link.active .nav-icon { color: var(--primary); }
.nav-link .nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-link .nav-arrow { margin-left: auto; transition: transform var(--transition); }
.nav-link.open .nav-arrow { transform: rotate(180deg); }
.nav-sub {
  display: none;
  padding: 2px 0 4px;
  background: var(--gray-50);
  border-left: 3px solid var(--primary-border);
  margin-left: 20px;
  border-radius: 0 0 6px 6px;
}
.nav-sub.open { display: block; }
.nav-sub .nav-link {
  padding: 8px 16px 8px 20px;
  font-size: .84rem;
  color: var(--gray-500);
}
.nav-sub .nav-link::before {
  content: '◆';
  font-size: .45rem;
  color: var(--gray-300);
}
.nav-sub .nav-link.active::before { color: var(--primary); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
  font-size: .8rem;
  color: var(--gray-400);
}

/* ---- Topbar ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  padding: 6px;
  border-radius: 6px;
  transition: background var(--transition);
}
.topbar-toggle:hover { background: var(--gray-100); }
.topbar-brand {
  background: var(--primary);
  color: white;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .3px;
}
.topbar-spacer { flex: 1; }
.topbar-new-order {
  background: var(--success);
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.topbar-new-order:hover { background: var(--success-dark); }
.topbar-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  position: relative;
}
.topbar-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  display: none;
  z-index: 200;
}
.topbar-dropdown.open { display: block; }
.topbar-dropdown a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-size: .88rem;
  color: var(--gray-700);
  transition: background var(--transition);
}
.topbar-dropdown a:hover { background: var(--gray-50); }
.topbar-dropdown hr { border: none; border-top: 1px solid var(--gray-200); margin: 4px 0; }

/* ---- Page Content ---- */
.page-content { flex: 1; padding: 24px; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-title { font-size: 1.4rem; font-weight: 700; color: var(--dark); }
.breadcrumb { font-size: .8rem; color: var(--gray-400); margin-top: 2px; }
.breadcrumb span { color: var(--primary); }

/* ============================================================
   KARTLAR & ISTATISTIKLER
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 1rem; font-weight: 600; color: var(--dark); }
.card-body { padding: 20px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}
.stat-icon.orange { background: #FFF7ED; color: var(--primary); }
.stat-icon.green  { background: #F0FDF4; color: var(--success); }
.stat-icon.blue   { background: #EFF6FF; color: var(--info); }
.stat-icon.purple { background: #F5F3FF; color: var(--purple); }
.stat-icon.red    { background: #FEF2F2; color: var(--danger); }
.stat-icon.yellow { background: #FFFBEB; color: var(--warning); }
.stat-info .stat-value { font-size: 1.6rem; font-weight: 700; color: var(--dark); line-height: 1; }
.stat-info .stat-label { font-size: .8rem; color: var(--gray-400); margin-top: 4px; }

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.perf-section { }
.perf-title { font-size: .85rem; font-weight: 600; color: var(--gray-500); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; }
.perf-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.perf-card {
  border-radius: var(--radius);
  padding: 14px 18px;
  color: white;
  min-width: 120px;
  flex: 1;
}
.perf-card.orange { background: var(--primary); }
.perf-card.purple { background: var(--purple); }
.perf-card.yellow { background: var(--warning); }
.perf-card.green  { background: var(--success); }
.perf-card.blue   { background: var(--info); }
.perf-card .pc-label { font-size: .75rem; opacity: .85; margin-bottom: 6px; }
.perf-card .pc-value { font-size: 1.2rem; font-weight: 700; }

/* ============================================================
   FİLTRE BARI
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-bar .form-control,
.filter-bar .form-select {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .88rem;
  outline: none;
  background: var(--white);
  color: var(--gray-700);
  transition: border-color var(--transition);
}
.filter-bar .form-control:focus,
.filter-bar .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249,115,22,.1); }
.filter-bar .btn-filter {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background var(--transition);
}
.filter-bar .btn-filter:hover { background: var(--primary-dark); }
.filter-bar .btn-pdf {
  background: var(--danger);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.filter-bar .btn-pdf:hover { background: var(--danger-dark); }
.quick-dates { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-dates button {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .8rem;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--gray-600);
}
.quick-dates button:hover { background: var(--primary-light); border-color: var(--primary-border); color: var(--primary); }

/* ============================================================
   TABLO
   ============================================================ */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
thead th {
  background: var(--gray-100);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-500);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--gray-100); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }
tbody td { padding: 12px 14px; color: var(--gray-700); vertical-align: middle; }
.table-empty { text-align: center; padding: 48px 20px; color: var(--gray-400); font-size: .9rem; }

/* ---- Toplam Satırı ---- */
.table-footer-row {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: .82rem;
  font-weight: 500;
}
.table-footer-row span { opacity: .85; font-size: .78rem; }
.table-footer-row strong { font-weight: 700; font-size: .88rem; }

/* ============================================================
   BADGE / ETİKET
   ============================================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-warning  { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.badge-info     { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.badge-primary  { background: #FFF7ED; color: #9A3412; border: 1px solid #FED7AA; }
.badge-success  { background: #F0FDF4; color: #14532D; border: 1px solid #BBF7D0; }
.badge-danger   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.badge-secondary{ background: var(--gray-100); color: var(--gray-500); border: 1px solid var(--gray-200); }

/* ============================================================
   BUTONLAR
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover { background: var(--success-dark); border-color: var(--success-dark); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-dark); }
.btn-info { background: var(--info); color: white; border-color: var(--info); }
.btn-secondary { background: var(--white); color: var(--gray-700); border-color: var(--gray-200); }
.btn-secondary:hover { background: var(--gray-50); }
.btn-outline-primary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary-light); }
.btn-warning { background: var(--warning); color: white; border-color: var(--warning); }
.btn-purple { background: var(--purple); color: white; border-color: var(--purple); }

/* Action buttons in table */
.action-btns { display: flex; gap: 6px; }
.btn-action {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-action.view   { background: #EFF6FF; color: var(--info); }
.btn-action.edit   { background: #FFFBEB; color: var(--warning); }
.btn-action.delete { background: #FEF2F2; color: var(--danger); }
.btn-action.assign { background: #F0FDF4; color: var(--success); }
.btn-action:hover { opacity: .8; transform: scale(1.05); }

/* ============================================================
   FORMLAR
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .85rem; font-weight: 500; color: var(--gray-700); }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control, .form-select, .form-textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--gray-700);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-control:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: .78rem; color: var(--gray-400); margin-top: 2px; }
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

/* Section divider */
.section-divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 20px 0;
}
.section-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Adres kartı */
.address-card {
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  margin-bottom: 10px;
}
.address-remove {
  position: absolute;
  top: 10px; right: 10px;
  background: #FEF2F2;
  color: var(--danger);
  border: none;
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .88rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #14532D; }
.alert-danger   { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert-info     { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }
.alert-warning  { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.alert-close { background: none; border: none; cursor: pointer; font-size: 1.1rem; opacity: .6; }
.alert-close:hover { opacity: 1; }

/* ============================================================
   KURYE PANELİ ÖZEL
   ============================================================ */
.kurye-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.kurye-header h2 { font-size: 1.2rem; font-weight: 700; }
.kurye-header p { font-size: .85rem; opacity: .85; margin-top: 2px; }
.kurye-info { font-size: .82rem; opacity: .75; }

.siparis-kart {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.siparis-kart:hover { box-shadow: var(--shadow-md); }
.siparis-kart-header {
  padding: 14px 18px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.siparis-kart-no { font-weight: 700; color: var(--dark); font-size: .95rem; }
.siparis-kart-body { padding: 16px 18px; }
.siparis-kart-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: .875rem;
}
.siparis-kart-row:last-child { margin-bottom: 0; }
.siparis-kart-row .icon { color: var(--primary); width: 16px; flex-shrink: 0; margin-top: 1px; }
.siparis-kart-row .label { color: var(--gray-400); min-width: 80px; flex-shrink: 0; }
.siparis-kart-row .value { color: var(--gray-700); font-weight: 500; }
.siparis-kart-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn-teslim-al {
  background: linear-gradient(90deg, var(--success) 0%, var(--success-dark) 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-teslim-al:hover { opacity: .9; }
.btn-teslim-etti {
  background: linear-gradient(90deg, var(--info) 0%, #2563EB 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-teslim-etti:hover { opacity: .9; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-state .es-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1rem; color: var(--gray-500); font-weight: 500; }
.empty-state p { font-size: .85rem; color: var(--gray-400); margin-top: 4px; }

/* ============================================================
   MODAl
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 600; color: var(--dark); }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 1.4rem; line-height: 1;
}
.modal-close:hover { color: var(--gray-700); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 10px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--gray-200);
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  font-size: .85rem;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  transition: all var(--transition);
}
.pagination a:hover { background: var(--primary-light); border-color: var(--primary-border); color: var(--primary); }
.pagination .active { background: var(--primary); border-color: var(--primary); color: white; }

/* ============================================================
   DETAY SAYFASI
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: .875rem; }
.detail-row:last-child { border-bottom: none; }
.detail-row .dr-label { color: var(--gray-400); font-weight: 500; }
.detail-row .dr-value { color: var(--gray-700); font-weight: 500; text-align: right; max-width: 65%; }

/* Timeline */
.timeline { padding: 0; }
.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 18px;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}
.tl-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
  font-size: .8rem;
  z-index: 1;
}
.tl-content { flex: 1; }
.tl-title { font-weight: 600; font-size: .875rem; color: var(--dark); }
.tl-time { font-size: .78rem; color: var(--gray-400); margin-top: 2px; }
.tl-desc { font-size: .82rem; color: var(--gray-500); margin-top: 4px; }

/* ============================================================
   RAPORLAR SAYFA ALTI BAR
   ============================================================ */
.report-totals {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 16px 20px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.report-total-item { color: white; }
.report-total-item .rti-label { font-size: .75rem; opacity: .8; }
.report-total-item .rti-value { font-size: 1rem; font-weight: 700; margin-top: 2px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .detail-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-md);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .btn-filter, .filter-bar .btn-pdf { justify-content: center; }
}

/* ============================================================
   PRINT / PDF
   ============================================================ */
@media print {
  .sidebar, .topbar, .filter-bar .btn-pdf,
  .action-btns, .btn, .page-header .btn { display: none !important; }
  .main-content { margin-left: 0 !important; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--gray-400); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.fw-bold { font-weight: 700; }
.fw-semi { font-weight: 600; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.d-flex  { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.w-100 { width: 100%; }

/* ============================================================
   DASHBOARD — YENİ STILLER
   ============================================================ */

/* Bölüm Başlığı */
.section-label {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-400);
  margin: 0 0 12px;
  padding-top: 4px;
}

/* Dönem Filtre Barı */
.dash-filter-bar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-filter-bar .filter-label {
  font-weight: 600;
  font-size: .85rem;
  color: var(--gray-600);
  white-space: nowrap;
}

/* Dönem Özet Kartları */
.period-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.period-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--gray-300);
  transition: transform var(--transition);
}
.period-card:hover { transform: translateY(-2px); }
.period-card.orange { border-left-color: var(--primary); }
.period-card.green  { border-left-color: var(--success); }
.period-card.blue   { border-left-color: var(--info); }
.period-card.purple { border-left-color: var(--purple); }
.period-card.red    { border-left-color: var(--danger); }
/* Renkli mod (ödeme dağılımı için) */
.period-card.orange.filled { background: var(--primary); border: none; color: white; }
.period-card.green.filled  { background: var(--success); border: none; color: white; }
.period-card.blue.filled   { background: var(--info);    border: none; color: white; }
.period-card.purple.filled { background: var(--purple);  border: none; color: white; }
.period-card-label { font-size: .78rem; color: var(--gray-400); font-weight: 500; margin-bottom: 4px; }
.period-card.orange .period-card-label,
.period-card.green .period-card-label { color: var(--gray-500); }
.period-card-value { font-size: 1.45rem; font-weight: 700; color: var(--dark); line-height: 1.1; }
.period-card-sub   { font-size: .78rem; color: var(--gray-400); margin-top: 4px; }

/* Rank Badge */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: .78rem;
  font-weight: 700;
}
.rank-1 { background: #FEF3C7; color: #92400E; }
.rank-2 { background: var(--gray-200); color: var(--gray-600); }
.rank-3 { background: #FFF7ED; color: #9A3412; }

/* Rank Table */
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th {
  background: var(--gray-50);
  padding: 10px 12px;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-400);
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}
.rank-table td { padding: 11px 12px; font-size: .875rem; border-bottom: 1px solid var(--gray-50); }
.rank-table tr:last-child td { border-bottom: none; }
.rank-table tr:hover td { background: var(--gray-50); }

/* Progress Bar */
.progress-bar-wrap {
  background: var(--gray-100);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  background: linear-gradient(90deg, var(--success), var(--success-dark));
  height: 100%;
  border-radius: 4px;
  transition: width .6s ease;
  min-width: 2px;
}

/* ============================================================
   KURYE PANELİ — TESLİMAT KODU
   ============================================================ */
.kod-dogrula-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 14px;
  width: 100%;
}
.kod-dogrula-hint {
  font-size: .84rem;
  color: #1E40AF;
  margin-bottom: 10px;
  line-height: 1.5;
}
.kod-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 12px;
  border: 2px solid #93C5FD;
  border-radius: 8px;
  font-size: 1.4rem;
  text-align: center;
  letter-spacing: 8px;
  font-weight: 700;
  color: var(--dark);
  outline: none;
  transition: border-color var(--transition);
  background: var(--white);
}
.kod-input:focus { border-color: var(--info); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }

/* ============================================================
   RESPONSİVE — Yeni Bileşenler
   ============================================================ */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .period-stats   { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .period-stats   { grid-template-columns: 1fr 1fr; }
  .dash-filter-bar { gap: 8px; }
  .dash-filter-bar .quick-dates { display: grid; grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 480px) {
  .period-stats   { grid-template-columns: 1fr; }
  .rank-table th, .rank-table td { padding: 9px 8px; font-size: .8rem; }
}
