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

body {
  /* font-family, background, and top padding (64px for the fixed masthead)
     come from theme.css. Keep horizontal/bottom breathing room here. */
  padding: 20px;
  padding-top: max(64px, 20px);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.content {
  padding: 30px;
}

.tabs {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  font-weight: 500;
  color: #666;
  font-size: 1em;
}

.tab-btn.active {
  color: #02133e;
  border-bottom-color: #02133e;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.controls {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

th {
  background: #f5f5f5;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
}

th:hover {
  background: #ebebeb;
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

tr:hover {
  background: #f9f9f9;
}

.edit-btn {
  background: #02133e;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

.edit-btn:hover {
  background: #0a3161;
}

.status-current {
  background-color: #d4edda;
  color: #155724;
}

.status-expiring {
  background-color: #fff3cd;
  color: #856404;
}

.status-expired {
  background-color: #f8d7da;
  color: #721c24;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin-bottom: 20px;
  color: #02133e;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1em;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-primary {
  flex: 1;
  background: #02133e;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
}

.btn-primary:hover {
  background: #0a3161;
}

.btn-secondary {
  flex: 1;
  background: #ccc;
  color: #333;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
}

.btn-secondary:hover {
  background: #bbb;
}

.status-info {
  margin-bottom: 15px;
  padding: 10px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 0.9em;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}
