html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

body {
    font-family: "Times New Roman";
    font-size: 14px;
    margin: 20px;
}

.header {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

.form-no {
    text-align: right;
    font-weight: bold;
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

td {
    padding: 6px;
    vertical-align: top;
}

/* PRINT RULES */
@media print {
    button {
        display: none;
    }

    body {
        margin: 0;
    }
}
/* ===== FIX FOR CREATE PAGE BUTTON NOT CLICKABLE ===== */

.ver-create-page {
    position: relative;
    z-index: 10;
}

    .ver-create-page form {
        position: relative;
        z-index: 11;
    }

.ver-submit-btn {
    position: relative;
    z-index: 12;
    pointer-events: auto !important;
    cursor: pointer;
}

/* Disable any global overlay */
body::before,
body::after {
    pointer-events: none;
}
/* ===== GLOBAL ===== */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f6f9;
    color: #212529;
}

/* ===== HEADER ===== */
.main-header {
    background: linear-gradient(90deg, #0d6efd, #0a58ca);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.navbar-brand {
    font-size: 1.2rem;
    letter-spacing: 0.4px;
}

.nav-link {
    font-weight: 500;
    margin-left: 15px;
    transition: opacity 0.2s ease;
}

    .nav-link:hover {
        opacity: 0.85;
    }

/* ===== CONTENT ===== */
.content-wrapper {
    min-height: calc(100vh - 130px);
    padding: 30px 0;
}

/* Card-style default for pages */
.card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* ===== FOOTER ===== */
.main-footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 0;
    font-size: 0.9rem;
    color: #6c757d;
}

    .main-footer a {
        color: #0d6efd;
        text-decoration: none;
    }

        .main-footer a:hover {
            text-decoration: underline;
        }
/* Email sending overlay */
#emailLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-box {
    text-align: center;
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}


/* ===============================
   SUPERVISOR DASHBOARD
================================ */

.supervisor-page {
    margin-top: 15px;
}

/* Tabs */
.supervisor-tabs .nav-link {
    font-weight: 500;
    color: #555;
}

    .supervisor-tabs .nav-link.active {
        background-color: #0d6efd;
        color: #fff;
        border-color: #0d6efd;
    }

/* Left filter panel */
.supervisor-filters .list-group-item {
    border-radius: 0;
    font-weight: 500;
    cursor: pointer;
}

    .supervisor-filters .list-group-item.active {
        background-color: #198754;
        border-color: #198754;
        color: #fff;
    }

