:root {
    --bg: #0f0f15;
    --card-bg: #1a1a25;
    --text: #e0e0ff;
    --primary: #6c5ce7;
    --primary-dark: #5649c5;
    --accent: #fd79a8;
    --success: #00b894;
    --danger: #ff4757;
    --warning: #fdcb6e;
    --input-bg: #252535;
    --border: #3a3a4a;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}
[data-theme="light"] {
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #333344;
    --primary: #6c5ce7;
    --primary-dark: #5649c5;
    --accent: #e84393;
    --success: #00b894;
    --danger: #ff4757;
    --warning: #fdcb6e;
    --input-bg: #ffffff;
    --border: #e0e0e5;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}
body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 1rem;
    transition: var(--transition);
    min-height: 100vh;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* PRELOADER */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg, #000);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader-content {
    text-align: center;
    position: relative;
}
.Loading_logo-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}
.Loading_logo {
    font-size: 180px;
    color: #96bf48;
    position: relative;
    z-index: 3;
    opacity: 0;
    animation: 
        fadeInScale 1s ease-out 0.3s forwards,
        sPreloader-logoFloat 3s ease-in-out 1.3s infinite;
    text-shadow: 
        0 0 20px rgba(150,191,72,0.8),
        0 0 40px rgba(150,191,72,0.5),
        0 0 60px rgba(150,191,72,0.3);
}
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
@keyframes sPreloader-logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.sPreloader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.sPreloader-ring.green {
    border: 4px solid rgba(150,191,72,0.6);
    animation: sPreloader-pulseGreen 2.5s infinite ease-out;
}
.sPreloader-ring.blue {
    border: 4px solid rgba(72,191,255,0.6);
    animation: sPreloader-pulseBlue 2.8s infinite ease-out;
}
.sPreloader-ring.purple {
    border: 4px solid rgba(180,72,255,0.6);
    animation: sPreloader-pulsePurple 3s infinite ease-out;
}
.sPreloader-ring.pink {
    border: 4px solid rgba(255,72,180,0.6);
    animation: sPreloader-pulsePink 3.2s infinite ease-out;
}
@keyframes sPreloader-pulseGreen {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}
@keyframes sPreloader-pulseBlue {
    0% { transform: translate(-50%, -50%) scale(0.65); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(1.85); opacity: 0; }
}
@keyframes sPreloader-pulsePurple {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; }
}
@keyframes sPreloader-pulsePink {
    0% { transform: translate(-50%, -50%) scale(0.65); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}
.preloader-content p {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #96bf41, #245705);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.loading-text {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 90%;
    margin: 0 auto;
}
.letter {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff !important;
    animation: pulse 3s infinite ease-in-out;
    opacity: 0;
    transform: translateY(20px);
    display: inline-block;
    margin: 0 2px;
}
@keyframes pulse {
    0%, 20% { opacity: 0; transform: translateY(20px); }
    30%, 70% { opacity: 1; transform: translateY(0); }
    80%, 100% { opacity: 0; transform: translateY(-20px); }
}
.letter:nth-child(1)  { animation-delay: 0.1s; }
.letter:nth-child(2)  { animation-delay: 0.3s; }
.letter:nth-child(3)  { animation-delay: 0.5s; }
.letter:nth-child(4)  { animation-delay: 0.7s; }
.letter:nth-child(5)  { animation-delay: 0.9s; }
.letter:nth-child(6)  { animation-delay: 1.1s; }
.letter:nth-child(7)  { animation-delay: 1.3s; }
.letter:nth-child(8)  { animation-delay: 1.5s; }
.letter:nth-child(9)  { animation-delay: 1.7s; }
.letter:nth-child(10) { animation-delay: 1.9s; }
.letter:nth-child(11) { animation-delay: 2.1s; }
.letter:nth-child(12) { animation-delay: 2.3s; }
.letter:nth-child(13) { animation-delay: 2.5s; }
.letter:nth-child(14) { animation-delay: 2.7s; }
.letter:nth-child(15) { animation-delay: 2.9s; }
.letter:nth-child(16) { animation-delay: 3.1s; }

/* HEADER */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.app-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #96bf41, #264d0d);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.app-title i {
    font-size: 2rem;
}
.control-buttons {
    display: flex;
    gap: 0.5rem;
}

