body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

header h1 {
  color: #2c3e50;
  margin: 0;
  font-size: 1.5rem;
}

.firebase-status {
  margin: 0 1rem;
  padding: 0.5rem;
  background-color: #e2e3e5;
  color: #383d41;
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
}

.firebase-status.connected {
  background-color: #d4edda;
  color: #155724;
}

.firebase-status.error {
  background-color: #f8d7da;
  color: #721c24;
}

.login-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-form {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
  text-align: center;
  color: #2c3e50;
  margin-top: 0;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

input, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}

button {
  padding: 0.75rem 1.5rem;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #2980b9;
}

.error-message {
  margin-top: 1rem;
  padding: 0.5rem;
  background-color: #f8d7da;
  color: #721c24;
  border-radius: 4px;
  text-align: center;
}

.login-hint {
  margin-top: 1.5rem;
  padding: 0.75rem;
  background-color: #e2e3e5;
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
  color: #383d41;
}

.login-hint p {
  margin: 0;
}

.admin-panel {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

.controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  max-width: 600px;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.admin-notice {
  background-color: #fff3cd;
  color: #856404;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border-left: 4px solid #ffc107;
  font-size: 0.9rem;
}

.applications-container {
  position: relative;
  min-height: 200px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  margin-bottom: 1.5rem;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f8fafc;
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr {
  transition: background-color 0.2s ease;
}

tbody tr:hover {
  background-color: #f8f9fa;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Column-specific styles */
td:nth-child(1), th:nth-child(1) { /* Date column */
  width: 120px;
  white-space: nowrap;
}

td:nth-child(5), th:nth-child(5) { /* Loan Amount column */
  text-align: right;
  font-weight: 500;
}

td:nth-child(6), th:nth-child(6) { /* Status column */
  text-align: center;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5px;
  min-width: 100px;
}

.status-pending {
  background-color: rgba(255, 193, 7, 0.15);
  color: #d9a400;
  border: 1px solid rgba(255, 193, 7, 0.4);
}

.status-checkdeposit {
  background-color: rgba(40, 167, 69, 0.15);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.4);
}

.status-upfront {
  background-color: rgba(0, 123, 255, 0.15);
  color: #0069d9;
  border: 1px solid rgba(0, 123, 255, 0.4);
}

.status-rejected {
  background-color: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.4);
}

/* Actions column */
td:nth-child(7), th:nth-child(7) { /* Actions column */
  text-align: center;
  min-width: 120px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
  margin: 0 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background-color: #e9ecef;
  transform: translateY(-2px);
}

.action-btn.view {
  color: #17a2b8;
}

.action-btn.approve {
  color: #28a745;
}

.action-btn.reject {
  color: #dc3545;
}

/* Application details styles */
.application-details {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
  padding: 0;
  z-index: 100;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background-color: #f8fafc;
  border-bottom: 1px solid #eee;
}

.details-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.details-header h2 i {
  color: #4a6fdc;
  font-size: 1.25rem;
}

.close-button {
  background: #f1f5f9;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  padding: 0.4rem 0.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
  line-height: 1;
}

.close-button:hover {
  background-color: #e2e8f0;
  color: #334155;
}

.details-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.details-section {
  margin-bottom: 2rem;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.section-header {
  background-color: #f8fafc;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-header i {
  color: #4a6fdc;
}

.section-content {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.details-row {
  margin-bottom: 0.75rem;
}

.details-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.details-value {
  font-weight: 500;
  color: #334155;
  word-break: break-word;
}

.details-actions {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: #f8fafc;
  border-top: 1px solid #eee;
}

/* Responsive changes */
@media (max-width: 768px) {
  th {
    display: none;
  }
  
  table, tbody, tr, td {
    display: block;
    width: 100%;
  }
  
  tr {
    margin-bottom: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
  }
  
  td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 0.75rem 1rem;
  }
  
  td:before {
    content: attr(data-label);
    font-weight: 600;
    color: #64748b;
    padding-right: 1rem;
    text-align: left;
  }
  
  td:nth-child(6), td:nth-child(7) {
    justify-content: center;
    text-align: center;
  }
  
  td:nth-child(6):before, td:nth-child(7):before {
    display: none;
  }
  
  .application-details {
    width: 95%;
    max-width: none;
    height: 95vh;
    max-height: none;
  }
  
  .section-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  header h1 {
    margin-bottom: 0.5rem;
  }
  
  .firebase-status {
    margin: 0.5rem 0;
  }
  
  .login-status {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: flex-end;
  }
  
  .controls {
    flex-direction: column;
  }
  
  .search-bar {
    max-width: 100%;
  }
  
  .application-details {
    width: 95%;
    max-height: 95vh;
  }
} 