@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto; /* allow vertical scrolling */
  font-family: 'Inter', sans-serif;
  background-color: white;
}

.login-container {
  text-align: center;
  max-width: 400px;
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
}

.card-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: #111115;
  margin: 0;
}

.card-header p {
  font-size: 14px;
  font-weight: 400;
  color: #6F6F77;
  margin: 8px 0 24px;
}

.card-header-big {
  font-size: 32px;
  font-weight: 400;
  color: #6F6F77;
  margin: 8px 0 24px;
}

label {
  display: block;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #111115;
  margin-bottom: 8px;
}

input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

#username {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
  }

button {
    width: 100%;
    padding: 12px;
    background-color: #1A88F8;
    color: white;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.card-footer.full-width {
    margin: 32px -32px -32px; /* extends to card edges */
    padding: 12px 24px 1px;
    background-color: #f5f5f7; /* soft gray background */
    border-top: 1px solid #e0e0e0;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    text-align: center;
  }
  
  .terms {
    font-size: 14px;
    color: #6F6F77;
    margin: 0;
  }
  
  .terms a {
    color: #1A88F8;
    font-weight: 500;
    text-decoration: none;
  }
  
  .background {
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 16px;
    position: relative;
  
    background-image: url('../cloud-bg.png'); /* Replace with your actual image path */
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover; /* Or use `100% auto` or `contain` depending on your layout needs */
  }
  
  @media (max-width: 768px) {
    .background {
      background-position: center -100px; /* Adjust this value to control upward shift */
    }
  }
  

  .card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1), 2px 0 16px rgba(0, 0, 0, 0.05), -2px 0 16px rgba(0, 0, 0, 0.05);
    max-width: 400px;
    width: 100%;
    text-align: start;
  }


  .card-wide {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1), 2px 0 16px rgba(0, 0, 0, 0.05), -2px 0 16px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    width: 100%;
    text-align: start;
  }

  .card .logo {
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
  }

  .card h2 {
    font-size: 16px;
    font-weight: 600;
    color: #111115;
    margin: 0 0 8px;
  }

  .card p {
    font-size: 14px;
    font-weight: 400;
    color: #6F6F77;
    margin: 0 0 24px;
  }

  .card p strong {
    font-weight: 500;
    color: #111115;
  }

  .otp-form {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .otp-inputs {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
  }

  @media (max-width: 600px) {
    .otp-inputs {
      gap: 5px;
    }
  }

  .otp-inputs input {
    width: 44px;
    height: 48px;
    font-size: 18px;
    font-weight: 500;
    text-align: center;

    background: #f5f5f5;
    border: none;
    border-radius: 8px;

    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield; /* Firefox-specific cleanup */
  }


  .otp-inputs input:focus {
    box-shadow: inset 0 0 0 2px #1A88F8;
  }


  .resend-code {
    background: none;
    border: none;
    color: #6F6F77;
    font-size: 14px;
    font-weight: 400;
    margin-top: 10px;
    margin-bottom: -10px;
    cursor: pointer;
  }

  .card-header-side {
    text-align: left;
    width: 100%;
    padding-bottom: 24px; /* Adjust this as needed */
  }

  .card-header-side h2 {
    font-size: 16px;
    font-weight: 600;
    color: #111115;
    margin: 0 0 8px;
  }

  .card-header-side p {
    font-size: 14px;
    font-weight: 400;
    color: #6F6F77;
    margin: 0;
  }

  .card-header-side p strong {
    font-weight: 500;
    color: #111115;
  }

  .input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111115;
    margin-bottom: 8px;
  }

  .input-text {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 12px;
    background: #f9f9f9;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); /* light gray edge */
    outline: none;
    transition: box-shadow 0.2s ease-in-out;
  }

  .input-text:focus {
    box-shadow: 0 0 0 2px #1A88F8;
    background-color: #ffffff;
  }

  .input-label-side {
    text-align: left;
  }

  .input-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.input-label-side {
  font-size: 14px;
  font-weight: 300;
  color: #111115;
  white-space: nowrap;
}

