/* ===========================================
   CUSTOM CSS - Serenity Dashboard
   Only styles that can't be done with Tailwind
   =========================================== */

/* ===========================================
   ALPINE.JS - Hide elements until initialized
   =========================================== */
[x-cloak] { display: none !important; }

/* ===========================================
   TYPOGRAPHY - Number formatting
   =========================================== */
/* Tabular nums for numeric elements */
#monthly_sales_count, #monthly_sales_revenue,
#lifetime_sales, #lifetime_revenue,
#auth_count, #success_count, #decline_count,
[id*="_count"], [id*="_revenue"], [id*="_sales"] {
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1 !important;
  font-weight: 500 !important;
}

/* Ensure MDI icons maintain proper font family */
.mdi:before, .mdi-set, [class*="mdi-"]:before {
  font-family: "Material Design Icons" !important;
}

/* ===========================================
   TABLE STYLES
   =========================================== */
/* Volume progress */
.progress-thin {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background-color: rgba(0,0,0,0.06);
}

.dark .progress-thin {
  background-color: rgba(255,255,255,0.1);
}

.volume-left .progress-bar {
  transition: width 0.25s ease;
}

.volume-cap {
  display: inline-block;
  text-align: right;
  line-height: 1.1;
}

.volume-cap .volume-current { font-weight: 600; }
.volume-cap .volume-total { font-size: 12px; color: hsl(var(--muted-foreground)); }

/* Mids table two-line clamp */
.mid-two-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.2;
}

/* Metric cell layout */
.metric-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.1;
}

.metric-cell .metric-value { font-weight: 600; }
.metric-cell .metric-sub { font-size: 14px; font-weight: 600; color: hsl(var(--muted-foreground)); }

/* Table header two-line */
.th-two-line {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
  gap: 2px;
}

.th-two-line .th-sub {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.1px;
}

/* Table hover column effect */
.table-hover td.hovered,
.table-hover th.hovered {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

.dark .table-hover td.hovered,
.dark .table-hover th.hovered {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Responsive table font sizes */
@media (max-width: 1490px) {
  #earning_table th, #earning_table td { font-size: 13px !important; }
}
@media (max-width: 1415px) {
  #earning_table th, #earning_table td { font-size: 12px !important; }
}
@media (max-width: 1350px) {
  #earning_table th, #earning_table td { font-size: 11px !important; }
}

/* ===========================================
   FORM ELEMENTS
   =========================================== */
.borderless-input {
  border: none !important;
  background: transparent !important;
  max-width: 100px;
  padding: 0.25rem 1.5rem 0.25rem 0.25rem !important;
  cursor: pointer;
  font-size: 14px;
  height: 32px;
}

.borderless-input::-webkit-calendar-picker-indicator {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.borderless-select {
  border: none !important;
  background: transparent !important;
  min-width: 120px;
  width: auto;
  padding: 0.25rem 1.25rem 0.25rem 0 !important;
  cursor: pointer;
  font-size: 14px;
  height: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0 center !important;
  background-size: 12px !important;
}

.borderless-select:focus,
.borderless-input:focus {
  box-shadow: none !important;
  outline: none !important;
}

/* ===========================================
   COMPLIANCE POPUP STYLES
   =========================================== */
.compliance-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(4px);
}

.compliance-popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.compliance-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 50%;
  max-width: 800px;
  max-height: 85vh;
  min-width: 400px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.compliance-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.compliance-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

.compliance-popup-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin: 0;
}

.compliance-popup-close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  color: hsl(var(--muted-foreground));
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compliance-popup-close:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.compliance-popup-body {
  flex: 1;
  padding: 2.5rem 2rem;
  overflow-y: auto;
}

.compliance-popup-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.compliance-popup-icon {
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fef2f2;
  border-radius: 50%;
}

.dark .compliance-popup-icon {
  background-color: rgba(236, 130, 144, 0.15);
}

.compliance-popup-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  stroke: #dc2626;
}

.dark .compliance-popup-icon svg {
  stroke: #ec8290;
}

.compliance-popup-message {
  font-size: 1.25rem;
  line-height: 1.75;
  color: hsl(var(--foreground));
  margin: 0 0 1.5rem 0;
  font-weight: 500;
}

.compliance-popup-highlight {
  color: #dc2626;
  font-weight: 600;
}

.dark .compliance-popup-highlight {
  color: #ec8290;
}

.compliance-popup-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin: 0 0 1rem 0;
}

.compliance-popup-list {
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
  list-style-type: none;
}

