
.mold-card,
.mold-card *,
.mold-card:before,
.mold-card:after {
    border-color: inherit !important;
    outline: none !important;
}

    .mold-card:focus,
    .mold-card:active,
    .mold-card:focus-within {
        outline: none !important;
        border-color: inherit !important;
        box-shadow: none !important;
    }

.schedule-container {
    background: #fcf5f5;
    color: white;
    font-family: Arial, sans-serif;
    padding: 0px 6px 0px 0px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.time-section {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    gap: 8px;
    border: 6px solid #9c9c9c;
    background-clip: border-box;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

    .time-section.collapsed {
        margin: 10px 0;
    }

        .time-section.collapsed .cards-area {
            padding: 1px 4px;
            gap: 6px;
        }

        .time-section.collapsed .mold-card {
            min-height: auto;
            height: auto;
            overflow: hidden;
        }

        .time-section.collapsed .card-body,
        .time-section.collapsed .card-footer {
            display: none !important;
        }

        .time-section.collapsed .card-header {
            height: auto;
            padding: 12px 15px;
            min-height: auto;
            border-radius: 6px;
        }

    .time-section.red-block {
        background: #aa0b0b;
        margin: 5px 0 10px 0;
        border-color: #aa0b0b;
    }

    .time-section.black-block {
        background: #000;
        margin: 5px 0 10px 0;
        border-color: #000;
    }

    .time-section.yellow-block {
        background: #ffc000;
        margin: 10px 0 10px 0;
        border-color: #ffc000;
    }

    .time-section.gray-block {
        background: #bfbfbf;
        margin: 10px 0 10px 0;
        border-color: #bfbfbf;
    }

    .time-section .time-section-header {
        position: static;
        display: flex;
        justify-content: center;
        padding: 6px 10px;
        font-weight: 700;
        font-size: 20px;
        border-radius: 6px;
        writing-mode: horizontal-tb;
        text-align: center;
        min-width: 110px;
        height: auto;
        flex-shrink: 0;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .time-section.red-block .time-section-header {
        color: #fff;
    }

    .time-section.yellow-block .time-section-header {
        color: #000;
    }

    .time-section.gray-block .time-section-header {
        color: #000;
    }

    .time-section .time-section-header:hover {
        background: rgba(255, 255, 255, 0.08);
    }

.cards-area {
    background: #f0f0f0;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    align-items: flex-start;
    border-radius: 6px;
    flex: 1;
    overflow-x: auto;
}

.section-area {
    background: #f0f0f0;
    padding: 0px 5px 5px 5px;
    display: grid;
    gap: 6px;
    border-radius: 6px;
    flex: 1;
    overflow-x: auto;
}

.mold-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #000 !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
    min-height: 300px;
    height: auto;
    transition: none;
}

.card-header {
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-top: none;
}

    .card-header.red {
        background: #E07A7A;
    }

    .card-header.black {
        background: #000000;
    }

    .card-header.gray {
        background: #d9d9d9;
    }

    .card-header.yellow {
        background: #6DB87D;
    }

    .card-header.blue {
        background: #ffff99;
    }

    .card-header.dark-gray {
        background: #7f7f7f;
    }

.machine-number {
    font-size: 40px;
    font-weight: bold;
    line-height: 1;
}

    .machine-number.black {
        color: black;
    }

.area-name {
    font-size: 12px;
    margin-top: 2px;
}

    .area-name.black {
        color: black;
    }

.machine-info.danger {
    color: #aa0b0b;
}

.machine-info.black {
    color: #000000;
}

.time-info {
    text-align: right;
    font-weight: bold;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(10px, 1.2vw, 18px);
}

    .time-info.danger {
        color: #aa0b0b;
    }

    .time-info.black {
        color: #000000;
    }

.time-detail {
    text-align: right;
    font-size: 14px;
    margin-top: 2px;
}

    .time-detail.danger {
        color: #aa0b0b;
    }

    .time-detail.black {
        color: #000000;
    }

.card-body {
    background: white;
    color: black;
    padding: 12px 15px;
    text-align: left;
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
    min-height: auto;
}

.product-name {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 17px;
    line-height: 1.3;
    gap: 8px;
    position: relative;
}

.color-indicator {
    width: 14px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
    max-height: 32px;
}

    .color-indicator.red {
        background: #aa0b0b;
    }

    .color-indicator.gray {
        background: #d9d9d9;
    }

    .color-indicator.green {
        background: #00b050;
    }

.mc3-column-body .mold-card:last-child {
    margin-bottom: 6px;
}

.product-text {
    flex: 1;
    padding-right: 10px;
}

.icon-stack {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 38px;
}

    .icon-stack i {
        font-size: 16px;
        color: #555;
        cursor: pointer;
        transition: transform 0.2s ease, color 0.2s ease;
    }

        .icon-stack i:hover {
            color: #007bff;
            transform: scale(1.2);
        }

.mold-info {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-left: 22px;
}

.machine-label {
    font-size: 18px;
    font-weight: bold;
    margin-left: 22px;
}

.card-footer.dual-buttons {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    margin-top: auto;
    height: auto;
    border: none;
    box-shadow: none;
    flex-shrink: 0;
}

.footer-btn {
    border: none;
    font-weight: 600;
    font-size: 14px;
    height: 38px;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0;
    margin: 0;
    position: relative;
    outline: none !important;
    box-shadow: none !important;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
}

.btn-text {
    margin-top: 8px;
}

.footer-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.footer-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.footer-btn:active {
    outline: none !important;
    box-shadow: none !important;
}

.mold-change-board {
    padding: 12px 16px;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: #222;
}

.board-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.brand {
    font-weight: 800;
    font-size: 20px;
    color: #0a0a0a;
    padding: 6px 10px;
}

.board-title {
    flex: 1;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px 10px;
    border-radius: 18px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
}

    .action-btn.primary {
        background: #000;
        color: #fff;
        border-color: #000;
    }

.columns-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    align-items: start;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
}


.column-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-large {
    min-height: 220px;
}

.card-medium {
    min-height: 180px;
}

.card-small {
    min-height: 140px;
}

.card-header .header-left {
    display: flex;
    flex-direction: column;
}

.card-header .header-right {
    text-align: right;
}

.card-header .time-number {
    font-size: 22px;
    font-weight: 700;
}

.card-header .time-delta {
    font-size: 12px;
    color: #777;
}

.product-text {
    font-size: 16px;
}

.mold-info.small {
    font-size: 12px;
    color: #666;
}

.card-footer.single-button {
    padding: 12px;
}

.footer-btn.yellow {
    background: #dff3fb;
    color: #2b7f9e;
    border-radius: 20px;
    padding: 8px 12px;
}

.footer-btn.light {
    background: #e9f2ff;
    color: #0b5cff;
    border-radius: 20px;
    padding: 8px 12px;
}

.footer-btn.blue {
    background: #cfe8ff;
    color: #004a9f;
    border-radius: 20px;
}

.footer-btn.repair-cta {
    background: #f8e71c;
    color: #222;
    border-radius: 18px;
    font-weight: 700;
    padding: 8px 14px;
}

.footer-btn.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.column-completed.faded {
    opacity: 0.28;
    border-left: 2px dashed rgba(0, 0, 0, 0.2);
    padding-left: 6px;
}

.faded-card {
    box-shadow: none;
    background: rgba(255, 255, 255, 0.95);
}

@media (max-width: 1400px) {
    .columns-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .columns-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .board-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .columns-grid {
        grid-template-columns: 1fr;
    }

    .action-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
}

.card-header.light-gray {
    background: #f5f5f5;
    color: #666;
}

.dual-buttons {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 10px;
    border-radius: 25px;
}

.btn-right {
    position: relative;
    z-index: 2;
    border: none;
    border-radius: 0;
    height: 38px;
    outline: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-radius: 25px;
}

    .btn-right:hover {
        font-weight: bold
    }

    .btn-left:focus,
    .btn-right:focus,
    .btn-left:active,
    .btn-right:active {
        outline: none !important;
        box-shadow: none !important;
    }

.btn-left {
    color: #000;
}

.btn-right {
    color: #000;
}

.status-production {
    background: #87ceeb;
}

.status-prepared {
    background: #90ee90;
}

.status-stop {
    background: #d3d3d3;
}

@media (min-width: 1920px) {
    .machine-number {
        font-size: 32px;
    }

    .time-detail {
        font-size: 18px;
    }

    .area-name {
        font-size: 18px;
    }

    .product-name {
        font-size: 21px;
    }

    .mold-info {
        font-size: 16px;
    }

    .time-section-header {
        font-size: 32px;
        padding: 20px 25px;
        min-width: 140px;
    }

    .machine-label {
        font-size: 18px;
    }

    .card-header {
        padding: 15px;
    }
}

@media (min-width: 1600px) and (max-width: 1919px) {
    .machine-number {
        font-size: 32px;
    }

    .time-detail {
        font-size: 16px;
    }

    .area-name {
        font-size: 15px;
    }

    .time-info {
        font-size: 26px;
    }

    .product-name {
        font-size: 17px;
    }

    .mold-info {
        font-size: 14px;
    }

    .time-section-header {
        font-size: 30px;
        min-width: 130px;
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .machine-number {
        font-size: 26px;
    }

    .time-detail {
        font-size: 14px;
    }

    .area-name {
        font-size: 15px;
    }

    .time-info {
        font-size: 22px;
    }

    .product-name {
        font-size: 17px;
    }

    .mold-info {
        font-size: 14px;
    }

    .card-header {
        padding: 10px 12px;
    }

    .machine-label {
        font-size: 16px;
    }

    .time-section-header {
        font-size: 26px;
        min-width: 120px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .machine-number {
        font-size: 25px;
    }

    .time-detail {
        font-size: 14px;
    }

    .area-name {
        font-size: 10px;
    }

    .time-info {
        font-size: 19px;
    }

    .product-name {
        font-size: 13px;
    }

    .mold-info {
        font-size: 10px;
    }

    .card-header {
        padding: 8px 10px;
    }

    .card-body {
        padding: 8px 10px;
        gap: 6px;
    }

    .machine-label {
        font-size: 14px;
    }

    .time-section-header {
        font-size: 22px;
        min-width: 100px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .time-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .time-section-header {
        font-size: 20px;
        min-width: auto;
        width: 100%;
        margin-bottom: 10px;
    }

    .cards-area {
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }

    .machine-number {
        font-size: 20px;
    }

    .time-info {
        font-size: 18px;
    }

    .time-detail {
        font-size: 12px;
    }

    .area-name {
        font-size: 10px;
    }

    .product-name {
        font-size: 11px;
    }

    .mold-info {
        font-size: 9px;
    }

    .card-header {
        padding: 6px 8px;
    }

    .card-body {
        padding: 6px 8px;
        gap: 4px;
    }

    .card-footer {
        padding: 0px 8px;
        font-size: 10px;
    }

    .color-indicator {
        width: 10px;
        height: 25px;
    }

    .machine-label {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .time-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .time-section-header {
        font-size: 18px;
        min-width: auto;
        width: 100%;
        margin-bottom: 10px;
    }

    .cards-area {
        grid-template-columns: 1fr;
        width: 100%;
    }
}


/* --- Toggle --- */
.toggle-container-3 {
    cursor: pointer;
    user-select: none;
    padding-top: 2px
}

    .toggle-container-3 .toggle-track {
        position: relative;
        width: 66px;
        height: 22px;
        background-color: #000;
        border-radius: 5px;
        padding: 2px;
        transition: background-color 0.3s ease;
    }

    .toggle-container-3 .toggle-circle {
        width: 18px;
        height: 18px;
        background-color: #fff;
        border-radius: 50%;
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    }

    .toggle-container-3 .position-left {
        transform: translateX(0);
    }

    .toggle-container-3 .position-center {
        transform: translateX(22px);
    }

    .toggle-container-3 .position-right {
        transform: translateX(44px);
    }

.toggle-container-2 {
    cursor: pointer;
    user-select: none;
    padding-top: 2px;
}

    .toggle-container-2 .toggle-track {
        position: relative;
        width: 44px;
        height: 22px;
        background-color: #000;
        border-radius: 5px;
        padding: 2px;
        transition: background-color 0.3s ease;
    }

    .toggle-container-2 .toggle-circle {
        width: 18px;
        height: 18px;
        background-color: #fff;
        border-radius: 50%;
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    }

    .toggle-container-2 .position-left {
        transform: translateX(0);
    }

    .toggle-container-2 .position-right {
        transform: translateX(22px);
    }

.toggle-label {
    color: gray;
    font-size: 11pt;
    font-weight: bold;
}

    .toggle-label.active {
        color: #000;
    }

/* Ticket Card Styles */
.ticket-container {
    display: flex;
    flex-direction: row; /* Xếp hàng ngang */
    align-items: center;
    justify-content: center;
    gap: 35px; /* Khoảng cách giữa các ticket */
}

.ticket-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none
}

.ticket-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #ebebeb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: all 0.3s ease;
}

.ticket-item.active .ticket-circle {
    background: #000;
}

.ticket-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ticket-circle i {
    color: gray;
    font-size: 16px
}

.ticket-item.active .ticket-circle i {
    color: #fff;
}

.ticket-label {
    font-size: 14px;
    color: gray;
}

.ticket-item.active .ticket-label {
    color: #000;
    font-weight: bold;
}

.fa-sync-wrapper {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 1px solid;
    border-radius: 50%;
}

    .fa-sync-wrapper .number {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 16px;
        font-weight: bold;
        pointer-events: none;
    }

* {
    box-sizing: border-box;
}

/* View container and title */
.mc3-view-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mc3-view-title {
    background: linear-gradient(135deg, #1f2226 0%, #2a2d31 100%);
    color: #ffd94a;
    font-size: 24px;
    font-weight: 700;
    padding: 5px 24px;
    margin: 0;
    text-align: center;
    border-bottom: 3px solid #ffd94a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0; /* Don't shrink the title */
}

.mc3-board {
    padding: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: #222;
    flex: 1; /* Take remaining space */
    display: grid;
    grid-template-rows: 1fr;
    margin: 0;
    overflow: hidden;
}

.mc3-topbar {
    display: grid;
    grid-template-columns: auto 1fr auto; /* brand | center | request */
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
    background: #1f2226;
    padding: 8px 20px;
    color: #cfd2d6;
    height: 60px;
    min-height: 50px;
}

/* ===== RESPONSIVE: Topbar ===== */

/* TV/4K screens (≥2560px) */
@media (min-width: 2560px) {
    .mc3-view-title {
        font-size: 30px;
        padding: 10px 32px;
    }

    .mc3-topbar {
        height: 60px;
        min-height: 60px;
        padding: 10px 30px;
        gap: 24px;
    }

    .mc3-brand-logo {
        width: 85px;
    }

    .mc3-brand-title {
        font-size: 1.3rem;
    }

    .mc3-center {
        gap: 100px;
    }

    .mc3-flow-text,
    .mc3-mode-label {
        font-size: 1.1rem;
    }

    .mc3-request-btn {
        padding: 8px 18px;
        font-size: 1.05rem;
    }
}

/* Large desktop (1920px-2559px) */
@media (min-width: 1920px) and (max-width: 2559px) {
    .mc3-view-title {
        font-size: 28px;
        padding: 10px 28px;
    }

    .mc3-topbar {
        height: 56px;
        min-height: 56px;
        padding: 9px 26px;
        gap: 20px;
    }

    .mc3-brand-logo {
        width: 78px;
    }

    .mc3-brand-title {
        font-size: 1.15rem;
    }

    .mc3-center {
        gap: 100px;
    }
}

/* Tablet (768px-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .mc3-view-title {
        font-size: 22px;
        padding: 6px 18px;
    }

    .mc3-topbar {
        padding: 6px 14px;
        gap: 12px;
        height: 46px;
        min-height: 46px;
    }

    .mc3-brand {
        gap: 12px;
    }

    .mc3-brand-logo {
        width: 60px;
    }

    .mc3-brand-title {
        font-size: 0.95rem;
    }

    .mc3-mode {
        padding-left: 12px;
        gap: 8px;
    }

    .mc3-mode-label {
        font-size: 0.9rem;
    }

    .mc3-toggle {
        width: 38px;
        height: 20px;
    }

    .mc3-toggle-knob {
        width: 14px;
        height: 14px;
    }

    .mc3-toggle.on .mc3-toggle-knob {
        left: 21px;
    }

    .mc3-center {
        gap: 16px;
    }

    .mc3-flows {
        column-gap: 16px;
    }

    .mc3-flow-text {
        font-size: 0.9rem;
    }

    .mc3-request-btn {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
}

/* Brand group at left side */
.mc3-brand {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    justify-self: start;
}

.mc3-brand-logo {
    width: 70px;
    height: auto;
}

.mc3-btn-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    background: transparent;
    mix-blend-mode: multiply;
    /* filter: brightness(0) invert(1);  */
    transition: filter 0.2s ease;
}

.mc3-brand-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #cfd2d6;
    white-space: nowrap;
}

/* Center block (flows + view switch) */
.mc3-center {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    justify-content: center; /* keep middle truly centered */
    gap: 100px;
}

.mc3-mode {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
    border-left: 2px solid #3a3d41;
}

.mc3-mode-label {
    color: #a9afb7;
    font-weight: 600;
    font-size: 1.1rem;
}

    .mc3-mode-label.active {
        color: #ffffff;
    }

.mc3-toggle {
    width: 42px;
    height: 22px;
    background: #0d0f12;
    border: 1px solid #3a3d41;
    border-radius: 20px;
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

    .mc3-toggle:focus {
        outline: 2px solid #ffd94a;
        outline-offset: 2px;
    }

.mc3-toggle-knob {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    left: 3px;
    transition: left 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.mc3-toggle:active .mc3-toggle-knob {
    transform: scale(0.95);
}

.mc3-toggle.off {
    background: #0d0f12;
    border-color: #3a3d41;
}

.mc3-toggle.on {
    background: #ffffff;
    border-color: #ffffff;
}

    .mc3-toggle.on .mc3-toggle-knob {
        left: 23px;
        background: #0d0f12;
    }

.mc3-flows {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    column-gap: 100px;
}

.mc3-flow {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mc3-flow-icon {
    color: #888;
}

.mc3-flow-text {
    color: white;
    font-size: 1.1rem;
}

.mc3-request-btn {
    background: #000;
    color: #ffd94a;
    border: 2px solid #ffd94a;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    justify-self: end; /* align to far right of the topbar */
}

    .mc3-request-btn:hover {
        filter: brightness(1.05);
    }

.mc3-columns {
    display: grid;
    gap: 0;
    align-items: start;
    min-height: 0;
    height: 100%;
}


.mc3-column {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    min-height: 0;
}

.mc3-column-header {
    font-weight: 800;
    text-align: center;
    padding: 10px 8px;
    font-size: 16px;
    flex: 0 0 auto;
    background: #000;
    color: #fff;
    margin-top: 5px;
}

    .mc3-column-header .mc3-title-text {
        display: inline-block;
        margin-right: 10px;
        font-size: 20px
    }

.mc3-column-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px 4px 12px;
    scrollbar-width: thin;
    scrollbar-color: #9aa0a6 transparent;
}

    .mc3-column-body::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    .mc3-column-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .mc3-column-body::-webkit-scrollbar-thumb {
        background-color: #9aa0a6;
        border-radius: 6px;
    }

        .mc3-column-body::-webkit-scrollbar-thumb:hover {
            background-color: #7e848a;
        }

/* ViewByStatus: Fix card spacing to match ViewByTime */
.mc3-board .mold-card {
    justify-content: flex-start !important;
    min-height: fit-content !important;
}


.mc3-switch {
    display: inline-flex;
    gap: 8px;
    margin-left: 16px;
}

.mc3-switch-btn {
    padding: 4px 12px;
    border-radius: 6px;
    background: #2a2d31;
    color: #cfd2d6;
    border: 1px solid #3a3d41;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
}

    .mc3-switch-btn.active {
        background: #ffffff;
        color: #121416;
        border-color: #ffffff;
    }

/* ===== RESPONSIVE: ViewByStatus (Columns) ===== */

/* TV/4K screens (≥2560px) - 6 columns with larger cards */
@media (min-width: 2560px) {
    .mc3-columns {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }

    .mc3-column-header {
        font-size: 20px;
        padding: 14px 10px;
    }

    .mc3-board .mold-card {
        min-height: 380px;
    }

    .mc3-column-body {
        padding: 8px 6px 16px;
    }
}

/* Large desktop (1920px-2559px) - 6 columns */
@media (min-width: 1920px) and (max-width: 2559px) {
    .mc3-columns {
        grid-template-columns: repeat(6, 1fr);
    }

    .mc3-column-header {
        font-size: 18px;
        padding: 12px 9px;
    }

    .mc3-board .mold-card {
        min-height: 360px;
    }
}

/* Laptop/Medium (1400px-1919px) - 6 columns (default) */
@media (min-width: 1400px) and (max-width: 1919px) {
    .mc3-columns {
        grid-template-columns: repeat(5, 1fr);
    }

    .mc3-board .mold-card {
        min-height: 340px;
    }
}

/* Normal desktop (1024px-1399px) - 4 columns */
@media (min-width: 1024px) and (max-width: 1399px) {
    .mc3-columns {
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
    }

    .mc3-column-header {
        font-size: 15px;
        padding: 9px 7px;
    }

    .mc3-board .mold-card {
        min-height: 300px;
    }
}

/* Tablet landscape (768px-1023px) - 3 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .mc3-columns {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }

    .mc3-column-header {
        font-size: 14px;
        padding: 8px 6px;
    }

    .mc3-board .mold-card {
        min-height: 280px;
    }

    .mc3-column-body {
        padding: 4px 3px 10px;
    }
}

/* Priority list view */
.mc3-prio {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Allow flexbox to shrink */
}

.mc3-prio-list {
    background: #fff;
    border-radius: 12px;
    border: 3px solid #000;
    padding: 10px 6px;
    margin: 0; /* Align to left instead of center */
}

.mc3-prio-item {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    align-items: center;
    gap: 8px;
    margin: 0px 20px;
    background: #fff;
    box-shadow: 0 1px 0 #ddd;
}

.mc3-prio-left {
    display: flex;
    justify-content: center;
}

.mc3-prio-strip {
    width: 14px;
    height: 56px;
    display: inline-block;
}

    .mc3-prio-strip.red {
        background: #c8102e;
    }

    .mc3-prio-strip.yellow {
        background: #ffc000;
    }

    .mc3-prio-strip.gray {
        background: #d9d9d9;
    }

.mc3-prio-body {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    font-size: 20px;
}

.mc3-prio-time {
    font-weight: 700;
    min-width: 44px;
    text-align: right;
    font-size: 21px;
    margin-right: 14px;
}

    .mc3-prio-time.danger {
        color: #ff1a1a;
    }

    .mc3-prio-time.warn {
        color: #f2a100;
    }

    .mc3-prio-time.mute {
        color: #9e9e9e;
    }

.mc3-prio-text {
    color: #1d1d1f;
}

.mc3-prio-link {
    color: #007aff;
    text-decoration: underline;
}

.mc3-prio-dim {
    color: #a1a1a1;
}

.mc3-prio-right {
    display: flex;
    justify-content: center;
}

/* ===== RESPONSIVE: ViewByPriority ===== */

/* TV/4K screens (≥2560px) */
@media (min-width: 2560px) {
    .mc3-prio {
        padding: 24px;
    }

    .mc3-prio-list {
        width: 55%;
        max-width: 2000px;
        padding: 16px 10px;
    }

    .mc3-prio-item {
        grid-template-columns: 36px 1fr 36px;
        margin: 0px 30px;
    }

    .mc3-prio-strip {
        width: 18px;
        height: 70px;
    }

    .mc3-prio-body {
        font-size: 28px;
        gap: 14px;
    }

    .mc3-prio-time {
        font-size: 32px;
        min-width: 56px;
        margin-right: 20px;
    }
}

/* Large desktop (1920px-2559px) */
@media (min-width: 1920px) and (max-width: 2559px) {
    .mc3-prio {
        padding: 18px;
    }

    .mc3-prio-list {
        width: 55%;
        max-width: 1700px;
    }

    .mc3-prio-item {
        grid-template-columns: 32px 1fr 32px;
        margin: 0px 25px;
    }

    .mc3-prio-strip {
        width: 16px;
        height: 64px;
    }

    .mc3-prio-body {
        font-size: 22px;
    }

    .mc3-prio-time {
        font-size: 28px;
        min-width: 50px;
    }
}

/* Laptop/Medium (1400px-1919px) - default styles */

/* Normal desktop (1024px-1399px) */
@media (min-width: 1024px) and (max-width: 1399px) {
    .mc3-prio-list {
        width: 70%;
    }

    .mc3-prio-item {
        margin: 0px 16px;
    }

    .mc3-prio-body {
        font-size: 20px;
    }

    .mc3-prio-time {
        font-size: 23px;
        margin-right: 12px;
    }
}

/* Tablet landscape (768px-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .mc3-prio-list {
        width: 80%;
        padding: 8px 4px;
    }

    .mc3-prio-item {
        grid-template-columns: 24px 1fr 24px;
        margin: 0px 12px;
        gap: 6px;
    }

    .mc3-prio-strip {
        width: 12px;
        height: 48px;
    }

    .mc3-prio-body {
        font-size: 18px;
        gap: 8px;
    }

    .mc3-prio-time {
        font-size: 20px;
        min-width: 38px;
        margin-right: 10px;
    }
}

/* Item grid view */
.mc3-items {
    padding: 12px;
    background: #f5f5f5;
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Allow flexbox to shrink */
}

.mc3-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.mc3-item-card {
    background: #fff;
    border: 3px solid #000;
    border-radius: 12px;
    overflow: hidden;
}

.mc3-item-header {
    background: #6d6d6d;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    padding: 12px 16px;
    text-align: left;
}

.mc3-item-body {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mc3-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 17px;
    font-weight: 600;
}

.mc3-item-text {
    flex: 1;
}

    .mc3-item-text.text-green {
        color: rgb(15, 151, 15);
    }

    .mc3-item-text.text-red {
        color: rgba(200, 31, 31);
    }

.mc3-item-check {
    color: #00c853;
    font-size: 33px;
    margin-left: 8px;
}

/* Responsive breakpoints for Item grid */

/* Màn hình TV/4K (≥2560px) - 5 cột */
@media (min-width: 2560px) {
    .mc3-items {
        padding: 20px;
    }

    .mc3-items-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
    }

    .mc3-item-header {
        font-size: 22px;
        padding: 16px 20px;
    }

    .mc3-item-row {
        font-size: 20px;
        padding: 8px 12px;
    }

    .mc3-item-check {
        font-size: 40px;
    }
}

/* Màn hình lớn (1920px-2559px) - 4 cột */
@media (min-width: 1920px) and (max-width: 2559px) {
    .mc3-items {
        padding: 16px;
    }

    .mc3-items-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .mc3-item-header {
        font-size: 20px;
        padding: 14px 18px;
    }

    .mc3-item-row {
        font-size: 18px;
        padding: 7px 10px;
    }

    .mc3-item-check {
        font-size: 36px;
    }
}

/* Màn hình vừa/laptop (1400px-1919px) - 3 cột (mặc định) */
@media (min-width: 1400px) and (max-width: 1919px) {
    .mc3-items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Màn hình bình thường/tablet landscape (900px-1399px) - 2 cột */
@media (min-width: 900px) and (max-width: 1399px) {
    .mc3-items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .mc3-item-header {
        font-size: 16px;
        padding: 10px 14px;
    }

    .mc3-item-row {
        font-size: 15px;
        padding: 5px 8px;
    }

    .mc3-item-check {
        font-size: 28px;
    }
}

.help-dropdown .dropdown-toggle {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: background 0.15s;
}

    .help-dropdown .dropdown-toggle:hover,
    .help-dropdown .dropdown-toggle:focus {
        background: #f0f0f0;
        color: #1a1a1a;
        box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    }

    .help-dropdown .dropdown-toggle::after {
        display: none; /* ẩn mũi tên mặc định */
    }

    .help-dropdown .dropdown-toggle .chevron {
        font-size: 12px;
        margin-left: 4px;
        transition: transform 0.2s ease;
        display: inline-block;
    }

    .help-dropdown .dropdown-toggle[aria-expanded="true"] .chevron {
        transform: rotate(180deg);
    }

.help-dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0 !important;
}

.help-dropdown:hover .dropdown-toggle .chevron i {
    transform: rotate(180deg);
}

.help-dropdown .dropdown-toggle .chevron i {
    transition: transform 0.2s ease;
    display: inline-block;
}

.help-dropdown .dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 6px 0;
    min-width: 170px;
    margin-top: 6px !important;
    right: 0;
    left: auto;
}

.help-dropdown .dropdown-item {
    font-size: 14.5px;
    color: #1a1a1a;
    padding: 9px 18px;
    transition: background 0.12s;
}

    .help-dropdown .dropdown-item:hover {
        background: #f5f5f5;
        color: #1a1a1a;
    }



.app {
    background-color: #fff;
    width: 100%;
    height: calc(100vh - 55px);
    padding: 10px;
}

.drag-container {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.board {
    display: flex;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.board-column {
    left: 0;
    top: 0;
    padding: 0 1.5px;
    width: calc(100% / 6);
    z-index: 1;
}

    .board-column.muuri-item-releasing {
        z-index: 2;
    }

    .board-column.muuri-item-dragging {
        z-index: 3;
        cursor: move;
    }

.board-column-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.board-column-header {
    position: relative;
    height: 50px;
    line-height: 50px;
    overflow: hidden;
    padding: 0 10px;
    text-align: center;
    background: #fff;
    color: #000;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 2px solid #c8c8c8
}

@media (max-width: 600px) {
    .board-column-header {
        text-indent: -1000px;
    }
}

.board-column-content-wrapper {
    position: relative;
    background: #f0f0f0;
    height: calc(100vh - 120px);
}


.board-item {
    margin-bottom: 8px;
}

.board-column-content {
    padding: 8px 8px 0px 8px
}

    .board-item.muuri-item-releasing {
        z-index: 9998;
    }

    .board-item.muuri-item-dragging {
        z-index: 9999;
        cursor: move;
    }

    .board-item.muuri-item-hidden {
        z-index: 0;
    }

.board-item-content {
    position: relative;
    padding: 10px;
    background: #fff;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid rgb(200, 200, 200);
    border-left: 3px solid #0999c9
}

.my-pivot-table table {
    table-layout: fixed !important;
    width: max-content !important;
    min-width: 100% !important;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.my-pivot-table thead tr:first-child th:nth-child(1) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    position: sticky !important;
    left: 0 !important;
}

.my-pivot-table thead tr:first-child th:nth-child(2) {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    position: sticky !important;
    left: 150px !important;
}

.my-pivot-table tbody td.sticky-1, .my-pivot-table tfoot td.sticky-1 {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 2;
}

.my-pivot-table tbody td.sticky-2, .my-pivot-table tfoot td.sticky-2 {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    position: sticky !important;
    left: 150px !important;
    z-index: 2;
}

.my-pivot-table tbody tr:not(.child-row) td.sticky-1,
.my-pivot-table tbody tr:not(.child-row) td.sticky-2 {
    background-color: #fff !important;
}

.my-pivot-table tbody tr.child-row td.sticky-1,
.my-pivot-table tbody tr.child-row td.sticky-2 {
    background-color: #fff !important;
}

.my-pivot-table th {
    position: sticky;
    background-color: #000 !important;
    color: #fff !important;
}

.my-pivot-table thead tr:first-child th {
    top: 0;
    z-index: 3;
}

.my-pivot-table thead tr.tr-group th {
    top: 40px;
    z-index: 3;
}

.my-pivot-table thead tr:first-child th:nth-child(1),
.my-pivot-table thead tr:first-child th:nth-child(2) {
    top: 0 !important;
    z-index: 6 !important;
    background-color: #000 !important;
    color: #fff !important;
}

.my-pivot-table tbody tr.child-row td {
    font-size: 0.8rem;
}

.filter-icon {
    cursor: pointer;
}

.clickable-row {
    cursor: pointer;
}

.expanded-row {
    background-color: #fff3cd !important;
    font-weight: 600;
}

.schedule-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border-radius: 5px;
    box-shadow: rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;
}