/**
 * Shop Floor Kiosk Styles
 * Optimized for 10" tablet touch interface
 * Version 6.0.0
 */

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

.shop-floor-body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.shop-floor-kiosk {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    color: white;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

/* ==========================================================================
   LOADING SCREEN
   ========================================================================== */

.shop-floor-kiosk .loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.shop-floor-kiosk .loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.shop-floor-kiosk .loading-text {
    margin-top: 20px;
    font-size: 22px;
    opacity: 0.8;
}

/* ==========================================================================
   SCREEN CONTAINER
   ========================================================================== */

.shop-floor-kiosk .screen {
    display: none;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
}

.shop-floor-kiosk .screen.active {
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */

.shop-floor-kiosk .login-screen {
    align-items: center;
    justify-content: center;
}

.shop-floor-kiosk .login-header {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.shop-floor-kiosk .btn-refresh {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 24px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 56px;
    min-height: 56px;
}

.shop-floor-kiosk .btn-refresh:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.3);
}

.shop-floor-kiosk .version-tag {
    font-size: 14px;
    opacity: 0.5;
}

.shop-floor-kiosk .login-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 12px;
}

.shop-floor-kiosk .login-subtitle {
    font-size: 22px;
    opacity: 0.8;
    margin-bottom: 32px;
}

.shop-floor-kiosk .employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    padding: 12px;
}

.shop-floor-kiosk .employee-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 100px;
}

.shop-floor-kiosk .employee-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

.shop-floor-kiosk .employee-avatar {
    font-size: 36px;
    margin-bottom: 10px;
}

/* ==========================================================================
   LOOKAHEAD SCREEN
   ========================================================================== */

.shop-floor-kiosk .lookahead-screen {
    align-items: center;
    justify-content: center;
}

.shop-floor-kiosk .lookahead-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 12px;
}

.shop-floor-kiosk .lookahead-subtitle {
    font-size: 20px;
    opacity: 0.8;
    margin-bottom: 32px;
}

.shop-floor-kiosk .lookahead-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 400px;
}

.shop-floor-kiosk .lookahead-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 24px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.shop-floor-kiosk .lookahead-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.25);
}

.shop-floor-kiosk .lookahead-btn .count {
    font-size: 16px;
    font-weight: normal;
    opacity: 0.8;
    margin-top: 6px;
}

/* ==========================================================================
   WORKCENTER SCREEN
   ========================================================================== */

.shop-floor-kiosk .workcenter-screen {
    align-items: center;
    justify-content: center;
}

.shop-floor-kiosk .workcenter-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 12px;
}

.shop-floor-kiosk .workcenter-subtitle {
    font-size: 20px;
    opacity: 0.8;
    margin-bottom: 32px;
}

.shop-floor-kiosk .workcenter-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 500px;
}

.shop-floor-kiosk .workcenter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 32px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 90px;
}

.shop-floor-kiosk .workcenter-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   CART SELECTION SCREEN
   ========================================================================== */

.shop-floor-kiosk .cart-selection-screen {
    align-items: center;
    padding-top: 48px;
}

.shop-floor-kiosk .cart-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 12px;
}

.shop-floor-kiosk .cart-subtitle {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 32px;
}

.shop-floor-kiosk .cart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    max-width: 600px;
    width: 100%;
    margin-bottom: 32px;
}

.shop-floor-kiosk .cart-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid transparent;
    border-radius: 16px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 80px;
}

.shop-floor-kiosk .cart-btn.selected {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
}

.shop-floor-kiosk .cart-btn:active {
    transform: scale(0.95);
}

/* ==========================================================================
   CUTTING SCREEN
   ========================================================================== */

.shop-floor-kiosk .cutting-screen {
    display: flex;
    flex-direction: column;
    padding: 12px;
}

/* Header */
.shop-floor-kiosk .cutting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 12px;
}

.shop-floor-kiosk .operator-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shop-floor-kiosk .operator-name {
    font-size: 20px;
    font-weight: 500;
}

.shop-floor-kiosk .btn-end {
    padding: 12px 20px;
    background: rgba(244, 67, 54, 0.3);
    border: 2px solid #f44336;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    min-height: 48px;
}

.shop-floor-kiosk .session-stats {
    display: flex;
    gap: 20px;
}

.shop-floor-kiosk .stat-box {
    text-align: center;
}