.compliance-popup-list li {
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.compliance-popup-list li:before {
  content: "\2022";
  position: absolute;
  left: -1rem;
  color: #dc2626;
  font-weight: bold;
  font-size: 1.25rem;
}

.dark .compliance-popup-list li:before {
  color: #ec8290;
}

.compliance-popup-footer-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid hsl(var(--border));
}

.compliance-popup-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
}

.compliance-popup-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: transparent;
  color: hsl(var(--foreground));
  border: 2px solid hsl(var(--border));
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.compliance-popup-btn:hover {
  background-color: hsl(var(--foreground));
  color: hsl(var(--background));
  border-color: hsl(var(--foreground));
}

.compliance-popup-btn:active {
  transform: scale(0.98);
}

/* Compliance popup responsive */
@media (max-width: 1024px) {
  .compliance-popup { width: 70%; }
}

@media (max-width: 768px) {
  .compliance-popup { width: 90%; }
  .compliance-popup-layout {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  .compliance-popup-body { padding: 2rem 1.5rem; }
  .compliance-popup-message { font-size: 1.125rem; }
}

@media (max-width: 480px) {
  .compliance-popup {
    width: 95%;
    min-width: unset;
  }
  .compliance-popup-header { padding: 1rem; }
  .compliance-popup-body { padding: 1.5rem 1rem; }
  .compliance-popup-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===========================================
   ANNOUNCEMENT POPUP STYLES
   =========================================== */
.announcement-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(4px);
}

.announcement-popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.announcement-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 50%;
  max-width: 800px;
  max-height: 85vh;
  min-width: 400px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.announcement-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.announcement-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

.announcement-popup-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin: 0;
}

.announcement-popup-close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  color: hsl(var(--muted-foreground));
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.announcement-popup-close:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.announcement-popup-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.announcement-popup-body {
  flex: 1;
  padding: 2.5rem 2rem;
  overflow-y: auto;
}

.announcement-popup-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.announcement-popup-icon {
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--primary) / 0.1);
  border-radius: 50%;
}

.announcement-popup-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  stroke: hsl(var(--primary));
}

.announcement-popup-message {
  font-size: 1.5rem;
  line-height: 1.75;
  color: hsl(var(--foreground));
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.announcement-popup-highlight {
  color: hsl(var(--primary));
}

.announcement-popup-description {
  font-size: 1.125rem;
  line-height: 1.75;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.announcement-popup-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
}

.announcement-popup-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.announcement-popup-btn:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.announcement-popup-btn:active {
  transform: scale(0.98);
}

.announcement-popup-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Announcement popup responsive */
@media (max-width: 1024px) {
  .announcement-popup { width: 70%; }
}

@media (max-width: 768px) {
  .announcement-popup { width: 90%; }
  .announcement-popup-layout {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
  }
  .announcement-popup-body { padding: 2rem 1.5rem; }
  .announcement-popup-message { font-size: 1.25rem; }
  .announcement-popup-actions { justify-content: center; }
}

@media (max-width: 480px) {
  .announcement-popup {
    width: 95%;
    min-width: unset;
  }
  .announcement-popup-header { padding: 1rem; }
  .announcement-popup-body { padding: 1.5rem 1rem; }
  .announcement-popup-btn {
    width: 100%;
    justify-content: center;
  }
}

.customize-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
}

.customize-header-icon {
  width: 40px;
  height: 40px;
  background: hsl(var(--primary) / 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary));
}

.customize-header-text h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin: 0;
}

.customize-header-text p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0.125rem 0 0 0;
}

.customize-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .customize-container {
    grid-template-columns: 1fr;
  }
}

.form-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.form-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid hsl(var(--border));
}

.form-card-icon {
  width: 36px;
  height: 36px;
  background: hsl(var(--primary) / 0.1);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary));
}

