/* CSS Reset & Variables */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-glass: rgba(19, 27, 46, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  --accent-primary: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  
  /* Receipt Template variables (matching screenshot) */
  --receipt-bg: #ffffff;
  --receipt-text-dark: #1a1e24;
  --receipt-text-muted: #5e6672;
  --receipt-green: #0f8f4c;
  --receipt-dashed-line: #a7aeb8;
}

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

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(226, 92, 29, 0.1) 0px, transparent 50%);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-x: hidden;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* App Header */
.app-header {
  text-align: center;
  margin-bottom: 8px;
}

.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--accent-primary);
}

.header-logo h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.header-logo h1 span {
  color: var(--accent-primary);
}

.header-tagline {
  font-size: 14px;
  color: var(--text-muted);
}

/* Main Content Grid */
.main-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

/* Editor Panel */
.editor-panel {
  width: 100%;
}

.panel-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.panel-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

/* Forms Styling */
.form-section-title {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-primary);
  margin: 24px 0 12px 0;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  width: 100%;
}

.form-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.form-row > .form-group {
  flex: 1;
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

label {
  font-size: 13px;
  font-weight: 600;
  color: #d1d5db;
}

input[type="text"],
input[type="datetime-local"],
select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
  width: 100%;
}

input[type="text"]:focus,
input[type="datetime-local"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(15, 23, 42, 0.9);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 16px;
}

.amount-wrapper input {
  padding-left: 36px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #3b82f6;
}

.helper-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -2px;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  margin-top: 10px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-glass);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.w-full {
  width: 100%;
}

.align-end {
  justify-content: flex-end;
}

.flex-2 {
  flex: 2 !important;
}

.flex-1 {
  flex: 1 !important;
}

.hidden {
  display: none !important;
}

/* Preview Panel */
.preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-sticky-wrapper {
  position: sticky;
  top: 20px;
  width: 100%;
  max-width: 420px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  width: 100%;
  padding: 0 4px;
}

.preview-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.preview-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

/* The Capture Area (Receipt Canvas) */
.receipt-background-canvas {
  position: relative;
  width: 440px;
  height: 580px;
  background-image: url('background.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px; /* Reduced padding to make the ticket card larger */
  border-radius: 0;
  box-sizing: border-box;
}

/* Ticket Receipt Design */
.receipt-ticket {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 20px; /* Offset for green tick hanging out */
  background-color: var(--receipt-bg);
  border-radius: 28px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.16);
  font-family: Arial, Helvetica, sans-serif;
}

