/* ==========================================================================
   Q-Snack Master Control Panel - SaaS Modular Styling
   ========================================================================== */

.cp-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-radius: var(--radius-md, 10px);
  font-size: 0.85rem;
  animation: slideDown 0.2s ease-out forwards;
}

.alert-banner-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.alert-banner-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.alert-close {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

/* 3-Column Action Grid */
.cp-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.cp-action-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
}

.card-sale     { border-top: 3px solid #10b981; }
.card-purchase { border-top: 3px solid #3b82f6; }
.card-refill   { border-top: 3px solid #8b5cf6; }

.cp-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
}

.cp-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin: 4px 0 0 0;
}

.cp-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 6px;
}

.tag-sale     { background: #ecfdf5; color: #059669; }
.tag-purchase { background: #eff6ff; color: #2563eb; }
.tag-refill   { background: #f5f3ff; color: #7c3aed; }

.cp-hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

.cp-card-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.cp-card-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
}

.cp-card-form label {
  font-size: 0.775rem;
  font-weight: 600;
  color: #475569;
}

.cp-card-form input,
.cp-card-form select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-main, #0f172a);
  background: #ffffff;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cp-card-form input:focus,
.cp-card-form select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.cp-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Action Buttons */
.btn-cp {
  margin-top: auto;
  height: 42px;
  width: 100%;
  border: none;
  border-radius: var(--radius-md, 10px);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-cp:hover {
  opacity: 0.92;
}

.btn-cp:active {
  transform: translateY(1px);
}

.btn-cp-sale     { background: #059669; }
.btn-cp-purchase { background: #2563eb; }
.btn-cp-refill   { background: #7c3aed; }

/* Activity Type Pills */
.type-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.pill-sale     { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.pill-purchase { background: #eff6ff; color: #2563eb; border: 1px solid #dbeafe; }
.pill-refill   { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }

/* Filter Bar */
.search-filters-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-input-wrapper select {
  height: 38px;
  padding: 0 12px;
  font-size: 0.85rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  background: #f8fafc;
  color: var(--text-main, #0f172a);
  outline: none;
  font-family: inherit;
}

.btn-action-reset {
  height: 38px;
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  background: #ffffff;
  color: var(--text-muted, #64748b);
  cursor: pointer;
}

.btn-action-reset:hover {
  background: #f1f5f9;
  color: var(--text-main, #0f172a);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1150px) {
  .cp-actions-grid {
    grid-template-columns: 1fr;
  }
}