/* Base styles (for desktop and all devices) */

/* Container with fixed width of 800px */
.container {
  max-width: 800px;
  margin: 0 auto;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  margin: 0;
  padding: 20px;
}

header {
  background-color: #fff;
  padding: 10px 20px;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

header h1 {
  margin: 0;
  text-align: left;
}

header button#lang-switch {
  background: none;
  border: none;
  font-size: 1rem;
  color: #007bff;
  cursor: pointer;
  align-self: center;
}

header button#lang-switch:hover {
  background: none;
  color: #007bff;
}

/* Login overlay styling */
#login-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(245, 247, 250, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#login-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

#login-container h2 {
  margin: 0;
  font-size: 1.5rem;
}

#login-container button#login-lang-switch {
  background: none;
  border: none;
  font-size: 1rem;
  color: #007bff;
  cursor: pointer;
}

#login-container button#login-lang-switch:hover {
  background: none;
  color: #007bff;
}

#login-container input {
  margin: 5px;
  padding: 8px 12px;
  font-size: 1rem;
}

/* Card styles */
.card {
  background-color: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.input-group,
.button-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

#template-targets li::before,
#template-tasks li::before,
#status-targets li::before {
  content: "• ";
  margin-right: 8px;
}

ul {
  list-style: none;
  padding: 0;
}

/* Every li gets a bottom border */
li {
  padding: 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-num {
  font-weight: bold;
}

/* Narrower order input boxes */
.order-input {
  width: 60px;
}

/* Manual Add Done Tasks row styling */
.manual-add-done-row {
  margin: 10px 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.manual-add-done-row .section-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 2px;
  color: #333;
  text-align: left;
}

.manual-add-done-row label {
  font-weight: bold;
}

.manual-add-done-row select,
.manual-add-done-row input[type="date"],
.manual-add-done-row button {
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 3px;
  border: 1px solid #ccc;
}

.manual-add-done-row button {
  background-color: #007bff;
  color: #fff;
  border: none;
  cursor: pointer;
}

.manual-add-done-row button:hover {
  background-color: #0056b3;
}

.edit-buttons button {
  margin-left: 5px;
}

input,
select {
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 3px;
  border: 1px solid #ccc;
  flex: none;
}

button {
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 3px;
  border: none;
  background-color: #007bff;
  color: #fff;
  cursor: pointer;
}

button:hover:not(#lang-switch):not(#login-lang-switch) {
  background-color: #0056b3;
}

.completed {
  color: #28a745;
  font-weight: bold;
}

.target-success {
  color: #17692a;
  font-weight: bold;
  margin-left: 8px;
}

/* 简化模式：在电脑桌面以外的全部屏幕使用 */
@media (max-width: 1199px) {

  /* Fluid container for non-desktop devices */
  .container {
    max-width: 100%;
    padding: 10px;
    margin: 0 5px;
  }

  body {
    padding: 10px;
    font-size: 1.1rem;
  }

  header {
    padding: 8px 10px;
    flex-direction: column;
    align-items: center;
  }

  header h1 {
    font-size: 1.4rem;
    text-align: center;
  }

  #login-container input {
    width: 90%;
    font-size: 1.1rem;
  }

  .card {
    padding: 15px;
    margin-bottom: 15px;
  }

  /* Stack input group and button group vertically for non-desktop */
  .input-group,
  .button-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 12px;
  }

  input,
  select,
  button {
    font-size: 1.1rem;
    padding: 10px 14px;
  }

  /* Hide editing section on non-desktop: only display status */
  #template-editor {
    display: none;
  }

  /* Within the status monitor, hide the reset buttons */
  #reset-daily-btn,
  #reset-weekly-btn {
    display: none;
  }
}
