.weekly-admin-container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.weekly-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.weekly-admin-header h2 {
  margin: 0 0 0.4rem;
}

.weekly-admin-header p {
  margin: 0;
  color: var(--secondary-text, #666);
}

.weekly-admin-link {
  display: inline-block;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  background: var(--card-bg, #fff);
  color: inherit;
  border: 1px solid rgba(128, 128, 128, 0.3);
  white-space: nowrap;
}

.weekly-admin-card {
  background: var(--card-bg, #fff);
  color: var(--text, #111);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.weekly-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.weekly-card-heading h3 {
  margin: 0;
}

.weekly-count {
  color: var(--secondary-text, #666);
  font-size: 0.9rem;
}

.weekly-current-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.weekly-current-grid > div {
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(128, 128, 128, 0.08);
}

.weekly-label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--secondary-text, #666);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weekly-uuid {
  margin-top: 1rem;
  color: var(--secondary-text, #666);
  font-family: monospace;
  overflow-wrap: anywhere;
}

.weekly-badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.15);
  font-size: 0.8rem;
}

.weekly-badge-current {
  background: rgba(34, 139, 34, 0.14);
  color: green;
}

.weekly-warning {
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  background: rgba(255, 165, 0, 0.12);
  border: 1px solid rgba(255, 165, 0, 0.35);
}

.weekly-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.weekly-admin-table {
  width: 100%;
  border-collapse: collapse;
}

.weekly-admin-table th,
.weekly-admin-table td {
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.weekly-admin-table th {
  color: var(--secondary-text, #666);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weekly-admin-table code {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.weekly-empty-message {
  color: var(--secondary-text, #666);
}

.weekly-date-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  white-space: nowrap;
}

.weekly-date-input {
  min-height: 2.1rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 7px;
  background: var(--card-bg, #fff);
  color: inherit;
  font: inherit;
}

.weekly-date-save-button {
  min-height: 2.1rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 7px;
  background: var(--card-bg, #fff);
  color: inherit;
  cursor: pointer;
}

.weekly-date-save-button:hover {
  background: rgba(128, 128, 128, 0.12);
}

.weekly-date-display {
  display: block;
  margin-top: 0.35rem;
  color: var(--secondary-text, #666);
  font-size: 0.78rem;
}

.weekly-schedule-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.weekly-schedule-actions form {
  margin: 0;
}

.weekly-action-button {
  min-width: 2.25rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 7px;
  background: var(--card-bg, #fff);
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.weekly-action-button:hover:not(:disabled) {
  background: rgba(128, 128, 128, 0.12);
}

.weekly-action-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.weekly-remove-button {
  min-width: auto;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
  border-color: rgba(190, 45, 45, 0.45);
  color: #c53d3d;
}

.weekly-remove-button:hover:not(:disabled) {
  background: rgba(190, 45, 45, 0.12);
}

.weekly-station-search-form {
  margin: 0;
}

.weekly-station-search-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

.weekly-station-search-input {
  flex: 1;
  min-width: 0;
  min-height: 2.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 8px;
  background: var(--card-bg, #fff);
  color: inherit;
  font: inherit;
}

.weekly-primary-button {
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(60, 110, 190, 0.55);
  border-radius: 8px;
  background: rgba(60, 110, 190, 0.14);
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.weekly-primary-button:hover {
  background: rgba(60, 110, 190, 0.23);
}

.weekly-search-results {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.weekly-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(128, 128, 128, 0.22);
  border-radius: 10px;
  background: rgba(128, 128, 128, 0.05);
}

.weekly-search-result-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.weekly-search-result-info h4 {
  margin: 0 0 0.3rem;
}

.weekly-search-result-info code {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.weekly-station-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(128, 128, 128, 0.08);
}

.weekly-result-details {
  margin: 0 0 0.35rem;
  color: var(--secondary-text, #666);
  font-size: 0.85rem;
}

.weekly-add-station-form {
  margin: 0;
}

.weekly-add-station-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.weekly-make-current-form {
  margin: 0.65rem 0 0;
}

.weekly-make-current-button,
.weekly-current-button {
  min-height: 2.1rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(34, 139, 34, 0.5);
  border-radius: 7px;
  background: rgba(34, 139, 34, 0.13);
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.weekly-make-current-button:hover,
.weekly-current-button:hover {
  background: rgba(34, 139, 34, 0.22);
}

.weekly-current-button {
  min-width: auto;
}

@media (max-width: 760px) {
  .weekly-admin-header {
    flex-direction: column;
  }

  .weekly-current-grid {
    grid-template-columns: 1fr;
  }

    .weekly-station-search-row {
    flex-direction: column;
  }

  .weekly-search-result {
    grid-template-columns: 1fr;
  }

  .weekly-add-station-row {
    align-items: stretch;
    flex-direction: column;
  }
}