/* Sidebar Layout Additions */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background-color: #f0f2f5;
}

/* Sidebar Styling removed and moved to components/sidebar.js */

.main-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2rem;
}

.top-bar {
  background-color: white;
  padding: 1rem 2rem;
  border-bottom: 1px solid #e2e8f0;
  margin: -2rem -2rem 2rem -2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
}

.page-subtitle {
  font-size: 0.9rem;
  color: #16a34a; /* Green */
  font-weight: 600;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 200px;
}

.form-group.full-width {
  flex: 100%;
}

.form-group label {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.form-group input, .form-group select {
  padding: 0.6rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
}

.form-group input:focus, .form-group select:focus {
  border-color: #16a34a;
  outline: none;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.btn-primary {
  background-color: #0d4632;
  color: white;
}

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

.btn-secondary {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.card-header {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-container {
  overflow-x: auto;
}

.table-header-green th {
  background-color: #3b82f6;
  color: white;
}
.table-header-green th {
  background-color: #4ade80; /* lighter green from screenshot */
  color: #0d4632;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
}

.page-item {
  padding: 0.4rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  color: #475569;
}

.page-item.active {
  background-color: #0d4632;
  color: white;
  border-color: #0d4632;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.status-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-free {
  background-color: #dcfce7;
  color: #166534;
}

.status-pay {
  background-color: #fee2e2;
  color: #991b1b;
}

.summary-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: 1rem;
  color: #475569;
}

.summary-row.total {
  border-top: 1px solid #cbd5e1;
  padding-top: 0.8rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: #1e293b;
}

.text-green { color: #16a34a; }
.text-red { color: #dc2626; }

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background-color: white;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #1e293b;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  padding: 0;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
