* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: #000000;
    overflow-x: hidden;
    min-height: 100vh;
}

.header-title {
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #000000;
}

.column-header {
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Active Jobs Table Style (Airport Flight Display) */
.active-column {
    background: #ffffff;
    border: 2px solid #dc143c;
}

.active-jobs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.2rem;
    /* Ensure table doesn't break 3D transforms */
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.active-jobs-table thead {
    background: #dc143c;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.active-jobs-table th {
    padding: 4px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 1.1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    line-height: 1.2;
}

.active-jobs-table th:last-child {
    border-right: none;
}

.active-jobs-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
    /* Ensure table rows preserve 3D transforms */
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.active-jobs-table tbody tr:hover {
    background-color: #f5f5f5;
}

.active-jobs-table tbody tr.new-entry {
    animation: row-highlight 1s ease-in-out;
}

@keyframes row-highlight {
    0%, 100% {
        background-color: #ffffff;
    }
    50% {
        background-color: #fff5f5;
    }
}

.active-jobs-table td {
    padding: 3px 12px;
    font-size: 1.3rem;
    vertical-align: middle;
    line-height: 1.3;
    /* Ensure table cells don't break 3D transforms */
    overflow: visible;
}

.active-jobs-table td:first-child {
    text-align: left;
}

.active-jobs-table td:nth-child(2) {
    text-align: center;
    padding: 3px 16px;
    min-width: 180px;
    vertical-align: middle;
    /* Ensure 3D transforms work inside table cells */
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    overflow: visible !important;
    position: relative;
}

:root {
    --tag-width: 180px;
    --tag-height: 48px;
    --cube-depth: 24px;
}

.status-tag {
    display: inline-block;
    position: relative;
    width: var(--tag-width);
    max-width: 100%;
    height: var(--tag-height);
    margin: 0 auto;
    vertical-align: middle;
}

.status-tag-scene {
    perspective: 1000px !important;
    -webkit-perspective: 1000px !important;
    -moz-perspective: 1000px !important;
    -o-perspective: 1000px !important;
    perspective-origin: 50% 50% !important;
    -webkit-perspective-origin: 50% 50% !important;
    -moz-perspective-origin: 50% 50% !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    transform-style: preserve-3d !important;
    -webkit-transform-style: preserve-3d !important;
    -moz-transform-style: preserve-3d !important;
    -webkit-transform: translateZ(0) !important;
    -moz-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    display: block !important;
}

.status-tag-cube {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    transform-style: preserve-3d !important;
    -webkit-transform-style: preserve-3d !important;
    -moz-transform-style: preserve-3d !important;
    animation: cube-flip 6s infinite ease-in-out !important;
    -webkit-animation: cube-flip 6s infinite ease-in-out !important;
    -moz-animation: cube-flip 6s infinite ease-in-out !important;
    -o-animation: cube-flip 6s infinite ease-in-out !important;
    will-change: transform !important;
    -webkit-backface-visibility: hidden !important;
    -moz-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    /* Android TV / Chrome optimization */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform-origin: center center !important;
    -webkit-transform-origin: center center !important;
}

.status-tag-face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.2rem;
    text-transform: uppercase;
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 1.5px;
    overflow: visible;
    /* Android TV / Chrome optimization */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform-origin: center center;
    -webkit-transform-origin: center center;
}

.status-tag-front {
    transform: rotateY(0deg) translateZ(var(--cube-depth));
    -webkit-transform: rotateY(0deg) translateZ(var(--cube-depth));
    -moz-transform: rotateY(0deg) translateZ(var(--cube-depth));
}

.status-tag-back {
    transform: rotateY(180deg) translateZ(var(--cube-depth));
    -webkit-transform: rotateY(180deg) translateZ(var(--cube-depth));
    -moz-transform: rotateY(180deg) translateZ(var(--cube-depth));
}

.status-tag-top {
    transform: rotateX(90deg) translateZ(calc(var(--tag-height) / 2));
    -webkit-transform: rotateX(90deg) translateZ(calc(var(--tag-height) / 2));
    -moz-transform: rotateX(90deg) translateZ(calc(var(--tag-height) / 2));
}

.status-tag-bottom {
    transform: rotateX(-90deg) translateZ(calc(var(--tag-height) / 2));
    -webkit-transform: rotateX(-90deg) translateZ(calc(var(--tag-height) / 2));
    -moz-transform: rotateX(-90deg) translateZ(calc(var(--tag-height) / 2));
}

.status-tag-right {
    transform: rotateY(90deg) translateZ(calc(var(--tag-width) / 2));
    -webkit-transform: rotateY(90deg) translateZ(calc(var(--tag-width) / 2));
    -moz-transform: rotateY(90deg) translateZ(calc(var(--tag-width) / 2));
}

.status-tag-left {
    transform: rotateY(-90deg) translateZ(calc(var(--tag-width) / 2));
    -webkit-transform: rotateY(-90deg) translateZ(calc(var(--tag-width) / 2));
    -moz-transform: rotateY(-90deg) translateZ(calc(var(--tag-width) / 2));
}

