


  :root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: var(--dark);
    line-height: 1.6;
   /* padding: 20px;*/
    min-height: 100vh;
  }

  .container {
    max-width: 1200px;
    margin: 0 auto;
  }

  header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
  }

  h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
  }

  .subtitle {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
  }

  .calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
  }

  @media (min-width: 992px) {
    .calculator-grid {
      grid-template-columns: 1fr 1fr;
    }
  }

  .calculator-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary);
  }

  .calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  }

  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
  }

  .card-title {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 600;
  }

  .card-icon {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
  }

  .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    background: var(--light);
  }

  .form-field {
    display: flex;
    flex-direction: column;
  }

  .form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--gray);
  }

  .form-field input {
    padding: 10px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
  }

  .form-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
  }

  .form-field input[readonly] {
    background-color: #f8f9fa;
    color: var(--gray);
  }

  .btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .btn-primary {
    background: var(--primary);
    color: white;
  }

  .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
  }

  .btn-secondary {
    background: var(--secondary);
    color: white;
  }

  .btn-secondary:hover {
    background: #5a0a9c;
    transform: translateY(-2px);
  }

  .btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
  }

  .btn-outline:hover {
    background: rgba(67, 97, 238, 0.1);
  }

  .btn-danger {
    background: #e63946;
    color: white;
  }

  .btn-danger:hover {
    background: #d62839;
  }

  .action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
    margin-bottom: 60px; /* 👈 Add this line */
     justify-content: center;
  }

  .add-row-btn {
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    margin-bottom: 15px;
  }

  .add-row-btn:hover {
    background: #3ab3d6;
    transform: translateY(-2px);
  }

  /* Modal Styles */
  .modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
  }

  .modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalAppear 0.3s ease-out;
  }

  @keyframes modalAppear {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
  }

  .modal-title {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 600;
  }

  .close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
  }

  .close-modal:hover {
    color: var(--dark);
  }

  .payment-options {
    margin: 20px 0;
  }

  .payment-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
  }

  .payment-option:hover {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
  }

  .payment-option input {
    margin-right: 10px;
  }

  .payment-details {
    margin-top: 15px;
    padding: 15px;
    background: var(--light);
    border-radius: 8px;
  }

  .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {
    .form-row {
      grid-template-columns: 1fr 1fr;
    }
    
    .action-buttons {
      flex-direction: column;
    }
    
    .btn {
      width: 100%;
    }
    
    h1 {
      font-size: 2rem;
    }
  }

  @media (max-width: 576px) {
    .form-row {
      grid-template-columns: 1fr;
    }
    
    .calculator-card {
      padding: 15px;
    }
  }

  /* Delete button for rows */
  .delete-row {
    background: none;
    border: none;
    color: #e63946;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
  }

  .delete-row:hover {
    background: rgba(230, 57, 70, 0.1);
  }

  /*header styles*/
  header {
  width: 100vw;
  text-align: center;
  margin: 0;
  margin-top:0;
  padding: 0 0 20px 0;
  background: #fff;
  color: #fff;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

  /* header styles end */


  /* calculator styles  */
    .container {
      max-width: 100%;
    }
    .rate-table {
      background: #fff;
      border-radius: 10px;
      border: 1px solid #e3e3e3;
      padding: 12px;
      overflow-x: auto;
      width: 100%;
    }
    .rate-row {
      display: grid;
      grid-template-columns: 3.2fr 2.2fr 3.2fr 2.2fr 3.8fr 1.9fr 1.9fr 1.9fr 1.9fr 1.9fr 1.9fr 3fr 3.2fr 3fr 3.2fr 5.2fr;
      gap: 10px;
      align-items: center;
      min-width: 2000px;
    }
    .rate-head {
      background: #f2f2f2;
      font-weight: 600;
      border: 1px solid #dcdcdc;
      padding: 8px;
    }
    .rate-subhead {
      background: #fafafa;
      font-size: 0.78rem;
      font-weight: 600;
      border: 1px solid #eee;
      padding: 6px;
    }
    .rate-cell {
      border: 1px solid #e1e1e1;
      padding: 6px;
      background: #fff;
    }
    .rate-cell input,
    .rate-cell textarea {
      width: 100%;
      padding: 8px 10px;
      border: 1px solid #cfcfcf;
      border-radius: 6px;
      font-size: 0.9rem;
    }
    .rate-cell textarea {
      min-height: 38px;
      resize: vertical;
    }
    .rate-cell input[readonly] {
      background: #f7f7f7;
      font-weight: 600;
    }
    .rate-note {
      margin-top: 10px;
      font-size: 0.9rem;
      color: #666;
    }
    .add-row-btn {
      margin-top: 12px;
      width: auto;
    }
    .rate-row-actions {
      margin-top: 12px;
      display: flex;
      justify-content: flex-end;
    }
    .rate-row-actions .add-row-btn {
      margin-top: 0;
      margin-right: 0;
    }
    @media (max-width: 900px) {
      .rate-table { padding: 8px; }
      .rate-row { min-width: 1000px; }
    }
    .calc-layout {
      display: grid;
      /* grid-template-columns: 1fr 360px; */
      gap: 18px;
      align-items: start;
    }
    .summary-panel {
      background: #fff;
      border: 1px solid #e3e3e3;
      border-radius: 10px;
      padding: 14px;
      position: sticky;
      top: 16px;
      width: 100%;
      max-width: 360px;
      justify-self: end;
    }
    .summary-panel h4 {
      font-size: 1rem;
      margin-bottom: 10px;
    }
    .summary-row {
      display: flex;
      justify-content: space-between;
      font-size: 0.9rem;
      padding: 6px 0;
      border-bottom: 1px solid #eee;
    }
    .summary-row:last-child {
      border-bottom: none;
      font-weight: 700;
    }
    .action-buttons .btn {
      padding: 8px 14px;
      font-size: 0.85rem;
      border-radius: 6px;
    }
    @media (max-width: 1100px) {
      .calc-layout {
        grid-template-columns: 1fr;
      }
      .summary-panel {
        position: static;
        max-width: none;
      }
    }
  /* calculator styles end */