.form-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.form-card-subtitle {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.btn-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-preview {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #e8475f 0%, #c41e3a 100%);
  color: white;
  border: none;
}

.btn-preview:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-copy {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

.btn-copy.is-copied {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

.btn-copy:hover {
  background: hsl(var(--muted));
  border-color: hsl(var(--foreground) / 0.2);
}

.notes-section {
  margin-top: 1.5rem;
  padding: 1rem;
  background: hsl(var(--muted) / 0.3);
  border-radius: 0.5rem;
  border-left: 3px solid hsl(var(--primary));
}

.notes-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notes-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notes-section li {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  padding: 0.375rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.notes-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  background: hsl(var(--primary));
  border-radius: 50%;
}

.notes-section a {
  color: hsl(var(--primary));
  text-decoration: none;
}

.notes-section a:hover {
  text-decoration: underline;
}

.notes-section code {
  background: hsl(var(--muted));
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color: hsl(var(--foreground));
}

.notes-section strong {
  color: hsl(var(--foreground));
}

.preview-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1.5rem;
  position: sticky;
  top: 1rem;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid hsl(var(--border));
}

.preview-title {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.preview-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  border-radius: 9999px;
}

.preview-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: linear-gradient(135deg, hsl(var(--muted) / 0.3) 0%, hsl(var(--muted) / 0.5) 100%);
  border-radius: 0.5rem;
  padding: 2rem;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.loader-wrapper {
  position: fixed;
  z-index: 999999;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.loader {
  border: 4px solid hsl(var(--muted));
  border-radius: 50%;
  border-top: 4px solid hsl(var(--primary));
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



/* ----- AUTH ------ */
.auth-bg {
                background-image: url('/assets/images/bg-lighttheme-1920x1080.svg');
                background-size: cover;
                background-position: center;
                background-repeat: no-repeat;
            }
            .dark .auth-bg {
                background-image: url('/assets/images/bg-darktheme-1920x1080.svg');
            }
            .auth-bg-rotated {
                background-image: url('/assets/images/bg-lighttheme-1920x1080.svg');
                background-size: cover;
                background-position: center;
                background-repeat: no-repeat;
                transform: rotate(180deg);
            }
            .dark .auth-bg-rotated {
                background-image: url('/assets/images/bg-darktheme-1920x1080.svg');
            }


/* ===========================================
   REFUND UPLOAD
   =========================================== */
/* Page Header */
            .upload-header {
                display: flex;
                align-items: center;
                gap: 1rem;
                margin-bottom: 1.5rem;
                padding-top: 1rem;
            }
            .upload-header-icon {
                width: 40px;
                height: 40px;
                background: hsl(var(--primary) / 0.1);
                border-radius: 0.5rem;
                display: flex;
                align-items: center;
                justify-content: center;
                color: hsl(var(--primary));
            }
            .upload-header-text h1 {
                font-size: 1.5rem;
                font-weight: 600;
                color: hsl(var(--foreground));
                margin: 0;
            }
            .upload-header-text p {
                font-size: 0.875rem;
                color: hsl(var(--muted-foreground));
                margin: 0.125rem 0 0 0;
            }

            /* Upload Card */
            .upload-card {
                max-width: 600px;
                background: hsl(var(--card));
                border: 1px solid hsl(var(--border));
                border-radius: 0.5rem;
            }
            .upload-card-body {
                padding: 1.5rem;
            }

            /* Dropzone */
            .dropzone {
                border: 2px dashed hsl(var(--border));
                border-radius: 0.5rem;
                padding: 2rem;
                text-align: center;
                transition: all 0.2s ease;
                cursor: pointer;
                background: hsl(var(--muted) / 0.2);
            }
            .dropzone:hover,
            .dropzone.dragover {
                border-color: hsl(var(--primary));
                background: hsl(var(--primary) / 0.05);
            }
            .dropzone-icon {
                width: 48px;
                height: 48px;
                margin: 0 auto 1rem;
                color: hsl(var(--muted-foreground));
            }
            .dropzone.dragover .dropzone-icon,
            .dropzone:hover .dropzone-icon {
                color: hsl(var(--primary));
            }
            .dropzone-text {
                font-size: 0.875rem;
                color: hsl(var(--foreground));
                margin-bottom: 0.25rem;
            }
            .dropzone-text strong {
                color: hsl(var(--primary));
            }
            .dropzone-hint {
                font-size: 0.75rem;
                color: hsl(var(--muted-foreground));
            }
            .dropzone input[type="file"] {
                display: none;
            }
            .file-selected {
                display: flex;
                align-items: center;
                gap: 0.75rem;
                padding: 0.75rem 1rem;
                background: hsl(var(--primary) / 0.1);
                border: 1px solid hsl(var(--primary) / 0.3);
                border-radius: 0.375rem;
                margin-top: 1rem;
            }
            .file-selected.hidden {
                display: none;
            }
            .file-selected-icon {
                color: hsl(var(--primary));
            }
            .file-selected-name {
                flex: 1;
                font-size: 0.875rem;
                font-weight: 500;
                color: hsl(var(--foreground));
            }
            .file-selected-remove {
                background: none;
                border: none;
                color: hsl(var(--muted-foreground));
                cursor: pointer;
                padding: 0.25rem;
            }
            .file-selected-remove:hover {
                color: hsl(var(--destructive, 0 84% 60%));
            }

            /* Format Info */
            .format-info {
                display: flex;
                align-items: flex-start;
                gap: 0.75rem;
                padding: 0.875rem 1rem;
                background: hsl(var(--muted) / 0.3);
                border-radius: 0.375rem;
                margin-top: 1rem;
            }
            .format-info-icon {
                color: hsl(var(--muted-foreground));
                flex-shrink: 0;
                margin-top: 0.125rem;
            }
            .format-info-text {
                font-size: 0.75rem;
                color: hsl(var(--muted-foreground));
                line-height: 1.5;
            }
            .format-info-text code {
                font-size: 0.6875rem;
                background: hsl(var(--background));
                padding: 0.125rem 0.375rem;
                border-radius: 0.25rem;
                border: 1px solid hsl(var(--border));
            }

            /* Submit Button */
            .upload-submit {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                padding: 0.625rem 1.25rem;
                font-size: 0.875rem;
                font-weight: 500;
                color: white;
                background: hsl(var(--primary));
                border: none;
                border-radius: 0.375rem;
                cursor: pointer;
                transition: opacity 0.15s ease;
                margin-top: 1.25rem;
            }
            .upload-submit:hover {
                opacity: 0.9;
            }
            .upload-submit:disabled {
                opacity: 0.6;
                cursor: not-allowed;
            }

            /* Alerts */
            .upload-alert {
                display: flex;
                align-items: flex-start;
                gap: 0.75rem;
                padding: 0.875rem 1rem;
                border-radius: 0.375rem;
                margin-bottom: 1rem;
            }
            .upload-alert.hidden {
                display: none;
            }
            .upload-alert-success {
                background: rgba(34, 197, 94, 0.1);
                border: 1px solid rgba(34, 197, 94, 0.2);
                color: #16a34a;
            }
            .dark .upload-alert-success {
                background: rgba(34, 197, 94, 0.1);
                color: #4ade80;
            }
            .upload-alert-error {
                background: rgba(239, 68, 68, 0.1);
                border: 1px solid rgba(239, 68, 68, 0.2);
                color: #dc2626;
            }
            .dark .upload-alert-error {
                background: rgba(239, 68, 68, 0.1);
                color: #f87171;
            }
            .upload-alert-icon {
                flex-shrink: 0;
                margin-top: 0.125rem;
            }
            .upload-alert-content {
                flex: 1;
                font-size: 0.875rem;
            }
            .upload-alert-close {
                background: none;
                border: none;
                cursor: pointer;
                padding: 0;
                opacity: 0.7;
            }
            .upload-alert-close:hover {
                opacity: 1;
            }

            /* Results */
            .upload-results {
                margin-top: 1.25rem;
                padding-top: 1.25rem;
                border-top: 1px solid hsl(var(--border));
            }
            .upload-results.hidden {
                display: none;
            }
            .upload-results-title {
                font-size: 0.875rem;
                font-weight: 600;
                color: hsl(var(--foreground));
                margin-bottom: 0.75rem;
            }
            .upload-results-grid {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 0.75rem;
            }
            .upload-result-item {
                padding: 0.75rem;
                background: hsl(var(--muted) / 0.3);
                border-radius: 0.375rem;
            }
            .upload-result-label {
                font-size: 0.6875rem;
                font-weight: 500;
                text-transform: uppercase;
                letter-spacing: 0.025em;
                color: hsl(var(--muted-foreground));
                margin-bottom: 0.25rem;
            }
            .upload-result-value {
                font-size: 1.25rem;
                font-weight: 600;
                color: hsl(var(--foreground));
            }

            /* Spinner animation */
            @keyframes spin {
                to { transform: rotate(360deg); }
            }
            .animate-spin {
                animation: spin 1s linear infinite;
            }


.page-header{display:flex;align-items:center;gap:1rem;margin-bottom:1.5rem;padding-top:1rem;}
.page-header-icon{width:40px;height:40px;background:hsl(var(--primary)/0.1);border-radius:0.5rem;display:flex;align-items:center;justify-content:center;color:hsl(var(--primary));}

.register-container{max-width:640px;}
.register-card{background:hsl(var(--card));border:1px solid hsl(var(--border));border-radius:0.75rem;overflow:hidden;}
.register-card-header{display:flex;align-items:center;gap:1rem;padding:1.25rem 1.5rem;border-bottom:1px solid hsl(var(--border));background:linear-gradient(to right,hsl(var(--muted)/0.3),transparent);}
.register-card-icon{width:36px;height:36px;background:hsl(var(--primary)/0.1);border-radius:0.5rem;display:flex;align-items:center;justify-content:center;color:hsl(var(--primary));flex-shrink:0;}
.register-card-title{font-size:1.125rem;font-weight:600;color:hsl(var(--foreground));}
.register-card-subtitle{font-size:0.875rem;color:hsl(var(--muted-foreground));margin-top:0.125rem;}
.register-card-body{padding:1.5rem;}

.form-group{margin-bottom:1rem;}
.form-group:last-child{margin-bottom:0;}
.form-group label{display:block;font-size:0.875rem;font-weight:500;color:hsl(var(--foreground));margin-bottom:0.375rem;}
.form-group .form-input,.form-group .form-select{width:100%;padding:0.625rem 0.875rem;border:1px solid hsl(var(--border));border-radius:0.5rem;background:hsl(var(--background));color:hsl(var(--foreground));font-size:0.875rem;transition:border-color 0.15s,box-shadow 0.15s;}
.form-group .form-input:focus,.form-group .form-select:focus{outline:none;border-color:hsl(var(--primary));box-shadow:0 0 0 3px hsl(var(--primary)/0.1);}
.form-group .form-input::placeholder{color:hsl(var(--muted-foreground));}

.btn-submit{display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;padding:0.625rem 1.5rem;background:hsl(var(--primary));color:hsl(var(--primary-foreground));border:none;border-radius:0.5rem;font-size:0.875rem;font-weight:500;cursor:pointer;transition:background 0.15s;}
.btn-submit:hover{background:hsl(var(--primary)/0.9);}

.alert-success{padding:0.875rem 1rem;background:hsl(142 76% 36%/0.1);border:1px solid hsl(142 76% 36%/0.2);border-radius:0.5rem;color:hsl(142 76% 36%);font-size:0.875rem;}
.alert-danger{padding:0.875rem 1rem;background:hsl(0 84% 60%/0.1);border:1px solid hsl(0 84% 60%/0.2);border-radius:0.5rem;color:hsl(0 84% 60%);font-size:0.875rem;}

.page-header{display:flex;align-items:center;gap:1rem;margin-bottom:1.5rem;padding-top:1rem;}.page-header-icon{width:40px;height:40px;background:hsl(var(--primary)/0.1);border-radius:0.5rem;display:flex;align-items:center;justify-content:center;color:hsl(var(--primary));}

.merchant-analytics-overlay-sentinel {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
/* Sortable column headers: show they are clickable and current sort direction */
#merchant-analytics-livewire .table-container a.sort {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}
#merchant-analytics-livewire .table-container a.sort:hover {
    color: hsl(var(--primary));
}
#merchant-analytics-livewire .table-container a.sort::after {
    content: '\21C5';
    font-size: 0.85em;
    opacity: 0.4;
}
#merchant-analytics-livewire .table-container a.sort.asc::after {
    content: '\2191';
    opacity: 1;
    color: hsl(var(--primary));
}
#merchant-analytics-livewire .table-container a.sort.desc::after {
    content: '\2193';
    opacity: 1;
    color: hsl(var(--primary));
}

/* Page Header */
.cap-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.cap-header-icon {
    width: 40px;
    height: 40px;
    background: hsl(var(--primary) / 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--primary));
}
.cap-header-text h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin: 0;
}
.cap-header-text p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin: 0.125rem 0 0 0;
}