@keyframes cube-flip {
    0% {
        transform: rotateY(0deg);
    }
    25% {
        transform: rotateY(90deg);
    }
    50% {
        transform: rotateY(180deg);
    }
    75% {
        transform: rotateY(270deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

@-webkit-keyframes cube-flip {
    0% {
        -webkit-transform: rotateY(0deg);
    }
    25% {
        -webkit-transform: rotateY(90deg);
    }
    50% {
        -webkit-transform: rotateY(180deg);
    }
    75% {
        -webkit-transform: rotateY(270deg);
    }
    100% {
        -webkit-transform: rotateY(360deg);
    }
}

@-moz-keyframes cube-flip {
    0% {
        -moz-transform: rotateY(0deg);
    }
    25% {
        -moz-transform: rotateY(90deg);
    }
    50% {
        -moz-transform: rotateY(180deg);
    }
    75% {
        -moz-transform: rotateY(270deg);
    }
    100% {
        -moz-transform: rotateY(360deg);
    }
}

@-o-keyframes cube-flip {
    0% {
        -o-transform: rotateY(0deg);
    }
    25% {
        -o-transform: rotateY(90deg);
    }
    50% {
        -o-transform: rotateY(180deg);
    }
    75% {
        -o-transform: rotateY(270deg);
    }
    100% {
        -o-transform: rotateY(360deg);
    }
}

/* Fallback for browsers without 3D support (Smart TV compatibility) */
.no-3d-support .status-tag-cube {
    animation: none;
    -webkit-animation: none;
    -moz-animation: none;
    transform-style: flat;
    -webkit-transform-style: flat;
}

.no-3d-support .status-tag-face {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
}

.no-3d-support .status-tag-front,
.no-3d-support .status-tag-back,
.no-3d-support .status-tag-top,
.no-3d-support .status-tag-bottom,
.no-3d-support .status-tag-right,
.no-3d-support .status-tag-left {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
}

.no-3d-support .status-tag-front {
    opacity: 1;
    position: relative;
}

.status-tag.scheduled .status-tag-face {
    background: #dc143c;
    color: #ffffff;
    border: 2px solid #dc143c;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-tag.ongoing .status-tag-face {
    background: #28a745;
    color: #ffffff;
    border: 2px solid #28a745;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Finished Jobs - Plate Numbers Only */
.finished-column {
    background: #f5f5f5;
    border: 2px solid #808080;
}

.finished-plate {
    padding: 4px 4px;
    border-bottom: 1px solid #d0d0d0;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    color: #333333;
}

.finished-plate.new-entry {
    animation: plate-highlight 1s ease-in-out;
}

@keyframes plate-highlight {
    0%, 100% {
        background-color: #ffffff;
    }
    50% {
        background-color: #f0f0f0;
    }
}

.empty-state {
    font-family: Arial, sans-serif;
    color: #666666;
    font-style: italic;
}

.status-badge {
    font-family: Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.connection-status {
    position: fixed;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #ffffff;
    color: #ffffff;
}

.fullscreen-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #ffffff;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    font-family: Arial, sans-serif;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.column-content::-webkit-scrollbar {
    width: 8px;
}

.column-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.column-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.column-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Compact design - smaller sizes across all screens */
@media screen and (min-width: 1920px) {
    .header-title {
        font-size: 2.5rem;
    }
    .column-header {
        font-size: 1.25rem;
    }
}

.job-number {
    color: #dc143c;
    font-weight: 700;
}

/* TV override: enforce dimensions and stable 3D geometry */
:root {
    --tag-width: 180px;
    --tag-height: 48px;
    --cube-depth: 24px;
}

.status-tag {
    width: var(--tag-width) !important;
    height: var(--tag-height) !important;
}

.status-tag-face {
    overflow: visible !important;
}

.status-tag-cube {
    animation: cube-flip 6s infinite linear !important;
    -webkit-animation: cube-flip 6s infinite linear !important;
    -moz-animation: cube-flip 6s infinite linear !important;
    -o-animation: cube-flip 6s infinite linear !important;
}

.status-tag-top {
    transform: rotateX(90deg) translateZ(calc(var(--tag-height) / 2)) !important;
    -webkit-transform: rotateX(90deg) translateZ(calc(var(--tag-height) / 2)) !important;
    -moz-transform: rotateX(90deg) translateZ(calc(var(--tag-height) / 2)) !important;
}

.status-tag-bottom {
    transform: rotateX(-90deg) translateZ(calc(var(--tag-height) / 2)) !important;
    -webkit-transform: rotateX(-90deg) translateZ(calc(var(--tag-height) / 2)) !important;
    -moz-transform: rotateX(-90deg) translateZ(calc(var(--tag-height) / 2)) !important;
}

.status-tag-right {
    transform: rotateY(90deg) translateZ(calc(var(--tag-width) / 2)) !important;
    -webkit-transform: rotateY(90deg) translateZ(calc(var(--tag-width) / 2)) !important;
    -moz-transform: rotateY(90deg) translateZ(calc(var(--tag-width) / 2)) !important;
}

.status-tag-left {
    transform: rotateY(-90deg) translateZ(calc(var(--tag-width) / 2)) !important;
    -webkit-transform: rotateY(-90deg) translateZ(calc(var(--tag-width) / 2)) !important;
    -moz-transform: rotateY(-90deg) translateZ(calc(var(--tag-width) / 2)) !important;
}

