/* ============================================
   BSP CUSTOMER PORTAL - Custom Styles
   Inspired by Modern Banking UI
   ============================================ */

/* General */
:root {
    --primary-blue: #DC2626;
    --primary-dark: #991B1B;
    --success-green: #28a745;
    --warning-yellow: #ffc107;
    --danger-red: #dc3545;
    --light-gray: #f5f7fa;
    --border-gray: #e1e8ed;
    --text-dark: #1a202c;
    --text-muted: #718096;
    --gray-50: #F4F5F7;
    --gray-100: #EBECF0;
    --gray-200: #DFE1E6;
    --gray-300: #C1C7D0;
    --gray-400: #A5ADBA;
    --gray-500: #7A869A;
    --gray-700: #42526E;
    --gray-900: #172B4D;
}

body {
    background-color: var(--light-gray);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    font-size: 14px;
}

/* ============================================
   BSP Branding & Header
   ============================================ */
.bsp-header {
    background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.1);
}

.bsp-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.bsp-logo-box {
    background: white;
    color: var(--primary-blue);
    padding: 8px 15px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 1px;
}

.bsp-tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    margin: 0;
}

/* Step Progress Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border-radius: 25px;
    border: 2px solid var(--border-gray);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.step-item.active {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
}

.step-item.completed {
    border-color: var(--success-green);
    background: var(--success-green);
    color: white;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: white;
    color: var(--primary-blue);
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
}

.step-item.active .step-number {
    background: white;
    color: var(--primary-blue);
}

.step-item.completed .step-number {
    background: white;
    color: var(--success-green);
}

/* Desk Cards (Index Page) */
.desk-card {
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
}

.desk-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.15);
}

.desk-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Desk Page Header */
.desk-badge {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

/* Card Styling */
.bsp-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-gray);
    overflow: hidden;
}

.bsp-card-header {
    background: white;
    border-bottom: 2px solid var(--light-gray);
    padding: 20px 25px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}

.bsp-card-body {
    padding: 25px;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-gray);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light-gray);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary-blue);
    background: #e6f2ff;
}

.drop-zone-icon {
    width: 34px;
    height: 34px;
    margin: 0 auto 8px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.drop-zone-text {
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 2px;
    font-weight: 500;
}

.drop-zone-hint {
    color: var(--text-muted);
    font-size: 11px;
}

.upload-info-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
}

.upload-info-box i {
    color: #856404;
}

/* File List */
.file-list {
    margin-top: 20px;
    max-height: 320px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border-gray);
    transition: all 0.2s;
}

.file-item:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.file-icon {
    width: 36px;
    height: 36px;
    background: var(--light-gray);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

.file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 500;
}

.file-size {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0 15px;
    white-space: nowrap;
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: color 0.2s;
}

.file-remove:hover {
    color: var(--danger-red);
}

/* Progress Bar */
.progress-wrapper {
    margin-top: 15px;
}

.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #198754 0%, #20c997 100%);
    transition: width 0.3s ease;
}

/* Success Icon */
.success-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 18px;
    color: white;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Status Timeline */
.status-timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 36px;
    width: 2px;
    height: calc(100% - 10px);
    background: var(--border-gray);
}

.timeline-item.completed::after {
    background: var(--success-green);
}

.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.timeline-item.completed .timeline-dot {
    border-color: var(--success-green);
    background: var(--success-green);
    color: white;
}

.timeline-item.active .timeline-dot {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(0, 102, 204, 0); }
}

.timeline-content {
    flex: 1;
    padding-top: 2px;
}

.timeline-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--text-dark);
}

.timeline-time {
    font-size: 12px;
    color: var(--text-muted);
}

.timeline-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}

/* Admin Dashboard */
.sidebar-nav {
    background: linear-gradient(180deg, #120303 0%, #2d0606 50%, #120303 100%);
    min-height: 100vh;
    width: 240px;
    position: fixed;
    left: 0;
    top: 0;
    padding: 12px;
    box-shadow: 2px 0 10px rgba(31, 5, 5, 0.5);
    border-radius: 0 16px 16px 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000;
}

.sidebar-nav::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(220, 38, 38, 0.6) 45%, rgba(255, 255, 255, 0.12));
    pointer-events: none;
}