.shop-floor-kiosk .stat-value {
    font-size: 24px;
    font-weight: bold;
}

.shop-floor-kiosk .stat-best {
    color: #4caf50;
}

.shop-floor-kiosk .stat-company {
    color: #ffc107;
}

.shop-floor-kiosk .stat-label {
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
}

/* Stick Bar */
.shop-floor-kiosk .stick-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 12px;
}

.shop-floor-kiosk .stick-label {
    font-size: 16px;
    font-weight: 500;
    min-width: 60px;
}

.shop-floor-kiosk .stick-bar {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.shop-floor-kiosk .stick-bar-fill {
    height: 100%;
    background: #4caf50;
    border-radius: 12px;
    transition: width 0.3s ease;
}

.shop-floor-kiosk .stick-bar-fill.low {
    background: #ff9800;
}

.shop-floor-kiosk .stick-bar-fill.critical {
    background: #f44336;
}

.shop-floor-kiosk .stick-remaining {
    font-size: 20px;
    font-weight: bold;
    min-width: 70px;
    text-align: right;
}

/* ==========================================================================
   MAIN CUT DISPLAY - THE BIG ONE!
   ========================================================================== */

.shop-floor-kiosk .main-cut-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 12px;
    min-height: 200px;
}

.shop-floor-kiosk .main-cut-display.scrap-mode {
    background: rgba(244, 67, 54, 0.3);
}

.shop-floor-kiosk .main-cut-display.store-mode {
    background: rgba(255, 152, 0, 0.3);
}

.shop-floor-kiosk .main-cut-display.done-mode {
    background: rgba(76, 175, 80, 0.3);
}

.shop-floor-kiosk .main-cut-display.load-mode {
    background: rgba(33, 150, 243, 0.3);
}

/* Material and color info */
.shop-floor-kiosk .cut-material {
    font-size: 22px;
    opacity: 0.9;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.shop-floor-kiosk .color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
}

.shop-floor-kiosk .color-dot.color-white {
    background: #ffffff;
    border: 2px solid #ccc;
}

.shop-floor-kiosk .color-dot.color-bronze {
    background: #8B4513;
}

.shop-floor-kiosk .color-dot.color-mill {
    background: #C0C0C0;
}

.shop-floor-kiosk .color-dot.color-black {
    background: #333333;
}

.shop-floor-kiosk .color-dot.color-other {
    background: #888888;
}

/* THE CUT LENGTH - BIGGEST ELEMENT */
.shop-floor-kiosk .cut-length-big {
    font-size: 96px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Cart location */
.shop-floor-kiosk .cut-location-big {
    font-size: 48px;
    font-weight: bold;
    color: #4caf50;
    margin-bottom: 12px;
}

/* Order info */
.shop-floor-kiosk .cut-info {
    font-size: 20px;
    opacity: 0.8;
}

.shop-floor-kiosk .cut-qty {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 12px;
}

/* ==========================================================================
   ACTION BUTTONS
   ========================================================================== */

.shop-floor-kiosk .main-actions {
    margin-bottom: 12px;
}

.shop-floor-kiosk .cutting-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.shop-floor-kiosk .cutting-actions.scrap-actions {
    grid-template-columns: 1fr;
}

.shop-floor-kiosk .btn {
    padding: 20px 24px;
    border: none;
    border-radius: 14px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 64px;
}

.shop-floor-kiosk .btn:active {
    transform: scale(0.98);
}

.shop-floor-kiosk .btn-cut-done {
    background: #4caf50;
    color: white;
    grid-column: span 2;
}

.shop-floor-kiosk .btn-primary {
    background: #2196f3;
    color: white;
}

.shop-floor-kiosk .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.shop-floor-kiosk .btn-warning {
    background: #ff9800;
    color: white;
}

.shop-floor-kiosk .btn-danger {
    background: #f44336;
    color: white;
}

/* HUGE BUTTONS */
.shop-floor-kiosk .btn-huge {
    padding: 40px 56px;
    font-size: 42px;
    border-radius: 20px;
    width: 100%;
    min-height: 100px;
}

.shop-floor-kiosk .btn-huge.btn-cut {
    background: #4caf50;
    color: white;
}

.shop-floor-kiosk .btn-huge.btn-load {
    background: #2196f3;
    color: white;
}

.shop-floor-kiosk .btn-sm {
    padding: 14px 20px;
    font-size: 16px;
    min-height: 52px;
}

.shop-floor-kiosk .secondary-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    justify-content: center;
}