/* Card */
.supervisor-card {
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

/* Table */
.supervisor-table thead {
    background-color: #f8f9fa;
}

.supervisor-table th {
    font-size: 14px;
    font-weight: 600;
    vertical-align: middle;
}

.supervisor-table td {
    font-size: 14px;
    vertical-align: middle;
}

/* Hover */
.supervisor-table tbody tr:hover {
    background-color: #f1f5ff;
}

/* Button */
.supervisor-table .btn {
    padding: 3px 10px;
    font-size: 13px;
}
/* ===============================
   SUPERVISOR DASHBOARD (PRO UI)
================================ */
.supervisor-header {
    background: #ffffff;
    border-left: 5px solid #0d6efd;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.supervisor-header h4 {
    font-weight: 600;
    margin-bottom: 2px;
}

.supervisor-header span {
    font-size: 14px;
}

/* Filter bar */
.supervisor-filter-bar {
    border-left: 4px solid #0d6efd;
    background: #f8f9fa;
}

/* Tabs */
.supervisor-tabs {
    border-bottom: 2px solid #dee2e6;
}

    .supervisor-tabs .nav-link {
        background-color: #f1f3f5;
        margin-right: 5px;
        border-radius: 4px 4px 0 0;
        color: #495057;
        font-weight: 500;
        padding: 8px 18px;
    }

        .supervisor-tabs .nav-link:hover {
            background-color: #e9ecef;
        }

        .supervisor-tabs .nav-link.active {
            background-color: #0d6efd;
            color: #fff;
            border-bottom: 2px solid #0d6efd;
        }

/* Left filters */
.supervisor-filters .list-group-item {
    font-weight: 500;
    border-radius: 0;
}

    .supervisor-filters .list-group-item.active {
        background-color: #198754;
        border-color: #198754;
        color: #fff;
    }

/* Card */
.supervisor-card {
    border-radius: 4px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

/* Table */
.supervisor-table thead {
    background-color: #f8f9fa;
}

.supervisor-table th {
    font-size: 14px;
    font-weight: 600;
}

.supervisor-table td {
    font-size: 14px;
}

.supervisor-table tbody tr:hover {
    background-color: #f1f5ff;
}
/* ===============================
   SUPERVISOR TOP BAR
================================ */

.supervisor-top-bar {
    border-left: 4px solid #0d6efd;
    background-color: #f8f9fa;
}

/* Tabs */
.supervisor-tabs {
    margin-bottom: 0;
}

    .supervisor-tabs .nav-link {
        background-color: #e9ecef;
        margin-right: 6px;
        border-radius: 4px;
        color: #495057;
        font-weight: 500;
        padding: 8px 18px;
    }

        .supervisor-tabs .nav-link:hover {
            background-color: #dee2e6;
        }

        .supervisor-tabs .nav-link.active {
            background-color: #0d6efd;
            color: #fff;
        }

/* Date filter inputs */
.supervisor-top-bar input[type="date"] {
    font-size: 14px;
}

.supervisor-top-bar .btn {
    font-size: 14px;
    font-weight: 500;
}



.supervisor-tabs .nav-link span.count {
    font-weight: 600;
    margin-left: 4px;
}
/* ===== DASHBOARD STAT CARDS (BLUE THEME) ===== */
.supervisor-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 6px 20px rgba(13,110,253,0.15);
    position: relative;
    overflow: hidden;
}

    /* Blue top strip like orange UI */
    .supervisor-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        height: 5px;
        width: 100%;
        background: linear-gradient(90deg, #0d6efd, #0a58ca);
    }

    .supervisor-card h5 {
        color: #0d6efd;
        font-weight: 600;
    }
.attached-header {
    background: linear-gradient(90deg, #f1f3f5, #dde7f5);
    padding: 10px 20px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

    .attached-header h5 {
        color: #0a58ca;
        font-weight: 600;
    }

    .attached-header .btn {
        font-weight: 500;
    }



/* ===============================
   SUPERVISOR DASHBOARD - RECTIFIED
================================ */

.supervisor-page {
    margin-top: 15px;
}

/* Ensure the container allows horizontal scrolling if the screen is too small */
.supervisor-card .card-body {
    overflow-x: auto !important;
    width: 100%;
    display: block;
}

/* FORCE TABLE TO FILL EMPTY SPACE:
   Added table-layout: fixed to prevent columns from resizing based on content.
   Added width: 100% to ensure it fills the empty space on the right.
*/
.supervisor-table {
    table-layout: fixed !important;
    width: 100% !important;
    border-collapse: collapse;
    min-width: 1000px; /* Ensures table stays readable on small screens */
}

    .supervisor-table thead {
        background-color: #f8f9fa;
    }

    .supervisor-table th {
        font-size: 14px;
        font-weight: 600;
        vertical-align: middle;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* FIX FOR THE 'HIDDEN' DATA:
   Forces the text to wrap inside the cell rather than expanding the width.
*/
    .supervisor-table td {
        font-size: 14px;
        vertical-align: top; /* Changed to top for better readability with long text */
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }

        /* Keep Action buttons from wrapping to multiple lines */
        .supervisor-table td.text-nowrap {
            white-space: nowrap !important;
        }

        /* Specific fix for the 6th column (Reason for Call) or any long text column */
        .reason-column,
        .supervisor-table td:nth-child(6) {
            word-break: break-word !important;
            line-height: 1.4;
        }

    .supervisor-table tbody tr:hover {
        background-color: #f1f5ff;
    }

    .supervisor-table .btn {
        padding: 3px 10px;
        font-size: 13px;
    }
/* ===== FOOTER ===== */
.app-footer {
    background: linear-gradient(90deg, #f8f9fa, #e9f1ff);
    border-top: 1px solid #dbe3f0;
    padding: 8px 0;
    font-size: 13px;
    color: #495057;
}

    .app-footer .footer-right {
        font-weight: 500;
        color: #0d6efd;
    }
#filterPanel {
    position: fixed;
    top: 80px;
    right: -300px;
    width: 300px;
    height: calc(100% - 100px);
    background: #fff;
    border-left: 1px solid #ddd;
    padding: 15px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 9999;
}

    #filterPanel.open {
        right: 0;
    }

#filterToggle {
    position: fixed;
    top: 120px;
    right: 0;
    z-index: 10000;
    background: #0d6efd;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px 0 0 4px;
}
.call-ui {
    text-align: center;
    background: radial-gradient(circle at top, #0d6efd, #001a3a);
    color: white;
    padding: 25px;
    border-radius: 20px;
    width: 320px;
    margin-top: 15px;
    box-shadow: 0 0 25px rgba(0,0,0,0.4);
}

#callStatusText {
    font-size: 18px;
    margin-bottom: 10px;
}

.caller-box {
    background: linear-gradient(180deg, #001a3a, #003b8f);
    border-radius: 18px;
    padding: 16px;
    margin: 20px 0;
    box-shadow: inset 0 0 6px rgba(255,255,255,0.2), 0 0 12px rgba(0,0,0,0.4);
}
.agent-right .call-circle-btn {
    width: 55px;
    height: 55px;
    font-size: 18px;
}

#callerDisplay {
    font-size: 18px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.call-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 28px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease;
}

    .call-btn:active {
        transform: scale(0.9);
    }

.answer {
    background: #28a745;
    color: white;
}

.hangup {
    background: #dc3545;
    color: white;
}


/* ===== AGENT 70-30 LAYOUT ===== */

.agent-wrapper {
    display: flex;
    height: 100vh;
    background: #f8f9fa;
    font-family: 'Inter', sans-serif;
}

/* 70% LEFT */
.agent-left {
    width: 80%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid #e9ecef;
}

/* Header */
.agent-header {
    padding: 15px 25px;
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Scrollable content */
.agent-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* 30% RIGHT */
.agent-right {
    width: 20%;
    padding: 25px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: -3px 0 10px rgba(0,0,0,0.04);
}

/* Call Timer */
#callDuration {
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}
.agent-right #callDuration {
    font-size: 28px !important;
}
    .agent-right #callDuration.display-5 {
        font-size: 30px !important;
    }
