/* 업무 메모 전용 페이지 — 표(오전/오후) · 세로(9:16)에서는 열이 세로로 쌓임 */

body.memo-page--sheet {
    min-height: 100vh;
    background: #f2f4f6;
}

.memo-sheet-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 16px 72px;
    box-sizing: border-box;
}

.memo-sheet-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.memo-sheet-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #191f28;
}

.memo-sheet-help {
    margin: 0 0 14px;
    font-size: 13px;
    color: #4e5968;
    line-height: 1.45;
    max-width: 56ch;
}

.memo-sheet-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-sheet-primary,
.btn-sheet-secondary {
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-sheet-primary {
    background: #3182f6;
    color: #fff;
}

.btn-sheet-primary:hover {
    background: #1c6ef3;
}

.btn-sheet-secondary {
    background: #fff;
    color: #333;
    border: 1px solid #d0d7e0;
}

.btn-sheet-secondary:hover {
    background: #f9fafb;
}

.memo-sheet-add {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 18px;
    margin-bottom: 18px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.memo-sheet-add-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.memo-sheet-add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.memo-sheet-add-row--content {
    padding-top: 12px;
    border-top: 1px solid #eef0f3;
    align-items: flex-end;
}

.memo-sheet-add-submit {
    margin-left: auto;
}

.memo-sheet-select-short {
    min-width: 0;
    max-width: 220px;
}

.memo-sheet-label-shift {
    flex: 0 0 auto;
}

.memo-sheet-select-compact {
    min-width: 0;
    width: 100%;
    max-width: 118px;
}

/* 구분·전달 등급 셀렉트를 같은 행의 호실·작성자 입력과 높이·글자 크기 맞춤 */
.memo-sheet-add-row--primary .memo-sheet-select-compact {
    min-height: 0;
    padding: 8px 26px 8px 10px;
    font-size: 13px;
    line-height: 1.25;
}

.memo-sheet-label-date {
    flex: 0 0 auto;
}

.memo-sheet-input-date {
    width: 100%;
    min-width: 0;
    max-width: 132px;
}

.memo-sheet-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.memo-sheet-label-grow {
    flex: 1 1 120px;
    min-width: 0;
}

.memo-sheet-label-text {
    font-size: 12px;
    font-weight: 700;
    color: #4e5968;
    text-transform: none;
    letter-spacing: -0.01em;
}

.memo-sheet-select,
.memo-sheet-input {
    padding: 10px 12px;
    border: 1px solid #d0d7e0;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.25;
    background: #fff;
    box-sizing: border-box;
    min-height: 42px;
    vertical-align: middle;
}

.memo-sheet-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7684' d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.memo-sheet-input {
    width: 100%;
    min-width: 0;
}

.memo-sheet-input-fixed {
    width: 100%;
    min-width: 140px;
    max-width: 220px;
}

.memo-sheet-label-room {
    flex: 0 0 auto;
}

.memo-sheet-input-room {
    width: 100%;
    min-width: 0;
    max-width: 88px;
    padding: 8px 10px;
    font-size: 13px;
}

.memo-sheet-label-author {
    flex: 0 0 auto;
}

.memo-sheet-input-author {
    width: 100%;
    min-width: 0;
    max-width: 72px;
    padding: 8px 10px;
    font-size: 13px;
}

.memo-sheet-inline-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 2px solid #3182f6;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #191f28;
    background: #fff;
}

.memo-sheet-inline-input:focus {
    outline: none;
}

.memo-sheet-inline-edit-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
    align-items: center;
}

.memo-sheet-inline-edit-wrap .memo-sheet-inline-input-date {
    width: 88px;
    max-width: 35%;
    flex: 0 1 auto;
}

.memo-sheet-inline-edit-wrap .memo-sheet-inline-input-room {
    width: 72px;
    max-width: 22%;
    flex: 0 1 auto;
}

.memo-sheet-inline-edit-wrap .memo-sheet-inline-input-author {
    width: 56px;
    max-width: 18%;
    flex: 0 1 auto;
}

.memo-sheet-inline-edit-wrap .memo-sheet-inline-input-content {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
}

.memo-sheet-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

