/* ==========================================================================
   ÇAĞIRAN AVM STOK YÖNETİM SİSTEMİ - MODERN STİLLER
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

/* Fallback Protection Rules */
.hidden {
  display: none !important;
}

svg {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
}

.w-4 { width: 1rem !important; }
.h-4 { height: 1rem !important; }
.w-3 { width: 0.75rem !important; }
.h-3 { height: 0.75rem !important; }
.w-3\.5 { width: 0.875rem !important; }
.h-3\.5 { height: 0.875rem !important; }
.w-10 { width: 2.5rem !important; }
.h-10 { height: 2.5rem !important; }
.w-14 { width: 3.5rem !important; }
.h-14 { height: 3.5rem !important; }

/* Typography & Utilities */
.font-mono { font-family: var(--font-mono); }
.text-2xs { font-size: 0.65rem; line-height: 0.85rem; }

/* Category Pills */
.cat-pill {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-pill:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.cat-pill.active {
  background-color: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Category Badges in Table */
.badge-yatak {
  background-color: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.badge-baza {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-baslik {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-somya {
  background-color: #cffafe;
  color: #155e75;
  border: 1px solid #a5f3fc;
}

.badge-bahce {
  background-color: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.badge-diger {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Excel Spreadsheet Table Styles */
.spreadsheet-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}

.spreadsheet-table th,
.spreadsheet-table td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.spreadsheet-table tr:hover td {
  background-color: #f8fafc;
}

/* Editable Cell */
.editable-cell {
  position: relative;
  cursor: text;
  min-height: 42px;
  height: 42px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
  user-select: text;
}

.editable-cell:hover {
  background-color: #f1f5f9;
  outline: 1px dashed #94a3b8;
  outline-offset: -1px;
}

.editable-cell.is-editing {
  padding: 0;
  outline: 2px solid #2563eb !important;
  outline-offset: -2px;
  background-color: #ffffff !important;
  z-index: 5;
}

.cell-input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  color: #0f172a;
}

/* Cell Value Display */
.cell-val-zero {
  color: #94a3b8;
  font-weight: 500;
}

.cell-val-num {
  font-weight: 700;
  color: #0f172a;
  background-color: #e2e8f0/50;
  padding: 2px 6px;
  border-radius: 4px;
}

.cell-val-variant {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Saved Flash Animation */
@keyframes flashGreen {
  0% { background-color: #bbf7d0; }
  100% { background-color: transparent; }
}

.flash-saved {
  animation: flashGreen 1.2s ease-out;
}

/* Toast Notification */
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
  animation: slideIn 0.25s ease-out;
}

.toast-success {
  background-color: #065f46;
  color: #ffffff;
}

.toast-error {
  background-color: #991b1b;
  color: #ffffff;
}

.toast-info {
  background-color: #1e293b;
  color: #ffffff;
}

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

/* Total Stock Badge in Column */
.total-badge-active {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.total-badge-zero {
  color: #94a3b8;
  font-weight: 500;
}

/* Reservation Badges */
.cell-reserve-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.1);
}

.cell-reserve-btn {
  opacity: 0;
  transition: opacity 0.15s ease;
  cursor: pointer;
}

.editable-cell:hover .cell-reserve-btn {
  opacity: 1;
}

/* Touch & Mobile Screen Rules */
@media (hover: none), (max-width: 768px) {
  .cell-reserve-btn {
    opacity: 0.75 !important;
    display: inline-flex !important;
  }
  .editable-cell {
    min-height: 44px !important;
    height: 44px !important;
  }
  .sticky-col-name {
    position: sticky !important;
    left: 0 !important;
    z-index: 5 !important;
    background-color: #ffffff !important;
    box-shadow: 2px 0 6px -2px rgba(0, 0, 0, 0.12) !important;
  }
  thead th.sticky-col-name {
    z-index: 15 !important;
    background-color: #f1f5f9 !important;
  }
  tr:hover .sticky-col-name {
    background-color: #f8fafc !important;
  }
}

/* Mobile Card View Styles */
.mobile-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.mobile-card:active {
  transform: scale(0.995);
}

.mobile-branch-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.mobile-branch-pill:hover, .mobile-branch-pill:active {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

/* Custom Scrollbar for Spreadsheet */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