.agent-right .card.py-4 {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
.agent-right .card-body.py-4 {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
/* Incoming pulse animation */
.incoming-pulse {
    animation: shadow-pulse 1.5s infinite;
}

@keyframes shadow-pulse {
    0% {
        box-shadow: 0 0 0 0px rgba(25, 135, 84, 0.4);
    }

    100% {
        box-shadow: 0 0 0 20px rgba(25, 135, 84, 0);
    }
}

/* Responsive fallback */
@media (max-width: 992px) {
    .agent-wrapper {
        flex-direction: column;
    }

    .agent-left,
    .agent-right {
        width: 100%;
        height: auto;
    }

    .agent-right {
        border-top: 1px solid #dee2e6;
        border-left: none;
    }
}
/* ===== MOBILE STYLE CALL BUTTONS ===== */

.call-buttons-wrapper {
    padding-bottom: 20px;
}

/* Common circular button */
.call-circle-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    font-size: 22px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Answer button */
.answer-btn {
    background: linear-gradient(135deg, #28a745, #198754);
}

/* Hangup button */
.hangup-btn {
    background: linear-gradient(135deg, #dc3545, #bb2d3b);
}

/* Press animation */
.call-circle-btn:active {
    transform: scale(0.9);
}

/* Disabled state */
.call-circle-btn:disabled {
    opacity: 0.5;
    box-shadow: none;
    cursor: not-allowed;
}

/* Incoming call pulse animation */
.answer-btn.incoming {
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(40,167,69,0.6);
    }

    100% {
        box-shadow: 0 0 0 18px rgba(40,167,69,0);
    }
}
