/* ============================================================
   DORIA SALES CRM — Complete Design System
   Premium Dark Glassmorphism Theme
   ============================================================ */

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

/* ─── 1. CSS Variables ─── */
:root {
  --primary: #F59E0B;
  --primary-light: #FBBF24;
  --accent: var(--primary);
  --primary-dark: #D97706;
  --primary-darker: #B45309;

  --bg-darkest: #F3F4F6;
  --bg-dark: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #FFFFFF;
  --bg-input: #F9FAFB;
  --bg-glass: rgba(255, 255, 255, 0.6);

  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.12);

  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6B7280;
  --text-dim: #9CA3AF;

  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: #3B82F6;
  --info-bg: rgba(59, 130, 246, 0.1);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.1);

  --gradient-primary: linear-gradient(135deg, #F59E0B, #D97706);
  --gradient-brand: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
  --gradient-dark: linear-gradient(180deg, #F3F4F6 0%, #E5E7EB 100%);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --sidebar-width: 260px;
  --header-height: 64px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── 2. Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-darkest);
  min-height: 100vh;
  overflow: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-light); }

img { max-width: 100%; display: block; }

::selection {
  background: rgba(245, 158, 11, 0.35);
  color: var(--text-primary);
}

/* ─── 3. Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.9rem; }
h6 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

p { color: var(--text-secondary); margin-bottom: 0.5rem; }

.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-warning { color: var(--warning); }
.text-primary-color { color: var(--primary); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.72rem; }
.text-lg { font-size: 1.1rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ─── 4. App Layout ─── */
#app {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.app-layout {
  display: flex;
  width: 100%;
  height: 100vh;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: var(--sidebar-width);
  height: 100vh;
  transition: margin-left 0.3s ease;
}

/* ─── 5. Sidebar ─── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, transparent 100%);
}

.sidebar-brand svg {
  margin: 0 auto 8px;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.15));
}

.sidebar-brand h2 {
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
}

.sidebar-brand span {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
}

.sidebar-nav a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.sidebar-nav a:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.sidebar-nav a:hover svg {
  opacity: 1;
}

.sidebar-nav a.active {
  color: var(--primary);
  background: rgba(245, 158, 11, 0.08);
  font-weight: 600;
}

.sidebar-nav a.active svg {
  opacity: 1;
  color: var(--primary);
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--gradient-primary);
  border-radius: 0 3px 3px 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
  line-height: 1.3;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ─── 6. Top Header ─── */
.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left h1 {
  font-size: 1.15rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.header-search svg {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.header-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.8rem;
  width: 180px;
  font-family: var(--font-family);
}

.header-search input::placeholder {
  color: var(--text-dim);
}

.header-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.header-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.header-btn svg {
  width: 20px;
  height: 20px;
}

.header-btn .dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-darkest);
}

.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

/* ─── 7. Page Content ─── */
.page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px;
  background: var(--gradient-dark);
}

.page-content > .fade-in {
  animation: fadeIn 0.3s ease;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h2 {
  font-size: 1.35rem;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── 8. Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

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

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  /* flexible inner */
}

/* Stat Cards (KPI) */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-card.highlighted {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.06);
}

