﻿/* ═══════════════════════════════════════════
   PMIS — Daily Activity  |  Responsive CSS
   ═══════════════════════════════════════════ */

/* ── Layout ── */
.container-fluid {
    width: 100%;
}

    .container-fluid.panel-body {
        padding: 16px 20px;
    }

/* ── PMIS Header ── */
.pmis-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #16a34a 100%);
    padding: 14px 28px;
}

    .pmis-header h4 {
        margin: 0;
        color: #fff;
        font-size: 20px;
        font-weight: 700;
        letter-spacing: 0.4px;
    }

    .pmis-header span {
        color: rgba(255,255,255,0.65);
        font-size: 12px;
        letter-spacing: 0.5px;
    }

/* ── Table header ── */
#tblDailyActivity thead th {
    background: #1a1b1d !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 8px 6px;
    white-space: nowrap;
}

#tblDailyActivity thead th {
    font-weight: 700 !important;
    font-size: 14px !important;
    white-space: nowrap;
}
    #tblDailyActivity thead th:first-child {
        border-top-left-radius: 8px;
    }

    #tblDailyActivity thead th:last-child {
        border-top-right-radius: 8px;
    }

#tblDailyActivity tbody td {
    border-color: #eef2f7 !important;
    padding: 6px 8px;
    vertical-align: middle;
}

#tblDailyActivity tbody tr.row-done td {
    background-color: #f0fdf4 !important;
}

/* ── Description cell ── */
.desc-cell {
    max-width: 280px;
    font-size: 12px;
    line-height: 1.5;
    word-break: break-word;
}

.desc-toggle {
    color: #1db954;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

    .desc-toggle:hover {
        text-decoration: underline;
    }

/* ── DataTable sorting icons ── */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* ── DataTable toolbar ── */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.dataTables_wrapper .dataTables_length select {
    height: 34px;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    padding: 0 8px;
}

.dataTables_wrapper .dataTables_filter label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .dataTables_wrapper .dataTables_filter label:before {
        content: "\f002";
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #FFFFFF !important;
        font-size: 13px;
    }

.dataTables_wrapper .dataTables_filter input {
    width: 220px !important;
    height: 36px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    padding-left: 34px !important;
    padding-right: 10px;
    box-shadow: none;
    margin-left: 0 !important;
}

/* ── Export buttons ── */
div.dt-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

    div.dt-buttons .dt-button {
        border-radius: 6px !important;
        padding: 5px 13px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        text-shadow: none !important;
        box-shadow: none !important;
        background-image: none !important;
        cursor: pointer;
        border: 1px solid transparent !important;
    }

        div.dt-buttons .dt-button.da-btn-copy {
            background: #f3f4f6 !important;
            color: #374151 !important;
            border-color: #d1d5db !important;
        }

            div.dt-buttons .dt-button.da-btn-copy:hover {
                background: #e5e7eb !important;
            }

        div.dt-buttons .dt-button.da-btn-csv {
            background: #16a34a !important;
            color: #fff !important;
            border-color: #88eaac !important;
        }

            div.dt-buttons .dt-button.da-btn-csv:hover {
                background: #15803d !important;
            }

        div.dt-buttons .dt-button.da-btn-excel {
            background: #22c55e !important;
            color: #fff !important;
            border-color: #22c55e !important;
        }

            div.dt-buttons .dt-button.da-btn-excel:hover {
                background: #16a34a !important;
            }

        div.dt-buttons .dt-button.da-btn-pdf {
            background: #ef4444 !important;
            color: #fff !important;
            border-color: #ef4444 !important;
        }

            div.dt-buttons .dt-button.da-btn-pdf:hover {
                background: #dc2626 !important;
            }

        div.dt-buttons .dt-button.da-btn-print {
            background: #3b82f6 !important;
            color: #fff !important;
            border-color: #3b82f6 !important;
        }

            div.dt-buttons .dt-button.da-btn-print:hover {
                background: #2563eb !important;
            }

/* ── Action buttons ── */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    margin: 0 3px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none !important;
}

.edit-btn {
    background: #eefbf3;
    border: 1px solid #d8f5e3;
    color: #16a34a !important;
}

.delete-btn {
    background: #fff1f2;
    border: 1px solid #ffd6db;
    color: #ef4444 !important;
}

.blocker-btn {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c !important;
}

.edit-btn:hover {
    background: #e3f8eb;
}

.delete-btn:hover {
    background: #ffe9ec;
}

.blocker-btn:hover {
    background: #ffedd5;
}

/* ── DataTable info ── */
.dataTables_info {
    font-size: 14px;
    color: #64748b;
    padding-top: 8px !important;
}

/* ── Status / Priority / Type badges ── */
.badge-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pending {
    background: #fef9c3;
    color: #854d0e;
}