.sidebar-nav.collapsed {
    transform: translateX(-100%);
    box-shadow: none;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    width: 100%;
    padding: 20px 10px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-weight: 700;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.sidebar-qr {
    text-align: center;
    padding: 16px;
    margin-top: auto;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-qr img,
.sidebar-qr canvas {
    border-radius: 8px;
    margin-bottom: 6px;
    width: 140px !important;
    height: 140px !important;
}
.sidebar-qr .sidebar-qr-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    display: block;
}

.sidebar-online-card {
    margin-top: auto;
    margin-bottom: 8px;
    flex-shrink: 0;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    color: #1a202c;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.sb-online-head {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #C62828;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sb-online-badge {
    margin-left: auto;
    background: #E2E8F0;
    color: #37474F;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 7px;
    letter-spacing: 0;
}
.sb-online-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}
.sb-online-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f1f3f5;
}
.sb-online-list li:last-child { border-bottom: none; }
.sb-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sb-online-dot.on { background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.sb-online-dot.off { background: #CBD5E1; }
.sb-online-code { font-weight: 700; font-size: 11px; color: #1a202c; width: 64px; flex-shrink: 0; }
.sb-online-name { font-size: 11px; color: #718096; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-online-card.sidebar-combined-card {
    padding-top: 14px;
}
.sb-combined-desk {
    text-align: center;
}
.sb-online-divider {
    border-top: 1px solid #eef1f4;
    margin: 8px 0;
}

.sidebar-desk-card {
    margin-top: auto;
    margin-bottom: 8px;
    flex-shrink: 0;
    padding: 14px 14px 12px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    text-align: center;
    color: #1a202c;
    animation: fadeInUp 0.5s ease both;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.sb-desk-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #C62828;
    font-weight: 700;
    margin-bottom: 6px;
}
.sb-desk-img {
    margin-bottom: 4px;
}
.sb-desk-img svg {
    width: 88px;
    height: 62px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.sb-desk-code {
    font-weight: 800;
    font-size: 15px;
    color: #1a202c;
}
.sb-desk-name {
    font-size: 11px;
    color: #718096;
    margin-bottom: 6px;
}
.sb-desk-comp {
    font-size: 11px;
    color: #37474F;
    background: #f1f3f5;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 3px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 8px;
    word-break: break-all;
}
.sb-desk-comp i {
    color: #1565C0;
}
.sb-desk-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sb-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f3f5;
    color: #37474F;
}
.sb-badge-on {
    background: #E8F5E9;
    color: #2E7D32;
}
.sb-badge-off {
    background: #ECEFF1;
    color: #546E7A;
}
.sb-badge-central {
    background: #EDE7F6;
    color: #5E35B1;
}
.sb-badge-warn {
    background: #FFF8E1;
    color: #B26A00;
}
.sb-badge-pusat {
    background: #E0F7FA;
    color: #00695C;
}
.sb-badge-all {
    background: #E3F2FD;
    color: #1565C0;
}
.sb-badge-rusak {
    background: #FFEBEE;
    color: #C62828;
}
.sb-dot-comp {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
}
.sb-pc-led {
    transform-origin: center;
}
.sb-pc-led-on {
    animation: sbPulse 1.8s ease-in-out infinite;
}
.sb-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4CAF50;
    display: inline-block;
    animation: sbPulse 1.6s ease-in-out infinite;
}
.sb-badge-off .sb-dot {
    background: #B0BEC5;
    animation: none;
}
.sb-pc-light {
    animation: sbLightPulse 2.4s ease-in-out infinite;
}
@keyframes sbPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.75);
    }
}
@keyframes sbLightPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.floating-qr {
    position: fixed;
    z-index: 9999;
    background: #ffffff;
    border: 2px solid #1E88E5;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    cursor: move;
    user-select: none;
    text-align: center;
    min-width: 260px;
}
.floating-qr-handle {
    position: absolute;
    top: -1px;
    right: -1px;
    background: #1E88E5;
    color: #fff;
    border-radius: 0 11px 0 8px;
    padding: 3px 8px;
    font-size: 12px;
    line-height: 1;
    cursor: move;
}
.floating-qr-code img,
.floating-qr-code canvas {
    display: block;
    margin: 0 auto 6px;
    width: 240px !important;
    height: 240px !important;
    border-radius: 6px;
    background: #fff;
}
.floating-qr-label {
    display: block;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 13px;
}
.floating-qr-url {
    display: block;
    color: #1E88E5;
    font-size: 11px;
    font-weight: 600;
    word-break: break-all;
    margin-top: 4px;
    cursor: pointer;
    text-decoration: underline;
}
.floating-qr-url:hover {
    color: #0d6efd;
}
.floating-qr-actions {
    margin-top: 8px;
}
.floating-qr-hide {
    position: absolute;
    top: -1px;
    left: -1px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 11px 0 8px 0;
    padding: 2px 9px;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
}
.floating-qr-show {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #1E88E5;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}
.floating-qr-actions .btn {
    font-size: 11px;
    padding: 3px 10px;
}
.floating-qr.dragging {
    opacity: 0.85;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.qr-link-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.qr-link-overlay.show {
    display: flex;
}
.qr-link-overlay-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 34px;
    text-align: center;
    max-width: 92vw;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
.qr-link-overlay-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f1f1f1;
    color: #333333;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.qr-link-overlay-close:hover {
    background: #e0e0e0;
}
.qr-link-overlay-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 14px;
}
.qr-link-overlay-url {
    display: block;
    font-family: Consolas, 'Courier New', monospace;
    font-size: clamp(1.6rem, 6vw, 3.4rem);
    font-weight: 700;
    color: #0b3b73;
    word-break: break-all;
    line-height: 1.3;
    background: #eef5fd;
    border: 2px dashed #1E88E5;
    border-radius: 10px;
    padding: 18px 20px;
    user-select: text;
    cursor: text;
}
.qr-link-overlay-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #6c757d;
}
.qr-link-overlay-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.sidebar-version {
    margin-top: auto;
    padding: 10px 8px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    border-radius: 10px;
    margin: 2px 0;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border-left: 3px solid white;
}

