/**
 * bayteklif admin paneli — anasayfa ile uyumlu koyu mavi tema
 */
[data-bs-theme="dark"] {
  --bs-body-bg: #0c1222;
  --bs-body-bg-rgb: 12, 18, 34;
  --bs-body-color: #e2e8f0;
  --bs-body-color-rgb: 226, 232, 240;
  --bs-emphasis-color: #f1f5f9;
  --bs-secondary-color: rgba(226, 232, 240, 0.75);
  --bs-secondary-bg: #151d33;
  --bs-secondary-bg-rgb: 21, 29, 51;
  --bs-tertiary-bg: #151d33;
  --bs-tertiary-bg-rgb: 21, 29, 51;
  --bs-primary: #3b82f6;
  --bs-primary-rgb: 59, 130, 246;
  --bs-primary-text-emphasis: #93c5fd;
  --bs-primary-bg-subtle: rgba(59, 130, 246, 0.12);
  --bs-primary-border-subtle: rgba(59, 130, 246, 0.35);
  --bs-border-color: rgba(148, 163, 184, 0.12);
  --bs-border-color-translucent: rgba(148, 163, 184, 0.15);
  --bs-link-color: #60a5fa;
  --bs-link-hover-color: #93c5fd;
  --bs-heading-color: #f1f5f9;
  --bs-gray-100: #151d33;
  --bs-gray-200: #1e293b;
  --bs-gray-300: #334155;
  --bs-gray-600: #94a3b8;
  --bs-gray-700: #cbd5e1;
  --bs-gray-800: #e2e8f0;
  --bs-gray-900: #f1f5f9;
}

/* Body & wrapper */
body.layout-fixed {
  background: #0c1222 !important;
  color: #e2e8f0;
}

.app-header.navbar {
  background: rgba(12, 18, 34, 0.92) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}
.app-header .nav-link {
  color: #94a3b8 !important;
}
.app-header .nav-link:hover {
  color: #e2e8f0 !important;
}

/* Sidebar — anasayfa kart rengi */
.app-sidebar {
  background: #151d33 !important;
  border-right: 1px solid rgba(148, 163, 184, 0.12) !important;
}
.app-sidebar .brand-link,
.app-sidebar .nav-link {
  color: #94a3b8 !important;
}
.app-sidebar .nav-link:hover,
.app-sidebar .brand-link:hover {
  color: #e2e8f0 !important;
}
.app-sidebar .nav-link.active {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}
.app-sidebar .sidebar-brand {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.app-sidebar .brand-text {
  color: #e2e8f0 !important;
}
.app-sidebar .brand-text b,
.app-sidebar .nav-link.active .nav-icon {
  color: #3b82f6 !important;
}

/* Main content alanı */
.app-main {
  background: #0c1222;
  color: #e2e8f0;
}
.app-content {
  padding-top: 1.25rem;
}
.app-content-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.app-content-header .breadcrumb-item a {
  color: #94a3b8;
}
.app-content-header .breadcrumb-item a:hover {
  color: #60a5fa;
}
.app-content-header .breadcrumb-item.active {
  color: #cbd5e1;
}

/* Kartlar */
.app-main .card {
  background: #151d33;
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}
.app-main .card-header {
  background: rgba(21, 29, 51, 0.8);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #f1f5f9;
}
.app-main .card-title {
  color: #f1f5f9;
}
.app-main .card-text,
.app-main .text-muted {
  color: #94a3b8 !important;
}

/* Tablolar */
.app-main .table {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.12);
}
.app-main .table th {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(21, 29, 51, 0.5);
}
.app-main .table td {
  border-color: rgba(148, 163, 184, 0.08);
}
.app-main .table-hover tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* Form elemanları */
.app-main .form-control,
.app-main .form-select {
  background: #0c1222;
  border-color: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}
.app-main .form-control:focus,
.app-main .form-select:focus {
  background: #151d33;
  border-color: #3b82f6;
  color: #e2e8f0;
}
.app-main .form-control::placeholder {
  color: #64748b;
}
.app-main .form-label {
  color: #cbd5e1;
}

/* Butonlar */
.app-main .btn-primary {
  background: #3b82f6;
  border-color: #3b82f6;
}
.app-main .btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}
.app-main .btn-outline-primary {
  border-color: #3b82f6;
  color: #3b82f6;
}
.app-main .btn-outline-primary:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: #3b82f6;
}
.app-main .btn-outline-secondary {
  border-color: rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}
.app-main .btn-outline-secondary:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.4);
}