.stat-card.highlighted::after {
  opacity: 1;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-icon.amber {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-icon.blue {
  background: var(--info-bg);
  color: var(--info);
}

.stat-icon.green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-icon.red {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-info {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }
.stat-trend.neutral { color: var(--text-dim); }

.stat-trend svg {
  width: 14px;
  height: 14px;
}

/* ─── 9. Stats Grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

/* ─── 10. Section Grid ─── */
.section-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.section-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.section-grid .full-width {
  grid-column: 1 / -1;
}

/* ─── 11. Tables ─── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  scrollbar-width: thin;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

.data-table thead th {
  background: var(--bg-input);
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  cursor: default;
  user-select: none;
}

.data-table thead th.sortable {
  cursor: pointer;
  transition: color 0.2s;
}

.data-table thead th.sortable:hover {
  color: var(--primary);
}

.data-table thead th.sortable::after {
  content: '⇅';
  margin-left: 6px;
  opacity: 0.4;
  font-size: 0.7rem;
}

.data-table thead th.sort-asc::after { content: '↑'; opacity: 1; color: var(--primary); }
.data-table thead th.sort-desc::after { content: '↓'; opacity: 1; color: var(--primary); }

.data-table tbody tr {
  transition: background 0.2s;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .td-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.data-table .checkbox-cell {
  width: 40px;
  text-align: center;
}

.data-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ─── 12. Forms ─── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-family);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
  background: #FFFFFF;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-dark);
  color: var(--text-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

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

.form-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.form-error {
  font-size: 0.72rem;
  color: var(--danger);
  margin-top: 4px;
}

/* Multi-select tags input */
.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 40px;
  align-items: center;
  cursor: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tags-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.tags-input .tag-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.15);
  color: var(--primary);
}

.tags-input .tag-item .tag-remove {
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.8rem;
  line-height: 1;
}

.tags-input .tag-item .tag-remove:hover {
  opacity: 1;
}

/* ─── 13. Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #000;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  filter: brightness(1.08);
}

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

.btn-success:hover {
  background: #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

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

.btn-danger:hover {
  background: #DC2626;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

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

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-dim);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 6px 10px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.75rem;
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  min-width: 32px;
  min-height: 32px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--border);
}

.btn-icon.btn-sm {
  padding: 5px;
  min-width: 26px;
  min-height: 26px;
}

.btn-icon.btn-sm svg {
  width: 14px;
  height: 14px;
}

.btn-group {
  display: flex;
  gap: 0;
}

.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.btn-group .btn:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.btn-group .btn + .btn {
  margin-left: -1px;
}

.btn:disabled, .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── 14. Modals ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-lg {
  max-width: 720px;
}

.modal-xl {
  max-width: 960px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  display: flex;
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ─── 15. Tags & Badges ─── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.tag-vip {
  background: rgba(245, 158, 11, 0.18);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.tag-premium {
  background: rgba(59, 130, 246, 0.18);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.tag-standard {
  background: rgba(107, 114, 128, 0.18);
  color: #9CA3AF;
  border: 1px solid rgba(107, 114, 128, 0.25);
}

.tag-new {
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tag-avrupa {
  background: rgba(139, 92, 246, 0.18);
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.tag-asya {
  background: rgba(236, 72, 153, 0.18);
  color: #F472B6;
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.tag-ortadogu {
  background: rgba(251, 146, 60, 0.18);
  color: #FB923C;
  border: 1px solid rgba(251, 146, 60, 0.25);
}

.tag-yerli {
  background: rgba(45, 212, 191, 0.18);
  color: #2DD4BF;
  border: 1px solid rgba(45, 212, 191, 0.25);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--primary);
  color: #000;
}

.badge-danger { background: var(--danger); color: #fff; }
.badge-success { background: var(--success); color: #fff; }
.badge-info { background: var(--info); color: #fff; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
}

.status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.active {
  background: var(--success-bg);
  color: var(--success);
}
.status-badge.active::before { background: var(--success); }

.status-badge.inactive {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-dim);
}
.status-badge.inactive::before { background: var(--text-dim); }

.status-badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
}
.status-badge.pending::before { background: var(--warning); animation: pulse 2s infinite; }

.status-badge.draft {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-muted);
}
.status-badge.draft::before { background: var(--text-muted); }

.status-badge.approved {
  background: var(--success-bg);
  color: var(--success);
}
.status-badge.approved::before { background: var(--success); }

.status-badge.rejected {
  background: var(--danger-bg);
  color: var(--danger);
}
.status-badge.rejected::before { background: var(--danger); }

.status-badge.sent {
  background: var(--info-bg);
  color: var(--info);
}
.status-badge.sent::before { background: var(--info); }

/* ─── 16. Email Preview Cards ─── */
.email-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.email-preview-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.email-preview-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.email-preview-icon svg {
  width: 20px;
  height: 20px;
}

.email-preview-icon.draft { background: rgba(107, 114, 128, 0.15); color: var(--text-muted); }
.email-preview-icon.pending { background: var(--warning-bg); color: var(--warning); }
.email-preview-icon.approved { background: var(--success-bg); color: var(--success); }
.email-preview-icon.rejected { background: var(--danger-bg); color: var(--danger); }
.email-preview-icon.sent { background: var(--info-bg); color: var(--info); }

.email-preview-content {
  flex: 1;
  min-width: 0;
}

.email-preview-subject {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-preview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.email-preview-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ─── 17. Competitor Cards ─── */
.competitor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all 0.2s;
}

.competitor-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.competitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.competitor-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.competitor-stars {
  color: var(--primary);
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.competitor-price-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.competitor-price-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 60px;
  flex-shrink: 0;
}

.competitor-price-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

.competitor-price-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.competitor-price-fill.ours { background: var(--gradient-primary); }
.competitor-price-fill.theirs { background: rgba(107, 114, 128, 0.4); }

.competitor-price-value {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 70px;
  text-align: right;
}

/* ─── 18. Charts ─── */
.chart-container {
  padding: 8px 0;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-chart-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-chart-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  width: 90px;
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-chart-track {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 99px;
  overflow: hidden;
}

.bar-chart-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gradient-primary);
  animation: barGrow 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: left;
}

