* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 1600px;
    width: 100%;
    display: grid;
    grid-template-columns: 280px 1fr 1fr 280px;
    gap: 30px;
    background: #0f3460;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Coming Soon Banner */
.coming-soon-banner {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #ff6b6b 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

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

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-icon {
    font-size: 24px;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.banner-text {
    letter-spacing: 0.5px;
}

.banner-text strong {
    font-weight: 700;
    font-size: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* QZ Tray Setup Required Section */
.qz-setup-required {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #2a1a2e 0%, #1a1a2e 100%);
    border: 2px solid #ff6b6b;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.qz-setup-content {
    max-width: 100%;
}

.qz-setup-content .help-content {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.qz-setup-content .help-content h3 {
    color: #00d4ff;
    margin-bottom: 10px;
}

.qz-setup-content .help-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.qz-setup-content .help-content ol,
.qz-setup-content .help-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
    line-height: 1.8;
}

.qz-setup-content .help-content li {
    margin-bottom: 8px;
}

/* Hide main content when QZ setup is required */
.container.qz-setup-blocked .sidebar,
.container.qz-setup-blocked .form-section,
.container.qz-setup-blocked .preview-section,
.container.qz-setup-blocked .logo-sidebar {
    opacity: 0.3;
    pointer-events: none;
    filter: blur(2px);
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Floating User Menu */
.floating-user-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #1a5f7a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
    border: 3px solid rgba(0, 212, 255, 0.3);
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.6);
    border-color: #00d4ff;
}

.user-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 280px;
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 212, 255, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 20px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #1a5f7a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
    border: 3px solid rgba(0, 212, 255, 0.5);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 18px;
    font-weight: bold;
    color: #00d4ff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-dropdown-menu {
    padding: 10px;
}

.dropdown-item {
    width: 100%;
    padding: 12px 15px;
    background: transparent;
    border: none;
    color: #e0e0e0;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 5px;
}

.dropdown-item:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    transform: translateX(5px);
}

.dropdown-item.logout:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.dropdown-icon {
    font-size: 18px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 212, 255, 0.2);
    margin: 8px 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auction-name-controls {
    display: flex;
    gap: 10px;
}

.auction-dropdown {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.auction-dropdown:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.5);
}

.auction-dropdown:focus {
    outline: none;
    border-color: #00d4ff;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.auction-dropdown option {
    background: #0f3460;
    color: #e0e0e0;
    padding: 10px;
}

.auction-dropdown option:checked {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
}