/* Top checkmark badge */
.receipt-check-badge {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background-color: #0da15c; /* Vibrant Success Green */
  border: 2px solid #068046; /* Subtle darker green border matching reference */
  box-shadow: 0 8px 20px rgba(13, 161, 92, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Ticket Top Card Part */
.receipt-top-section {
  background-color: transparent;
  padding: 52px 26px 16px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Brand Header */
.brand-header {
  margin-bottom: 16px;
}

.icici-brand-logo-img {
  height: 28px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.icici-symbol-wrapper {
  background-color: #d92419;
  border: 1.5px solid #ffffff;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icici-i-symbol {
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  line-height: 1;
  margin-top: -1px;
}

.icici-brand-name {
  font-size: 17px;
  font-weight: 500;
  font-style: italic;
  font-family: 'Arial', sans-serif;
  letter-spacing: -0.3px;
}

.icici-brand-name .bold-brand {
  font-weight: 900;
}

/* Custom Brand Header Styles */
.custom-brand-text-badge {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.2px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.custom-brand-logo-img {
  max-height: 36px;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.custom-brand-logo-placeholder {
  font-size: 12px;
  font-style: italic;
  color: var(--receipt-text-muted);
  border: 1.5px dashed var(--receipt-dashed-line);
  padding: 6px 14px;
  border-radius: 4px;
}

/* Status Msg */
.status-msg {
  font-size: 17px;
  font-weight: normal;
  color: var(--receipt-text-dark);
  margin-bottom: 12px;
}

/* Amount Display */
.amount-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: var(--receipt-text-dark);
  margin-bottom: 18px;
  font-weight: normal;
}

.amount-display .rupee-symbol {
  font-size: 26px;
  margin-right: 8px;
  font-weight: 500;
}

.amount-display span:not(.rupee-symbol) {
  font-size: 34px;
  letter-spacing: -0.5px;
}

/* Recipient card */
.recipient-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4px;
  gap: 4px;
}

.recipient-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.recipient-label {
  font-size: 14.5px;
  color: var(--receipt-text-muted);
  font-weight: 400;
}

.recipient-name {
  font-size: 18px;
  font-weight: normal;
  color: var(--receipt-text-dark);
}

.bank-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.bank-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.bank-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bank-name {
  font-size: 16px;
  font-weight: normal;
  color: var(--receipt-text-dark);
}

.account-num {
  font-size: 14.5px;
  color: var(--receipt-text-muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Perforation Divider */
.ticket-divider {
  display: flex;
  align-items: center;
  height: 24px;
  width: 100%;
  position: relative;
  background-color: transparent;
  padding: 0 24px; /* Pad so dashed line stays inside notches */
}

.notch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 5;
}

.notch-left {
  left: -12px;
  background-color: #df4210; /* Blend with left background gradient */
}

.notch-right {
  right: -12px;
  background-color: #e04d13; /* Blend with right background gradient */
}

.dashed-line {
  flex-grow: 1;
  height: 2px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.dashed-line svg {
  width: 100%;
  height: 2px;
  display: block;
}

/* Bottom Card Part */
.receipt-bottom-section {
  background-color: transparent;
  padding: 16px 26px 28px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sender-info-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
  gap: 4px;
}

.sender-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  width: 100%;
}

.sender-label {
  font-size: 14px;
  color: var(--receipt-text-muted);
  font-weight: 400;
}

.sender-name {
  font-size: 16.5px;
  font-weight: normal;
  color: var(--receipt-text-dark);
}

.sender-bank-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.sender-bank-logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.sender-bank-logo-container svg, 
.sender-bank-logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sender-bank-details {
  font-size: 13.5px;
  color: var(--receipt-text-muted);
  font-weight: normal;
}

/* Metadata Box */
.metadata-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding-top: 14px;
}

.metadata-item {
  font-size: 13px;
  color: var(--receipt-text-muted);
}

.tr-id-item {
  color: var(--receipt-text-muted);
}

.tr-id-item strong {
  color: var(--receipt-text-dark);
  font-weight: normal;
}

/* Tabs Container Styles */
.tabs-container {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.4);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  margin-bottom: 22px;
}

.tab-btn {
  flex: 1;
  padding: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 7px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 10px var(--accent-glow);
}

/* Style 2 - Wavy Ticket Receipt Styles */
.receipt-ticket-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('text background.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-color: transparent;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

.ticket-2-body {
  width: 80.5%; /* Exact card width ratio from image */
  margin: 0 auto;
  padding-top: 172px; /* Shifted up by 22px to move text higher */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Wavy Edges (Hidden because they are baked in text background.png) */
.wavy-edge {
  display: none;
}

/* Double-circle badge */
.transfer-check-badge {
  position: absolute;
  top: 64px; /* Shifted slightly down for the smaller checkmark size */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.transfer-check-img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.transfer-status-msg {
  font-size: 17.5px;
  font-weight: bold;
  color: #1a1e24;
  margin-bottom: 12px;
  text-align: center;
}

.transfer-amount-label {
  font-size: 13.5px;
  color: var(--receipt-text-muted);
  margin-bottom: 2px;
  text-align: center;
}

.transfer-amount-display {
  font-size: 32px;
  font-weight: 700;
  color: #1a1e24;
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 0;
}

.transfer-amount-display .rupee-symbol {
  font-size: 24px;
  margin-right: 6px;
  font-weight: 700;
}

.transfer-decimal {
  font-size: 0.68em;
  font-weight: 700;
  margin-left: 1px;
}

.transfer-divider-line {
  display: none; /* Already baked into background image */
}

.transfer-details-table {
  width: 100%;
  padding: 0 16px; /* Spacing inside card boundaries */
  display: flex;
  flex-direction: column;
  gap: 15px; /* Spacing between rows */
  box-sizing: border-box;
  margin-top: 68px; /* Increased by 22px to keep original absolute position */
}

.transfer-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  font-size: 14px;
  line-height: 1.45;
}

.transfer-detail-label {
  color: var(--receipt-text-muted);
  font-weight: normal;
  text-align: left;
}

.transfer-detail-val {
  color: var(--receipt-text-dark);
  font-weight: bold;
  text-align: right;
  word-break: break-word;
}

/* Style 3 - Kotak Mahindra Bank Receipt Styles */
.receipt-ticket-3 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('background3.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-color: transparent;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

.ticket-3-body {
  padding: 105px 28px 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-sizing: border-box;
}

.kotak-title {
  font-size: 24px;
  font-weight: normal;
  color: #0c3370; /* Kotak Mahindra Blue */
  margin-bottom: 2px;
  letter-spacing: -0.3px;
}

.kotak-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kotak-label {
  font-size: 14.5px;
  color: #555c68;
  font-weight: normal;
  letter-spacing: -0.1px;
}

.kotak-value {
  font-size: 19px;
  color: #000000;
  font-weight: normal;
  letter-spacing: -0.2px;
}

.kotak-amount {
  font-size: 21px;
  font-weight: normal;
}

/* Style 4 - Utkarsh Small Finance Bank Receipt Styles */
.receipt-ticket-4 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top, #5c16b0 0%, #1d0739 100%);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ffffff;
  box-sizing: border-box;
}

.ticket-4-body {
  padding: 40px 32px 30px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: space-between;
  box-sizing: border-box;
}

.utkarsh-check-container {
  margin-top: 10px;
  margin-bottom: 24px;
}

.utkarsh-check-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.utkarsh-status-msg {
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  margin-bottom: 28px;
  padding: 0 4px;
  font-weight: 400;
}

.utkarsh-amount-display {
  font-size: 38px;
  font-weight: normal;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 36px;
  letter-spacing: -0.5px;
}

.utkarsh-amount-display .rupee-symbol {
  font-size: 28px;
  margin-right: 8px;
}

.utkarsh-card-section {
  width: 100%;
  margin-bottom: 20px;
}

.utkarsh-card-label {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  margin-bottom: 10px;
  font-weight: normal;
}

.utkarsh-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

.utkarsh-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 20px;
  font-weight: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-teal {
  background: #02a4a7;
}

.avatar-rose {
  background: #df5977;
}

.utkarsh-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.utkarsh-card-name {
  color: #111827;
  font-size: 16px;
  font-weight: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.utkarsh-card-sub {
  color: #6b7280;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.utkarsh-details-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  margin-bottom: 25px;
}

.utkarsh-detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.utkarsh-detail-label {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: normal;
}

.utkarsh-detail-val {
  font-size: 17.5px;
  color: #ffffff;
  font-weight: normal;
  letter-spacing: 0.3px;
}

.utkarsh-footer-note {
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-top: auto;
  padding: 0 8px;
}