.input-text {
  flex: 1;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 12px;
  background: #f9f9f9;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.success-card {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1), 2px 0 16px rgba(0, 0, 0, 0.05), -2px 0 16px rgba(0, 0, 0, 0.05);
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.success-card img {
  width: 200px !important;
  margin: 0 auto 24px;
  display: block;
}

.success-card h2 {
  font-size: 25px;
  font-weight: 500;
  color: #111115;
  margin: 12px 0 3px;
  text-align: center;
}

.success-card p {
  font-size: 14px;
  color: #6F6F77;
  font-weight: 500;
  margin: 0 0 24px;
}

.success-card p strong {
  display: inline-block;
  font-family: 'Roboto Mono', Courier, monospace;
  font-size: 15px;
  font-weight: normal;
  padding: 12px 10px;
  background-color: #eef4ff;
  color: #1A88F8;
  border-radius: 8px;
  margin-top: 12px;
}




/*

USER DASHBOARD STARTS HERE

*/
.card-wide {
  background: white;
  border-radius: 16px;
  padding: 24px 0 0 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  width: 100%;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 32px;
  margin-bottom: 0;
}

.username {
  font-weight: 600;
}

.header-row h2 {
  font-size: 20px; /* slightly smaller header */
  margin: 0;
}

.btn-group {
  display: flex;
  gap: 12px;
}

.btn-primary {
  background-color: #1A88F8;
  color: white;
  padding: 10px 20px 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 400;
  font-size: 14px;
  min-width: 160px;
  white-space: nowrap;
}

.btn-secondary {
  background-color: white;
  color: black;
  border: 1px solid #ccc;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 400;
  font-size: 14px;
  min-width: 160px;
  white-space: nowrap;
}

.stats-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #f5f5f5;
  padding: 24px 32px;
  text-align: left;
  border-top: 1px solid #eee;
  margin-top: 15px;
}

.stat-box {
  flex: 1;
  min-width: 150px;
}

.stat-label {
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 20px;
  font-weight: bold;
  color: #111;
}

.divider {
  width: 1px;
  height: 40px;
  background-color: #ddd;
  margin: 0 16px;
}

@media (max-width: 768px) {
  .header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 0 16px;
  }

  .header-row h2 {
    font-size: 18px;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .btn-group button {
    width: 100%;
  }

  .stats-row {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 24px 16px;
  }

  .divider {
    display: none;
  }

  .stat-box {
    text-align: left;
  }

  .stat-value {
    font-size: 18px;
  }

  .stat-label {
    font-size: 13px;
  }
}

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 800px; /* widened cards */
  margin: 0 auto;
  overflow-y: auto;
  flex-grow: 1;
}

/* Ensure both cards use the full width of the section */
.card-wide,
.card-guide {
  width: 100%;
  max-width: 100%;
}

.card-guide {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 24px;
  font-family: 'Inter', sans-serif;
  max-width: 1000px; /* controls width */
  align-self: flex-end; /* aligns to the right side */
}

.guide-content {
  flex: 1;
}

.guide-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.guide-content .app-name {
  font-weight: 600;
}

.guide-content p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 16px;
  line-height: 1.5;
}



.guide-icon {
  width: 120px;
  height: 120px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-icon .icon-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
}

.guide-icon .icon-foreground {
  position: relative;
  width: 48px;
  height: auto;
  z-index: 1;
}

.guide-button {
  background-color: #f5f5f5;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  width: fit-content;
  color: #6b7280; /* gray text */
}
.arrow-icon {
  width: 16px;
  height: 16px;
  stroke: #6b7280; /* match text color if needed */
}

/* SETTINGS CARD STYLES */
#settingsCard {
  margin: 0 auto 40px auto;
}



.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}


.search-bar {
  position: relative;
  width: 100%;
  margin-bottom: 24px;
}

