/* === Admin Panel Styles === */
/* This file is loaded only on admin pages, so it won't affect the main app. */

/* --- Reset overrides for admin --- */
body {
  font-family: "Source Sans Pro", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  background-color: #f4f6f9;
  overflow-x: hidden;
}

header {
  display: none;
  height: 0;
}

main {
  height: 100vh;
  overflow-y: auto;
}

footer {
  display: none;
}

a:hover {
  opacity: 1;
  color: #0056b3;
}

button:hover {
  opacity: 1;
}

/* --- Admin Layout --- */
.flex-container {
  display: flex;
  min-height: 100vh;
}

.flex-grow {
  flex: 1;
  min-width: 0;
  background-color: #f4f6f9;
  display: flex;
  flex-direction: column;
}

/* --- Content Header --- */
.admin-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #dee2e6;
  background-color: #fff;
}

.admin-content-header h1 {
  font-size: 1.8rem;
  font-weight: 400;
  margin: 0;
  color: #212529;
}

.admin-content-header .actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* --- Content Body --- */
.admin-content-body {
  padding: 1.25rem;
}

/* --- Buttons --- */
button.btn,
a.btn {
  display: inline-block;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
  text-align: center;
  vertical-align: middle;
  background-color: #007bff;
  border: 1px solid #007bff;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

button.btn:hover,
a.btn:hover {
  background-color: #0069d9;
  border-color: #0062cc;
  opacity: 1;
}

button.btn-success,
a.btn-success {
  background-color: #28a745;
  border-color: #28a745;
}

button.btn-success:hover,
a.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

button.btn-danger,
a.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}

button.btn-danger:hover,
a.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

button.btn-outline,
a.btn-outline {
  background-color: transparent;
  color: #343a40;
  border: 1px solid #dee2e6;
}

button.btn-outline:hover,
a.btn-outline:hover {
  background-color: #e9ecef;
}

/* --- Cards --- */
.card {
  background-color: #fff;
  border-radius: 0.25rem;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
}

.card-header {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  background-color: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.card-body {
  padding: 1.25rem;
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
}

table thead th {
  background-color: #fff;
  border-top: none;
  border-bottom: 2px solid #dee2e6;
  padding: 0.75rem;
  font-weight: 700;
  font-size: 0.8125rem;
  color: #212529;
  text-align: left;
  white-space: nowrap;
  vertical-align: bottom;
}

table tbody td {
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
  vertical-align: top;
  font-size: 0.8125rem;
  color: #212529;
}

table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

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

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
  color: #212529;
  margin-bottom: 0.25rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

select.form-control {
  appearance: auto;
}

.search-input {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  outline: none;
}

.search-input:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
