/* public/css/style.css */

/* --- Global Reset & Base Styles --- */
body {
  font-family: "Microsoft YaHei", sans-serif;
  background-color: #000;
  color: #fff;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

/* --- Layout Structure --- */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.content-wrapper {
  display: flex;
  flex-grow: 1;
}

/* --- Header Styles --- */
.header {
  height: 60px;
  background-color: #111;
  border-bottom: 1px dashed #ccc;
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex-shrink: 0;
  justify-content: space-between; /* Ensures logo/title and actions are spaced */
}

.header-logo {
  height: 40px;
  margin-right: 15px;
}

.header-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #0f0;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- Sidebar Styles --- */
.sidebar {
  width: 200px;
  background-color: #111;
  border-right: 1px dashed #ccc;
  padding: 20px 0;
  flex-shrink: 0;
  z-index: 10;
}

.menu-item {
  padding: 15px 20px;
  cursor: pointer;
  transition: background 0.3s, border-left-color 0.3s, color 0.3s;
  border-left: 3px solid transparent;
  color: #fff;
}

.menu-item:hover {
  background-color: #222;
  border-left-color: #0f0;
}

.menu-item.active {
  background-color: #222;
  border-left-color: #0f0;
  color: #0f0;
}

/* --- Main Content Area --- */
.main-content {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: auto;
}

/* --- Common Typography & Elements --- */
.page-title, .title {
  font-size: 1.5em;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  color: #0f0;
  text-align: center;
}

.section-title {
  font-size: 1.1em;
  margin-top: 20px;
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 1px solid #333;
  color: #fff;
}

/* --- Forms & Inputs --- */
.form-group {
  margin-bottom: 15px;
}

.label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #ccc;
}

.input-field, .select-field, .textarea-field {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  background-color: #111;
  color: #fff;
  font-family: monospace;
  box-sizing: border-box;
}

.textarea-field {
  height: 100px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.checkbox {
  margin-right: 8px;
}

.hint {
  font-size: 0.8em;
  color: #888;
  margin-top: 5px;
}

/* --- Buttons --- */
.btn, .save-button, .login-btn, .profile-btn, .logout-btn, .return-btn, .btn-add, .action-btn {
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.save-button, .btn-add, .btn-primary {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #0f0;
  color: #000;
  border: none;
  text-align: center;
  margin-top: 20px;
}

.save-button:hover, .btn-add:hover, .btn-primary:hover {
  background-color: #0c0;
}

.btn-secondary {
  padding: 8px 15px;
  background-color: #333;
  color: #fff;
  border: 1px solid #ccc;
}

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

.profile-btn {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
}

.profile-btn:hover {
  background-color: #0056b3;
}

.logout-btn, .return-btn {
  margin-left: 10px;
  padding: 5px 10px;
  background-color: #f56c6c;
  color: white;
  border: none;
  border-radius: 4px;
}

.logout-btn:hover, .return-btn:hover {
  background-color: #e64343;
}

.action-btn {
  color: #0f0;
  margin-right: 10px;
  text-decoration: underline;
  background: none;
  border: none;
  font-size: 0.9em;
  padding: 0;
}

.action-btn.delete {
  color: #f00;
}

/* --- Tables --- */
.table-container {
  background-color: #111;
  border: 1px dashed #ccc;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

th, td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid #333;
}

th {
  background-color: #0a0a0a;
  color: #ccc;
  font-weight: normal;
}

td {
  color: #fff;
}

tr:hover {
  background-color: #1a1a1a;
}

/* --- Tags & Badges --- */
.tag {
  display: inline-block;
  padding: 2px 6px;
  background-color: #222;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 0.85em;
  margin-right: 5px;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  gap: 10px;
}

.page-btn {
  padding: 5px 10px;
  background-color: #111;
  border: 1px solid #ccc;
  color: #fff;
  cursor: pointer;
}

.page-btn.active {
  background-color: #0f0;
  color: #000;
  border-color: #0f0;
}

/* --- Modal Styles (from head.html) --- */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  border-radius: 8px;
  color: #000; /* Ensure text is visible in modal */
}

.close-btn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-btn:hover {
  color: black;
}

.message-box {
  margin-top: 10px;
  text-align: center;
}

.error { color: #ff4d4f; }
.success { color: #52c41a; }