#detailPage .detail-heading { margin-bottom: 16px; }
#detailPage .breadcrumb { margin: 0 0 12px; color: #617082; }
#detailPage .notice { max-width: 920px; margin: 12px 0; padding: 13px 16px; border: 1px solid #b6e4c6; border-radius: 8px; background: #eff9ec; color: #146536; }
#detailPage .detail-layout { display: flex; gap: 18px; }
#detailPage .detail-main { min-width: 0; flex: 1; }
#detailPage .detail-main .card, #detailPage .checklist { margin-bottom: 16px; padding: 16px; }
#detailPage .detail-main h2, #detailPage .checklist h2 { margin: 0 0 8px; font-size: 18px; }
#detailPage .detail-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px 18px; }
#detailPage .detail-fields label { display: block; }
#detailPage .detail-fields label > input, #detailPage .detail-fields label > select, #detailPage .detail-fields label > textarea { margin-top: 6px; }
#detailPage .detail-fields .k-datetimepicker { display: block; width: 100%; height: 34px; margin-top: 6px; box-sizing: border-box; border: 1px solid #ced5dd !important; border-radius: 5px; background: #fff; overflow: hidden; }
#detailPage .detail-fields .k-datetimepicker .k-picker-wrap { display: flex; width: 100%; height: 32px; padding: 0; border: 0 !important; border-radius: 4px; background: #fff; box-shadow: none; }
#detailPage .detail-fields .k-datetimepicker .k-input { flex: 1; min-width: 0; width: 0; height: 32px; min-height: 32px; padding: 0 9px; border: 0; box-shadow: none; line-height: 32px; }
#detailPage .detail-fields .k-datetimepicker .k-select { display: flex; flex: 0 0 58px; align-items: center; justify-content: space-around; height: 32px; border-left: 1px solid #ced5dd; }
#detailPage .detail-fields .k-datetimepicker .k-link-date,
#detailPage .detail-fields .k-datetimepicker .k-link-time { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 100%; color: #43576d; text-decoration: none; }
#detailPage .detail-fields .k-datetimepicker .glyphicon { top: 0; font-size: 13px; line-height: 1; }
#detailPage .detail-fields .poll-datetime-actions { display: flex; flex: 0 0 60px; align-self: stretch; border-left: 1px solid #ced5dd; }
#detailPage .detail-fields .poll-datetime-actions button { display: inline-flex; align-items: center; justify-content: center; min-width: 29px; width: 29px; height: 100%; padding: 0; border: 0; border-radius: 0; background: #fff; color: #43576d; }
#detailPage .detail-fields .poll-datetime-picker .k-select { display: none !important; }
#detailPage .detail-fields .poll-datetime-actions button + button { border-left: 1px solid #e2e7eb; }
#detailPage .detail-fields .poll-datetime-actions button:hover { background: #edf6f1; }
#detailPage .detail-fields .k-datetimepicker .k-icon { width: 24px; height: 24px; margin: 0; background-image: none; text-indent: 0; font-size: 0; overflow: hidden; }
#detailPage .detail-fields .k-datetimepicker .k-icon::before { display: block; font-family: 'Glyphicons Halflings'; font-size: 12px; line-height: 24px; text-align: center; color: #43576d; }
#detailPage .detail-fields .k-datetimepicker .k-i-calendar::before { content: "\e109"; }
#detailPage .detail-fields .k-datetimepicker .k-i-clock::before { content: "\e023"; }
#detailPage .detail-fields textarea { width: 100%; min-height: 54px; padding: 8px 10px; border: 1px solid #ced5dd; border-radius: 5px; resize: vertical; }
#detailPage .note-field { grid-column: 1 / -1; }
#detailPage .meal-table { width: 100%; margin-top: 8px; border: 1px solid var(--border); border-collapse: separate; border-spacing: 0; border-radius: 7px; overflow: hidden; }
#detailPage .meal-table th, #detailPage .meal-table td { padding: 10px; border-bottom: 1px solid #e6ebf0; text-align: left; }
#detailPage .meal-table th { background: #f6f8fa; text-align: center; }
#detailPage .meal-table .poll-day-check { width: 110px; text-align: center; }
#detailPage .meal-table .poll-day-check input { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--green); }
#detailPage .menu-option { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 10px; min-width: 300px; padding: 8px; border: 1px solid #dce2e7; border-radius: 8px; background: #fbfdfc; }
#detailPage .menu-option img, #detailPage .menu-option-placeholder { width: 124px; height: 94px; border-radius: 7px; object-fit: cover; }
#detailPage .menu-option-placeholder { display: grid; place-items: center; background: #eef2f0; color: var(--muted); font-size: 11px; }
#detailPage .menu-option strong { display: block; margin-bottom: 4px; color: #087443; }
#detailPage .menu-option p { margin: 2px 0; color: #46586b; font-size: 12px; line-height: 1.25; }
#detailPage .menu-option p b { color: #263645; }
#detailPage .empty { text-align: center !important; color: var(--muted); }
#detailPage .add-day { width: 48%; margin-top: 12px; border-style: dashed; color: #087443; }
#detailPage .checklist { flex: 0 0 310px; }
#detailPage .checklist p { color: #146536; }
#approvalChecklist { margin: 12px 0 0; padding: 0; list-style: none; }
#approvalChecklist li { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 9px; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
#approvalChecklist .glyphicon { flex-shrink: 0; top: 2px; }
#approvalChecklist .check-passed { color: #146536; }
#approvalChecklist .check-pending { color: #a65b00; }
#detailPage .checklist hr { margin: 20px 0; border: 0; border-top: 1px solid var(--border); }
#detailPage .checklist { overflow-y: auto; min-height: 0; }
#detailPage .phone-preview { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 300px; height: 590px; margin: 12px auto 4px; padding: 0 7px 12px; border: 8px solid #17191b; border-radius: 42px; background: #fff; color: #292c30; box-shadow: 0 0 0 2px #818589, 0 0 0 4px #dedfe0, 0 8px 18px #0002; overflow: hidden; overflow-wrap: anywhere; }
#detailPage .phone-preview::before { content: ""; position: absolute; top: -1px; left: 26%; width: 48%; height: 19px; border-radius: 0 0 13px 13px; background: #17191b; z-index: 1; }
#detailPage .preview-status { display: flex; justify-content: space-between; flex-shrink: 0; padding: 7px 13px 10px; font-size: 9px; line-height: 12px; }
#detailPage .preview-header { flex-shrink: 0; padding: 5px 3px 7px; text-align: center; border-bottom: 1px solid #eee; }
#detailPage .phone-preview h3 { margin: 0 0 5px; font-size: 12px; line-height: 1.35; font-weight: 600; }
#detailPage .preview-header p { margin: 0; color: #555; font-size: 11px; }
#detailPage .preview-days { flex: 1; min-height: 0; padding: 8px 0; overflow-y: auto; scrollbar-width: thin; }
#detailPage .preview-day + .preview-day { margin-top: 10px; }
#detailPage .preview-day h4 { margin: 0 0 6px; font-size: 11px; line-height: 1.3; font-weight: 600; }
#detailPage .preview-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
#detailPage .preview-option { display: flex; flex-direction: column; align-items: center; min-width: 0; margin: 0; padding: 3px 3px 5px; border: 1px solid #e6e8eb; border-radius: 8px; background: #fff; text-align: center; cursor: pointer; }
#detailPage .preview-option:has(input:checked) { border-color: #007c43; background: #f0f9f3; }
#detailPage .preview-option img, #detailPage .preview-option .menu-option-placeholder { display: block; width: 100%; height: 68px; object-fit: cover; border-radius: 6px; }
#detailPage .preview-option .menu-option-placeholder { display: grid; place-items: center; font-size: 10px; }
#detailPage .preview-option strong { margin: 5px 0 3px; font-size: 10px; line-height: 1.3; }
#detailPage .preview-option .preview-dishes { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0 0 3px; color: #62666b; font-size: 8px; line-height: 1.35; }
#detailPage .preview-option small { margin-top: auto; color: #85898d; font-size: 8px; }
#detailPage .preview-option input { width: 12px; height: 12px; margin: 5px 0 0; padding: 0; accent-color: #007c43; cursor: pointer; }
#detailPage .preview-more { flex-shrink: 0; width: 100%; margin-top: 3px; padding: 7px 0 0; border: 0; border-top: 1px solid #eee; border-radius: 0; color: #333; background: white; font-size: 11px; }
#detailPage .preview-more:hover { color: #007c43; }
#detailPage .phone-preview .empty { padding: 16px 5px; font-size: 11px; }
#detailPage .detail-actions { display: flex; justify-content: flex-start; gap: 12px; padding: 8px 0; }
#detailPage .detail-actions button { min-width: 120px; }
body.poll-detail-open.poll-editing #detailPage #btnCancel,
body.poll-detail-open.poll-editing #detailPage #btnSave { display: inline-block !important; }
body.poll-detail-open.poll-editing #detailPage #btnUpdate,
body.poll-detail-open.poll-editing #detailPage #btnDelete,
body.poll-detail-open.poll-editing #detailPage #btnApprove,
body.poll-detail-open.poll-editing #detailPage #btnRevoke { display: none !important; }
body.poll-detail-open:not(.poll-editing) #detailPage #btnCancel,
body.poll-detail-open:not(.poll-editing) #detailPage #btnSave { display: none !important; }
body.poll-detail-open:not(.poll-editing) #detailPage #btnUpdate,
body.poll-detail-open:not(.poll-editing) #detailPage #btnDelete,
body.poll-detail-open:not(.poll-editing) #detailPage #btnApprove,
body.poll-detail-open:not(.poll-editing) #detailPage #btnRevoke { display: inline-block !important; }