/* ==========================================================================
   QUEUE PANEL
   ========================================================================== */

.shop-floor-kiosk .queue-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    max-height: 120px;
    overflow: hidden;
}

.shop-floor-kiosk .queue-header {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 10px;
}

.shop-floor-kiosk .queue-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.shop-floor-kiosk .queue-item {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    min-width: 90px;
}

.shop-floor-kiosk .queue-item.no-fit {
    opacity: 0.4;
}

.shop-floor-kiosk .qi-len {
    font-weight: bold;
    font-size: 20px;
}

.shop-floor-kiosk .qi-loc {
    color: #4caf50;
    font-size: 16px;
}

.shop-floor-kiosk .empty-state-text {
    font-size: 18px;
    opacity: 0.6;
    text-align: center;
    padding: 12px;
}

/* ==========================================================================
   MODAL
   ========================================================================== */

.shop-floor-kiosk .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.shop-floor-kiosk .modal {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}

.shop-floor-kiosk .modal-header {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-floor-kiosk .modal-header h2 {
    font-size: 28px;
    margin: 0 0 8px 0;
}

.shop-floor-kiosk .modal-header p {
    font-size: 18px;
    opacity: 0.8;
    margin: 0;
}

.shop-floor-kiosk .modal-body {
    padding: 24px;
}

.shop-floor-kiosk .material-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
}

.shop-floor-kiosk .material-info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-floor-kiosk .material-info-row:last-child {
    border-bottom: none;
}

.shop-floor-kiosk .material-info-label {
    opacity: 0.7;
    font-size: 18px;
}

.shop-floor-kiosk .material-info-value {
    font-weight: bold;
    font-size: 18px;
}

.shop-floor-kiosk .material-info-value.highlight {
    color: #4caf50;
    font-size: 22px;
}

.shop-floor-kiosk .upcoming-cuts h3 {
    font-size: 18px;
    margin: 0 0 12px 0;
    opacity: 0.8;
}

.shop-floor-kiosk .upcoming-cut-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 18px;
}

.shop-floor-kiosk .modal-actions {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-floor-kiosk .modal-actions .btn {
    width: 100%;
    font-size: 24px;
    padding: 24px;
}

/* ==========================================================================
   PICK LIST SCREEN
   ========================================================================== */

.shop-floor-kiosk .picklist-screen {
    align-items: center;
    padding: 20px;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}

.shop-floor-kiosk .picklist-header {
    text-align: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.shop-floor-kiosk .picklist-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
}

.shop-floor-kiosk .picklist-subtitle {
    font-size: 18px;
    opacity: 0.8;
}

.shop-floor-kiosk .picklist-summary {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    flex-shrink: 0;
}

.shop-floor-kiosk .summary-item {
    text-align: center;
}

.shop-floor-kiosk .summary-value {
    font-size: 32px;
    font-weight: bold;
    display: block;
    color: #4caf50;
}

.shop-floor-kiosk .summary-label {
    font-size: 14px;
    opacity: 0.8;
    text-transform: uppercase;
}

.shop-floor-kiosk .picklist-items {
    width: 100%;
    max-width: 600px;
    flex-shrink: 0;
}

.shop-floor-kiosk .pick-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.shop-floor-kiosk .pick-item-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: bold;
}

.shop-floor-kiosk .pick-material {
    flex: 1;
}

.shop-floor-kiosk .pick-color {
    font-size: 18px;
    font-weight: normal;
    opacity: 0.8;
}

.shop-floor-kiosk .pick-item-details {
    display: flex;
    gap: 24px;
}

.shop-floor-kiosk .pick-detail {
    display: flex;
    gap: 6px;
    font-size: 18px;
}

.shop-floor-kiosk .pick-label {
    opacity: 0.7;
}

.shop-floor-kiosk .pick-value {
    font-weight: bold;
}

.shop-floor-kiosk .pick-sticks {
    color: #4caf50;
    font-size: 20px;
}

.shop-floor-kiosk .pick-location {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 8px;
}

.shop-floor-kiosk .picklist-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    display: flex;
    gap: 14px;
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
}

.shop-floor-kiosk .picklist-actions .btn {
    flex: 1;
    padding: 20px;
    font-size: 18px;
}
