:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --price-color: #db2777;
}

#nocodevn-order-wrapper {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    max-width: 600px;
    margin: 20px auto;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.nocodevn-title {
    text-align: center;
    color: var(--text-main);
    margin-bottom: 25px;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* Form Search */
.nocodevn-search-box {
    position: relative;
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.nocodevn-input {
    width: 100%;
    padding: 14px 15px;
    padding-left: 45px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    color: var(--text-main);
}

.nocodevn-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* SVG Icon trong input */
.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 1;
    width: 20px;
    height: 20px;
}

.nocodevn-btn {
    padding: 0 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.nocodevn-btn:hover { background-color: var(--primary-hover); }
.nocodevn-btn:disabled { background-color: #ccc; cursor: not-allowed; }

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Kết quả */
.order-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.order-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}
.status-completed::before { background-color: var(--success-color); }
.status-processing::before { background-color: var(--warning-color); }
.status-cancelled::before, .status-failed::before { background-color: var(--danger-color); }
.status-on-hold::before { background-color: var(--primary-color); }

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-id { font-weight: 700; color: var(--text-main); font-size: 1.1em; }

.order-date { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    display: flex; 
    align-items: center; 
    gap: 5px; 
}

.status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    background: #f3f4f6; color: #555;
}
.status-completed .status-badge { background: #d1fae5; color: #065f46; }
.status-processing .status-badge { background: #fef3c7; color: #92400e; }
.status-cancelled .status-badge, .status-failed .status-badge { background: #fee2e2; color: #991b1b; }
.status-on-hold .status-badge { background: #e0e7ff; color: #3730a3; }

.order-total {
    font-weight: 700;
    color: var(--price-color);
    font-size: 1.1rem;
}

.view-details-btn {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- POPUP --- */
.swal-container { text-align: left; }
.swal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.info-item label { display: block; color: var(--text-muted); font-size: 0.8em; margin-bottom: 2px;}
.info-item span { font-weight: 600; color: var(--text-main); }

.product-list {
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid #e5e7eb;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}
.product-item:last-child { border-bottom: none; }

.p-thumb img {
    width: 60px; height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.p-info { flex: 1; text-align: left;}
.p-name {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 4px;
    font-size: 0.95rem;
}
.p-name:hover { color: var(--primary-color); }
.p-meta { font-size: 0.85rem; color: var(--text-muted); }
.p-price {
    font-weight: 700;
    color: var(--price-color);
    text-align: right;
    min-width: 80px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #e5e7eb;
    font-size: 1.2rem;
    font-weight: 800;
}
.nocodevn-search-box input{
	border-radius:5px !important;
}