body.poll-detail-open #detailPage .detail-heading { margin-bottom: 5px; }
body.poll-detail-open #detailPage .detail-heading h1 { margin-bottom: 2px; }
body.poll-detail-open #detailPage .notice { margin: 5px 0; padding: 7px 12px; }
body.poll-detail-open #detailPage .detail-main > .card:first-child { flex: 0 0 auto; margin-bottom: 7px; padding: 9px 12px; }
body.poll-detail-open #detailPage .detail-main > .card:first-child h2 { margin-bottom: 6px; }
body.poll-detail-open #detailPage .detail-fields label { line-height: 15px; }
body.poll-detail-open #detailPage .detail-fields label > input,
body.poll-detail-open #detailPage .detail-fields label > select { height: 31px; margin-top: 3px; padding-top: 5px; padding-bottom: 5px; }
body.poll-detail-open #detailPage .detail-fields .k-datetimepicker { height: 31px; margin-top: 3px; }
body.poll-detail-open #detailPage .detail-fields .k-datetimepicker .k-picker-wrap,
body.poll-detail-open #detailPage .detail-fields .k-datetimepicker .k-input,
body.poll-detail-open #detailPage .detail-fields .k-datetimepicker .k-select { height: 29px; min-height: 29px; line-height: 29px; }
body.poll-detail-open #detailPage .detail-fields textarea { min-height: 31px; height: 34px; margin-top: 3px; }
body.poll-detail-open #detailPage .detail-main > .card:last-child { flex: 1 1 70%; min-height: 0; margin-bottom: 0; padding: 9px 12px; overflow: auto; }
body.poll-detail-open #detailPage .meal-table { margin-top: 5px; }
body.poll-detail-open #detailPage .meal-table thead th { position: sticky; top: 0; z-index: 1; }
body.poll-detail-open #detailPage .meal-table th,
body.poll-detail-open #detailPage .meal-table td { padding: 6px; }