.search-bar input {
  width: 100%;
  padding: 12px 64px 12px 40px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background-color: white;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: #9ca3af;
  pointer-events: none;
}

#clearSearchBtn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #9ca3af;
  line-height: 1;
  padding: 0;
  width: auto;
  height: auto;
  z-index: 1; /* ensures it appears above input text, but doesn't block clicks */
}

.card-empty {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  padding: 40px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  width: 100%;
  max-width: 800px; /* Optional: adjust for size */
  margin: 0 auto;
}


.empty-icon {
  width: 72px;
  height: 72px;
  font-size: 30px;
  font-weight: 600;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1px;
}
.card-empty h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827; /* Dark text for better visibility */
  margin-bottom: -5px;
}

.card-empty p {
  font-size: 14px;
  color: #6b7280;
}

.card-empty .btn-primary {
  background-color: #1A88F8;
  color: white;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 12px;
  cursor: pointer;

  max-width: 100px;
}

.card-empty .btn-primary:hover {
  background-color: #0e7cd2; /* Hover color */
}
.billing-card {
  padding: 24px;
  font-size: 14px;
  color: #6b7280;
  text-align: left;
}



/* NAVBAR */
.navbar {
  width: 100%;
  background: white;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 2000;
}

.navbar-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo {
  font-size: 18px;
  font-weight: 600;
  color: #1A88F8;
}

.navbar-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.navbar-links li a {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
}

.navbar-links li a:hover {
  color: #1A88F8;
}

.user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.user-button {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease-in-out;
}

.user-button:hover {
  background-color: #f3f4f6;
}

.dropdown-icon {
  width: 16px;
  height: 16px;
  color: #9ca3af;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  width: 200px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  padding: 12px;
  z-index: 999;
}

.dropdown-item {
  font-size: 14px;
  color: #374151;
  margin-bottom: 8px;
  font-weight: 500;
}

.dropdown-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 8px 0;
}

.logout-button {
  padding: 10px 12px;
  background-color: #f5f5f5;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1A88F8;
  cursor: pointer;
  text-align: left;
}

.logout-button:hover {
  background-color: #e5e7eb;
}

/* Hide the hamburger icon on larger screens */
.navbar-toggle {
  display: none;
}

/* Mobile Menu */
@media (max-width: 768px) {
  .navbar-links {
    display: none; /* Hide default links */
    flex-direction: column;
    gap: 16px;
    width: 100%;
    background-color: white;
    position: absolute;
    top: 60px;
    left: 0;
    padding: 16px;
  }

  .navbar-links li a {
    padding: 8px 16px;
    width: 100%;
  }

  .navbar-links.active {
    display: flex; /* Show menu on active */
  }

  .navbar-toggle {
    display: block; /* Show hamburger menu on mobile */
    cursor: pointer;
  }

  .user-dropdown {
    display: block; /* Show dropdown on mobile */
    margin-left: 16px;
  }
}




/*
FOOTER CONTENT
*/

.footer {
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid #E5E7EB;
  padding: 16px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: #6B7280;
}

.footer-content {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-content p,
.footer-content a {
  margin: 0;
  text-decoration: none;
  color: #6B7280;
}

.footer-content a:hover {
  text-decoration: underline;
}

/* Responsive Footer */
@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
  }
}


/*


CERTIFICATE IN LIST 


*/

.certificates-section {
  display: block;
}

.certificate-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  padding: 24px;
  max-width: 800px; /* Set max-width to control card size */
  width: 100%;
  margin: 20px auto;
  font-family: 'Inter', sans-serif;
}

/* Header Section */
.certificate-header {
  margin-bottom: 26px; /* Space between the header and body */
}

.certificate-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.certificate-icon {
  color: #1A88F8;
  margin-left: 8px; /* Space between title and icon */
}

.certificate-date {
  font-size: 14px;
  color: #6b7280;
  margin-top: 8px; /* Adds space between the title and the date */
}