@media (max-width: 820px), (orientation: portrait) and (max-width: 900px) {
    .memo-sheet-columns {
        grid-template-columns: 1fr;
    }
}

.memo-sheet-col {
    background: #fff;
    border-radius: 14px;
    padding: 14px 14px 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    min-width: 0;
}

.memo-sheet-col-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
    color: #191f28;
}

.memo-sheet-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.memo-sheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.memo-sheet-table thead th {
    text-align: left;
    padding: 8px 10px;
    background: #f2f4f6;
    color: #6b7684;
    font-weight: 700;
    border-bottom: 1px solid #eaeef2;
}

.memo-sheet-table tbody td {
    padding: 10px;
    border-bottom: 1px solid #f2f4f6;
    vertical-align: middle;
}

.memo-sheet-table tbody tr:last-child td {
    border-bottom: none;
}

.memo-sheet-table .col-task {
    width: auto;
}

.memo-sheet-table .col-check {
    width: 52px;
    text-align: center;
}

.memo-sheet-table .col-act {
    width: 36px;
    text-align: center;
}

.memo-sheet-task-text {
    color: #191f28;
    line-height: 1.45;
    cursor: pointer;
    user-select: none;
}

.memo-sheet-task-text:hover {
    color: #3182f6;
}

.memo-sheet-task-meta {
    font-size: 11px;
    color: #8b95a1;
    margin-top: 4px;
}

.memo-sheet-routine-row--checked .memo-sheet-task-text {
    text-decoration: line-through;
    color: #8b95a1;
}

.memo-sheet-routine-row--checked .memo-sheet-task-text:hover {
    color: #6b7684;
}

.memo-sheet-routine-checker {
    font-size: 11px;
    font-weight: 600;
    color: #3182f6;
    margin-top: 4px;
}

.memo-sheet-check {
    width: 20px;
    height: 20px;
    accent-color: #3182f6;
    cursor: pointer;
}

.memo-sheet-del {
    background: none;
    border: none;
    color: #c9cdd4;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
    line-height: 1;
}

.memo-sheet-del:hover {
    color: #f04452;
}

.memo-sheet-empty {
    margin: 12px 0 0;
    font-size: 13px;
    color: #8b95a1;
    text-align: center;
}

.memo-sheet-done {
    margin-top: 18px;
    background: #fff;
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.memo-sheet-done-summary {
    font-weight: 700;
    cursor: pointer;
    color: #4e5968;
}

.memo-sheet-done-wrap {
    margin-top: 12px;
}

.memo-sheet-table--compact tbody td {
    padding: 8px 10px;
}

.badge-shift {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-shift--morning {
    background: #eef4ff;
    color: #3182f6;
}

.badge-shift--afternoon {
    background: #fff4e6;
    color: #c96f00;
}

.badge-shift--night {
    background: #ede9fe;
    color: #5b21b6;
}

.memo-sheet-handoff {
    margin-top: 4px;
    margin-bottom: 0;
    background: #fff;
    border-radius: 14px;
    padding: 18px 16px 16px;
    box-shadow: 0 2px 12px rgba(49, 130, 246, 0.08);
    border: 1px solid #e3eefc;
}

.memo-sheet-handoff-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: #191f28;
}

.memo-sheet-handoff-buckets {
    display: block;
}

.handoff-buckets-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.handoff-grid-row--single {
    grid-template-columns: 1fr;
}

.handoff-grid-row--full {
    grid-template-columns: 1fr;
}

.handoff-date-cell {
    min-width: 0;
}

@media (max-width: 720px) {
    .handoff-grid-row:not(.handoff-grid-row--full) {
        grid-template-columns: 1fr;
    }
}

.handoff-date-section {
    border-radius: 10px;
    padding: 8px 10px 10px;
    background: #fafbfc;
    border: 1px solid #eaeef2;
}

.handoff-date-section--past {
    background: #fff8f7;
    border-color: #f5cfcb;
}

.handoff-date-heading {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: #4e5968;
    letter-spacing: -0.02em;
}

.handoff-date-count {
    font-weight: 700;
    color: #8b95a1;
}

.handoff-date-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.handoff-date-rows .handoff-row:nth-child(even) {
    background: #f8fafc;
}

.handoff-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
    min-height: 0;
}