/* BUTTONS */
.btn {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
    justify-content: center;
}
.fa-square-plus:before {
    color: white;
}
.fa-shopify:before {
    color: #8fb73d;
}
.fa-file-lines:before {
    color: #ffffff;
}
.btn-primary {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.3);
}
.btn-primary:hover {
    background: #f3c30a;
    transform: translateY(-3px);
}
.btn-secondary {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--input-bg);
}
.btn-danger {
    background: #f72f41;
    color: white;
}
.btn-danger:hover {
    background: #ff3344;
}
#copyBtn {
    background: #1db514 !important;
}
#settingsBtn {
    border-radius: 6px;
    padding: 12px;
    background: #ffffff;
    color: black;
    border: none;
    box-shadow: 4px 4px 0px 1px #8bb33c;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#settingsBtn:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0px 1px #ffffffa3;
}
#settingsBtn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px 1px #ffffffa3;
    transition: transform 0.1s ease-in, box-shadow 0.1s ease-in;
}

/* CARDS */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}
.card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #f7f7f7db;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}
.card-title i {
    color: var(--accent);
}

/* INPUT GROUP */
.input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.input-field {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.input-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.8;
    font-weight: 500;
}
input, select {
    width: 100%;
    padding: 0.875rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    font-weight: 500;
}
input:focus, select:focus {
    outline: none;
    border-color: #abff00;
    box-shadow: -1px 1px 11px 11px rgb(127 249 12 / 41%);
}

/* SKU DROPDOWN */
.sku-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 0 0 12px 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow);
}
.sku-dropdown-item {
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}
.sku-dropdown-item:last-child {
    border-bottom: none;
}
.sku-dropdown-item:hover, .sku-dropdown-item.active {
    background: var(--primary);
    color: white;
}
.highlight {
    background: rgb(255 177 0);
    font-weight: 700;
    color: #000000;
}

/* ADD BUTTON */
.btn-add {
    background: #af0a4e;
    color: white;
    align-self: flex-end;
    padding: 0.875rem 1.25rem;
    font-weight: 700;
    min-width: 120px;
}
.btn-add:hover {
    background: #d5a212;
    transform: translateY(-3px);
}

/* INVENTORY TABLE */
.inventory-list {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}
.inventory-list thead, .inventory-list tbody {
    display: table;
    width: 100%;
    table-layout: fixed;
}
.inventory-list th {
    text-align: left;
    padding: 0.875rem 0.5rem;
    background: #252546;
    color: white;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all 0.5s ease;
}
.inventory-list th:hover {
    background: #8bb43c;
    transform: translateY(-1px);
    color: #000000;
}
.inventory-list td {
    padding: 0.875rem 0.5rem;
    border-bottom: 1px solid var(--border);
}
.inventory-list tr:last-child td {
    border-bottom: none;
}
.inventory-list tr:hover {
    background-color: rgba(108, 92, 231, 0.1);
}
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text);
    opacity: 0.6;
}
.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--border);
}

/* SORT INDICATOR */
.sort-indicator {
    margin-left: 0.5rem;
    display: inline-block;
    transition: var(--transition);
}