/* Body Section */
.certificate-body {
  display: flex;
  flex-direction: row; /* Ensure horizontal layout */
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.qr-code {
  background: white; /* White background for the border effect */
  padding: 2px; /* Controls the border thickness */
  border-radius: 16px; /* Rounded corners */
  box-shadow: 0 0 0 1px #e5e7eb; /* Optional: soft outer border for subtle depth */
  display: flex; /* So padding and background wrap tightly */
}


.guide-button:hover {
  background-color: #e5e7eb; /* Hover color */
}

/* For mobile screens */
@media (max-width: 768px) {
    .certificate-body {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }


  .qr-code img {
    margin-bottom: 16px; /* Space between QR code and button */
  }

  .guide-button {
    width: auto; /* Make the button take full width on smaller screens */
  }
}


/*

PURCHASE CARD


*/

/*

PURCHASE CARD


*/
.purchases-section {
  display: block;
}

.purchases-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  padding: 24px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 32px;
  font-family: 'Inter', sans-serif;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  color: #111827;
}

.purchase-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f5f5f5;
  margin-top: 8px;
  margin-bottom: 8px;
}

.purchase-details h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.purchase-details p {
  font-size: 14px;
  color: #6b7280;
  margin-top: 8px;
}

.purchase-buttons {
  display: flex;
  gap: 12px;
}

.btn-primary-small {
  background-color: #1A88F8;
  color: white;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 400;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn-primary-small:hover {
  background-color: #0e7cd2;
}

.btn-secondary-small {
  background-color: #f5f5f5;
  color: #6b7280;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
}

.btn-secondary-small:hover {
  background-color: #f3f4f6;
}

.purchase-item:last-child {
  border-bottom: none; /* Remove the border for the last item */
}

.purchase-small-title {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  margin: 0 0 24px 0;
  display: block;
}

/* Mobile view */
@media (max-width: 768px) {

  .purchases-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    padding: 24px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 32px;
    font-family: 'Inter', sans-serif;
  }
  
  .purchase-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .purchase-buttons {
    width: 100%;
    justify-content: space-between;
  }
}



.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

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

/* Certificate Card Styles */
.create-certificate-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  display: none; /* hide by default */
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
/* Modal overlay for certificate details */
.certificate-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
}
.certificate-detail-modal.active {
  display: flex;
}

.certificate-form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;

  gap: 40px;
}

.card-wide-xl {
  padding: 24px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 40px;
}

.card-wide-xl h2 {
  font-size: 24px;
  font-weight: 600;
  margin-top: 6px;
  color: #111115;
}

.card-wide-xl .form-group {
  margin-bottom: 24px;
}

.card-wid-xl label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  color: #111115;
}

.card-wide-xl input[type="text"],
.card-wide-xl textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-sizing: border-box;
  outline: none;
  transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.card-wide-xl input[type="text"]:focus,
.card-wide-xl textarea:focus {
  border-color: #1A88F8;
  box-shadow: 0 0 0 2px #1A88F8;
  background-color: #ffffff;
}



.card-wide-xl .form-helper {
  font-size: 12px;
  color: #6F6F77;
  margin-top: 4px;
  margin-bottom: 8px;
}

.card-wide-xl .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.card-wide-xl input::placeholder,
.card-wide-xl textarea::placeholder {
  color: #9ca3af;
  font-weight: 400;
  font-family: 'Inter', sans-serif;
}
.card-wide-xl hr {
  border: none;
  border-top: 1px solid #ccc;
  margin-left: -24px;
  margin-right: -24px;
  width: calc(100% + 48px);
  margin-top: 16px;
  margin-bottom: 16px;
}


.form-step-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 24px 16px 24px; /* top padding increased for bar height */
  background-color: #ffffff;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.06);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.step-bar-group {
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
  justify-content: stretch;
  align-items: stretch;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.step-bar {
  height: 100%;
  background-color: #ccc;
  flex: 1;
  border-radius: 0;
}
.step-bar.active {
  background-color: #3B82F6;
}


.step-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px; /* Space between cancel and next buttons */
}