.badge-inprogress {
    background: #dbeafe;
    color: #1e40af;
}

.badge-done {
    background: #dcfce7;
    color: #166534;
}

.badge-low {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.badge-medium {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-high {
    background: #fff1f2;
    color: #b91c1c;
    border: 1px solid #fecdd3;
}

.badge-cr {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-bug {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.badge-task {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

.badge-blocker-yes {
    background: #fff1f2;
    color: #b91c1c;
    border: 1px solid #fecdd3;
    font-size: 10px;
    padding: 2px 7px;
}

.badge-blocker-no {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    font-size: 10px;
    padding: 2px 7px;
}

/* ── Done filter button ── */
#btnDoneFilter {
   
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    border-color: #15803d;
}

    #btnDoneFilter.btn-done-active {
        background: linear-gradient(135deg, #fcfdf0, #dcfcfb);
    border: 1.5px solid #86efac;
    color: #15803d;
    border-radius: 8px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    }

    #btnDoneFilter:hover {
        opacity: 0.88;
    }

/* ── Done radio (hidden by default) ── */
label.radio-inline[data-status="done"] {
    display: none;
}

/* ── Autocomplete ── */
.ui-autocomplete {
    z-index: 9999 !important;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 13px;
}

.ui-menu-item-wrapper {
    padding: 6px 10px !important;
}

    .ui-menu-item-wrapper.ui-state-active {
        background: #16a34a !important;
        border-color: #16a34a !important;
        color: #fff !important;
    }

/* ── Validation ── */
.form-group.has-error input:not([type="radio"]):not([type="checkbox"]),
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.18) !important;
    background-color: #fff8f8 !important;
}

.form-group.has-error label,
.form-group.has-error .control-label,
.form-group.has-error .radio-inline {
    color: inherit !important;
}

.field-error-msg {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #dc3545;
}

/* ══════════════════════════════════════════
   OTP INLINE SECTION
══════════════════════════════════════════ */

/* OTP row — top-right aligned on desktop, full-width on mobile */
#grp-otp-row {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 6px 0 10px;
}

#grp-otp {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 260px;
}

.otp-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
    border: 1.5px solid #bbf7d0;
    border-radius: 12px;
    padding: 18px 22px 14px;
    position: relative;
}

.otp-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

    .otp-card-title i {
        margin-right: 6px;
        color: #16a34a;
    }

/* Status message bar */
#otpStatusMsg {
    font-size: 12px;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: none;
}

.otp-info-pending {
    background: #fefce8;
    border: 1px solid #fde68a;
    color: #92400e;
}

.otp-info-verified {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

/* Input + button row */
.otp-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

#otpInput {
    flex: 0 0 200px;
    height: 38px;
    margin-top: 10px;
    font-weight: 400;
    letter-spacing: 10px;
    text-align: center;
    border: 2px solid #93c5fd;
    border-radius: 10px;
    color: #1e3a5f;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    #otpInput:focus {
        border-color: #16a34a;
        box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
        outline: none;
    }

    #otpInput:disabled {
        background: #f0fdf4;
        border-color: #86efac;
        color: #15803d;
        cursor: not-allowed;
    }

#btnVerifyInlineOtp {
    height: 48px;
    padding: 0 22px;
    background: linear-gradient(135deg, #1e3a5f, #16a34a);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: opacity 0.2s;
    white-space: nowrap;
}

    #btnVerifyInlineOtp:hover {
        opacity: 0.88;
    }

    #btnVerifyInlineOtp:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Verified badge */
#otpVerifiedBadge {
    display: none;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
    white-space: nowrap;
}

    #otpVerifiedBadge i {
        font-size: 14px;
    }

/* Error below input */
#otpFieldError {
    display: none;
    font-size: 12px;
    color: #ef4444;
    margin-top: 6px;
}

/* Save-locked note */
#otpUnlockNote {
    display: none;
    margin-top: 10px;
    font-size: 12px;
    color: #92400e;
    background: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 7px 12px;
}

    #otpUnlockNote i {
        margin-right: 5px;
    }

/* ── Blocker modal ── */
#blockerModal .modal-header {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-bottom: 1px solid #fed7aa;
}

#blockerModal .modal-title {
    color: #c2410c;
    font-weight: 600;
    font-size: 16px;
}

/* ── Blocked row: red highlight ── */
#tblDailyActivity tbody tr.row-blocked td {
    background-color: #febcbc !important;
   
}


#blockerModal textarea {
    resize: vertical;
    min-height: 120px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    padding: 10px 12px;
}

    #blockerModal textarea:focus {
        border-color: #f97316;
        box-shadow: 0 0 0 2px rgba(249,115,22,0.15);
        outline: none;
    }

#btnSaveBlocker {
    background: #ea580c;
    border-color: #ea580c;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}

    #btnSaveBlocker:hover {
        background: #c2410c;
        border-color: #c2410c;
    }

