* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
  }

  body {
    background: #f5f7fb;
    color: #333;
  }

  /* Top Navbar */
  .custom-navbar {
    display: flex;
    justify-content: center;
    background: #fff;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-wrap: wrap;
  }

  .custom-navbar a {
    margin: 10px 15px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: 0.3s;
  }

  .custom-navbar a:hover {
    background: #007bff;
    color: #fff;
  }

  /* Profile Section */
  .profile {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    margin: 20px auto;
    max-width: 900px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-wrap: wrap;
  }

  .noflex-profile {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #fff;
    margin: 20px auto;
    max-width: 300px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-wrap: wrap;
  }

  .profile img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 20px;
  }

  .profile-info {
    flex: 1;
  }

  .profile-info h2 {
    font-size: 20px;
    margin-bottom: 5px;
  }

  .profile-info p {
    color: #555;
    margin-bottom: 0px;
  }

  .create-wallet-btn {
    background: #007bff;
    color: #fff;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
  }

  .create-wallet-btn:hover {
    background: #0056b3;
    text-decoration: none;
    color: #fff;
  }

  /* Cards */
  .cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 20px auto;
  }

  .card {
    padding: 20px;
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .card.blue { background: linear-gradient(135deg, #007bff, #0056b3); }
  .card.black { background: linear-gradient(135deg, #333, #000); }
  .card.orange { background: linear-gradient(135deg, #ff7a18, #ff3d00); }

  .card h3 {
    margin-bottom: 10px;
  }

  .card p {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .card .actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .btn {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
  }

  .btn.show {
    background: rgba(255,255,255,0.2);
    color: #fff;
  }

  .btn.withdraw {
    background: #fff;
    color: #ff3d00;
    font-weight: bold;
  }

  /* Responsive */
  @media(max-width: 600px) {
    .profile {
      flex-direction: column;
      text-align: center;
    }

    .profile img {
      margin-bottom: 10px;
    }

    .profile-info {
      margin-bottom: 15px;
    }
  }

h1 {
    text-align: center;
    color: #2c3e50;
}

.summary {
    margin: 20px 0;
    text-align: center;
}

.summary span {
    font-weight: bold;
    margin: 0 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

th, td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #3498db;
    color: white;
    font-size: 14px;
}

tr {
  font-size: 14px;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

.success {
    color: green;
    font-weight: bold;
}

.failed {
    color: red;
    font-weight: bold;
}

.table-container {
    overflow-x: auto;
}
/* Center container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background-color: #f5f6fa;
    padding: 20px;
}

/* Card style */
.form-card {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    font-family: Arial, sans-serif;
}

/* Headings */
.form-card h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.form-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* File input */
.file-label {
    display: block;
    margin-bottom: 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
}

.file-label input[type="file"] {
    display: block;
    margin-top: 8px;
    width: 100%;
}

/* Submit button */
.submit-btn {
    background-color: #007bff;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #0056b3;
}

/* Loading overlay */
#loading-overlay {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    color: #333;
}

/* Spinner animation */
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #007bff; /* match button color */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Blur background when overlay is active */
body.loading .container {
    filter: blur(5px);
    pointer-events: none; /* disable interactions */
}

.custom-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
  width: 100%; /* makes sure it shrinks on small screens */
  box-sizing: border-box;
}

.custom-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

.custom-card-header {
  background: #fff;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.custom-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
}

.custom-card-body {
  padding: 1.5rem;
}

.custom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.custom-col {
  flex: 1 1 calc(33.333% - 1rem);
  min-width: 200px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.custom-col label {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: #444;
}

.custom-col input,
.custom-col select,
.custom-col textarea {
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
}

.custom-col input:focus,
.custom-col select:focus,
.custom-col textarea:focus {
  border-color: #007bff;
  outline: none;
}

.custom-checkboxes {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.custom-check {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.custom-card-footer {
  padding: 1rem 1.5rem;
  text-align: right;
  border-top: 1px solid #e5e5e5;
}

.custom-btn {
  padding: 0.6rem 1.5rem;
  background: #007bff;
  border: none;
  color: #fff;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.custom-btn:hover {
  background: #0056b3;
  color: white;
  text-decoration: none;
}

.custom-divider {
  width: 1px;
  background-color: #e5e5e5;
  margin: 0 1rem;
}

/* Tablets (<= 992px): 2 columns */
@media (max-width: 992px) {
  .custom-col {
    flex: 1 1 calc(50% - 1rem);
  }
}

/* Small screens (<= 768px): force 1 column earlier */
@media (max-width: 768px) {
  .custom-col {
    flex: 1 1 100%;
  }
}

@media (max-width: 925px) {
  .custom-divider {
    display: none;
  }
}

/* Extra small screens (<= 415px) */
@media (max-width: 415px) {
  .custom-card-body {
    padding: 0.8rem 1rem; /* reduce padding */
    font-size: 0.9rem;    /* reduce font */
  }

  .custom-col {
    flex: 1 1 100%;       /* full width */
    min-width: auto;      /* remove min-width constraint */
  }

  h3 {
    font-size: 1rem;      /* smaller headings */
  }

  p {
    font-size: 0.85rem;   /* smaller paragraph text */
    word-wrap: break-word; /* prevent long text overflow */
  }

  .custom-container {
    padding: 0.5rem 1rem; /* reduce container padding */
  }
}

/* Extra extra small screens (<= 370px) */
@media (max-width: 370px) {
  .custom-container {
    padding: 0.3rem 0.5rem;
  }

  .custom-card-body {
    padding: 0.5rem 0.7rem;
  }

  .custom-col {
    flex: 1 1 100%;   /* full width */
    min-width: auto;  /* allow shrinking */
  }

  h3 {
    font-size: 0.95rem;
  }

  p {
    font-size: 0.8rem;
    word-wrap: break-word; /* prevent overflow */
  }

  .custom-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .custom-card-header {
    padding: 0.6rem 1rem;
  }

  .custom-title {
    font-size: 1rem;
  }

  .custom-divider {
    display: none; /* hide divider */
  }
}

/* Extra small screens (<= 320px) */
@media (max-width: 320px) {
  .custom-row {
    flex-direction: column; /* stack everything vertically */
    gap: 0.5rem;           /* smaller gaps for tight space */
  }

  .custom-col {
    flex: 1 1 100%;        /* full width columns */
    min-width: 0;           /* allow shrinking */
  }

  .custom-card-body {
    padding: 0.8rem;        /* smaller padding */
  }

  .custom-container {
    padding: 0.5rem;
  }
}


.wallet-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.wallet-card {
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease-in-out;
    position: relative;
}

.wallet-card:hover {
    transform: translateY(-5px);
}

.balance {
    font-size: 1.5rem;
    font-weight: bold;
}

.toggle-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 0.9rem;
    margin-left: 10px;
}

/* Colors */
.blue { background: linear-gradient(135deg, #007bff, #0056b3); }
.black { background: linear-gradient(135deg, #333, #000); }
.orange { background: linear-gradient(135deg, #ff7e5f, #feb47b); }
.green { background: linear-gradient(135deg, #28a745, #19692c); }
.red { background: linear-gradient(135deg, #ff4b5c, #d90429); }
.purple { background: linear-gradient(135deg, #6f42c1, #4a148c); }
.teal { background: linear-gradient(135deg, #20c997, #0d6efd); }
.brown { background: linear-gradient(135deg, #795548, #3e2723); }
.pink { background: linear-gradient(135deg, #ff758c, #ff7eb3); }

.error-messages {
    background-color: #fee2e2; /* light red */
    color: #b91c1c; /* dark red text */
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 15px;
    font-size: 14px;
}

.error-messages ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.error-messages li {
    margin-bottom: 6px;
}

.error-messages li:last-child {
    margin-bottom: 0;
}

.logo-img {
  max-width: 40px;
}

@media (max-width: 730px) {
  .button-flex {
    flex-direction: column; /* stack everything vertically */
    gap: 0.5rem;           /* smaller gaps for tight space */
  }
}

.form-container {
    max-width: 500px;
    margin: 50px auto;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
}
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 15px;
    box-sizing: border-box;
}
input[type="password"]:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}
.btn-submit {
    width: 100%;
    background: #2563eb;
    color: #fff;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.btn-submit:hover {
    background: #1d4ed8;
}
.message {
    margin-top: 15px;
    color: green;
    font-size: 14px;
}
.error {
    color: red;
    font-size: 13px;
}

.hire {
  padding: 10px;
  width: fit-content;
  height: 40px;
  border-radius: 15px;
  border: none;
  background-color: #0C9AD3;
  cursor: pointer;
  color: white;
  transition: 0.5s ease-out;
  margin-bottom: 15px;
  display: flex;
}

.hire a {
  text-decoration: none;
  color: white;
  align-items: center;
  justify-content: center;
  position: relative;
}