.create-auction-btn {
    background: linear-gradient(135deg, #51cf66 0%, #2f9e44 100%);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-auction-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(81, 207, 102, 0.4);
}

label {
    font-size: 14px;
    font-weight: 600;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input {
    padding: 12px 16px;
    border: 2px solid #1a5f7a;
    border-radius: 8px;
    background: #16213e;
    color: #e0e0e0;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

input[type="file"] {
    padding: 8px;
    font-size: 14px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    padding: 8px 16px;
    background: #1a5f7a;
    color: #e0e0e0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background: #00d4ff;
    color: #0f3460;
}

.clear-image-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.clear-image-btn:hover {
    background: #c82333;
}

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

/* Settings Section */
.settings-section {
    margin-bottom: 15px;
    padding: 15px;
    background: #16213e;
    border-radius: 10px;
    border: 1px solid #1a5f7a;
}

.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #00d4ff;
    font-weight: 600;
    cursor: default;
}

.toggle-text {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tooltip-icon {
    cursor: help;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.tooltip-icon:hover {
    opacity: 1;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1a5f7a;
    transition: 0.4s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Barcode Indicator */
.barcode-indicator {
    color: #00ff00;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Print Help Section */
.print-help {
    margin-top: 15px;
    background: #16213e;
    border-radius: 10px;
    overflow: hidden;
}

.print-help details {
    cursor: pointer;
}

.print-help summary {
    padding: 12px 16px;
    font-size: 13px;
    color: #00d4ff;
    font-weight: 600;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.print-help summary::-webkit-details-marker {
    display: none;
}

.print-help summary::before {
    content: '▶';
    font-size: 10px;
    transition: transform 0.3s ease;
}

.print-help details[open] summary::before {
    transform: rotate(90deg);
}

.print-help summary:hover {
    background: #1a5f7a;
}

.help-content {
    padding: 16px;
    font-size: 12px;
    line-height: 1.6;
    color: #e0e0e0;
    border-top: 1px solid #1a5f7a;
}

.help-content h3 {
    font-size: 14px;
    color: #00d4ff;
    margin-bottom: 12px;
}

.help-content ol {
    margin-left: 20px;
    margin-bottom: 0;
}

.help-content li {
    margin-bottom: 10px;
}

.help-content ul {
    margin-left: 20px;
    margin-top: 6px;
}

.help-content ul li {
    margin-bottom: 4px;
}

.help-content strong {
    color: #00d4ff;
}

.help-content code {
    background: #1a5f7a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #00d4ff;
}


.print-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #0f3460;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.5);
}

.print-btn:active {
    transform: translateY(0);
}

.preview-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-title {
    font-size: 20px;
    color: #00d4ff;
    font-weight: 600;
}

.label-preview-container {
    background: #1a1a2e;
    padding: 30px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #1a5f7a;
}

.label-preview {
    width: 288px;
    height: 144px;
    background: white;
    color: #000;
    padding: 9px;
    border-radius: 4px;
    display: flex;
    flex-direction: row;
    gap: 9px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-family: Arial, sans-serif;
}

.label-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
}

.label-image-container {
    width: 79px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
}

.label-image {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.label-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.label-image.empty {
    font-size: 9px;
    color: #999;
    text-align: center;
}

.label-image.empty::after {
    content: 'No Logo';
}

.label-header {
    font-size: 12px;
    font-weight: bold;
    border-bottom: 2px solid #000;
    padding-bottom: 2px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.label-field {
    font-size: 11px;
    margin-bottom: 4px;
    line-height: 1.3;
}

/* Buyer field - single line with separator */
.label-field:has(strong:contains("Buyer")),
.label-field:first-of-type {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #ddd;
    padding-bottom: 3px;
    margin-bottom: 4px;
}

/* Item field - label on one line, item name below with 2-line limit */
.label-field:has(strong:contains("Item")),
.label-field:nth-of-type(2) {
    white-space: normal;
    word-wrap: break-word;
    font-size: 11px;
    display: flex;
    flex-direction: column;
}

.label-field:has(strong:contains("Item")) strong,
.label-field:nth-of-type(2) strong {
    display: block;
    margin-bottom: 2px;
}

/* Item name span - max 2 lines with auto font reduction */
.label-field:has(strong:contains("Item")) span,
.label-field:nth-of-type(2) span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
    max-height: calc(1.2em * 2);
    font-size: 11px;
}

.label-field strong {
    font-weight: bold;
    display: inline-block;
    min-width: 65px;
}

.label-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 4px;
    border-top: 1px solid #ccc;
}

.label-date {
    font-size: 9px;
    text-align: left;
    line-height: 1;
}

.label-website {
    font-size: 12px;
    text-align: right;
    color: #666;
    line-height: 1;
    font-weight: 500;
}

.label-auction-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
}

/* Auction number with circle in preview - now under logo */
#prevAuction {
    display: inline-block;
    font-size: 20px;
    font-weight: bold;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border: 2px solid #000;
    border-radius: 50%;
    vertical-align: middle;
    margin: 0 auto;
}

/* No circle for 3+ digit numbers */
#prevAuction.no-circle {
    width: auto;
    height: auto;
    min-width: 40px;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: transparent;
    line-height: 1.2;
    font-size: 18px;
}

/* Hide print-only area on screen */
.print-only {
    display: none;
}

/* Print Styles */
@media print {
    /* Force exact page size */
    @page {
        size: 2in 1in landscape;
        margin: 0;
        padding: 0;
    }

    /* Force html and body to exact dimensions */
    html {
        width: 2in !important;
        height: 1in !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: white !important;
    }

    body {
        width: 2in !important;
        height: 1in !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: white !important;
    }

    body::before {
        display: none !important;
    }

    /* Hide all screen UI */
    .container,
    .sidebar,
    .form-section,
    .preview-section,
    .floating-user-menu,
    .notification-container {
        display: none !important;
    }

    /* Show only print area */
    .print-only {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 2in !important;
        height: 1in !important;
    }

    .print-label {
        position: absolute;
        top: 0;
        left: 0;
        width: 2in;
        height: 1in;
        padding: 0.06in;
        background: white;
        color: #000;
        display: flex;
        flex-direction: row;
        gap: 0.06in;
        font-family: Arial, sans-serif;
        overflow: hidden;
    }

    .print-label-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-width: 0;
    }

    .print-label-header {
        font-size: 8pt;
        font-weight: bold;
        border-bottom: 1.5px solid #000;
        padding-bottom: 0.015in;
        margin-bottom: 0.03in;
        text-transform: uppercase;
        line-height: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .print-label-field {
        font-size: 8pt;
        margin-bottom: 0.02in;
        line-height: 1.2;
    }
    
    /* Buyer field - single line with light separator */
    .print-label-field:has(strong:contains("Buyer")),
    .print-label-field:first-of-type {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-bottom: 0.5px solid #ccc;
        padding-bottom: 0.01in;
        margin-bottom: 0.02in;
        font-size: 8pt;
    }
    
    /* Item field - label on one line, item name below with 2-line limit */
    .print-label-field:has(strong:contains("Item")),
    .print-label-field:nth-of-type(2) {
        white-space: normal;
        word-wrap: break-word;
        font-size: 8pt;
        display: flex;
        flex-direction: column;
    }
    
    .print-label-field:has(strong:contains("Item")) strong,
    .print-label-field:nth-of-type(2) strong {
        display: block;
        margin-bottom: 0.005in;
    }
    
    /* Item name span - max 2 lines with auto font reduction */
    .print-label-field:has(strong:contains("Item")) span,
    .print-label-field:nth-of-type(2) span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.2;
        max-height: calc(1.2em * 2);
        font-size: 8pt;
    }

    .print-label-field strong {
        font-weight: bold;
        display: inline-block;
        min-width: 0.45in;
    }
    
    /* Auction number with circle in print - now under logo */
    #printAuction {
        display: inline-block;
        font-size: 11pt;
        font-weight: bold;
        min-width: 0.28in;
        height: 0.28in;
        line-height: 0.28in;
        text-align: center;
        border: 1.5px solid #000;
        border-radius: 50%;
        padding: 0 0.02in;
        vertical-align: middle;
        box-sizing: border-box;
    }
    
    /* No circle for 3+ digit numbers */
    #printAuction.no-circle {
        width: auto;
        height: auto;
        min-width: 0.28in;
        padding: 0.01in 0.03in;
        border: none;
        border-radius: 2px;
        background: transparent;
        line-height: 1.2;
        font-size: 10pt;
    }

    .print-label-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: auto;
        padding-top: 0.015in;
        border-top: 1px solid #999;
    }
    
    .print-label-date {
        font-size: 6pt;
        text-align: left;
        line-height: 1;
    }
    
    .print-label-website {
        font-size: 8pt;
        text-align: right;
        color: #666;
        line-height: 1;
        font-weight: 500;
    }
    
    .print-label-image-container {
        width: 0.55in;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        flex-shrink: 0;
    }

    .print-label-image {
        width: 100%;
        flex: 1;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        margin-bottom: 0.01in;
    }
    
    .print-label-auction-number {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-top: 0.01in;
    }

    .print-label-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .print-label-image:empty {
        display: none;
    }
}

/* Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: calc(100vh - 100px);
    height: 100%;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a5f7a;
}

.sidebar-header h2 {
    font-size: 18px;
    color: #00d4ff;
    margin: 0;
}

.refresh-btn {
    background: transparent;
    border: 2px solid #1a5f7a;
    color: #00d4ff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.refresh-btn:hover {
    background: #1a5f7a;
    transform: rotate(180deg);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 8px;
    max-height: 400px;
    min-height: 0;
}

/* Modern scrollbar styling */
.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(22, 33, 62, 0.5);
    border-radius: 10px;
    margin: 5px 0;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1a5f7a 0%, #00d4ff 100%);
    border-radius: 10px;
    border: 2px solid rgba(22, 33, 62, 0.3);
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00d4ff 0%, #1a5f7a 100%);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Firefox scrollbar */
.sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: #1a5f7a #16213e;
}

.label-history-item {
    background: #16213e;
    padding: 12px;
    border-radius: 10px;
    border-left: 3px solid #00d4ff;
    transition: all 0.3s ease;
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.label-history-item:hover {
    background: #1a5f7a;
}

.item-content {
    flex: 1;
    cursor: pointer;
}

.item-content:hover {
    opacity: 0.9;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.label-history-item .item-title {
    font-size: 12px;
    color: #00d4ff;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.label-history-item .item-detail {
    font-size: 11px;
    color: #e0e0e0;
    margin-bottom: 3px;
    display: flex;
    gap: 5px;
}

.label-history-item .item-detail strong {
    color: #00d4ff;
    min-width: 45px;
}

.label-history-item .item-time {
    font-size: 10px;
    color: #888;
    margin-top: 6px;
    font-style: italic;
}

.reprint-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #0f3460;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.reprint-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.5);
}

.reprint-btn:active {
    transform: scale(0.95);
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.delete-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
}

.delete-btn:active {
    transform: scale(0.95);
}

.loading {
    text-align: center;
    color: #888;
    padding: 20px;
    font-size: 14px;
}

.no-history {
    text-align: center;
    color: #888;
    padding: 20px;
    font-size: 14px;
}

/* Logo Sidebar (Right) */
.logo-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 600px;
}

.logo-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a5f7a;
    gap: 10px;
}

.logo-sidebar-header h2 {
    font-size: 18px;
    color: #00d4ff;
    margin: 0;
}

.upload-logo-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #1a5f7a 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.upload-logo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4);
}

.logo-sidebar-content {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-right: 5px;
}

