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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.header p {
    opacity: 0.9;
    font-size: 16px;
}

.website-input-section {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.website-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    background: white;
}

.website-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: end;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:disabled {
    background: #3b82f6;
    cursor: not-allowed;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-purple {
    background: #8b5cf6;
    color: white;
    margin-left: auto;
}

.btn-purple:hover {
    background: #7c3aed;
}

.table-section {
    display: none;
}

.table-section.show {
    display: block;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8fafc;
}

th {
    padding: 16px 24px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.05em;
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

tbody tr:hover {
    background: #f8fafc;
}

.source-url {
    word-break: break-all;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.5;
}

.target-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.target-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.target-input:not(:placeholder-shown) {
    border-color: #10b981;
    background: #f0fdf4;
}

.icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.data-info {
    padding: 16px 24px;
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    margin: 20px 24px;
    border-radius: 6px;
}

.data-info strong {
    color: #1e40af;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.welcome-state {
    text-align: center;
    padding: 60px 24px;
    color: #6b7280;
}

.welcome-state h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #374151;
}

.welcome-state p {
    font-size: 16px;
    margin-bottom: 24px;
}

.loading {
    text-align: center;
    padding: 40px 24px;
    color: #6b7280;
}

.spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

#newzen_id {
    padding: 10px 16px;
    width: 100%;
    flex: 1;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .input-group {
        flex-direction: column;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-purple {
        margin-left: 0;
    }

    th,
    td {
        padding: 12px 16px;
    }

    .source-url {
        font-size: 13px;
    }
}

.spinner-submit {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

.hidden {
    display: none;
}

/* Style cho input number */
.website-input[type="number"] {
    -moz-appearance: textfield;
}

.website-input[type="number"]::-webkit-outer-spin-button,
.website-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

.customer-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.customer-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
}

.customer-dropdown-item:hover {
    background-color: #f8f9fa;
}

.customer-dropdown-item:last-child {
    border-bottom: none;
}

.customer-dropdown-item.selected {
    background-color: #007bff;
    color: white;
}

.customer-dropdown-item.selected:hover {
    background-color: #0056b3;
}

.customer-name {
    font-weight: 400;
    font-size: 14px;
}

.customer-id-input:focus+.customer-dropdown {
    border-color: #667eea;
}