@media (max-width: 900px) {
    #detailPage .detail-layout { display: block; }
    #detailPage .checklist { display: none; }
    #detailPage .detail-fields { grid-template-columns: 1fr 1fr; }
    #detailPage .note-field { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    #detailPage .detail-fields { grid-template-columns: 1fr; }
    #detailPage .note-field { grid-column: 1 / -1; }
    #detailPage .detail-actions { flex-wrap: wrap; }
    #detailPage .add-day { width: 100%; }
}

/* Danh sách đợt bình chọn dùng khung chung /css/qlna-list-page.css. */
body:not(.detail-open) .content { max-width: none; padding: 0; }
#listPage #filterForm { padding: 0; }
#listPage .poll-filter-grid {
    grid-template-columns: minmax(120px, .55fr) repeat(2, minmax(140px, .65fr)) minmax(145px, .65fr) minmax(230px, 1.2fr) auto;
}
#listPage .qlna-list-filter-actions { white-space: nowrap; }
#listPage .qlna-list-filter-actions .qlna-list-btn { min-width: 92px; }
#listPage .qlna-list-bottom-actions #btnAdd { min-width: 190px; }
#listPage #grid .k-grid-content tr:not(.kendo-empty-row) { cursor: pointer; }
#listPage #grid .k-grid-content td { height: 48px; padding: var(--qlna-list-cell-padding); }

#listPage #grid .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 8px;
    border: 0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}
#listPage #grid .badge::before { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; content: ""; }
#listPage #grid .badge.draft { background: #fff4df; color: #9d5d00; }
#listPage #grid .badge.active { background: #e8f6ed; color: #087538; }
#listPage #grid .badge.stopped { background: red; color: white; }

#listPage #grid .row-actions.action-icons { align-items: center; justify-content: center; gap: 4px; }
#listPage #grid .row-actions .action-icon {
    display: inline-flex;
    width: 28px;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d5dae0;
    border-radius: 5px;
    background: #fff;
    line-height: 1;
}
#listPage #grid .row-actions .action-icon:hover { border-color: var(--green); background: #edf6f1; }

@media (max-width: 1250px) {
    #listPage .poll-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    #listPage .poll-search-field { grid-column: span 2; }
    #listPage .qlna-list-filter-actions { grid-column: span 2; justify-content: flex-end; }
}

@media (max-width: 767px) {
    #listPage .poll-filter-grid { grid-template-columns: 1fr; }
    #listPage .poll-search-field,
    #listPage .qlna-list-filter-actions { grid-column: auto; }
    #listPage .qlna-list-filter-actions { justify-content: stretch; }
    #listPage .qlna-list-filter-actions .qlna-list-btn { min-width: 0; }
    #listPage #grid .badge { padding: 4px 6px; font-size: 10px; }
    #listPage #grid .row-actions .action-icon { width: 27px; min-width: 27px; height: 27px; }
}
