/* style.css – Styling for login page and loan tracker with responsive card layout */

/* Reset & globals */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  background: #eef2f5;
  color: #333;
  line-height: 1.5;
}
a {
  text-decoration: none;
  color: inherit;
}

/* Main container */
.container {
  max-width: 1000px;
  margin: 80px auto 40px;
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: relative;
}

/* Logout button */
.logout {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 12px;
  background: #dc3545;
  color: #fff;
  border-radius: 4px;
  font-size: 0.9em;
}
.logout:hover {
  background: #c82333;
}

/* Headings */
h1 {
  font-size: 2em;
  margin-bottom: 20px;
  text-align: center;
}
h2 {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: #555;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

/* Section containers */
section {
  margin-bottom: 30px;
}
.form-section,
.export-section,
.loan-overview {
  background: #fafafa;
  padding: 20px;
  border: 1px solid #ececec;
  border-radius: 6px;
}

/* Form elements */
.form-section label {
  display: block;
  margin-bottom: 12px;
}
.form-section label input,
.form-section label select {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Buttons */
button,
.btn {
  display: inline-block;
  background: #007bff;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.2s;
}
button:hover,
.btn:hover {
  background: #0056b3;
}
.btn-danger {
  background: #dc3545;
}
.btn-danger:hover {
  background: #c82333;
}

/* Export section */
.export-section .btn {
  margin-right: 10px;
}

/* Loan overview card grid */
.loan-overview h2 {
  margin-bottom: 20px;
  font-size: 1.5em;
  color: #333;
}
.loan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.loan-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.loan-card h3 {
  font-size: 1.1em;
  margin-bottom: 12px;
  color: #007bff;
}
.loan-card p {
  font-size: 0.95em;
  margin: 4px 0;
}
.loan-card .value {
  font-weight: bold;
  color: #333;
}
.loan-card hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 12px 0;
}
.loan-card .actions {
  margin-top: 12px;
  text-align: right;
}
@media (max-width: 600px) {
  .loan-grid {
    grid-template-columns: 1fr;
  }
}

/* Login page */
.login-container {
  margin: 100px auto;
  max-width: 400px;
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.login-container h1 {
  margin-bottom: 20px;
  font-size: 1.5em;
  text-align: center;
}
.login-form label {
  display: block;
  margin-bottom: 15px;
}
.login-form input {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.login-form button {
  width: 100%;
  margin-top: 10px;
}
.error {
  color: #d9534f;
  margin-bottom: 15px;
  text-align: center;
}