/**
 * GoldLedger Shift Z-Report & Thermal Slip Styles
 * مجوهرات السعادة
 */

/* Shift Header Summary */
.shift-status-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.shift-status-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.shift-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.shift-pill-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Big Net Cash Hero */
.net-drawer-hero {
  text-align: center;
  padding: 14px 0 6px 0;
}

.net-drawer-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 4px;
}

.net-drawer-amount {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold-400);
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

/* 2-Column Inflow/Outflow Grid */
.inout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.inout-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border-muted);
}

.inout-card.inflow {
  border-right: 3px solid var(--color-inflow);
}

.inout-card.outflow {
  border-right: 3px solid var(--color-outflow);
}

.inout-title {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 4px;
}

.inout-val {
  font-size: 1.15rem;
  font-weight: 800;
}

.inout-card.inflow .inout-val {
  color: var(--color-inflow);
}

.inout-card.outflow .inout-val {
  color: var(--color-outflow);
}

/* Gold Weight Summary Card */
.gold-balance-card {
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.gold-weight-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-muted);
}

.gold-hero-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.gold-hero-delta {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-400);
}

/* Karats Matrix Table */
.karat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.karat-table th {
  text-align: right;
  padding: 8px 6px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-muted);
}

.karat-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 700;
}

.karat-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-300);
  font-weight: 800;
  font-size: 0.78rem;
}

/* Payment Methods Breakdown */
.payment-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-muted);
  font-size: 0.86rem;
}

.pay-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 600;
}

.pay-row-val {
  font-weight: 800;
  font-family: var(--font-digits);
  color: var(--gold-300);
}

/* Thermal Receipt Preview View */
.thermal-receipt {
  background: #fff;
  color: #111827;
  padding: 24px 20px;
  border-radius: var(--radius-md);
  font-family: 'Courier New', Courier, monospace, var(--font-arabic);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 16px;
  position: relative;
}

.thermal-receipt::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: radial-gradient(circle, transparent, transparent 50%, #fff 50%, #fff 100%);
  background-size: 16px 16px;
}

.receipt-header {
  text-align: center;
  border-bottom: 2px dashed #9ca3af;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.receipt-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #111;
  font-family: var(--font-arabic);
}

.receipt-subtitle {
  font-size: 0.85rem;
  color: #4b5563;
  margin-top: 2px;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.receipt-line.total {
  font-weight: 900;
  font-size: 1.05rem;
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
  padding: 8px 0;
  margin: 8px 0;
}

.receipt-barcode {
  text-align: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px dashed #9ca3af;
}

.barcode-lines {
  height: 40px;
  background: repeating-linear-gradient(
    90deg,
    #111 0px,
    #111 2px,
    transparent 2px,
    transparent 4px,
    #111 4px,
    #111 7px,
    transparent 7px,
    transparent 9px
  );
  margin: 0 auto 6px auto;
  width: 80%;
}

/* Action Button Group */
.shift-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.btn-secondary {
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-muted);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--gold-500);
  background: var(--bg-card-hover);
}

.btn-secondary:active {
  transform: scale(0.96);
}

.btn-danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

/* Print Media Query */
@media print {
  body {
    background: #fff !important;
    padding: 0 !important;
  }
  .app-wrapper {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    height: auto !important;
  }
  .app-header, .bottom-nav, .shift-actions-grid, .toast-container {
    display: none !important;
  }
  .thermal-receipt {
    box-shadow: none !important;
    padding: 0 !important;
  }
}
