:root {
  /* Avolta Brand Colors */
  --primary-color: #8F53F0;
  --primary-hover: #7A46CC;
  --primary-light: rgba(143, 83, 240, 0.1);
  --accent-color: #0071CF;
  --secondary-color: #777777;
  --secondary-hover: #5a5a5a;
  --success-color: #10b981;
  --success-hover: #059669;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --background: #F5F3ED;
  --card-background: #FFFFFF;
  --text-primary: #373737;
  --text-secondary: #777777;
  --border-color: #D0D0D0;
  --border-radius: 16px;
  --border-radius-sm: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 6px 24px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  background: #F5F3ED;
  color: var(--text-primary);
  line-height: 1.6;
  padding: 30px 20px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header Bar */
header {
  background-color: #FFFFFF;
  border-bottom: 1px solid #E0E0E0;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

/* Logo Section */
.logo-section {
  display: flex;
  align-items: center;
}

.logo {
  max-height: 36px;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.8;
}

/* Page Title Container */
.page-title-container {
  text-align: center;
  padding: 40px 24px 24px 24px;
}

.page-title-container h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #373737;
  margin: 0;
  letter-spacing: -0.025em;
}

.page-title-container .subtitle {
  font-size: 1.25rem;
  color: #777777;
  margin-top: 8px;
}

/* Language Selector */
.language-selector {
  position: relative;
  z-index: 100;
}

.lang-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  color: #373737;
  font-weight: 600;
}

.lang-dropdown:hover {
  background-color: #F5F3ED;
}

/* Globe Icon */
.lang-icon {
  width: 20px;
  height: 20px;
  stroke: #373737;
  flex-shrink: 0;
}

.lang-dropdown:active {
  transform: scale(0.98);
}

.lang-flag {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.lang-arrow {
  font-size: 0.7rem;
  color: #666;
  margin-left: 2px;
}

/* Language Menu (Popup) */
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 1000;
  min-width: 180px;
  animation: menuSlideIn 0.2s ease-out;
}

@keyframes menuSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-menu.show {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option:hover {
  background: #f5f5f5;
}

.lang-option:active {
  transform: scale(0.98);
}

.lang-option.active {
  background: #F0E9FA;
  color: #8F53F0;
}

.lang-option.active .lang-code {
  color: #8F53F0;
}

.lang-code {
  font-size: 0.85rem;
  font-weight: 500;
  color: #373737;
}

/* Card */
.card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 32px;
  margin-bottom: 32px;
  border: none;
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #373737;
  letter-spacing: -0.025em;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #373737;
}

.section-description {
  color: #777777;
  font-size: 1rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Upload Section */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

.upload-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(37, 99, 235, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.upload-area:hover::before {
  opacity: 1;
}

.upload-area:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
  transform: scale(1.01);
}

.upload-area.dragover {
  border-color: var(--primary-color);
  background: var(--primary-light);
  border-width: 3px;
  transform: scale(1.02);
}

.upload-content {
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.upload-icon {
  width: 56px;
  height: 56px;
  color: var(--primary-color);
  margin: 0 auto 20px;
  transition: var(--transition);
}

.upload-area:hover .upload-icon {
  transform: translateY(-4px);
}

.upload-text {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-weight: 500;
}

.upload-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.camera-section {
  margin-top: 24px;
  text-align: center;
}

/* Image Preview */
.image-preview {
  margin-top: 24px;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.image-preview:hover {
  box-shadow: var(--shadow-lg);
}

.image-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.btn-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--danger-color);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
  box-shadow: var(--shadow-md);
}

.btn-remove:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.01em;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon {
  width: 20px;
  height: 20px;
  stroke: #FFFFFF;
}

.btn-primary {
  background: #8F53F0;
  color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
  background: #7A46CC;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary {
  background: #777777;
  color: #FFFFFF;
}

.btn-secondary:hover:not(:disabled) {
  background: #5a5a5a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: #8F53F0;
  color: #FFFFFF;
}

.btn-success:hover:not(:disabled) {
  background: #7A46CC;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.action-section {
  margin-top: 32px;
  text-align: center;
}

/* Form Styling - Unified input and select styling */
.form-group {
  margin-bottom: 24px;
}

.form-row {
  display: flex;
  gap: 24px;
}

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

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #373737;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.required {
  color: var(--danger-color);
  font-weight: 700;
}