.sb-note-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: auto;
    background: #DC2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1;
}
.sb-note-badge-new {
    animation: cgoNewPulse 1.6s ease-in-out infinite;
    cursor: help;
    font-size: 8px;
    padding: 0 5px;
}

/* Catatan CGO - inline edit di tabel dashboard */
.cgo-new-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    background: #DC2626;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.4;
    border-radius: 999px;
    vertical-align: middle;
    animation: cgoNewPulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5);
    position: relative;
    cursor: help;
}
.cgo-new-badge::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #212529;
    color: #fff;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.45;
    padding: 7px 11px;
    border-radius: 8px;
    width: 220px;
    white-space: normal;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    pointer-events: none;
}
.cgo-new-badge::before {
    content: '';
    position: absolute;
    top: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #212529;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    z-index: 30;
}
.cgo-new-badge:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.cgo-new-badge:hover::before {
    opacity: 1;
    visibility: visible;
}
@keyframes cgoNewPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
    50% { box-shadow: 0 0 0 5px rgba(220, 38, 38, 0); }
}
.cgo-note-cell {
    display: flex;
    align-items: center;
    max-width: 200px;
    min-width: 120px;
}
.cgo-note-text {
    display: block;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    color: #37474F;
    line-height: 1.3;
    cursor: pointer;
}
.cgo-note-text.cgo-note-empty {
    color: #adb5bd;
}
.cgo-note-cell:hover .cgo-note-text { color: #1976D2; }
.cgo-note-pen {
    font-size: 11px;
    color: #adb5bd;
    flex-shrink: 0;
}
.cgo-note-cell:hover .cgo-note-pen { color: #1976D2; }
.cgo-note-input {
    width: 100%;
    min-width: 140px;
    font-size: 11px;
    padding: 3px 6px;
    border: 1px solid #1976D2;
    border-radius: 6px;
    resize: vertical;
    outline: none;
}
.cgo-note-hint {
    display: block;
    font-size: 9px;
    color: #adb5bd;
    margin-top: 2px;
    white-space: nowrap;
}

.main-content {
    margin-left: 240px;
    padding: 0;
    background: var(--light-gray);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

.top-bar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.impersonation-banner {
    background: #ffffff;
    color: #1a202c;
    padding: 8px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    flex-shrink: 0;
    border-bottom: 1px solid #e1e8ed;
}
.impersonation-banner a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    background: #DC2626;
    padding: 5px 12px;
    border-radius: 8px;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}
.impersonation-banner a:hover { background: #b91c1c; transform: translateY(-1px); }

/* Running text pengumuman maintenance */
.running-text {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FEF3C7;
    color: #92400E;
    border-bottom: 1px solid #FDE68A;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}
.running-text i { flex-shrink: 0; color: #D97706; }
.running-text-track {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}
.running-text-content {
    display: inline-block;
    padding-left: 100%;
    animation: running-text-scroll 45s linear infinite;
}
.running-text-content:hover { animation-play-state: paused; }
@keyframes running-text-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Greeting di topbar */
.greet-text { font-weight: 500; }
.greet-text strong {
    background: linear-gradient(90deg, #DC2626, #f59e0b, #DC2626);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: greetGradient 3s linear infinite;
}
@keyframes greetGradient {
    to { background-position: 200% center; }
}

/* Hero sapaan dashboard CGO */
.greet-hero {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    color: #fff;
    padding: 10px 16px;
    background: linear-gradient(120deg, #DC2626 0%, #991B1B 55%, #7f1d1d 100%);
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.3);
    flex-shrink: 0;
}
.greet-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.gh-bubble {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    animation: ghFloat 7s ease-in-out infinite;
}
.gh-bubble.b1 { width: 70px; height: 70px; top: -30px; right: 8%; }
.gh-bubble.b2 { width: 45px; height: 45px; bottom: -18px; left: 12%; animation-delay: 1.5s; }
.gh-bubble.b3 { width: 28px; height: 28px; top: 8px; left: 30%; animation-delay: 3s; }
.gh-bubble.b4 { width: 18px; height: 18px; bottom: 12px; right: 30%; animation-delay: 4.5s; }
@keyframes ghFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.08); }
}
.greet-hero-content { position: relative; display: flex; align-items: center; gap: 12px; }
.greet-hero-emoji {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    animation: emojiBob 2.6s ease-in-out infinite;
}
@keyframes emojiBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(-4deg); }
}
.greet-hero-title { margin: 0 0 2px; font-weight: 800; font-size: 15px; letter-spacing: -0.3px; }
.greet-hero-sub { font-size: 12px; opacity: 0.95; }
.greet-hero-date {
    display: inline-block;
    margin-top: 4px;
    font-size: 10.5px;
    background: rgba(255,255,255,0.16);
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

/* Angka statistik count-up */
.stat-card .stat-card-body > div { transition: color 0.3s; }

/* ===== Ringkasan per CGO (superadmin) ===== */
.cgo-summary-wrap .cgo-card {
    width: 4in;
    max-width: 100%;
    border: none;
    border-radius: 8px;
    background: #fff;
}
.cgo-summary-wrap .cgo-card .card-body {
    padding: 6px 8px;
}
.cgo-summary-wrap {
    display: flex;
    justify-content: flex-start;
}
.cgo-donut {
    line-height: 0;
    margin-top: 8px;
}
.cgo-donut svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 340px;
    margin: 0 auto;
}
.cgo-donut svg a,
.cgo-donut svg a text,
.cgo-donut svg a * {
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
    border-bottom: none !important;
}
.cgo-donut svg a path,
.cgo-donut svg a line {
    transition: stroke-width 0.15s ease, opacity 0.15s ease;
}
.cgo-donut svg a path {
    stroke-width: 26;
}
.cgo-donut svg a:hover path {
    stroke-width: 32;
}
.cgo-donut svg a.cgo-active path {
    stroke-width: 30;
}
.cgo-donut svg a.cgo-active:hover path {
    stroke-width: 34;
}
.cgo-donut svg a line {
    stroke-width: 1;
    opacity: 0.45;
}
.cgo-donut svg a:hover line {
    stroke-width: 2;
    opacity: 0.8;
}
.cgo-donut svg a.cgo-active line {
    stroke-width: 2;
    opacity: 0.8;
}
.cgo-donut svg a.cgo-active text {
    fill: #DC2626;
    font-size: 11px;
    font-weight: 800;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-right: 12px;
}
.sidebar-toggle:hover {
    background: #f0f0f0;
    color: #DC2626;
}

/* Sync icon spin */
.sync-icon {
    animation: sync-spin 2s linear infinite;
    font-size: 14px;
    display: inline-block;
}
@keyframes sync-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.content-area {
    padding: 25px 30px 0 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.stat-card {
    background: white;
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

a.stat-card {
    display: block;
    text-decoration: none;
    cursor: pointer;
    color: inherit;
}

a.stat-card.active {
    outline: 2px solid #b02a37;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-card-body {
    padding: 20px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 24px;
}

.stat-icon.blue { background: #fee2e2; color: var(--primary-blue); }
.stat-icon.yellow { background: #fff8e1; color: #ff9800; }
.stat-icon.green { background: #e8f5e9; color: #4caf50; }
.stat-icon.red { background: #ffebee; color: #f44336; }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Table */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

/* Status Badges */
.badge-waiting { background: #ffc107; color: #000; }
.badge-processing { background: #0dcaf0; color: #000; }
.badge-completed { background: #198754; }
.badge-cancelled { background: #dc3545; }

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 20px;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-outline-primary {
    color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
}

.btn-outline-primary:hover {
    background: var(--primary-blue) !important;
    color: #fff !important;
}

.text-primary {
    color: var(--primary-blue) !important;
}

.bg-primary {
    background-color: var(--primary-blue) !important;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* Data Table */
.data-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.data-table table {
    margin-bottom: 0;
}

.data-table thead {
    background: var(--light-gray);
}

.data-table thead th {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-gray);
    padding: 15px;
}

.data-table tbody td {
    font-size: 13px;
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid var(--light-gray);
}

/* Form Styling */
.form-label {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-control,
.form-select {
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Alert Boxes */
.info-alert {
    background: #e6f2ff;
    border-left: 4px solid var(--primary-blue);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
}

/* Badge Enhancements */
.badge {
    padding: 5px 10px;
    font-weight: 500;
    font-size: 11px;
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-nav {
        transform: translateX(-100%);
        z-index: 1050;
    }

    .sidebar-nav.collapsed {
        transform: translateX(-100%);
    }

    .sidebar-nav.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1049;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

    /* Burger tetap di atas sidebar saat terbuka, supaya bisa dipakai menutup */
    .sidebar-toggle {
        position: relative;
        z-index: 1060;
    }
    .sidebar-nav.open ~ .main-content .sidebar-toggle {
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
    }
    .sidebar-nav.open ~ .main-content .sidebar-toggle:hover {
        background: rgba(255, 255, 255, 0.25);
    }
    
    .step-indicator {
        flex-direction: column;
        gap: 10px;
        padding: 0 10px;
    }
    
    .step-item {
        padding: 8px 14px;
        font-size: 12px;
    }

    .desk-icon {
        font-size: 36px;
    }
    
    .drop-zone {
        padding: 12px 10px;
    }

    .drop-zone-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .customer-page .card-body {
        padding: 16px !important;
    }

    .customer-page h5 {
        font-size: 16px;
    }

    .customer-page h4 {
        font-size: 18px;
    }

    .desk-badge {
        font-size: 13px;
        padding: 6px 14px;
    }

    .btn.btn-upload {
        padding: 10px 20px;
        font-size: 14px;
        width: 100% !important;
    }

    .btn-review-cgo {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .cgo-profile-photo {
        width: 72px;
        height: 72px;
    }

    .cgo-photo-wrapper {
        padding: 3px;
    }

    .online-dot {
        width: 14px;
        height: 14px;
        bottom: 2px;
        right: 2px;
        border-width: 2px;
    }

    .success-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .info-alert {
        font-size: 12px;
    }

    .form-label {
        font-size: 12px;
    }

    .form-control.form-control-sm {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 375px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .customer-page .card-body {
        padding: 12px !important;
    }

    .desk-badge {
        font-size: 12px;
        padding: 5px 12px;
    }

    .customer-page h4 {
        font-size: 16px;
    }

    .btn-review-cgo {
        font-size: 13px;
        padding: 9px 16px;
    }
}

/* Small laptop / 13-inch screens (768px - 1200px) */
@media (max-width: 1200px) {
    .top-bar {
        padding: 10px 16px;
    }
    .top-bar h5 {
        font-size: 15px;
    }
    .content-area {
        padding: 16px 16px 0 16px;
    }
    .data-table thead th {
        padding: 8px 10px;
        font-size: 11px;
    }
    .data-table tbody td {
        padding: 8px 10px;
        font-size: 12px;
    }
    /* Hide less important columns on smaller screens */
    .data-table thead th:nth-child(4),
    .data-table tbody td:nth-child(4) {
        display: none;
    }
    .data-table thead th:nth-child(10),
    .data-table tbody td:nth-child(10) {
        display: none;
    }
}

@media (max-width: 992px) {
    .data-table thead th:nth-child(3),
    .data-table tbody td:nth-child(3) {
        display: none;
    }
    .data-table thead th:nth-child(7),
    .data-table tbody td:nth-child(7) {
        display: none;
    }
}

/* iPhone 15 / Mobile Small (393px - 430px) */
@media (max-width: 430px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .step-indicator {
        gap: 6px;
        padding: 0 2px;
    }

    .step-item {
        padding: 6px 10px;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
    }

    .step-number {
        width: 22px;
        height: 22px;
        font-size: 11px;
        min-width: 22px;
    }

    .customer-page .card-body {
        padding: 12px !important;
    }

    .card-body.p-4 {
        padding: 14px !important;
    }

    h5.fw-bold {
        font-size: 14px;
    }

    .badge.px-3.py-2 {
        padding: 4px 10px !important;
        font-size: 11px;
    }

    .btn {
        font-size: 13px;
        padding: 8px 14px;
    }

    .btn-review-cgo {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Fix table overflow on success page */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 12px;
    }

    .table td, .table th {
        white-space: nowrap;
        padding: 6px 8px;
    }

    /* Detail card on mobile */
    .col-lg-4 .card {
        position: static !important;
        margin-top: 12px;
    }

    .col-lg-4 .card-body {
        padding: 12px !important;
    }

    .col-lg-4 .card-body small {
        font-size: 11px;
    }

    .col-lg-4 .card-body strong {
        font-size: 13px;
    }

    /* Timeline compact */
    .status-timeline {
        padding-left: 8px;
    }

    .timeline-item {
        padding-left: 32px;
    }

    .timeline-dot {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .timeline-title {
        font-size: 13px;
    }

    .timeline-time {
        font-size: 11px;
    }

    .timeline-status {
        font-size: 10px;
        padding: 2px 8px;
    }

    /* Upload page header - keep desk name & CGO on right */
    #step1 > .d-flex.justify-content-between.align-items-center.mb-3 {
        gap: 2px;
    }
    #step1 > .d-flex.justify-content-between.align-items-center.mb-3 h5 {
        font-size: 14px;
    }
    #step1 > .d-flex.justify-content-between.align-items-center.mb-3 .text-end {
        text-align: right !important;
    }
    #step1 > .d-flex.justify-content-between.align-items-center.mb-3 .text-end .fw-bold {
        font-size: 12px !important;
    }
    #step1 > .d-flex.justify-content-between.align-items-center.mb-3 .text-end .text-muted {
        font-size: 10px !important;
    }

    /* Upload page form rows */
    #step1 .row.g-2 > .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Success step card */
    #step2 .card.bg-light .card-body.p-4 {
        padding: 16px 12px !important;
    }
    #step2 h4.fw-bold {
        font-size: 16px;
    }
    #step2 .cgo-profile-photo {
        width: 56px;
        height: 56px;
    }

    /* Desk cards responsive */
    .desk-card {
        padding: 10px 8px 12px;
    }
    .desk-card-image svg {
        width: 72px;
        height: 54px;
    }
    .desk-card-image {
        margin-bottom: 8px;
        padding: 4px 0;
    }
    .desk-card-code {
        font-size: 13px;
    }
    .desk-card-name {
        font-size: 11px;
    }
    .desk-card-agent {
        font-size: 10px;
        margin-bottom: 6px;
    }
    .desk-card-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    .desk-card .desk-card-url-wrap small {
        font-size: 9px !important;
    }
    .desk-card-actions {
        opacity: 1;
    }
    .desk-action-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    /* Settings page header - tambah meja button */
    .chart-container .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-wrap: wrap;
        gap: 8px;
    }
    .chart-container .d-flex.justify-content-between.align-items-center.mb-4 h6 {
        font-size: 14px;
    }
    .chart-container .d-flex.justify-content-between.align-items-center.mb-4 .btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    /* Order info row */
    .d-flex.justify-content-between.align-items-start.mb-4 {
        flex-direction: column;
        gap: 8px;
    }

    .d-flex.justify-content-between.align-items-start.mb-4 .badge {
        align-self: flex-start;
    }

    /* Form elements on desk.php */
    .form-label {
        font-size: 12px;
        margin-bottom: 3px;
    }

    input.form-control,
    textarea.form-control {
        font-size: 13px;
        padding: 8px 10px;
    }

    .drop-zone {
        padding: 20px 10px;
        min-height: 100px;
    }

    .drop-zone p {
        font-size: 12px;
    }

    .file-item {
        padding: 6px 10px;
        font-size: 12px;
    }

    .progress {
        height: 20px !important;
    }
    .progress-bar {
        font-size: 11px;
        line-height: 20px;
    }
}


/* ============================================
   Desk Card Styling
   ============================================ */
.desk-card {
    background: white;
    border: 1px solid #E1E8ED;
    border-radius: 10px;
    padding: 14px 12px 16px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.desk-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue);
}

.desk-card.desk-card-central {
    border: 2px solid #C62828;
    background: linear-gradient(180deg, #FDECEC 0%, #FFFFFF 45%);
    box-shadow: 0 4px 14px rgba(198, 40, 40, 0.22);
    padding-top: 24px;
}

.desk-card.desk-card-central:hover {
    border-color: #B71C1C;
    box-shadow: 0 8px 20px rgba(198, 40, 40, 0.35);
}

.desk-central-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #C62828;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 3px 0;
    border-radius: 9px 9px 0 0;
    z-index: 5;
}

.desk-badge-central {
    background: #C62828 !important;
    color: #FFFFFF !important;
    font-weight: 600;
}

.desk-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.desk-card:hover .desk-card-actions {
    opacity: 1;
}

.desk-action-btn {
    background: white;
    border: 1px solid #E1E8ED;
    border-radius: 5px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #718096;
    font-size: 12px;
}

.desk-action-btn:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    transform: scale(1.05);
}

.desk-card-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.desk-card-content {
    text-align: center;
    min-width: 0;
    overflow: hidden;
}

.desk-card-code {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 5px 0;
    letter-spacing: 0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desk-card-name {
    font-size: 12px;
    color: var(--gray-700);
    margin: 0 0 3px 0;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desk-card-agent {
    font-size: 11px;
    color: var(--gray-500);
    margin: 0 0 10px 0;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desk-card-url-wrap {
    min-width: 0;
    overflow: hidden;
}
.desk-card-url-wrap small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    min-width: 0;
}

.desk-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
}

.desk-card-badge i {
    font-size: 12px;
}

.desk-card-badge.active {
    background: #E8F5E9;
    color: #2E7D32;
}

.desk-card-badge.inactive {
    background: #F5F5F5;
    color: #9E9E9E;
}


/* ============================================
   Desk Badge Mini (for table)
   ============================================ */
.desk-badge-mini {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #E8F0FE;
    border: 1px solid #C5D9F5;
    border-radius: 12px;
    padding: 4px 10px 4px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #1967D2;
    white-space: nowrap;
}

.desk-badge-mini svg {
    flex-shrink: 0;
}

/* ============================================
   Customer Upload - Red Theme (form only)
   ============================================ */

.customer-page .bsp-header {
    background: linear-gradient(135deg, #DC2626 0%, #991B1B 50%, #7F1D1D 100%);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.25);
}

.customer-page .bsp-header .bsp-logo-box {
    background: rgba(255, 255, 255, 0.95);
    color: #DC2626;
}

.customer-page .desk-badge {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    box-shadow: 0 3px 12px rgba(220, 38, 38, 0.3);
}

.customer-page .step-item.active {
    border-color: #DC2626;
    background: linear-gradient(135deg, #DC2626, #B91C1C);
}

.customer-page .step-item.active .step-number {
    color: #DC2626;
}

.customer-page .step-item.completed {
    border-color: #059669;
    background: linear-gradient(135deg, #059669, #047857);
}

.customer-page .drop-zone:hover,
.customer-page .drop-zone.dragover {
    border-color: #DC2626;
    background: #FEF2F2;
}

.customer-page .drop-zone-icon {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.customer-page .btn-success {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    border: none;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.customer-page .btn-success:hover {
    background: linear-gradient(135deg, #B91C1C, #991B1B);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.customer-page .progress-bar {
    background: linear-gradient(90deg, #DC2626 0%, #F87171 100%);
}

.customer-page .form-control:focus,
.customer-page .form-select:focus {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.customer-page .info-alert {
    background: #FEF2F2;
    border-left: 4px solid #DC2626;
}

.customer-page .info-alert i {
    color: #DC2626;
}

.btn.btn-upload {
    background: #DC2626 !important;
    border: none;
    color: white !important;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto !important;
    max-width: fit-content;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
    transition: all 0.3s ease;
    animation: pulseRed 2s infinite;
}

.btn.btn-upload:hover:not(:disabled) {
    background: #991B1B !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(220, 38, 38, 0.45);
}

.btn.btn-upload:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35); }
    50% { box-shadow: 0 4px 24px rgba(220, 38, 38, 0.6), 0 0 0 8px rgba(220, 38, 38, 0.15); }
}

.btn-review-cgo {
    background: linear-gradient(135deg, #DC2626, #991B1B);
    border: none;
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    max-width: fit-content;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulseRedReview 2s infinite;
}

.btn-review-cgo:hover {
    background: linear-gradient(135deg, #991B1B, #7F1D1D);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(220, 38, 38, 0.5);
    animation: none;
}

@keyframes pulseRedReview {
    0%, 100% { box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35); }
    50% { box-shadow: 0 4px 28px rgba(220, 38, 38, 0.65), 0 0 0 8px rgba(220, 38, 38, 0.15); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
}

.cgo-profile-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    position: relative;
    z-index: 1;
}

.cgo-photo-wrapper {
    display: inline-block;
    position: relative;
    padding: 4px;
    border-radius: 50%;
}

.cgo-photo-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #DC2626, #EF4444, #F87171, #DC2626);
    background-size: 300% 300%;
    animation: borderGlow 3s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.cgo-photo-wrapper.is-online::before {
    animation: borderGlow 3s ease infinite;
}

.online-dot {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: #22C55E;
    border: 3px solid white;
    border-radius: 50%;
    z-index: 2;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast-container .toast-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}
.toast-container .toast-item.toast-success { background: #16a34a; }
.toast-container .toast-item.toast-danger  { background: #dc2626; }
.toast-container .toast-item.toast-warning { background: #d97706; }
.toast-container .toast-item.toast-out {
    animation: toastOut 0.3s ease forwards;
}
.toast-container .toast-item .toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 0 0 4px;
}
.toast-container .toast-item .toast-close:hover { color: #fff; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(40px); }
}
