* { box-sizing: border-box; }

body {
    font-family: Arial, sans-serif;
    font-size: 13px;
    background: #020521;
    margin: 0;
    padding: 10px;
    color: #f3f9f8;
}

.app {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 10px;
    max-width: 1300px;
    margin: 0 auto;
}

/* ===== Main panel ===== */
.main { display: flex; flex-direction: column; gap: 8px; }

.row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
    align-items: start;
}

.lbl {
    padding: 6px 4px;
    background: #618495;
    border: 1px solid #618495;
    text-align: right;
}

/* ===== Dropdown ===== */
.dropdown {
    position: relative;
    display: flex;
    flex-direction: column;
	color: #4c727f;
}

.search {
    padding: 6px;
    border: 1px solid #90adb9;
    background: #f3f9f8;
    font-size: 13px;
}

.dd-list {
    border: 1px solid #90adb9;
    border-top: none;
    background: #f3f9f8;
    max-height: 0;
    overflow-y: auto;
    cursor: pointer;
}

.dd-list.open { max-height: 200px; }

.dd-item { padding: 4px 8px; }

.dd-item:hover, .dd-item.active, .dd-item.selected {
    background: #5b9bd5;
    color: #f3f9f8;
}

.comment-input {
    padding: 6px;
    border: 1px solid #5b9bd5;
    background: #f3f9f8;
}

/* ===== Timer ===== */
.timer-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.timer-display {
    font-size: 36px;
    font-weight: bold;
    background: #618495;
    border: 1px solid #618495;
    padding: 8px 20px;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
}

.today {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #618495;
    border: 1px solid #618495;
    padding: 8px 16px;
}

#today-total {
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* ===== Buttons ===== */
.btn {
    padding: 8px 24px;
    border: 1px solid #82aa0b;
	margin-right: 1px;
    cursor: pointer;
    font-size: 13px;
}

.btn-blue { background: #82aa0b; color: #f3f9f8; }
.btn-blue:hover { background: #fafba1; color: #4c727f; }

.actions-row {
    display: flex;
    gap: 0;
    margin-top: 8px;
    justify-content: flex-end;
}

.actions-row .btn { border-radius: 0; }

/* ===== Table ===== */
.table-wrap {
    background: #040b43;
    border: 2px solid #040b43;
    max-height: 400px;
    overflow-y: auto;
}

#log-table {
    width: 100%;
    border-collapse: collapse;
}

#log-table th {
    background: #020521;
    padding: 9px 9px;
    text-align: center;
	color: #3e8ad6;
    position: sticky;
    top: 0;
}

#log-table td {
    padding: 9px 9px;
	background: #020521;
	color: #618495;
    text-align: center;
}

#log-table td.editable { cursor: pointer; }
#log-table td.editable:hover { background: #3e8ad6; color: #040b43; }

#log-table td input {
    width: 100%;
    border: 1px solid #5b9bd5;
    padding: 2px;
    font-size: 13px;
}

.row-action {
    cursor: pointer;
    color: #f00;
	background: #4a0101;
    font-weight: bold;
    font-size: 14px;
    padding: 2px 8px;
	margin-right: 4px;
}

.row-action:hover { background: #f00; color: #4a0101; }

.play-btn {
    cursor: pointer;
    color: #fafba1;
    background: #82aa0b;
    padding: 1px 8px;
    display: inline-block;
    margin-right: 4px;
}

.play-btn:hover { background: #fafba1; color: #82aa0b;}

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 10px; }

.cfg-block {
    background: #d4d4d4;
    border: 1px solid #90adb9;
    display: flex;
    flex-direction: column;
}

.cfg-title {
    background: #618495;
    padding: 6px;
    text-align: center;
    border-bottom: 1px solid #90adb9;
}

.cfg-block input,
.cfg-block textarea {
	background: #f3f9f8;
	color: #4c727f;
    border: none;
    border-top: 1px solid #90adb9;
    padding: 6px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    resize: vertical;
    outline: none;
}

.cfg-block input:focus,
.cfg-block textarea:focus { background: #f3f9f8; }

#task-input::placeholder { color: #90adb9; font-style: italic; }

#lock-screen {
  position: fixed; inset: 0;
  background: #040b43;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
#lock-screen.hidden { display: none; }
.lock-box {
  background: #618495; padding: 24px; border-radius: 10px;
  display: flex; flex-direction: column; gap: 10px; min-width: 260px;
  text-align: center;
}
.lock-box input { padding: 8px; font-size: 16px; }
.lock-box button { padding: 8px; cursor: pointer; }
#lock-error { color: #4a0101; font-size: 14px; min-height: 18px; }