/* =========================================================
   JET Dashboard - Main Page
   static/css/dashboard_main.css

   금일공사현황(1페이지) 전용 CSS
   공통 기본 스타일은 dashboard_common.css에서 관리
   공통 헤더 스타일은 dashboard_header.css에서 관리
   ========================================================= */


/* =========================================================
   MAIN LAYOUT
   ========================================================= */

main {
    padding: 14px 18px 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    min-height: 0;
}

.left,
.right {
    display: flex;
    flex-direction: column;
    gap: 11px;
    min-height: 0;
}

.box {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 5px #0002;
}


/* =========================================================
   금일 주요작업 / 중점 위험요소 / 안전대책
   ========================================================= */

.triple {
    flex: 1.56;
    display: grid;
    grid-template-rows: repeat(3, 1fr);
}

.trow {
    display: grid;
    grid-template-columns: 265px 1fr;
    border-bottom: 1px solid var(--line);
}

.trow:last-child {
    border-bottom: 0;
}

.lab {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 24px;
    color: #fff;
}

.lab1 {
    background: linear-gradient(135deg, #c3133b, #9d2937);
}

.lab2 {
    background: linear-gradient(135deg, #45494c, #595d60);
}

.lab3 {
    background: linear-gradient(135deg, #998e90, #b2a5a5);
}

.lab svg {
    width: 58px;
    height: 58px;
    fill: currentColor;
    flex: 0 0 58px;
}

.lab b {
    font-size: 23px;
    white-space: nowrap;
}

.lab small {
    display: block;
    font-size: 12px;
    margin-top: 10px;
}

.entry {
    padding: 28px 20px;
    font-size: 17px;
    color: #214b7a;
}

[contenteditable] {
    outline: none;
}

[contenteditable]:focus {
    background: #fffbe7;
}


/* =========================================================
   공지사항
   ========================================================= */

.notice {
    flex: .57;
    display: grid;
    grid-template-columns: 145px 1fr;
}

.noticePhoto {
    background: url('../images/notice-photo.jpg') center/cover no-repeat;
}

.noticeMain {
    display: grid;
    grid-template-rows: 55px 1fr;
}

.head {
    height: 50px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 16px;
}

.head svg {
    width: 30px;
    height: 30px;
    fill: var(--red);
}

.head b {
    font-size: 21px;
    color: #071d3b;
}

.head small {
    font-size: 10px;
    color: var(--muted);
    margin-left: 5px;
}

.more {
    margin-left: auto;
    font-size: 14px;
}

.noticeText {
    border-top: 1px solid var(--line);
    padding: 23px 25px;
    font-size: 16px;
    color: #214b7a;
}


/* =========================================================
   금일 투입인원
   ========================================================= */

.workforce {
    flex: .76;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th,
td {
    border: 1px solid #c4cdd4;
    text-align: center;
    height: 37px;
    font-size: 14px;
}

th {
    background: #dfe4e8;
}

.workforce th:first-child,
.workforce th:last-child {
    background: linear-gradient(135deg, #c21539, #a31f35);
    color: #fff;
}

.workforce th:first-child {
    width: 18%;
}

.workforce th:nth-child(2),
.workforce th:nth-child(3),
.workforce th:nth-child(4) {
    width: 10%;
}

.workforce th:last-child {
    width: 52%;
}

.workforce td:last-child {
    background: #fff2f3;
}

.workforce td:first-child {
    font-weight: 800;
}

.total td {
    background: #dfe4e8 !important;
}


/* =========================================================
   위험작업
   ========================================================= */

.risk {
    flex: .57;
}

.grid3 {
    display: grid;
    grid-template-columns: 160px repeat(4, 1fr);
    grid-template-rows: repeat(3, 40px);
    border-top: 1px solid var(--line);
}

.grid3>* {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.rowlab {
    background: linear-gradient(135deg, #c31539, #9f2035);
    color: #fff;
    font-weight: 800;
}

label {
    gap: 9px;
}

input[type="checkbox"] {
    width: 17px;
    height: 17px;
}


/* =========================================================
   작업허가
   ========================================================= */

.permit {
    flex: .42;
}

.pgrid {
    display: grid;
    grid-template-columns: 160px repeat(3, 1fr);
    grid-template-rows: repeat(2, 40px);
    border-top: 1px solid var(--line);
}

.pgrid>* {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}


/* =========================================================
   안전활동 실시 신호등
   ========================================================= */

.safety {
    flex: .55;
    display: grid;
    grid-template-columns: 190px 1fr;
}

.activityPhoto {
    background: url('../images/activity-photo.jpg') center 42%/cover no-repeat;
}

.safetyMain {
    display: grid;
    grid-template-rows: 51px 1fr;
}

.signals {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.sig {
    text-align: center;
    border-right: 1px solid var(--line);
    padding-top: 10px;
    font-size: 11px;
}

.sig b {
    display: block;
    font-size: 14px;
    margin-top: 3px;
}

.lights {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 26px;
}

.light {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #dfe3e6;
    border: 1px solid #c4cbd0;
    cursor: pointer;
    transition: .15s;
}

.light:hover {
    transform: scale(1.08);
}

.red.on {
    background: #e21838;
    border-color: #c9122d;
    box-shadow: 0 0 8px #e2183877;
}

.orange.on {
    background: #f39a12;
    border-color: #d88100;
    box-shadow: 0 0 8px #f39a1277;
}

.green.on {
    background: #22a447;
    border-color: #178b39;
    box-shadow: 0 0 8px #22a44777;
}

svg.icon {
    display: block;
}

.safetyMain>.head {
    border-bottom: 1px solid var(--line);
}


/* =========================================================
   LAYOUT STABILITY
   ========================================================= */

main,
.left,
.right,
.box,
.trow,
.entry,
.noticeMain,
.safetyMain,
.signals,
.sig,
.grid3,
.pgrid,
.workforce,
.risk,
.permit,
.safety {
    min-width: 0;
}

.grid3>*,
.pgrid>* {
    min-width: 0;
    overflow: hidden;
}

.grid3 label,
.pgrid label {
    white-space: nowrap;
    padding: 0 7px;
}

.pgrid label:last-child {
    font-size: 12px;
}

.head {
    min-width: 0;
}

.head b {
    white-space: nowrap;
}

.head small {
    white-space: nowrap;
}

.safety .head b {
    font-size: 19px;
}

.safety .head small {
    font-size: 9px;
}

.entry {
    white-space: normal;
    word-break: keep-all;
}

.noticeText {
    white-space: normal;
    word-break: keep-all;
}


/* =========================================================
   금일 작업 공종 선택
   ========================================================= */

.today-entry {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.today-entry::before {
    display: none !important;
}

.trade-status {
    height: 48px;
    min-height: 48px;
    border-bottom: 1px solid #d6dde2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    background: linear-gradient(#fbfcfd, #f5f7f8);
}

.trade-title {
    font-size: 13px;
    font-weight: 800;
    color: #5b6b79;
    margin-right: 4px;
    white-space: nowrap;
}

.trade-btn {
    height: 32px;
    min-width: 78px;
    padding: 0 13px;
    border: 1px solid #cbd3d9;
    border-radius: 17px;
    background: #fff;
    color: #5f6d78;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background .15s,
        border-color .15s,
        color .15s,
        box-shadow .15s;
}

.trade-btn .bulb {
    width: 18px;
    height: 18px;
    fill: #aeb7be;
    transition: fill .15s, filter .15s;
}

.trade-btn:hover {
    border-color: #aab5bd;
    background: #fafbfc;
}

.trade-btn.on {
    border-color: #e0a900;
    background: #fff8d7;
    color: #5b4700;
    box-shadow: 0 0 0 2px #ffd63322 inset;
}

.trade-btn.on .bulb {
    fill: #ffc400;
    filter: drop-shadow(0 0 4px #ffc400aa);
}

.today-work-text {
    flex: 1;
    padding: 22px 20px;
    font-size: 17px;
    color: #214b7a;
    outline: none;
}

.today-work-text:focus {
    background: #fffbe7;
}


/* =========================================================
   대시보드 항목 목록
   ========================================================= */

.dashboard-item-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-item-list li {
    position: relative;
    margin: 0 0 3px 0;
    padding-left: 16px;
    line-height: 1.35;
}

.dashboard-item-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d4143a;
}

.dashboard-item-list li:last-child {
    margin-bottom: 0;
}


/* =========================================================
   1500px 이하 화면 대응
   ========================================================= */

@media (max-width: 1500px) {

    .trow {
        grid-template-columns: 235px 1fr;
    }

    .lab {
        gap: 15px;
        padding: 0 18px;
    }

    .lab svg {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    .lab b {
        font-size: 20px;
    }

    .safety {
        grid-template-columns: 165px 1fr;
    }

    .grid3,
    .pgrid {
        grid-template-columns: 145px repeat(4, 1fr);
    }

    .pgrid {
        grid-template-columns: 145px repeat(3, 1fr);
    }

    .trade-status {
        gap: 6px;
        padding: 0 12px;
    }

    .trade-btn {
        min-width: 68px;
        padding: 0 9px;
        font-size: 13px;
    }

    .trade-title {
        font-size: 12px;
    }
}