.logo-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.logo-sidebar-content::-webkit-scrollbar-track {
    background: #16213e;
    border-radius: 10px;
}

.logo-sidebar-content::-webkit-scrollbar-thumb {
    background: #1a5f7a;
    border-radius: 10px;
}

.logo-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #00d4ff;
}

.logo-item {
    position: relative;
    aspect-ratio: 1;
    background: #16213e;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.logo-item:hover {
    border-color: #00d4ff;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.logo-item:hover::after {
    content: 'Click to use';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 212, 255, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
}

.logo-item.active {
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
}

.logo-item.active::before {
    content: '✓ Active';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 255, 0, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 1;
}

.logo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.logo-item-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.logo-item:hover .logo-item-delete {
    display: flex;
}

.logo-item-delete:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.no-logos {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 20px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .container {
        grid-template-columns: 280px 1fr 1fr;
        max-width: 1200px;
    }

    .logo-sidebar {
        grid-column: 1 / -1;
        max-height: 200px;
        order: 4;
    }

    .logo-sidebar-content {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr 1fr;
        max-width: 900px;
    }

    .sidebar {
        grid-column: 1 / -1;
        max-height: 300px;
        order: -1;
    }

    .sidebar-content {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .label-history-item {
        min-width: 200px;
    }

    .logo-sidebar {
        grid-column: 1 / -1;
        order: 4;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .sidebar {
        order: 3;
    }

    h1 {
        font-size: 24px;
    }

    .label-preview {
        transform: scale(0.8);
    }
}

/* Login Modal Styles */
.modal {
    display: none; /* Hidden by default, shown via JS */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
    border: 2px solid #00d4ff;
    max-width: 400px;
    width: 90%;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content.small-modal {
    max-width: 350px;
    padding: 30px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-content h2 {
    color: #00d4ff;
    text-align: center;
    margin-bottom: 10px;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.modal-content p {
    text-align: center;
    color: #e0e0e0;
    margin-bottom: 30px;
    font-size: 14px;
}

.modal .form-group {
    margin-bottom: 20px;
}

.modal input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    transition: all 0.3s ease;
}

.modal input:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00d4ff 0%, #1a5f7a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.error-message {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    display: none;
    font-size: 14px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.error-message.show {
    display: block;
}

/* Sidebar Tabs */
.sidebar-tabs {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px 10px 0 0;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Auction Filter */
.auction-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    margin: 10px 15px;
    font-size: 13px;
}

.auction-filter strong {
    color: #00d4ff;
}

.clear-filter-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.clear-filter-btn:hover {
    background: rgba(255, 107, 107, 0.2);
}

/* Auction Items */
.auction-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.auction-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateX(5px);
}

.auction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-right: 100px; /* Make room for action buttons */
}

.auction-name {
    font-weight: bold;
    color: #00d4ff;
    font-size: 15px;
}

.auction-badge {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.auction-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.auction-date {
    color: #e0e0e0;
}

.auction-time {
    font-style: italic;
}

.auction-item {
    position: relative;
}

.auction-item-content {
    cursor: pointer;
}

.auction-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.auction-export-btn,
.auction-delete-btn {
    background: rgba(0, 212, 255, 0.2);
    border: 2px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auction-export-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    border-color: #00d4ff;
    transform: scale(1.1);
}

.auction-delete-btn {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.auction-delete-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
    transform: scale(1.1);
}



/* Account Settings Modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: rotate(90deg);
}

.account-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.account-section:last-child {
    margin-bottom: 0;
}

.account-section h3 {
    color: #00d4ff;
    font-size: 18px;
    margin-bottom: 15px;
}

.modal-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #00d4ff 0%, #1a5f7a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.modal-btn:active {
    transform: translateY(0);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .modal-btn {
    flex: 1;
}

.danger-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%) !important;
}

.danger-btn:hover {
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4) !important;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0 !important;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1) !important;
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #00d4ff;
}

.notification.success {
    border-color: #51cf66;
}

.notification.success::before {
    background: #51cf66;
}

.notification.error {
    border-color: #ff6b6b;
}

.notification.error::before {
    background: #ff6b6b;
}

.notification.warning {
    border-color: #ffa94d;
}

.notification.warning::before {
    background: #ffa94d;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    color: #e0e0e0;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: #00d4ff;
}

.notification.success .notification-title {
    color: #51cf66;
}

.notification.error .notification-title {
    color: #ff6b6b;
}

.notification.warning .notification-title {
    color: #ffa94d;
}

.notification-message {
    font-size: 14px;
}

.notification-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification.closing {
    animation: slideOut 0.3s ease-out forwards;
}

/* Upload Preview */
.upload-preview {
    margin-top: 15px;
    text-align: center;
}

.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid rgba(0, 212, 255, 0.3);
}