/* Unified styling for ALL form inputs including select dropdowns */
input[type="text"],
input[type="date"],
input[type="number"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #D0D0D0;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: #373737;
  background-color: #FFFFFF;
  transition: var(--transition);
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Add custom arrow for select dropdowns */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23777777' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Focus states - purple glow */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #8F53F0;
  box-shadow: 0 0 0 3px rgba(143, 83, 240, 0.2);
  background-color: #FFFFFF;
}

/* Hover states */
input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: #8F53F0;
}

/* Disabled states */
input:disabled,
select:disabled,
textarea:disabled {
  background-color: #f1f5f9;
  cursor: not-allowed;
  opacity: 0.6;
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: #777777;
  font-size: 0.85rem;
  line-height: 1.4;
}

.field-error {
  display: block;
  margin-top: 6px;
  color: var(--danger-color);
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 500;
}

.field-error.hidden {
  display: none;
}

/* Add visual indication to input when error */
input.error,
select.error,
textarea.error {
  border-color: var(--danger-color);
}

/* Phone Input with Icon */
.phone-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.phone-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 1;
  transition: var(--transition);
}

.phone-input {
  width: 100%;
  padding: 14px 16px 14px 48px !important;
  border: 1px solid #D0D0D0;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: #373737;
  background-color: #FFFFFF;
  transition: var(--transition);
  box-shadow: none;
}

.phone-input:focus {
  outline: none;
  border-color: #8F53F0;
  box-shadow: 0 0 0 3px rgba(143, 83, 240, 0.2);
  background-color: #FFFFFF;
}

.phone-input:focus ~ .phone-icon,
.phone-input-wrapper:focus-within .phone-icon {
  color: #8F53F0;
}

.phone-input:hover:not(:disabled) {
  border-color: #8F53F0;
}

.phone-input:disabled {
  background-color: #f1f5f9;
  cursor: not-allowed;
  opacity: 0.6;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 36px 0;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
}

.spinner {
  width: 56px;
  height: 56px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#loadingText {
  color: white;
  margin-top: 24px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 48px 40px;
  max-width: 450px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  margin-bottom: 24px;
}

.success-icon {
  width: 72px;
  height: 72px;
  color: var(--success-color);
  margin-bottom: 20px;
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.modal-content h2 {
  font-size: 1.75rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.modal-content p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  min-width: 400px;
  max-width: 600px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.notification-warning {
  border-left: 5px solid var(--warning-color);
}

.notification-content {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.notification-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--warning-color);
}

.notification-content > div {
  flex: 1;
}

.notification-content strong {
  display: block;
  margin-bottom: 6px;
  color: var(--warning-color);
  font-size: 1rem;
  font-weight: 700;
}

.notification-content p {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.notification-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  border-radius: 4px;
}

.notification-close:hover {
  color: var(--text-primary);
  background-color: #f1f5f9;
}

/* Guide Link Styles */
.guide-link {
  color: #0071CF;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.guide-link:hover {
  color: #005BA8;
  text-decoration: underline;
}

/* Guide Modal Styles */
.guide-modal {
  z-index: 1002;
}

.guide-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  padding: 32px;
  text-align: left;
}

.guide-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.guide-modal .modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: var(--transition);
  background: #f8fafc;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: #e2e8f0;
  transform: scale(1.1);
}

