/* ==========================================================================
   Chirak Web - Views Stylesheet
   Specific view styles for Dashboard, Sales, Inventory, Customers, More
   ========================================================================== */

/* ==========================================================================
   1. Dashboard View
   ========================================================================== */

.dashboard-greeting {
  margin-bottom: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.greeting-time {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.greeting-headline {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.25;
}

@media (max-width: 600px) {
  .dashboard-greeting {
    margin-bottom: 8px !important;
    align-items: center !important;
    gap: 8px;
  }

  .greeting-time {
    display: none !important;
  }

  .greeting-headline {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #btn-dashboard-see-all {
    padding: 0 4px !important;
    font-size: 12px !important;
    flex-shrink: 0;
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.quick-actions-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-action-btn:hover {
  border-color: var(--chirak-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 82, 245, 0.08);
}

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

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--chirak-primary-light);
  color: var(--chirak-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

/* Next Actions / Attention Needed Section */
.attention-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.attention-card:hover {
  border-color: var(--chirak-warning);
}

.attention-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.attention-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--chirak-warning-light);
  color: var(--chirak-warning);
  display: flex;
  align-items: center;
  justify-content: center;
}

.attention-text {
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================================================
   2. Inventory View & Product Rows
   ========================================================================== */

.filter-scroll-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: var(--space-md);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-scroll-row::-webkit-scrollbar {
  display: none;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--border-strong);
}

.product-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
}

.product-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card-secondary);
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.product-price {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   3. Sales View
   ========================================================================== */

.sales-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sale-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sale-card:hover {
  border-color: var(--border-strong);
}

.sale-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sale-number {
  font-size: 13px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--chirak-primary);
}

.sale-date {
  font-size: 12px;
  color: var(--text-muted);
}

.sale-card-middle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sale-customer {
  font-size: 14px;
  font-weight: 600;
}

.sale-total {
  font-size: 16px;
  font-weight: 700;
}

.sale-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ==========================================================================
   4. Customers View
   ========================================================================== */

.customer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--space-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.customer-card:hover {
  border-color: var(--border-strong);
}

.customer-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background-color: var(--chirak-primary-light);
  color: var(--chirak-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==========================================================================
   5. Settings / More View (Master-Detail Structure)
   ========================================================================== */

.settings-group {
  margin-bottom: var(--space-xl);
}

.settings-group-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  padding-left: var(--space-xs);
}

.settings-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row:hover {
  background-color: var(--bg-card-secondary);
}

.settings-row-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.settings-row-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--chirak-primary-light);
  color: var(--chirak-primary);
}

.settings-row-title {
  font-size: 14px;
  font-weight: 500;
}

.settings-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
