/* BraniMove v1.0.0 - Brani Brand Colors */

:root {
    --brani-pink: #E91E8C;
    --brani-pink-dark: #C4177A;
    --brani-blue: #4267B2;
    --brani-blue-dark: #365899;
    --brani-lime: #CDDC39;
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #8b8fa3;
    --text-muted: #6b7280;
    --border-color: #2d3a4f;
    --success: #16a34a;
    --success-dark: #15803d;
    --error: #ef4444;
    --warning: #f59e0b;
}

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

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

/* ==================== Header ==================== */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--brani-pink) 0%, var(--brani-pink-dark) 100%);
    flex-shrink: 0;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.logo-dot {
    color: var(--brani-lime);
    font-weight: 900;
}

.warehouse {
    background: var(--brani-blue);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== Main ==================== */

main {
    flex: 1;
    padding: 20px;
    position: relative;
    overflow-y: auto;
}

/* ==================== Steps ==================== */

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step.hidden {
    display: none;
}

.step-icon {
    color: var(--brani-pink);
    margin-bottom: 16px;
    margin-top: 24px;
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.step-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

/* ==================== Scan Input ==================== */

.scan-input-wrap {
    width: 100%;
}

.scan-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s;
    letter-spacing: 1px;
}

.scan-input:focus {
    border-color: var(--brani-pink);
    animation: pulse-border 2s ease-in-out infinite;
}

.scan-input::placeholder {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--brani-pink); }
    50% { border-color: var(--brani-blue); }
}

/* ==================== Product Card ==================== */

.product-card {
    width: 100%;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border-left: 4px solid var(--brani-pink);
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
}

.product-codes {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.product-code {
    color: var(--brani-pink);
    font-weight: 600;
}

.product-ean {
    color: var(--text-muted);
}

/* ==================== Section Label ==================== */

.section-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
}

/* ==================== Position List ==================== */

.position-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.position-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-left: 4px solid var(--brani-blue);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 56px;
}

.position-card:active {
    transform: scale(0.98);
}

.position-card.selected {
    border-color: var(--success);
    border-left-color: var(--success);
    background: rgba(22, 163, 74, 0.1);
}

.position-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.position-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--brani-lime);
}

.position-amount-unit {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 4px;
}

.position-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}

.position-card.selected .position-check {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

/* ==================== Quantity Section ==================== */

.qty-section {
    width: 100%;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.qty-section.hidden {
    display: none;
}

.qty-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.qty-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Move All Toggle */
.move-all-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.move-all-toggle input {
    display: none;
}

.toggle-switch {
    width: 36px;
    height: 20px;
    background: var(--border-color);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

.move-all-toggle input:checked + .toggle-switch {
    background: var(--success);
}

.move-all-toggle input:checked + .toggle-switch::after {
    transform: translateX(16px);
}

.toggle-text {
    font-size: 13px;
    font-weight: 500;
}

/* Quantity Control */
.qty-control {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border-radius: 10px;
    overflow: hidden;
}

.qty-control.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.qty-btn {
    width: 64px;
    height: 56px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 26px;
    font-weight: 300;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.qty-btn:hover {
    background: var(--brani-pink);
}

.qty-btn:active {
    background: var(--brani-pink-dark);
}

.qty-btn:first-child {
    border-right: 1px solid var(--border-color);
}

.qty-btn:last-child {
    border-left: 1px solid var(--border-color);
}

.qty-display {
    flex: 1;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--brani-lime);
    user-select: none;
}

/* ==================== Move Summary ==================== */

.move-summary {
    width: 100%;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-left: 4px solid var(--brani-lime);
}

.summary-product {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.summary-detail {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.summary-qty {
    color: var(--brani-lime);
    font-weight: 700;
}

.summary-location {
    color: var(--brani-pink);
    font-weight: 600;
}

/* ==================== Buttons ==================== */

.step-actions {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-large {
    padding: 18px 20px;
    font-size: 16px;
    width: 100%;
    margin-top: 24px;
}

/* ==================== Result ==================== */

.result-content {
    text-align: center;
    padding: 20px 0;
}

.result-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    margin: 0 auto 16px;
    animation: icon-pop 0.4s ease;
}

.result-icon.success {
    background: rgba(22, 163, 74, 0.15);
    border: 3px solid var(--success);
    color: var(--success);
}

.result-icon.error {
    background: rgba(239, 68, 68, 0.15);
    border: 3px solid var(--error);
    color: var(--error);
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.result-detail {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.result-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
    font-size: 15px;
}

.result-loc {
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
}

.result-loc.from {
    color: var(--text-secondary);
}

.result-loc.to {
    color: var(--brani-lime);
}

.result-arrow-icon {
    color: var(--brani-pink);
    font-size: 20px;
}

/* ==================== Overlay ==================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.overlay.hidden {
    display: none;
}

.overlay-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==================== Spinner ==================== */

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--brani-pink);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

@keyframes icon-pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ==================== Toast ==================== */

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    z-index: 2000;
    animation: toast-in 0.3s ease;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.warning { background: var(--warning); color: #000; }

.toast.fade-out {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ==================== Footer ==================== */

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

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

.version {
    font-size: 11px;
    color: #4b5563;
}