.guide-modal .modal-body {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.guide-image {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.guide-modal .modal-footer {
  text-align: center;
}

/* Responsive design for guide modal */
@media (max-width: 768px) {
  .guide-modal-content {
    max-width: 95vw;
    max-height: 95vh;
    padding: 24px 20px;
  }
  
  .guide-modal .modal-header h2 {
    font-size: 1.25rem;
  }
  
  .guide-image {
    max-height: 50vh;
  }
  
  .modal-close-btn {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .guide-modal-content {
    padding: 20px 16px;
  }
  
  .guide-modal .modal-header {
    margin-bottom: 16px;
  }
  
  .guide-modal .modal-body {
    margin-bottom: 20px;
  }
  
  .guide-image {
    max-height: 40vh;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 20px 15px;
  }

  .container {
    max-width: 100%;
  }

  header {
    padding: 12px 20px;
  }

  .logo {
    max-height: 28px;
  }

  .lang-dropdown {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .lang-icon {
    width: 18px;
    height: 18px;
  }

  .page-title-container {
    padding: 32px 20px 20px 20px;
  }

  .page-title-container h1 {
    font-size: 1.75rem;
  }

  .page-title-container .subtitle {
    font-size: 1rem;
  }

  .lang-menu {
    top: calc(100% + 8px);
    right: 0;
    left: auto;
  }

  .card {
    padding: 28px 20px;
    margin-bottom: 24px;
  }

  .card h2 {
    font-size: 1.5rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    width: 100%;
  }

  .modal-content {
    padding: 36px 24px;
  }

  .notification {
    min-width: 90%;
    max-width: 90%;
    padding: 16px;
  }

  .upload-area {
    padding: 40px 20px;
  }

  .upload-icon {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 15px 10px;
  }

  header {
    padding: 10px 16px;
  }

  .logo {
    max-height: 24px;
  }

  .lang-dropdown {
    font-size: 0.75rem;
    padding: 5px 8px;
  }

  .lang-icon {
    width: 16px;
    height: 16px;
  }

  .page-title-container {
    padding: 24px 16px 16px 16px;
  }

  .page-title-container h1 {
    font-size: 1.5rem;
  }

  .page-title-container .subtitle {
    font-size: 0.9rem;
  }

  .card {
    padding: 24px 16px;
  }

  .card h2 {
    font-size: 1.35rem;
  }

  .card h3 {
    font-size: 1.15rem;
  }

  .upload-area {
    padding: 32px 16px;
  }

  .upload-icon {
    width: 44px;
    height: 44px;
  }

  .upload-text {
    font-size: 1rem;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    min-height: 48px; /* Better touch target */
  }

  .btn-icon {
    width: 18px;
    height: 18px;
  }

  input[type="text"],
  input[type="date"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px;
    min-height: 48px; /* Better touch target */
  }

  .phone-input {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 14px 14px 14px 48px !important;
    min-height: 48px;
  }

  .phone-icon {
    left: 14px;
    width: 18px;
    height: 18px;
  }

  label {
    font-size: 0.9rem;
  }

  .notification {
    top: 12px;
    min-width: 95%;
    max-width: 95%;
  }

  .modal-content {
    padding: 28px 20px;
  }

  .success-icon {
    width: 60px;
    height: 60px;
  }
}

/* ==============================================
   MALAYSIA PORTAL - CUSTOM STYLES
   ============================================== */

/* Edit Mode Banner */
.edit-mode-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: var(--border-radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  animation: slideInDown 0.4s ease-out;
}

.edit-mode-banner .banner-icon {
  width: 24px;
  height: 24px;
  stroke: #d97706;
  flex-shrink: 0;
  margin-top: 2px;
}

.edit-mode-banner strong {
  color: #92400e;
  font-size: 1rem;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.edit-mode-banner p {
  color: #78350f;
  font-size: 0.9rem;
  margin: 0;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Transaction Summary */
.transaction-section {
  background: linear-gradient(135deg, #F8F7F4 0%, #F5F3ED 100%);
  border-left: 4px solid #8F53F0;
}

.transaction-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 32px;
  margin-top: 20px;
}

.transaction-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Manual Entry Section */
.manual-entry-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.transaction-item label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.transaction-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #8F53F0;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.transaction-value-container {
  display: block;
  width: 100%;
}

.transaction-value-container input {
  width: 100%;
  padding: 8px 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-color);
  background-color: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  transition: all 0.2s ease;
}

.transaction-value-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.transaction-value-container input[type="date"] {
  font-family: inherit;
}

/* TIN Section */
.tin-section {
  border: 2px solid #e2e8f0;
}

.tin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #EEEEEE;
}

.tin-tab {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  color: #777777;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  margin-bottom: -2px;
}

.tin-tab:hover {
  color: #8F53F0;
  background: rgba(143, 83, 240, 0.05);
}

.tin-tab.active {
  color: #8F53F0;
  border-bottom-color: #8F53F0;
  font-weight: 600;
}

.tin-tab-content {
  display: none;
}

.tin-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TIN Result Display */
.tin-result {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--border-radius);
  border: 2px solid;
  animation: slideInUp 0.4s ease-out;
}

.tin-result.success {
  background: #f0fdf4;
  border-color: var(--success-color);
}

.tin-result.error {
  background: #fef2f2;
  border-color: var(--danger-color);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tin-result .result-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.tin-result .result-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.tin-result .result-icon-success {
  stroke: var(--success-color);
}

.tin-result .result-icon-error {
  stroke: var(--danger-color);
}

.tin-result .result-header strong {
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.tin-result.success .result-header strong {
  color: #166534;
}

.tin-result.error .result-header strong {
  color: #991b1b;
}

.tin-result .result-header p {
  font-size: 0.9rem;
  margin: 0;
}

.tin-result.success .result-header p {
  color: #15803d;
}

.tin-result.error .result-header p {
  color: #b91c1c;
}

.tin-result .result-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid;
}

.tin-result.success .result-details {
  border-color: rgba(22, 163, 74, 0.2);
}

.tin-result.error .result-details {
  border-color: rgba(220, 38, 38, 0.2);
}

.tin-result .result-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tin-result .result-item label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 120px;
}

.tin-result .result-value {
  font-size: 1rem;
  font-weight: 600;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.tin-result.success .result-value {
  color: #166534;
}

.tin-result.error .result-value {
  color: #991b1b;
}

/* Buyer Section */
.buyer-section {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border-left: 4px solid var(--warning-color);
}

/* reCAPTCHA Container */
.recaptcha-container {
  margin: 24px 0;
  padding: 20px;
  background: var(--background);
  border-radius: var(--border-radius-sm);
  border: 2px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.recaptcha-container .g-recaptcha {
  transform: scale(0.95);
  transform-origin: center;
}

/* Not Editable Modal */
#notEditableModal .modal-content {
  text-align: center;
  padding: 40px;
}

#notEditableModal .error-icon {
  width: 80px;
  height: 80px;
  stroke: var(--danger-color);
  margin-bottom: 16px;
  animation: scaleUp 0.4s ease-out;
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#notEditableModal h2 {
  color: var(--danger-color);
  margin-bottom: 16px;
  font-size: 1.5rem;
}

#notEditableModal p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Error Notification */
.notification-error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid var(--danger-color);
}

.notification-error .notification-icon {
  stroke: var(--danger-color);
}

.notification-error strong {
  color: #991b1b;
}

.notification-error p {
  color: #b91c1c;
}

/* Responsive updates for Malaysia portal */
@media (max-width: 768px) {
  .transaction-summary {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tin-tabs {
    flex-direction: column;
    gap: 0;
  }

  .tin-tab {
    border-bottom: 1px solid var(--border-color);
    border-left: 3px solid transparent;
    padding: 12px 16px;
  }

  .tin-tab.active {
    border-bottom-color: var(--border-color);
    border-left-color: var(--primary-color);
  }

  .tin-result .result-details {
    gap: 16px;
  }

  .tin-result .result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .tin-result .result-item label {
    min-width: auto;
  }

  .edit-mode-banner {
    padding: 14px 16px;
  }

  .recaptcha-container .g-recaptcha {
    transform: scale(0.85);
  }
}

/* Print styles */
@media print {
  body {
    background: white;
  }

  .btn,
  .language-selector,
  .upload-section,
  .notification,
  .modal {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Guide Modal Styles */
.guide-modal {
  z-index: 1002;
}

.guide-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  padding: 32px;
  text-align: left;
}

.guide-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.guide-modal .modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: var(--transition);
  background: #f8fafc;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: #e2e8f0;
  transform: scale(1.1);
}

.modal-close-btn svg {
  width: 20px;
  height: 20px;
}

.guide-modal .modal-body {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.guide-image {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.guide-modal .modal-footer {
  text-align: center;
}

.guide-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  transition: var(--transition);
}

.guide-link:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* Responsive design for guide modal */
@media (max-width: 768px) {
  .guide-modal-content {
    padding: 20px;
    max-width: 95vw;
  }

  .guide-modal .modal-header h2 {
    font-size: 1.25rem;
  }

  .guide-image {
    max-height: 50vh;
  }
}
