/* 
 * Nomad Move Inventory - Premium Design System (Qwash Style) 
 */

:root {
    /* Colors */
    --primary-gradient: linear-gradient(135deg, #6B73FF 0%, #000DFF 100%);
    --secondary-gradient: linear-gradient(135deg, #FF6B6B 0%, #FF0000 100%);
    --surface-gradient: linear-gradient(180deg, #FFFFFF 0%, #F8F9FE 100%);
    --card-bg: #FFFFFF;
    --text-main: #1A1B4B;
    --text-secondary: #8385A8;
    --accent: #6B73FF;
    --danger: #FF4757;
    --success: #2ED573;

    /* Shadows */
    --shadow-soft: 0 10px 30px rgba(107, 115, 255, 0.1);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-button: 0 8px 16px rgba(107, 115, 255, 0.25);

    /* Structure */
    --radius-l: 24px;
    --radius-m: 16px;
    --radius-s: 12px;
}

/* Global Reset & Base */
.nm-dashboard-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background: #F4F6FB;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.nm-dashboard-wrap * {
    box-sizing: border-box;
}

/* Header Section */
.nm-header-card {
    background: var(--primary-gradient);
    border-radius: var(--radius-l);
    padding: 30px 25px;
    color: white;
    margin-bottom: 25px;
    box-shadow: var(--shadow-button);
    position: relative;
    overflow: hidden;
}

.nm-header-card h2 {
    color: white;
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 700;
}

.nm-header-info {
    font-size: 15px;
    opacity: 0.9;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.nm-header-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    backdrop-filter: blur(5px);
}

/* Action Buttons (Large) */
.nm-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.nm-action-btn {
    border: none;
    border-radius: var(--radius-m);
    padding: 20px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    color: white;
    position: relative;
    overflow: hidden;
}

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

.nm-btn-add {
    background: white;
    color: var(--text-main);
    box-shadow: var(--shadow-card);
}

.nm-btn-add::before {
    content: '+';
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 5px;
}

.nm-btn-remove {
    background: white;
    color: var(--text-main);
    box-shadow: var(--shadow-card);
}

.nm-btn-remove::before {
    content: '−';
    font-size: 32px;
    color: var(--danger);
    margin-bottom: 5px;
}

/* Inventory Grid */
.nm-section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-left: 5px;
}

.nm-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.nm-item-card {
    background: var(--card-bg);
    border-radius: var(--radius-m);
    padding: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nm-item-icon {
    width: 50px;
    height: 50px;
    background: #F4F6FB;
    border-radius: 50%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.nm-item-qty {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    margin: 5px 0;
}

.nm-item-name {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Modal */
.nm-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: flex-end;
    /* Bottom sheet on mobile */
}

.nm-modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: var(--radius-l) var(--radius-l) 0 0;
    padding: 30px 25px;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0%);
    }
}

@media (min-width: 600px) {
    .nm-modal {
        align-items: center;
    }

    .nm-modal-content {
        border-radius: var(--radius-l);
        margin: 20px auto;
    }
}

.nm-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: #ccc;
    cursor: pointer;
}

/* Form Elements */
.nm-form-group {
    margin-bottom: 20px;
}

.nm-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
}

.nm-select,
.nm-input,
.nm-textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #E0E2E9;
    border-radius: var(--radius-s);
    background: #F9FAFC;
    font-size: 16px;
    color: var(--text-main);
    transition: border-color 0.2s;
}

.nm-select:focus,
.nm-input:focus {
    border-color: var(--accent);
    outline: none;
}

/* Qty Controls */
.nm-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F9FAFC;
    padding: 5px;
    border-radius: var(--radius-s);
    border: 1px solid #E0E2E9;
}

.nm-qty-action-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: white;
    color: var(--text-main);
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.nm-qty-input-field {
    flex: 1;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: bold;
}

/* Primary Button */
.nm-btn-primary {
    width: 100%;
    padding: 18px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-m);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-button);
}

.nm-btn-outline {
    width: 100%;
    padding: 18px;
    background: transparent;
    border: 2px solid #E0E2E9;
    color: var(--text-secondary);
    border-radius: var(--radius-m);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

/* Download Button */
.nm-btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    color: var(--accent);
    padding: 15px;
    border-radius: var(--radius-m);
    text-decoration: none;
    font-weight: 600;
    width: 100%;
    border: none;
    margin-top: 30px;
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

/* Workflow Specifics */
.nm-workflow-card {
    background: var(--card-bg);
    border-radius: var(--radius-l);
    padding: 25px;
    box-shadow: var(--shadow-card);
    margin-bottom: 25px;
}

.nm-help-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Photo Grid */
.nm-photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.nm-photo-upload {
    aspect-ratio: 4/3;
    border: 2px dashed #E0E2E9;
    border-radius: var(--radius-m);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #F9FAFC;
    transition: all 0.2s;
    overflow: hidden;
    position: relative;
}

.nm-photo-upload:hover {
    border-color: var(--accent);
    background: #F0F2FF;
}

.nm-photo-upload.has-image {
    border-style: solid;
}

.nm-photo-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nm-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

/* Inventory Check List */
.nm-inventory-check-list {
    margin-bottom: 30px;
}

.nm-check-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #F0F2F5;
}

.nm-check-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nm-item-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.nm-check-item-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nm-actual-qty-input {
    width: 60px;
    text-align: center;
    border: 1px solid #E0E2E9;
    border-radius: 8px;
    padding: 5px;
    font-weight: bold;
}

.nm-check-qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #F0F2F5;
    color: var(--text-main);
    cursor: pointer;
    font-weight: bold;
}

/* Mismatch Status */
.nm-mismatch-status {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px;
    background: #F9FAFC;
    border-radius: var(--radius-s);
}

.nm-radio-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Signature Box */
.nm-signature-box {
    background: #F9FAFC;
    border: 1px solid #E0E2E9;
    border-radius: var(--radius-m);
    padding: 15px;
    margin-bottom: 20px;
}

#nm-before-signature-canvas,
#nm-after-signature-canvas {
    width: 100%;
    height: 150px;
    background: white;
    border-radius: 8px;
    border: 1px solid #F0F2F5;
    cursor: crosshair;
    touch-action: none;
}

.nm-signature-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.nm-btn-small {
    padding: 8px 15px;
    font-size: 12px;
    background: #F0F2F5;
    color: var(--text-secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}