* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
}

/* Navbar */
.navbar {
  background: #2c3e50;
  color: #fff;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar .brand {
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.navbar .nav-links a {
  color: #ecf0f1;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.navbar .nav-links a:hover {
  color: #3498db;
}

.navbar .nav-links .logout {
  color: #e74c3c;
}

.navbar .nav-links .logout:hover {
  color: #c0392b;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Alerts */
.alert {
  padding: 0.9rem 1.2rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alert-error {
  background: #fdeaea;
  color: #c0392b;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #eafaf1;
  color: #27ae60;
  border: 1px solid #c3e6cb;
}

/* Cards */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

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

.card-header h2 {
  font-size: 1.4rem;
  color: #2c3e50;
}

/* Forms */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid #dcdde1;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: #3498db;
  color: #fff;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-success {
  background: #27ae60;
  color: #fff;
}

.btn-success:hover {
  background: #219a52;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-secondary {
  background: #95a5a6;
  color: #fff;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
}

/* Table */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

table th, table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid #ecf0f1;
}

table th {
  background: #2c3e50;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

table tr:hover {
  background: #f8f9fa;
}

table td .actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Search bar */
.search-bar {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-bar input,
.search-bar select {
  padding: 0.6rem 0.9rem;
  border: 1px solid #dcdde1;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}

.search-bar input {
  flex: 1;
  min-width: 200px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.pagination a, .pagination span {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  background: #ecf0f1;
  color: #2c3e50;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.pagination a:hover {
  background: #3498db;
  color: #fff;
}

.pagination .active {
  background: #3498db;
  color: #fff;
}

/* Login/Register pages */
.auth-container {
  max-width: 450px;
  margin: 5rem auto;
  padding: 0 1rem;
}

.auth-container .card {
  text-align: center;
}

.auth-container .card h1 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.auth-container .card p {
  color: #7f8c8d;
  margin-bottom: 1.5rem;
}

.auth-container .form-group {
  text-align: left;
}

.auth-container .btn {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.auth-container .auth-link {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  color: #7f8c8d;
}

.auth-container .auth-link a {
  color: #3498db;
  text-decoration: none;
}

/* Member detail */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.2rem;
}

.detail-item {
  padding: 0.8rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.detail-item .label {
  font-size: 0.8rem;
  color: #7f8c8d;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.detail-item .value {
  font-size: 1rem;
  color: #2c3e50;
}

/* Settings */
.settings-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #ecf0f1;
}

.settings-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-section h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1.1rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #95a5a6;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
    flex-direction: column;
    height: auto;
    padding: 0.8rem;
    gap: 0.8rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.2rem;
  }

  table th, table td {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
}