/* Base Styles */
body {
  font-family: Arial, sans-serif;
  padding: 20px;
  color: #333;
  background-color: #fafafa;
}

.hidden {
  display: none !important;
}

/* ================= AUTH / LOGIN STYLES ================= */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
}

.auth-box {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 350px;
  border: 1px solid #ddd;
}

.auth-box h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.auth-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin-top: 5px;
}

/* Top Bar */
.top-bar {
  background-color: #eee;
  padding: 10px 15px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 4px;
  flex-wrap: wrap;
  gap: 10px;
}

/* Typography */
h2 {
  margin-top: 0;
}

/* Layout & Containers */
.dashboard-section, #formSection, #savedLoansSection, #pendingLoansSection, #trackerSection, #settingsSection, #receiptSection {
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.form-group {
  margin-bottom: 15px;
}

.form-group.border-top {
  border-top: 1px solid #ccc;
  padding-top: 10px;
}

.bg-light {
  background: #f0f0f0;
  padding: 10px;
  border-radius: 4px;
}

.ml-15 {
  margin-left: 15px;
}

.mt-15 {
  margin-top: 15px;
}

/* Inputs */
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="password"], select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.input-wide {
  width: 250px;
}

/* Buttons */
button {
  padding: 8px 12px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.btn-primary {
  background-color: #4CAF50;
  color: white;
  border: none;
  font-weight: bold;
}

.btn-primary:hover {
  background-color: #45a049;
}

.btn-secondary {
  background-color: #f8f8f8;
}

.btn-secondary:hover {
  background-color: #e0e0e0;
}

.btn-settings {
  background-color: #007BFF;
  color: white;
  border: none;
}

.btn-save {
  background: #4CAF50;
  color: white;
  padding: 10px;
  width: 100%;
  font-weight: bold;
  border: none;
}

.btn-back {
  margin-bottom: 15px;
  background: #f8f8f8;
}

/* Notification Badges */
.badge-container {
  position: relative;
  display: inline-block;
}

.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid white;
}

/* Settings Box */
.settings-box {
  border: 1px solid #ccc;
  padding: 20px;
  max-width: 400px;
  background: #f9f9f9;
  border-radius: 4px;
}

.settings-box input {
  width: 100%;
  box-sizing: border-box;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
  border: 1px solid black;
  background: white;
}

thead {
  background: #f4f4f4;
}

th, td {
  padding: 8px;
  border: 1px solid black;
}

/* Receipt & Cards */
.card {
  border: 1px solid #ccc;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 6px;
  background: white;
}

.receipt-box {
  padding: 20px;
  border: 2px solid #4CAF50;
  max-width: 600px;
  font-family: sans-serif;
  background: white;
  border-radius: 8px;
}

/* Dashboard Widgets */
.widget-container {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.widget {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  flex: 1;
  min-width: 200px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border-left: 5px solid #007BFF;
}

.widget h4 {
  margin: 0 0 10px 0;
  color: #666;
  font-size: 14px;
  text-transform: uppercase;
}

.widget p {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

.widget:nth-child(3) {
  border-left-color: #4CAF50;
}

/* Change Password Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-box {
  background: white;
  padding: 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  border: 1px solid #ccc;
}

.modal-box h3 {
  margin-top: 0;
  margin-bottom: 15px;
}

.modal-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin-top: 5px;
}