/* Dropdown & user menu */
.app-header .dropdown-menu {
  background: #151d33;
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.app-header .dropdown-item {
  color: #e2e8f0;
}
.app-header .dropdown-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}
.app-header .user-header.text-bg-primary {
  background: #151d33 !important;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

/* Alert */
.app-main .alert {
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.app-main .alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}
.app-main .alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

/* Badge */
.app-main .badge.text-bg-primary { background: #3b82f6 !important; }
.app-main .badge.text-bg-success { background: #22c55e !important; }
.app-main .badge.text-bg-info { background: #0ea5e9 !important; }
.app-main .badge.text-bg-warning { background: #eab308 !important; }
.app-main .badge.text-bg-danger { background: #ef4444 !important; }
.app-main .badge.text-bg-secondary { background: #475569 !important; }
.app-main .badge.text-bg-light { background: rgba(148, 163, 184, 0.2) !important; color: #e2e8f0 !important; }

/* Filtre / bg-light alanı (kategori, koleksiyon) */
.app-main .bg-light {
  background: #151d33 !important;
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.app-main .bg-light .text-muted,
.app-main .bg-light .small {
  color: #94a3b8 !important;
}
.app-main .bg-light a:not(.badge) {
  color: #60a5fa;
}
.app-main .bg-light a:not(.badge):hover {
  color: #93c5fd;
}

/* Arama kutusu & input-group */
.app-main .input-group-text {
  background: #151d33 !important;
  border-color: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}
.app-main .input-group .form-control {
  border-left: 0;
}
.app-main .input-group .input-group-text + .form-control {
  border-left: 1px solid rgba(148, 163, 184, 0.2);
}

/* Ürün kartları (products sayfası) */
.app-main .product-card {
  background: #151d33 !important;
  border-color: rgba(148, 163, 184, 0.12) !important;
}
.app-main .product-card-img-wrap {
  background: #0c1222 !important;
}
.app-main .product-card-body {
  color: #e2e8f0;
}
.app-main .product-card-title {
  color: #f1f5f9;
}
.app-main .product-card-meta {
  color: #94a3b8 !important;
}
.app-main .product-card-meta code {
  color: #cbd5e1;
  background: rgba(21, 29, 51, 0.8);
}
.app-main .product-card-prices {
  color: #cbd5e1;
}

/* Setler / Modüller buton grubu */
.app-main .btn-group .btn-primary.active,
.app-main .btn-group .product-filter-btn.active {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #fff !important;
}
.app-main .btn-outline-success {
  border-color: #22c55e;
  color: #4ade80;
}
.app-main .btn-outline-success:hover {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-color: #22c55e;
}
.app-main .btn-outline-danger {
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}
.app-main .btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
  border-color: #ef4444;
}

/* Modül bölümü başlığı */
.app-main .modul-section-title {
  color: #cbd5e1 !important;
  border-bottom-color: #3b82f6 !important;
}

/* Alert info (filtre bilgisi) */
.app-main .alert-info {
  background: rgba(14, 165, 233, 0.1);
  color: #7dd3fc;
  border-color: rgba(14, 165, 233, 0.25);
}

/* Modal */
.app-main .modal-content,
.modal-content {
  background: #151d33;
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}
.modal-header {
  border-bottom-color: rgba(148, 163, 184, 0.12);
}
.modal-footer {
  border-top-color: rgba(148, 163, 184, 0.12);
}
.modal-title {
  color: #f1f5f9;
}
.modal .btn-close {
  filter: invert(1);
  opacity: 0.7;
}
.modal .border-dashed {
  border-color: rgba(148, 163, 184, 0.25) !important;
  background: rgba(12, 18, 34, 0.5);
}

/* Pagination */
.app-main .pagination .page-link {
  background: #151d33;
  border-color: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}
.app-main .pagination .page-link:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(148, 163, 184, 0.3);
  color: #60a5fa;
}
.app-main .pagination .page-item.active .page-link {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
.app-main .pagination .page-item.disabled .page-link {
  background: #151d33;
  color: #64748b;
}

/* Kategorileri yönet linki */
.app-main .bg-light a.small {
  color: #60a5fa !important;
}
.app-main .bg-light a.small:hover {
  color: #93c5fd !important;
}

/* Kart içi linkler */
.app-main .card-body a:not(.btn) {
  color: #60a5fa;
}
.app-main .card-body a:not(.btn):hover {
  color: #93c5fd;
}

/* Sayfa başlığı h3 */
.app-main .app-content-header h3 {
  color: #f1f5f9;
}

/* Dashboard aksiyon butonları — mobilde aralık */
.dashboard-actions {
  gap: 0.5rem 0.75rem;
}
@media (max-width: 767.98px) {
  .dashboard-actions {
    gap: 0.5rem;
  }
}

/* Son teklifler — mobil kart listesi */
.quotes-mobile-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.quote-mobile-card {
  background: var(--bs-secondary-bg, #151d33);
  border: 1px solid var(--bs-border-color, rgba(148, 163, 184, 0.12));
  border-radius: 0.5rem;
  overflow: hidden;
}
.quote-mobile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bs-border-color, rgba(148, 163, 184, 0.12));
}
.quote-mobile-number {
  font-size: 0.95rem;
  color: var(--bs-body-color, #e2e8f0);
  word-break: break-all;
}
.quote-mobile-card-body {
  padding: 0.75rem 1rem;
}
.quote-mobile-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.quote-mobile-row:not(:last-child) {
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.quote-mobile-label {
  font-size: 0.8rem;
  color: var(--bs-secondary-color, #94a3b8);
  flex-shrink: 0;
}
.quote-mobile-value {
  font-size: 0.9rem;
  color: var(--bs-body-color, #e2e8f0);
  text-align: right;
  word-break: break-word;
}
.quote-mobile-card-footer {
  padding: 0.5rem 1rem 0.75rem;
  border-top: 1px solid var(--bs-border-color, rgba(148, 163, 184, 0.12));
}
.quote-mobile-card-footer .btn {
  width: 100%;
  justify-content: center;
}

/* Genel mobil tablo → kart listesi (müşteri, teklif, ekip vb.) */
.mobile-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mobile-card {
  background: var(--bs-secondary-bg, #151d33);
  border: 1px solid var(--bs-border-color, rgba(148, 163, 184, 0.12));
  border-radius: 0.5rem;
  overflow: hidden;
}
.mobile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bs-border-color, rgba(148, 163, 184, 0.12));
}
.mobile-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bs-body-color, #e2e8f0);
  word-break: break-word;
}
.mobile-card-body {
  padding: 0.75rem 1rem;
}
.mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.mobile-card-row:not(:last-child) {
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.mobile-card-label {
  font-size: 0.8rem;
  color: var(--bs-secondary-color, #94a3b8);
  flex-shrink: 0;
}
.mobile-card-value {
  font-size: 0.9rem;
  color: var(--bs-body-color, #e2e8f0);
  text-align: right;
  word-break: break-word;
}
.mobile-card-footer {
  padding: 0.5rem 1rem 0.75rem;
  border-top: 1px solid var(--bs-border-color, rgba(148, 163, 184, 0.12));
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.mobile-card-footer .btn {
  flex: 1;
  min-width: 0;
}

/* Teklif kalemleri — mobil: başlık+buton aralığı, tablo yatay kaydırma */
.quote-items-card-header {
  gap: 0.5rem;
}
.quote-items-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.quote-items-table-wrap #itemsTable {
  min-width: 580px;
}
.quote-items-table-wrap #itemsTable th:last-child,
.quote-items-table-wrap #itemsTable td:last-child {
  min-width: 52px;
  white-space: nowrap;
}
@media (max-width: 767.98px) {
  .quote-items-table-wrap {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Auth sayfaları (giriş, kayıt, şifremi unuttum) — site teması */
body.login-page[data-bs-theme="dark"],
body.login-page.auth-theme {
  background: #0c1222 !important;
  color: #e2e8f0;
}
body.login-page[data-bs-theme="dark"] .login-box .login-logo a,
body.login-page.auth-theme .login-box .login-logo a {
  color: #f1f5f9 !important;
}
body.login-page[data-bs-theme="dark"] .login-box .card,
body.login-page.auth-theme .login-box .card {
  background: #151d33;
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}
body.login-page[data-bs-theme="dark"] .login-card-body,
body.login-page.auth-theme .login-card-body {
  background: #151d33;
  color: #e2e8f0;
}
body.login-page[data-bs-theme="dark"] .login-box-msg,
body.login-page.auth-theme .login-box-msg {
  color: #94a3b8;
}
body.login-page[data-bs-theme="dark"] .form-control,
body.login-page.auth-theme .form-control {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}
body.login-page[data-bs-theme="dark"] .form-control::placeholder,
body.login-page.auth-theme .form-control::placeholder {
  color: #64748b;
}
body.login-page[data-bs-theme="dark"] .form-control:focus,
body.login-page.auth-theme .form-control:focus {
  background: #1e293b;
  border-color: #3b82f6;
  color: #e2e8f0;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}
body.login-page[data-bs-theme="dark"] .input-group-text,
body.login-page.auth-theme .input-group-text {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}
body.login-page[data-bs-theme="dark"] .form-check-label,
body.login-page.auth-theme .form-check-label {
  color: #cbd5e1;
}
body.login-page[data-bs-theme="dark"] .login-card-body a:not(.btn),
body.login-page.auth-theme .login-card-body a:not(.btn) {
  color: #60a5fa;
}
body.login-page[data-bs-theme="dark"] .login-card-body a:not(.btn):hover,
body.login-page.auth-theme .login-card-body a:not(.btn):hover {
  color: #93c5fd;
}
body.login-page[data-bs-theme="dark"] .alert-danger,
body.login-page.auth-theme .alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
body.login-page[data-bs-theme="dark"] .alert-success,
body.login-page.auth-theme .alert-success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}
body.login-page[data-bs-theme="dark"] .btn-primary,
body.login-page.auth-theme .btn-primary {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
body.login-page[data-bs-theme="dark"] .btn-primary:hover,
body.login-page.auth-theme .btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