/* ── Task Conflict modal ── */
#taskConflictModal .modal-header {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border-bottom: 1px solid #fecdd3;
}

#taskConflictModal .modal-title {
    color: #b91c1c;
    font-weight: 700;
    font-size: 16px;
}

/* ── Task Reuse modal ── */
#taskReuseModal .modal-header {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-bottom: 1px solid #fde68a;
}

#taskReuseModal .modal-title {
    color: #92400e;
    font-weight: 700;
    font-size: 16px;
}

#btnConfirmReuse {
    background: #d97706;
    border-color: #d97706;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
}

    #btnConfirmReuse:hover {
        background: #b45309;
        border-color: #b45309;
    }

/* ══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════ */

/* ── Large tablets / small laptops (max 991px) ── */
@media (max-width: 991px) {
    .pmis-header {
        padding: 12px 20px;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 180px !important;
    }
}

/* ── Tablets (max 767px) ── */
@media (max-width: 767px) {

    /* Header */
    .pmis-header {
        padding: 10px 14px;
        text-align: center;
    }

        .pmis-header h4 {
            font-size: 16px;
        }

    /* Panel body padding */
    .container-fluid.panel-body {
        padding: 10px 12px;
    }

    /* OTP — full width on mobile, centered */
    #grp-otp-row {
        justify-content: stretch;
    }

    #grp-otp {
        align-items: stretch;
        width: 100%;
        min-width: unset;
    }

    .otp-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    #otpInput {
        flex: unset;
        width: 100%;
    }

    #btnVerifyInlineOtp {
        width: 100%;
    }

    /* DataTable toolbar stacking */
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none !important;
        text-align: left !important;
        margin-bottom: 8px;
    }

    .dataTables_wrapper .dataTables_filter {
        display: flex;
        flex-direction: column;
    }

        .dataTables_wrapper .dataTables_filter input {
            width: 100% !important;
            margin-top: 4px;
        }

        .dataTables_wrapper .dataTables_filter label:before {
            top: 28px;
        }

    div.dt-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    /* Done filter button full width */
    #btnDoneFilter {
        width: 100%;
        text-align: center;
    }

    /* Save button full width */
    .btn-area .btn#btnSave {
        width: 100%;
    }

    /* DataTable info + pagination stacking */
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        text-align: center !important;
        margin-top: 8px;
    }

    /* Modals — constrain width on mobile */
    .modal-dialog {
        max-width: 95vw !important;
        margin: 10px auto !important;
    }

    /* Radio groups wrap */
    .radio-inline {
        display: inline-block;
        margin-right: 10px;
        margin-bottom: 4px;
    }
}

/* ── Small phones (max 575px) ── */
@media (max-width: 575px) {

    .pmis-header h4 {
        font-size: 14px;
    }

    .container-fluid.panel-body {
        padding: 8px;
    }

    /* Form labels smaller */
    label {
        font-size: 13px;
    }

    .form-control {
        font-size: 13px;
    }

    /* Radio buttons: stack vertically */
    #grp-type .radio-inline,
    #grp-status .radio-inline,
    #grp-priority .radio-inline {
        display: block;
        margin-bottom: 4px;
    }

    /* Export buttons: smaller */
    div.dt-buttons .dt-button {
        padding: 5px 9px !important;
        font-size: 12px !important;
    }

    /* Action buttons in table */
    .action-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
        margin: 0 1px;
    }

    /* Desc cell narrower */
    .desc-cell {
        max-width: 160px;
    }

    /* Pagination buttons */
    .dataTables_wrapper .paginate_button {
        padding: 3px 7px !important;
        font-size: 12px;
    }
}


/* ── Validation: ONLY the input/select/textarea box turns red ── */
.form-group.has-error input:not([type="radio"]):not([type="checkbox"]),
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.18) !important;
    background-color: #fff8f8 !important;
}

/* ── Radio/checkbox groups: no label colour change ── */
.form-group.has-error .radio-inline,
.form-group.has-error label {
    color: inherit !important;
}

/* ── Inline error message under the field ──
    display: block;
    margin-top: 4
    font-size: 12px;
    color: #dc3545;
}

/* ── OTP error ── */
#otpFieldError {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #dc3545;
}
table.dataTable span.dtcc span.dtcc-button-icon {
    display: inline-block;
    box-sizing: content-box;
    color: #FFFFFF;
    vertical-align: middle;
    line-height: var(--dtcc-button-icon_size);
    height: var(--dtcc-button-icon_size);
}
#btnRefreshTable {
    background: linear-gradient(135deg, #1e3a5f, #0f172a) !important;
    border: 1.5px solid #15803d;
    color: #fff;
    border-radius: 8px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    #btnRefreshTable:hover {
        opacity: 0.88;
    }