@keyframes barGrow {
  from { width: 0; }
}

.bar-chart-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 40px;
  flex-shrink: 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gradient-primary);
  transition: width 0.6s ease;
}

.progress-bar-fill.success { background: var(--success); }
.progress-bar-fill.danger { background: var(--danger); }
.progress-bar-fill.info { background: var(--info); }

/* ─── 19. Timeline ─── */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
  animation: fadeInUp 0.3s ease both;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -23px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--primary);
  z-index: 1;
}

.timeline-item.success::before { border-color: var(--success); }
.timeline-item.danger::before { border-color: var(--danger); }
.timeline-item.info::before { border-color: var(--info); }

.timeline-content {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.timeline-date {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ─── 20. Empty State ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state svg {
  width: 56px;
  height: 56px;
  color: var(--text-dim);
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 320px;
}

.empty-state .btn {
  margin-top: 16px;
}

/* ─── 21. Filters ─── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-bar .form-input,
.filter-bar .form-select {
  width: auto;
  min-width: 140px;
  padding: 7px 12px;
  font-size: 0.8rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--primary);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.filter-pill:hover {
  background: rgba(245, 158, 11, 0.2);
}

.filter-pill .filter-remove {
  font-size: 0.85rem;
  opacity: 0.7;
  cursor: pointer;
  line-height: 1;
}

.filter-pill .filter-remove:hover {
  opacity: 1;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  flex: 1;
  max-width: 300px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.search-input-wrapper svg {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.search-input-wrapper input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: var(--font-family);
  width: 100%;
}

.search-input-wrapper input::placeholder {
  color: var(--text-dim);
}

/* ─── 22. Toast ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  z-index: 300;
  animation: fadeInUp 0.3s ease;
  color: #fff;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--info); }
.toast.warning { background: var(--warning); color: #000; }

/* ─── 23. Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
  20%, 40%, 60%, 80% { transform: translateX(3px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.fade-in { animation: fadeIn 0.3s ease; }
.fade-in-up { animation: fadeInUp 0.4s ease; }
.slide-in { animation: slideIn 0.3s ease; }
.scale-in { animation: scaleIn 0.3s ease; }

/* ─── 24. Custom Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* ─── 25. File Upload / Drop Zone ─── */
.file-drop-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(245, 158, 11, 0.04);
}

.file-drop-zone.drag-over {
  box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.08);
}

.file-drop-zone svg {
  width: 40px;
  height: 40px;
  color: var(--text-dim);
  margin: 0 auto 12px;
  display: block;
}

.file-drop-zone p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.file-drop-zone span {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.file-drop-zone .file-types {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ─── 26. Mail Compose ─── */
.mail-editor {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mail-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
}

.mail-toolbar button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  transition: all 0.2s;
}

.mail-toolbar button:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.mail-toolbar button.active {
  color: var(--primary);
  background: rgba(245, 158, 11, 0.1);
}

.mail-content-area {
  min-height: 200px;
  padding: 16px;
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.7;
  outline: none;
  background: var(--bg-input);
}

.recipient-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 38px;
  align-items: center;
}

.recipient-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--info-bg);
  color: var(--info);
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 500;
}

.recipient-tag .remove-recipient {
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.8rem;
}

.recipient-tag .remove-recipient:hover {
  opacity: 1;
}

/* ─── 27. Approval Flow ─── */
.approval-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all 0.2s;
}

.approval-card:hover {
  border-color: var(--border-light);
}

.approval-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 16px 0;
}

.approval-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}

.approval-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 60%;
  right: -40%;
  height: 2px;
  background: var(--border);
}

.approval-step.completed:not(:last-child)::after {
  background: var(--success);
}

.approval-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  font-size: 0.7rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}

.approval-step.completed .approval-step-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.approval-step.current .approval-step-dot {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.approval-step.rejected .approval-step-dot {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.approval-step-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
}

.approval-step.completed .approval-step-label { color: var(--success); }
.approval-step.current .approval-step-label { color: var(--primary); font-weight: 600; }

/* ─── 28. Login Page ─── */
.login-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-darkest);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 44px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.4s ease;
  position: relative;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 0 0 2px 2px;
}

