/* 功能按钮区美化 */
.func_btns {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  align-items: center;
  position: sticky;
  top: 64px; /* 导航栏高度 (4rem) */
  z-index: 1000;
  background: var(--surface-alt);
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  left: 0;
  right: 0;
}

#loaded-file-name {
  font-weight: bold;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  min-width: 100px;
  transition: font-size 0.2s ease;
}

#loaded-file-name.long-filename {
  font-size: 0.9rem;
}

#loaded-file-name.very-long-filename {
  font-size: 0.8rem;
}
.input_date {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color 0.2s;
}
.input_date:focus {
  border-color: var(--primary);
}
.btn_primary {
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s;
}
.btn_primary:hover {
  background: var(--primary-hover);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-radius: 0.5rem;
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-size: 1rem;
}
.data-table th {
  background: var(--primary);
  color: var(--text-on-primary);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover {
  background: var(--surface-alt);
}

/* 编辑按钮美化 */
.btn_edit {
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
  border-radius: 0.4rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: background 0.2s;
}
.btn_edit:hover {
  background: var(--primary-hover);
}


/* BB表上下间距优化 */
.bb-table-container {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .container {
    padding: 1rem 0.5rem;
  }
  .func_btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    align-items: center;
    position: sticky;
    top: 0; /* 手机版导航栏隐藏时直接固定在顶部 */
    z-index: 999;
    background: var(--surface-alt);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
  }
  .func_btns > * {
    min-width: 0;
    text-align: center;
  }
  #loaded-file-name {
    grid-column: 1 / 3; /* 占据前两列 */
    max-width: 100%;
    text-align: center;
    margin-bottom: 0;
  }
  .input_date {
    grid-column: 3 / 4; /* 占据第三列 */
    width: 100%;
    margin-bottom: 0;
  }
  .data-table th, .data-table td {
    padding: 0.5rem 0.3rem;
    font-size: 0.95rem;
  }
}

/* 备注输入区美化 */
.remark_input {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
#remark {
  width: 100%;
  min-height: 120px;
  max-width: 100%;
  font-size: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  resize: vertical;
  transition: border-color 0.2s;
}
#remark:focus {
  border-color: var(--primary);
  outline: none;
}
.remark_input textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}