.cap-container {
    max-width: 480px;
}
.cap-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
}
.cap-card-body {
    padding: 1.25rem;
}

/* Success Alert */
.cap-alert-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    color: #16a34a;
}
.dark .cap-alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}
.cap-alert-success.hidden {
    display: none;
}
.cap-alert-success svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Form Styling */
.cap-form-group {
    margin-bottom: 1rem;
}
.cap-form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.375rem;
}
.cap-current {
    font-weight: 600;
    color: hsl(var(--primary));
}
.cap-today {
    font-weight: 400;
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
    margin-left: 0.25rem;
}
.cap-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.375rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: border-color 0.15s ease;
}
.cap-input:focus {
    outline: none;
    border-color: hsl(var(--primary));
}

/* Submit Button */
.cap-submit-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: white;
    background: hsl(var(--primary));
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.cap-submit-btn:hover {
    opacity: 0.9;
}



/** Loading **/ 

[data-loading=true] {
    opacity: 0.7;
    position: relative;
}

[data-loading=true]::after {
     animation: loading 500ms infinite linear;
     border: 0.1rem solid rgb(50, 189, 165);
     border-top-color: rgb(50, 189, 165);
     border-right-color: rgb(50, 189, 165);
     border-radius: 50%;
     border-right-color: transparent;
     border-top-color: transparent;
     content: "";
     display: block;
     height: .8rem;
     left: 50%;
     margin-left: -.4rem;
     margin-top: -.4rem;
     position: absolute;
     top: 50%;
     width: .8rem;
     z-index: 1;
 }

 @keyframes loading {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/** end loading **/