.login-card h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-card .subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-card .form-group {
  text-align: left;
}

.login-card .btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 0.9rem;
  margin-top: 8px;
}

/* ─── 29. Skeleton Loading ─── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 12px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text:last-child {
  width: 70%;
}

.skeleton-title {
  height: 20px;
  width: 50%;
  margin-bottom: 12px;
  border-radius: 4px;
}

.skeleton-card {
  height: 120px;
  border-radius: var(--radius-lg);
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* ─── 30. Tabs ─── */
.tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: currentColor;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.02);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* ─── 31. Dropdown ─── */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s ease;
}

.dropdown.open .dropdown-menu,
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-family);
}

.dropdown-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item.danger:hover {
  background: var(--danger-bg);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ─── 32. Tooltip ─── */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  padding: 5px 10px;
  background: rgba(17, 24, 39, 0.95);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
  pointer-events: none;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

/* ─── 33. Pagination ─── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
  padding-top: 16px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.pagination-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #000;
  font-weight: 700;
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 16px;
  height: 16px;
}

.pagination-info {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0 12px;
}

/* ─── 34. Utility Classes ─── */
.d-flex { display: flex; }
.d-grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── 35. Import Preview Table ─── */
.import-preview {
  max-height: 300px;
  overflow: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.import-preview .data-table {
  font-size: 0.75rem;
}

.import-preview .data-table thead th {
  position: sticky;
  top: 0;
}

.import-stats {
  display: flex;
  gap: 16px;
  margin: 12px 0;
  font-size: 0.82rem;
}

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

.import-stats strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ─── 36. Bulk Actions Bar ─── */
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  animation: fadeInUp 0.2s ease;
}

.bulk-actions .bulk-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
}

.bulk-actions .bulk-separator {
  width: 1px;
  height: 20px;
  background: var(--border-light);
}

/* ─── 37. Responsive ─── */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .top-header {
    padding: 0 16px;
  }

  .header-search {
    display: none;
  }

  .page-content {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions {
    justify-content: flex-start;
  }

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

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

  .search-input-wrapper {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }

  .modal-overlay {
    padding: 10px;
  }

  .data-table {
    font-size: 0.78rem;
  }

  .data-table thead th,
  .data-table tbody td {
    padding: 8px 10px;
  }

  .bulk-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 1.35rem;
  }

  .page-content {
    padding: 12px;
  }

  .card {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .top-header h1 {
    font-size: 1rem;
  }

  .login-card {
    padding: 28px 20px;
    margin: 12px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .approval-steps {
    flex-wrap: wrap;
    gap: 8px;
  }

  .approval-step:not(:last-child)::after {
    display: none;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

/* ─── 38. Print Styles ─── */
@media print {
  .sidebar, .top-header, .menu-toggle, .page-actions, .filter-bar, .modal-overlay {
    display: none !important;
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .page-content {
    padding: 0;
    overflow: visible;
    background: #fff;
    color: #000;
  }
  .card {
    border: 1px solid #ddd;
    background: #fff;
  }
  .data-table {
    color: #000;
  }
  .data-table thead th {
    background: #f5f5f5;
    color: #000;
  }
}

/* ─── 33. Modül Özel Tab İkonları ve Hizalama Düzeltmeleri ─── */
.camp-tab, .rpt-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  line-height: 1 !important;
}

.camp-tab svg, .rpt-tab svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  color: currentColor !important;
}

/* ─── 34. Premium Layout & Shell Alignment Additions ─── */

/* Sidebar Overlay for Mobile Menu */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.sidebar.open ~ .sidebar-overlay {
  opacity: 1;
  visibility: visible;
}

/* Header User Profile Badge */
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-left: 1px solid var(--border);
  margin-left: 8px;
}

.header-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.header-user-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.header-user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Premium Logout Button Hover Effects */
.header-logout-btn {
  transition: all 0.2s ease !important;
}
.header-logout-btn:hover {
  color: var(--danger) !important;
  background: rgba(239, 68, 68, 0.08) !important;
  transform: translateY(-1px);
}

/* Notifications Red Badge */
.header-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
  min-width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--bg-darkest);
}

/* Page Loader Spinner Styles */
.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.page-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Constraining ALL other unconstrained SVG Icons */
.empty-state svg {
  width: 48px !important;
  height: 48px !important;
  margin-bottom: 12px !important;
}

.tab-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.tab-btn svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
}