/* ACTION BUTTONS */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    border: solid 2px;
}
.btn-icon:hover {
    background: var(--border);
}
.btn-edit {
    color: #fbb531;
}
.btn-delete {
    color: #f72f41;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 1rem;
}
.modal.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: translateY(30px);
    transition: var(--transition);
    border: 1px solid var(--border);
}
.modal.active .modal-content {
    transform: translateY(0);
}
.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
}
.modal-close {
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    background: #ffffff;
    color: black;
    padding: 0px 8px 4px;
    line-height: 30px;
    box-shadow: 4px 4px 0px 1px #8bb33c;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.modal-close:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0px 1px #ffffffa3;
}
.modal-body {
    padding: 1.25rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* SKU LIST */
.sku-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.sku-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--input-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.sku-actions {
    display: flex;
    gap: 0.5rem;
}

/* ADD SKU FORM */
.add-sku-form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* EDIT MODAL */
.edit-modal {
    max-width: 400px;
}
.edit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* TOAST NOTIFICATION */
.toast {
    position: fixed;
    top: 18vh;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1100;
    font-weight: 600;
    max-width: 90%;
    text-align: center;
    justify-content: center;
    opacity: 0;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.success {
    background: #0b6605;
}
.toast.error {
    background: var(--danger);
}
.toast.warning {
    background: var(--warning);
    color: #333;
}

/* LOADER */
.loader {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    color: #8bb43c;
    font-weight: 700;
}
.loader i {
    font-size: 2rem;
}
.app-footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    font-size: 14px;
    color: #ffffff;
}

/* Progress Modal Styles */
.progress-container {
    margin-bottom: 2.5rem;
}
.progress-bar {
    height: 20px;
    background-color: var(--input-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s ease;
}
.progress-text {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.8;
}
.store-status-container h4 {
    margin-bottom: 1rem;
    color: var(--primary);
}
.store-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.store-status-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--input-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.store-name {
    font-weight: 600;
}
.store-status {
    font-weight: 500;
}
.store-status.success {
    color: var(--success);
}
.store-status.error {
    color: var(--danger);
}
.store-status.info {
    color: var(--primary);
}

/* BUZZER SETTINGS */
.buzzer-settings {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.buzzer-settings h4 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* PAGINATION */
.pagination-controls {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    /* Preloader adjustments */
    .Loading_logo {
        font-size: 120px;
    }
    
    .sPreloader-ring {
        width: 280px;
        height: 280px;
    }
    
    .preloader-content p {
        font-size: 1.8rem;
    }
    
    .letter {
        font-size: 1rem;
        margin: 0 1px;
    }
    
    /* Header adjustments */
    .app-header {
        flex-direction: row;
        padding: 13px 9px 19px 10px !important;
        text-align: center;
    }
    
    .app-title {
        font-size: 2rem;
    }
    
    .app-title i {
        font-size: 2rem;
    }
    
    .control-buttons {
        width: 20%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Card adjustments */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    /* Input group adjustments */
    .input-group {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .input-field {
        width: 100%;
        min-width: auto;
    }
    
    .btn-add {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
    }
    
    /* Table adjustments */
    .inventory-list {
        font-size: 0.9rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .inventory-list th,
    .inventory-list td {
        padding: 0.75rem 0.5rem;
        text-wrap: auto;
    }
    
    /* Action buttons adjustments */
    .action-buttons {
        gap: 0.5rem;
    }
    
    .btn-icon {
        width: 36px;
        height: 36px;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .modal-header {
        padding: 0.875rem 1rem;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* Toast adjustments */
    .toast {
        max-width: 90%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Footer adjustments */
    .app-footer {
        font-size: 0.8rem;
        padding: 1rem;
    }
    
    /* SKU List adjustments */
    .sku-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .sku-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Empty state adjustments */
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state i {
        font-size: 2rem;
    }
    
    .empty-state h3 {
        font-size: 1.1rem;
    }
    
    .empty-state p {
        font-size: 0.9rem;
    }
    
    /* Pagination adjustments */
    .pagination-controls {
        width: 100%;
    }
    
    #loadMoreSkusBtn {
        width: 100%;
    }
    
    /* Card header adjustments */
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start !important;
    }
    
    .actionset {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    /* Settings button adjustments */
    #settingsBtn {
        padding: 10px;
    }
    
    /* Add SKU Form adjustments */
    .add-sku-form {
        flex-direction: column;
    }
    
    .add-sku-form .input-field {
        width: 100%;
    }
    
    .add-sku-form .btn {
        width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    /* Preloader adjustments */
    .Loading_logo {
        font-size: 100px;
    }
    
    .sPreloader-ring {
        width: 220px;
        height: 220px;
    }
    
    .preloader-content p {
        font-size: 1.5rem;
    }
    
    .letter {
        font-size: 0.9rem;
        margin: 0 1px;
    }
    
    /* Header adjustments */
    .app-title {
        font-size: 1.7rem;
    }
    
    .app-title i {
        font-size: 1.7rem;
    }
    
    /* Card adjustments */
    .card {
        padding: 0.75rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    /* Input adjustments */
    input, select {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.6rem 0.875rem;
        font-size: 0.85rem;
    }
    
    .btn-icon {
        width: 32px;
        height: 32px;
    }
    
    /* Table adjustments */
    .inventory-list {
        font-size: 0.85rem;
    }
    
    .inventory-list th,
    .inventory-list td {
        padding: 0.625rem 0.375rem;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 98%;
    }
    
    .modal-header {
        padding: 0.75rem;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 0.875rem;
    }
    
    /* Toast adjustments */
    .toast {
        max-width: 95%;
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }
    
    /* Footer adjustments */
    .app-footer {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
    
    /* Action buttons adjustments */
    .actionset {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
    }
    
    /* Empty state adjustments */
    .empty-state {
        padding: 1.5rem 0.75rem;
    }
    
    .empty-state i {
        font-size: 1.8rem;
    }
    
    .empty-state h3 {
        font-size: 1rem;
    }
    
    .empty-state p {
        font-size: 0.85rem;
    }
}