/* ==========================================================================
   Kumaş Stok Takip - FAF SOFA Özel Tasarım (Bootstrap 5.3.3)
   ========================================================================== */

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

:root {
  --app-font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --app-bg: #f8fafc;
  --app-card-bg: #ffffff;
  --app-border: #edf2f7;
  --sidebar-width: 255px;
  
  /* Primary & Accent */
  --primary-color: #0284c7;
  --primary-subtle: #e0f2fe;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--app-font);
  background-color: var(--app-bg);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ==========================================================================
   Layout (Sidebar + Main Content)
   ========================================================================== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: #ffffff;
  border-right: 1px solid var(--app-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
  min-height: 100vh;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Brand / Logo */
.brand-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 0.5rem 1.75rem 0.5rem;
  text-decoration: none;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background-color: #0f172a;
  color: #ffffff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.brand-text-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand-text-subtitle {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Nav Menu */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item .nav-link-custom {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  font-size: 0.925rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.sidebar-nav-item .nav-link-custom i {
  font-size: 1.15rem;
  line-height: 1;
}

.sidebar-nav-item .nav-link-custom:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

/* Active Nav State - Açık mavi pill stili */
.sidebar-nav-item .nav-link-custom.active {
  background-color: #e0f2fe;
  color: #0284c7;
}

.sidebar-nav-item .nav-link-custom.active i {
  color: #0284c7;
}

/* Main Content Area */
.app-main {
  flex-grow: 1;
  padding: 2.25rem 2.5rem;
  background-color: var(--app-bg);
  overflow-x: hidden;
}

/* Mobile Header */
.mobile-header {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid var(--app-border);
  padding: 0.85rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Header Titles
   ========================================================================== */
.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 500;
}

/* ==========================================================================
   Dashboard Stat Cards (4'lü Kart Bloğu)
   ========================================================================== */
.stat-card {
  background-color: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.04);
}

.stat-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.stat-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Stat Icon Color Variants */
.icon-cyan {
  background-color: #e0f2fe;
  color: #0284c7;
}

.icon-green {
  background-color: #dcfce7;
  color: #16a34a;
}

.icon-amber {
  background-color: #fef3c7;
  color: #d97706;
}

.icon-purple {
  background-color: #f3e8ff;
  color: #9333ea;
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ==========================================================================
   Content Cards (Görseldeki "Son Eklenen Kayıtlar" vb.)
   ========================================================================== */
.content-card {
  background-color: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
}

.content-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.content-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.content-card-action {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0891b2;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.content-card-action:hover {
  color: #0e7490;
}

/* Empty State */
.empty-state {
  padding: 4rem 1.5rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.925rem;
  font-weight: 500;
}

/* ==========================================================================
   Table Styles
   ========================================================================== */
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.custom-table thead th {
  background-color: #f8fafc;
  color: #64748b;
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #edf2f7;
  white-space: nowrap;
}

.custom-table tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
  color: #334155;
}

.custom-table tbody tr:hover {
  background-color: #fbfcfe;
}

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

/* Pills & Badges */
.badge-pill {
  font-size: 0.775rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-pill.success {
  background-color: #dcfce7;
  color: #15803d;
}

.badge-pill.info {
  background-color: #e0f2fe;
  color: #0369a1;
}

.badge-pill.warning {
  background-color: #fef3c7;
  color: #b45309;
}

.badge-pill.danger {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* Action Buttons */
.btn-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-action:hover {
  background-color: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-action.btn-delete:hover {
  background-color: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Modals */
.modal-content {
  border-radius: 16px;
  border: 1px solid var(--app-border);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.modal-title {
  font-weight: 700;
  font-size: 1.15rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #f1f5f9;
}

/* ==========================================================================
   Giriş Ekranı (Login) - Sayfaya Ortalama & Sabit Genişlik
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, #eff6ff 0%, #f8fafc 100%);
  padding: 1.5rem;
  margin: 0;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  margin: auto;
}

/* Responsive */
@media (max-width: 992px) {
  .app-sidebar {
    display: none;
  }
  .app-sidebar.show-mobile {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  }
  .mobile-header {
    display: flex;
  }
  .app-main {
    padding: 1.5rem 1rem;
  }
}
