/* --- CW STYLE GUIDE VARIABLES --- */
        :root {
            --cw-blue: #026ccf;
            --cw-text: #212121;
            --cw-border: #cccccc;
            --cw-bg-gray: #f2f2f2;
            --cw-shadow: 0 2px 4px 0 rgba(0,0,0,0.5);
            --brand-green: #29ad10; 
            --error-red: #d32f2f;
        }

        /* --- GLOBAL RESET --- */
        * { box-sizing: border-box; }

        body { 
            margin: 0; 
            padding: 0; 
            font-family: 'Roboto', sans-serif;
            font-size: 13px;
            color: var(--cw-text);
            background-color: #ffffff; 
            overflow-x: hidden; 
        }

        /* --- MAIN CONTAINER --- */
        .container {
            padding: 12px;
            max-width: 100%;
            position: relative;
        }

        /* --- HEADER --- */
        header {
            display: flex; 
            align-items: center; 
            justify-content: space-between;
            margin-bottom: 12px;
            padding-bottom: 6px;
            border-bottom: 1px solid #e0e0e0; 
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .header-logo {
            height: 18px; 
            width: auto;
            object-fit: contain;
        }

        .ticket-badge {
            font-size: 11px;
            color: #666;
            font-weight: 500;
            background-color: #f5f5f5;
            padding: 2px 6px;
            border-radius: 4px;
        }

        /* --- FORM GRID --- */
        .grid-row {
            display: grid; 
            grid-template-columns: 1fr 1fr; 
            gap: 10px; 
            margin-bottom: 8px;
        }

        .grid-row-3 {
            display: grid;
            grid-template-columns: 0.8fr 1.1fr 1.1fr; 
            gap: 8px;
            margin-bottom: 8px;
            align-items: start; 
        }

        .input-group {
            display: flex;
            flex-direction: column;
            margin-bottom: 8px;
        }

        label {
            display: block; 
            font-weight: 500; 
            margin-bottom: 3px; 
            font-size: 11px; 
            color: #026ccf; 
        }

        .std-input {
            width: 100%; 
            padding: 4px 6px; 
            border: 1px solid var(--cw-border); 
            border-radius: 2px; 
            font-size: 12px; 
            color: var(--cw-text); 
            background-color: #ffffff; 
            height: 28px; 
            transition: border-color 0.2s;
            font-family: 'Roboto', sans-serif; 
        }

        input[type="datetime-local"] { color: #444; }
        
        .std-input:focus { 
            outline: none; 
            border-color: var(--cw-blue); 
        }

        textarea.std-input {
            height: auto;
            min-height: 50px;
            resize: vertical;
        }

        /* --- CHIPS --- */
        .chip-container {
            display: flex;
            gap: 4px;
            margin-top: 5px;
            flex-wrap: wrap; 
        }
        
        .time-chip {
            background: #f5f5f5;
            border: 1px solid #ddd;
            border-radius: 10px;
            padding: 2px 6px;
            font-size: 10px;
            color: #666;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .time-chip:hover { background: #e0e0e0; }

        .time-chip.active {
            background: #e3f2fd; 
            border-color: var(--cw-blue);
            color: var(--cw-blue);
            font-weight: 500;
        }

        /* --- TOGGLE LINK --- */
        .toggle-link {
            font-size: 11px;
            color: var(--cw-blue);
            text-decoration: none;
            cursor: pointer;
            font-weight: 500;
            display: inline-block;
            margin-bottom: 10px;
            user-select: none;
        }
        .toggle-link:hover { text-decoration: underline; }
        
        /* --- COLLAPSIBLE SECTION --- */
        #additionalOptions {
            display: none; 
            padding-top: 5px;
            border-top: 1px dashed #eee;
            margin-top: 5px;
        }

        /* --- BUTTONS & STATUS --- */
        .footer-actions {
            margin-top: 8px;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
        }

        .btn-row {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            width: 100%;
        }

        .status-msg {
            margin-top: 6px;
            font-size: 11px;
            min-height: 16px; 
            text-align: right;
            width: 100%;
            font-weight: 500;
        }

        .status-error { color: var(--error-red); }
        .status-success { color: var(--brand-green); }

        .btn-base {
            height: 30px; 
            border-radius: 3px; 
            font-size: 12px; 
            font-weight: 700; 
            cursor: pointer; 
            padding: 0 20px;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            text-transform: uppercase;
            transition: all 0.2s ease;
        }

        .secondary-btn {
            background-color: #ffffff;
            color: var(--cw-text); 
            border: 1px solid var(--cw-border);
        }
        .secondary-btn:hover { background-color: #f9f9f9; border-color: #999; }

        .primary-btn {
            background-color: var(--brand-green); 
            color: white; 
            border: 1px solid transparent; 
        }
        
        .primary-btn:hover { 
            background-color: #ffffff; 
            color: var(--brand-green);
            border: 1px solid var(--brand-green);
        }
        
        .primary-btn:disabled { background-color: #b0b0b0; border-color: transparent; color: white; cursor: not-allowed; }

        /* --- HISTORY LOG SECTION --- */
        .history-container {
            margin-top: 15px;
            border-top: 1px solid #e0e0e0;
            padding-top: 10px;
        }

        .history-header {
            font-size: 11px;
            font-weight: 700;
            color: #616161;
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .history-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .history-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 0;
            border-bottom: 1px solid #f0f0f0;
            font-size: 12px;
        }
        
        .history-item:last-child { border-bottom: none; }

        .history-info {
            display: flex;
            flex-direction: column;
        }

        .history-service {
            font-weight: 500;
            color: var(--cw-text);
        }

        .history-time {
            font-size: 10px;
            color: #888;
            margin-top: 1px;
        }

        .history-status {
            font-size: 9px;
            padding: 2px 5px;
            border-radius: 3px;
            background-color: #e3f2fd;
            color: var(--cw-blue);
            font-weight: 700;
            text-transform: uppercase;
        }
        
        .empty-history {
            font-size: 11px;
            color: #999;
            font-style: italic;
            padding: 5px 0;
        }

        /* --- MODAL --- */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(255,255,255,0.8); 
            z-index: 200;
            align-items: center;
            justify-content: center;
        }

        .modal-box {
            width: 90%;
            max-width: 320px;
            background-color: #ffffff;
            box-shadow: var(--cw-shadow);
            border: 1px solid var(--cw-border);
            padding: 20px 20px 12px 20px; 
            display: flex;
            flex-direction: column;
        }

        .modal-header {
            font-size: 14px;
            color: var(--cw-blue);
            margin-bottom: 12px;
            font-weight: 500;
        }

        .modal-body {
            font-size: 13px;
            color: var(--cw-text);
            margin-bottom: 20px;
            line-height: 1.4;
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
        }

        /* --- SUCCESS VIEW --- */
        .success-view {
            display: none;
            text-align: center;
            padding: 30px 15px;
            animation: fadeIn 0.3s ease;
        }

        .success-icon {
            font-size: 32px;
            color: var(--brand-green);
            margin-bottom: 10px;
            display: block;
        }
        
        .skeleton { color: transparent; background: #e0e0e0; border-radius: 2px; }
