/* E-Ink Stark Contrast Design System - Compact Focus Dashboard */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #ffffff;
  color: #000000;
  line-height: 1.3;
  width: 100%;
  min-height: 100vh;
  padding: 8px;
}

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

/* Header */
.app-header {
  display: table;
  width: 100%;
  border-bottom: 3px solid #000000;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.header-left {
  display: table-cell;
  vertical-align: middle;
}

.header-left h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  display: inline-block;
  vertical-align: middle;
}

.status-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border: 2px solid #000000;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

.status-online {
  background-color: #000000;
  color: #ffffff;
}

.status-offline {
  background-color: #ffffff;
  color: #000000;
  border-style: dashed;
}

.header-right {
  display: table-cell;
  vertical-align: middle;
  text-align: right;
  width: 90px;
}

/* Refresh Button */
#refresh-btn {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  cursor: pointer;
  display: inline-block;
}

#refresh-btn:active {
  background-color: #000000;
  color: #ffffff;
}

/* Grid Layout */
.dashboard-grid {
  display: block;
}

/* Section styling */
.dashboard-section {
  border: 2px solid #000000;
  padding: 10px;
  background-color: #ffffff;
  margin-bottom: 14px;
}

.dashboard-section h2 {
  font-size: 14px;
  font-weight: 800;
  border-bottom: 2px solid #000000;
  padding-bottom: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Lists */
.item-list {
  list-style: none;
  margin-bottom: 4px;
}

/* Rows modeled as tables */
.todo-item-row,
.weekly-item-row,
.appt-item-row {
  display: table;
  width: 100%;
  table-layout: fixed;
  border-bottom: 1px solid #000000;
  padding: 6px 0;
}

.item-list li:last-child {
  border-bottom: none;
}

/* Cells inside rows */
.todo-checkbox-wrapper,
.todo-text-wrapper,
.todo-move-wrapper,
.todo-delete-wrapper,
.weekly-bullet-wrapper,
.weekly-text-wrapper,
.weekly-move-wrapper,
.weekly-delete-wrapper,
.appt-badge-wrapper,
.appt-text-wrapper,
.appt-delete-wrapper {
  display: table-cell;
  vertical-align: middle;
}

/* Checkbox Column */
.todo-checkbox-wrapper,
.weekly-checkbox-wrapper {
  width: 36px;
  cursor: pointer;
}

/* Custom Checkbox Design (No form controls!) */
.custom-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #000000;
  background-color: #ffffff;
  position: relative;
  display: block;
}

.completed .custom-checkbox {
  background-color: #000000;
}

.completed .custom-checkbox::after {
  content: "X";
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 20px; /* 24px height minus borders (4px total) = 20px */
}

/* Text columns */
.todo-text-wrapper {
  cursor: pointer;
  padding-right: 8px;
  word-wrap: break-word;
}

.todo-text {
  font-size: 13px;
  font-weight: 700;
}

.completed .todo-text,
.completed .item-text {
  text-decoration: line-through;
  color: #777777;
}

/* Bullet Point Column */
.weekly-bullet-wrapper {
  width: 16px;
  font-size: 16px;
  font-weight: 800;
}

.weekly-text-wrapper {
  padding-right: 8px;
  word-wrap: break-word;
}

.item-text {
  font-size: 13px;
  font-weight: 600;
}

/* Appointment Badge Column */
.appt-badge-wrapper {
  width: 90px;
}

.item-date {
  font-size: 11px;
  font-weight: 800;
  background-color: #000000;
  color: #ffffff;
  padding: 2px 4px;
  border: 1px solid #000000;
  display: inline-block;
  text-align: center;
}

.appt-text-wrapper {
  padding-right: 8px;
  word-wrap: break-word;
}

/* Action Move Column & Buttons */
.todo-move-wrapper,
.weekly-move-wrapper {
  width: 60px;
  text-align: center;
  padding: 0 4px;
}

.move-btn {
  padding: 4px 2px;
  font-size: 10px;
  font-weight: 800;
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  cursor: pointer;
  display: inline-block;
  width: 24px;
  height: 24px;
  text-align: center;
  line-height: 12px;
}

.move-btn:active {
  background-color: #000000;
  color: #ffffff;
}

/* Action Delete Column & Button */
.todo-delete-wrapper,
.weekly-delete-wrapper,
.appt-delete-wrapper {
  width: 65px;
  text-align: right;
}

.delete-btn {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  cursor: pointer;
  display: inline-block;
}

.delete-btn:active {
  background-color: #000000;
  color: #ffffff;
}

/* Single Form - E.g. Todo, Weekly Goal */
.add-form {
  display: table;
  width: 100%;
}

.add-input-wrapper {
  display: table-cell;
  vertical-align: middle;
  padding-right: 6px;
}

.add-btn-wrapper {
  display: table-cell;
  vertical-align: middle;
  width: 90px;
}

.add-form input {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid #000000;
  outline: none;
  background-color: #ffffff;
  color: #000000;
}

/* Multi Input Form - E.g. Appointments */
.add-form-multi {
  width: 100%;
}

.multi-row {
  display: table;
  width: 100%;
  margin-bottom: 6px;
}

.cell-date {
  display: table-cell;
  width: 85px;
  padding-right: 6px;
  vertical-align: middle;
}

.cell-text {
  display: table-cell;
  vertical-align: middle;
}

.add-form-multi input {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid #000000;
  outline: none;
  background-color: #ffffff;
  color: #000000;
}

.multi-btn-row {
  width: 100%;
  margin-top: 6px;
}

.multi-btn-row .add-btn {
  width: 100%;
}

/* Common Add Button */
.add-btn {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  background-color: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  cursor: pointer;
  display: block;
  text-align: center;
}

.add-btn:active {
  background-color: #ffffff;
  color: #000000;
}

/* Action Forms Styling (Grouped at the end) */
.section-actions {
  background-color: #ffffff;
}

.action-forms-container {
  display: block;
}

.action-form-box {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #000000;
}

.action-form-box:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.action-form-box h3 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: #000000;
}

/* Messages */
.info-message {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 10px 0;
  border: 2px solid #000000;
  margin-bottom: 10px;
}

/* Responsive grid for larger screens (e.g. previewing on Mac browser) */
@media(min-width: 768px) {
  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
  }
}
