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

    body { 
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
      background: #000;
      color: #fff;
      min-height: 100vh;
      padding: 20px;
    }

    .container { 
      max-width: 1400px; 
      margin: 0 auto; 
      background: #111;
      border-radius: 15px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.5);
      overflow: hidden;
    }

    .header { 
      background: #000;
      color: white;
      text-align: center; 
      padding: 30px;
      border-bottom: 2px solid #333;
    }

    .header h1 {
      font-size: 2.2rem;
      margin-bottom: 10px;
      font-weight: 300;
    }

    .header p {
      font-size: 1rem;
      opacity: 0.8;
    }

    .main-content {
      padding: 30px;
    }

    .dashboard-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 30px;
      margin-bottom: 30px;
    }

    .section { 
      background: #000;
      border: 2px solid #333; 
      padding: 25px; 
      border-radius: 15px;
      position: relative;
    }

    .section-title { 
      color: #fff; 
      font-weight: 600; 
      margin-bottom: 25px;
      font-size: 1.3rem;
      display: flex;
      align-items: center;
      gap: 15px;
      border-bottom: 2px solid #333;
      padding-bottom: 15px;
    }

    .section-title::before {
      content: '';
      width: 4px;
      height: 25px;
      background: #fff;
      border-radius: 2px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 20px;
      margin-bottom: 20px;
    }

    .form-group { 
      margin-bottom: 20px; 
    }

    label { 
      display: block; 
      margin-bottom: 8px; 
      font-weight: 500;
      color: #fff;
      font-size: 0.9rem;
    }

    input, select, textarea { 
      width: 100%; 
      padding: 12px 15px; 
      border: 2px solid #333; 
      border-radius: 8px; 
      background: #000; 
      color: #fff;
      font-size: 0.95rem;
    }

    input:focus, select:focus, textarea:focus {
      outline: none;
      border-color: #fff;
    }

    input::placeholder {
      color: #666;
    }

    button { 
      padding: 12px 24px; 
      font-size: 0.95rem; 
      border-radius: 8px; 
      cursor: pointer; 
      border: 2px solid #fff;
      margin: 5px;
      font-weight: 500;
      background: transparent;
      color: #fff;
      transition: all 0.3s ease;
    }

    button:hover {
      background: #fff;
      color: #000;
    }

    .btn-primary { 
      background: #fff;
      color: #000;
    }

    .btn-primary:hover {
      background: #ccc;
      border-color: #ccc;
    }

    .btn-success { 
      background: #fff;
      color: #000;
    }

    .btn-info { 
      background: #fff;
      color: #000;
    }

    .status { 
      padding: 15px; 
      margin: 15px 0; 
      border-radius: 8px; 
      font-weight: 500;
    }

    .status.success { 
      background: #000; 
      color: #fff;
      border: 2px solid #4CAF50;
    }

    .status.error { 
      background: #000; 
      color: #fff;
      border: 2px solid #f44336;
    }

    .status.info { 
      background: #000; 
      color: #fff;
      border: 2px solid #2196F3;
    }

    .status-pending {
      background: #ff9800;
      color: #000;
    }

    .status-submitted {
      background: #9C27B0;
      color: #fff;
    }

    .status-validated {
      background: #4CAF50;
      color: #fff;
    }

    .status-error {
      background: #f44336;
      color: #fff;
    }

    .status-underwriting {
      background: #2196F3;
      color: #fff;
    }

    .status-approved {
      background: #4CAF50;
      color: #fff;
    }

    .status-rejected {
      background: #f44336;
      color: #fff;
    }

    .applications-list {
      max-height: 600px;
      overflow-y: auto;
    }

    .application-card {
      background: #111;
      border: 2px solid #333;
      border-radius: 10px;
      padding: 20px;
      margin-bottom: 15px;
      transition: all 0.3s ease;
    }

    .application-card:hover {
      border-color: #fff;
      transform: translateY(-2px);
    }

    .application-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
    }

    .application-name {
      font-size: 1.1rem;
      font-weight: 600;
      color: #fff;
    }

    .application-status {
      padding: 6px 12px;
      border-radius: 20px;
      font-size: 0.8rem;
      font-weight: 600;
      text-transform: uppercase;
    }

    .application-details {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 15px;
      margin-bottom: 15px;
    }

    .detail-item {
      font-size: 0.9rem;
    }

    .detail-label {
      color: #ccc;
      font-size: 0.8rem;
      text-transform: uppercase;
      margin-bottom: 5px;
    }

    .detail-value {
      color: #fff;
      font-weight: 500;
    }

    .application-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .btn-small {
      padding: 8px 16px;
      font-size: 0.8rem;
    }

    .link-display { 
      background: #000; 
      border: 2px solid #333;
      padding: 20px; 
      border-radius: 10px; 
      margin: 15px 0; 
    }

    .merchant-link { 
      color: #2196F3; 
      text-decoration: none; 
      font-weight: bold; 
      word-break: break-all;
    }

    .merchant-link:hover { 
      text-decoration: underline; 
    }

    .copy-btn { 
      background: #4CAF50; 
      color: white; 
      border: none; 
      padding: 8px 15px; 
      border-radius: 5px; 
      cursor: pointer; 
      margin-left: 10px; 
    }

    .refresh-btn {
      position: absolute;
      top: 25px;
      right: 25px;
      background: #333;
      border: 2px solid #666;
      padding: 8px 12px;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .refresh-btn:hover {
      background: #666;
      border-color: #fff;
    }

    .empty-state {
      text-align: center;
      padding: 40px;
      color: #666;
    }

    .empty-state h3 {
      margin-bottom: 10px;
      color: #ccc;
    }

    /* Loading Overlay Styles */
    .loading-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.8);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 9999;
    }

    .loading-spinner {
      width: 50px;
      height: 50px;
      border: 4px solid #333;
      border-top: 4px solid #fff;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    .loading-text {
      color: #fff;
      margin-top: 20px;
      font-size: 1.1rem;
      text-align: center;
    }

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

    .btn-loading {
      position: relative;
      pointer-events: none;
      opacity: 0.7;
    }

    .btn-loading::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 16px;
      height: 16px;
      margin: -8px 0 0 -8px;
      border: 2px solid transparent;
      border-top: 2px solid currentColor;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    /* Email Section Styles */
    .email-section {
      background: #000;
      border: 2px solid #333;
      padding: 20px;
      border-radius: 10px;
      margin-top: 20px;
    }

    .email-section-title {
      color: #fff;
      font-weight: 600;
      margin-bottom: 15px;
      font-size: 1.1rem;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .email-section-title::before {
      content: '📧';
      font-size: 1.2rem;
    }

    .email-options {
      display: flex;
      gap: 10px;
      margin-top: 15px;
      flex-wrap: wrap;
    }

    .email-template {
      background: #111;
      border: 2px solid #333;
      border-radius: 8px;
      padding: 15px;
      cursor: pointer;
      transition: all 0.3s ease;
      flex: 1;
      min-width: 200px;
    }

    .email-template:hover {
      border-color: #fff;
      background: #222;
    }

    .email-template.selected {
      border-color: #2196F3;
      background: #1a1a2e;
    }

    .email-template h4 {
      color: #fff;
      margin-bottom: 8px;
      font-size: 0.9rem;
    }

    .email-template p {
      color: #ccc;
      font-size: 0.8rem;
      line-height: 1.4;
    }

    @media (max-width: 768px) {
      .dashboard-grid {
        grid-template-columns: 1fr;
      }
      
      .form-grid {
        grid-template-columns: 1fr;
      }
      
      .application-details {
        grid-template-columns: 1fr;
      }
      
      .container {
        margin: 10px;
        border-radius: 10px;
      }
      
      .main-content {
        padding: 20px;
      }

      .email-options {
        flex-direction: column;
      }

      .email-template {
        min-width: auto;
      }

      .link-display .email-options {
        flex-direction: column;
      }

      .link-display input[type="email"] {
        margin-bottom: 10px;
      }
    }
 #authOverlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to right, #1f4037, #99f2c8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }

  .auth-box {
    
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 350px;
    width: 100%;
  }

  .auth-box h2 {
    margin-bottom: 25px;
    color: #333;
  }

  .auth-box input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.3s;
  }

  .auth-box input:focus {
    border-color: #66bb6a;
    outline: none;
  }

  .auth-box button {
    width: 100%;
    padding: 12px;
    background-color: #2e7d32;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
  }

  .auth-box button:hover {
    background-color: #1b5e20;
  }

  .error-msg {
    color: red;
    font-size: 14px;
    margin-top: 10px;
  }