.form-step-footer .btn-text {

  color: #6F6F77;
  background-color: rgba(0, 0, 0, 0.0);
  font-size: 14px;
  font-weight: 400;
  padding: 5px;
  width: 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  height: 50px;
}

.form-step-footer .btn-primary {
  background-color: #1A88F8;
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 5px;
  width: 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  height: 50px;
}

.form-step-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 24px;
  background-color: #ffffff;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1100; /* ensure it's on top */
}

.form-step-footer .progress-bar {
  height: 4px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

.form-step-footer .progress-fill {
  height: 100%;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

.form-step-footer .progress-label {
  margin-top: 8px;
  font-size: 14px;
  color: #6b7280;
  text-align: right;
}

/* Spacer class for layout separation */
.certificate-spacer {
  height: 40px;
  display: none;
}

.file-upload-box {
  border: 1px dashed #d1d5db;
  background-color: #f9fafb;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  margin-top: 24px;
}

.upload-icon {
  width: 40px;
  height: 40px;
  opacity: 0.6;
  margin-bottom: 16px;
}

.upload-instruction {
  font-size: 14px;
  color: #111115;
}

.upload-link {
  color: #1A88F8;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

.upload-subtext {
  display: block;
  font-size: 12px;
  color: #6F6F77;
  margin-top: 4px;
}

.file-upload-preview {
  border: 1px solid #e5e7eb;
  padding: 20px;
  border-radius: 12px;
  background-color: #fafafa;
  margin-top: 16px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.file-type-icon {
  width: 38px;
  height: 38px;
  margin-right: 12px;
}

.file-info {
  flex: 1;
}

.file-status {
  color: #3b82f6;
  font-size: 18px;
  margin-left: 12px;
}

.progress-container {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar {
  height: 100%;
  background-color: #3b82f6;
  transition: width 0.2s ease-in-out;
}

.custom-checkbox {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 8px;
}

.check-icon {
  width: 26px;
  height: 26px;
  display: none;
  transform: scale(0.8);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.check-icon.show {
  display: block;
  transform: scale(1);
}

.remove-file {
  color: #6f6f77;
  font-size: 16px;
  cursor: pointer;
  padding-left: 4px;
}


.card-wide-xl { 
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Override for certificate detail card visibility */
.certificate-detail-modal .card-wide-xl,
.certificate-detail-modal .certificate-detail-card {
  opacity: 1 !important;
  transform: none !important;
}

.card-wide-xl.active {
  opacity: 1;
  transform: translateX(0);
}

.card-transition-in-left {
  opacity: 1 !important;
  transform: translateX(0) !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-transition-out-left {
  opacity: 0 !important;
  transform: translateX(-32px) !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-transition-in-right {
  opacity: 1 !important;
  transform: translateX(0) !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-transition-out-right {
  opacity: 0 !important;
  transform: translateX(32px) !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.upload-icon {
  width: 60px;
  height: 60px;
  opacity: 0.6;
  margin-bottom: 8px;
}


.success-section {
  /*display: flex;*/
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  display: none;
}

.cert-success-card {
  display: block;
  margin: 0 auto;
  padding: 32px;
  max-width: 1080px; /* 1/3 wider than usual card */
  text-align: center;
}

/* Responsive tweaks */
@media screen and (max-width: 768px) {
  .cert-success-card {
    max-width: 95%;
    padding: 24px;
  }

  .cert-success-card .btn-small {
    padding: 6px 10px;
    font-size: 14px;
  }
  .cert-success-card .btn-group {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  .cert-success-card .btn-group button {
    width: 100%;
    max-width: 300px;
  }
}


.qr-code img {
  width: 89px; 
  height: 89px; 
  margin: 8px
}

.file-upload-box.dragover {
  background-color: #eef4ff;
  border-color: #1A88F8;
}
.stat-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3EAEED;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


#certificateSearch:focus {
  outline: none;
  box-shadow: none;
  border-color: #ccc;
}

.validate-certificate-section .card-wide-xl {
  max-width: 1200px;
  width: 100%;
}

.card-verify-xl {
  padding: 24px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  width: 200%;
  max-width: 800px;
  box-sizing: border-box;
  margin-bottom: 200px;
}
/* Update .card-verify-xl .form-actions */
.card-verify-xl .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .card-verify-xl {
    width: 100%;
    max-width: 100%;
    padding: 24px 16px;
  }

  .card-verify-xl .form-actions {
    flex-direction: column;
    gap: 12px;
  }

  .card-verify-xl .form-actions button {
    width: 100%;
  }
}

/* Certificate detail modal overrides */
.certificate-detail-modal {
  display: none;
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 50;
  background: none;
  margin: 0 auto;
}

.certificate-detail-modal.active .certificate-detail-card {
  display: block !important;
}


.file-upload-box .upload-instruction,
#validateUploadZone .upload-instruction {
  white-space: normal;
  word-break: break-word;
  text-align: center;
}

/* Show the modal container itself when active */
.certificate-detail-modal.active {
  display: block !important;
}

.certificate-detail-modal .certificate-detail-card {
  display: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.certificate-detail-modal.active .certificate-detail-card {
  display: block !important;
}

/* Styled certificate detail card */
.certificate-detail-card {
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 32px;
  margin-top: 0;
}

.certificate-detail-card .detail-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.certificate-detail-card .detail-left {
  flex: 1;
}

.certificate-detail-card .detail-left h2 {
  font-size: 24px;
  margin: 0 0 12px;
  font-weight: 600;
  color: #111827;
}

.certificate-detail-card .detail-left p {
  margin: 8px 0;
  font-size: 16px;
  color: #6B7280;
}

.certificate-detail-card .detail-left p strong {
  color: #374151;
}

.certificate-detail-card .detail-left p span {
  color: #111827;
}


/* TEST */
.certificate-detail-card .detail-buttons {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.certificate-detail-card .btn-small {
  width: 180px;
  font-size: 14px;
}

.certificate-detail-card .detail-buttons {
  justify-content: space-between;
  gap: 24px;
}

.certificate-detail-card .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.certificate-detail-card .btn-secondary img {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .certificate-detail-card {
    padding: 16px;
  }

  .certificate-detail-card .detail-content {
    flex-direction: column;
    gap: 16px;
  }

  .certificate-detail-card .detail-field {
    flex-direction: column !important;
  }

  .certificate-detail-card .detail-right {
    margin-left: 0 !important;
    width: 100%;
    max-width: 240px;
    align-self: center;
  }

  .certificate-detail-card .detail-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .certificate-detail-card .detail-buttons button {
    width: 100%;
  }

  .certificate-detail-card hr {
    margin: 32px -16px;
    width: calc(100% + 32px);
  }
  .certificate-detail-card .btn-secondary {
    justify-content: center;
  }
}

.background {
  position: relative;
}

#certSuccessCard {
  margin-top: 16px !important;
  margin-bottom: 16px !important;
}

input[type="text"],
textarea {
  font-size: 16px;
}

.success-action-buttons {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .success-action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .success-action-buttons button {
    width: 100% !important;
    max-width: 320px;
  }
}

@media (max-width: 768px) {
  .card-verify-xl {
    padding: 24px 16px !important;
    margin: 24px auto !important;
    width: 95% !important;
  }

  .card-verify-xl h2 {
    font-size: 20px !important;
  }

  .card-verify-xl p.form-helper {
    font-size: 14px !important;
  }

  .card-verify-xl .upload-instruction {
    font-size: 14px !important;
  }

  .card-verify-xl #validateUploadZone {
    padding: 24px !important;
  }

  .card-verify-xl .file-info strong {
    word-break: break-word;
  }

  .card-verify-xl .file-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-verify-xl .file-status {
    align-self: flex-end;
    margin-top: 12px;
  }

  .card-verify-xl .progress-container {
    margin-top: 8px;
  }
}