.handoff-row-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.handoff-row-body {
    width: 100%;
    min-width: 0;
}

.handoff-row-check-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.handoff-row-chips {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: 3px 4px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    vertical-align: top;
}

.handoff-chip {
    display: inline-block;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 7.5em;
}

.handoff-chip--date {
    background: #eef4ff;
    color: #3182f6;
    max-width: none;
}

.handoff-chip--room {
    background: #fff4e6;
    color: #c96f00;
}

.handoff-chip--author {
    background: #f0f0f5;
    color: #6b7684;
    font-weight: 600;
}

.handoff-row-body .handoff-row-text {
    flex: none;
    width: 100%;
}

.handoff-row-text {
    flex: 1 1 0%;
    min-width: 0;
    align-self: stretch;
    text-align: left;
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-pack: start;
    -webkit-box-align: start;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
}

.handoff-row-actions {
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.handoff-row-body .memo-sheet-inline-edit-wrap {
    width: 100%;
}

.memo-handoff-prio-select--mini {
    flex-shrink: 0;
    align-self: center;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
    padding: 2px 18px 2px 6px;
    margin: 0;
    box-sizing: border-box;
    min-width: 0;
    max-width: 7.5em;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    border-radius: 4px;
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%236b7684' d='M2 2l2 2 2-2'/%3E%3C/svg%3E");
}

.memo-handoff-prio-select--mini.badge-prio--urgent {
    background-color: #fee4e2;
    color: #c62828;
}

.memo-handoff-prio-select--mini.badge-prio--normal {
    background-color: #fff4e0;
    color: #b45309;
}

.memo-handoff-prio-select--mini.badge-prio--fyi {
    background-color: #eef1f5;
    color: #6b7684;
}

.memo-handoff-prio-select--mini:focus {
    outline: 2px solid #3182f6;
    outline-offset: 1px;
}

.memo-sheet-label-handoff-prio {
    flex: 0 0 auto;
    min-width: 0;
}

.badge-prio {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-prio--urgent {
    background: #fee4e2;
    color: #c62828;
}

.badge-prio--normal {
    background: #fff4e0;
    color: #b45309;
}

.badge-prio--fyi {
    background: #eef1f5;
    color: #6b7684;
}

.memo-done-dash {
    color: #c9cdd4;
    font-size: 13px;
}

.memo-sheet-routine {
    margin-top: 18px;
    background: #fafbfc;
    border-radius: 14px;
    padding: 10px 14px 14px;
    border: 1px dashed #d0d7e0;
}

.memo-sheet-routine-summary {
    font-weight: 600;
    cursor: pointer;
    color: #6b7684;
    font-size: 14px;
}

.memo-sheet-routine[open] .memo-sheet-routine-summary {
    margin-bottom: 12px;
}

.memo-sheet-other-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #eaeef2;
    border-radius: 12px;
}

.memo-sheet-other-item.handoff-row {
    align-items: flex-start;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
}

.memo-sheet-other-item--urgent {
    border-left: 4px solid #f04452;
    box-shadow: 0 1px 4px rgba(240, 68, 82, 0.12);
}

.memo-sheet-other-item.handoff-row.memo-sheet-other-item--urgent {
    border-left-width: 3px;
    box-shadow: none;
}

.memo-sheet-other-item--normal {
    border-left: 4px solid #f5a623;
}

.memo-sheet-other-item.handoff-row.memo-sheet-other-item--normal {
    border-left-width: 3px;
}

.memo-sheet-other-item--fyi {
    border-left: 4px solid #c9cdd4;
}

.memo-sheet-other-item.handoff-row.memo-sheet-other-item--fyi {
    border-left-width: 3px;
}

.memo-sheet-other-body {
    flex: 1;
    min-width: 0;
}

.memo-sheet-other-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.memo-sheet-handoff .memo-sheet-check {
    width: 17px;
    height: 17px;
    margin: 0;
}

body.memo-page--sheet .memo-page-user-info {
    position: fixed;
    bottom: 12px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 13px;
    z-index: 100;
}
