/* ─── Wielton AGRO — Customer Portal CSS v3.0 ─── */

/* ── Base ── */
.wag-customer-login,
.wag-customer-register,
.wag-customer-portal,
.wag-customer-detail {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
}

/* ── Auth forms (login/register) ── */
.wag-customer-form {
    max-width: 440px;
    margin: 40px auto;
    background: #fff;
    padding: 40px 36px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.wag-customer-form h2 {
    margin: 0 0 24px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
}

.wag-customer-form .wag-form-group {
    margin-bottom: 18px;
}

.wag-customer-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 13px;
    color: #374151;
}

.wag-customer-form .wag-form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.wag-customer-form .wag-form-input:focus {
    border-color: #f7c502;
    outline: none;
    box-shadow: 0 0 0 3px rgba(247, 197, 2, 0.15);
}

.wag-customer-form small {
    display: block;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 4px;
}

.wag-customer-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7280;
}

.wag-customer-link a {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #d1d5db;
    transition: border-color 0.2s;
}
.wag-customer-link a:hover {
    border-bottom-color: #f7c502;
}

/* ── Portal header ── */
.wag-customer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.wag-customer-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.wag-customer-greeting {
    color: #6b7280;
    font-size: 14px;
}

/* ── Tabs ── */
.wag-customer-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 28px;
    border-bottom: 2px solid #e5e7eb;
}

.wag-customer-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.wag-customer-tab:hover {
    color: #1a1a1a;
}

.wag-customer-tab.active {
    color: #1a1a1a;
    border-bottom-color: #f7c502;
    font-weight: 600;
}

/* ── Config cards ── */
.wag-customer-configs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wag-customer-config-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    transition: all 0.2s ease;
}

.wag-customer-config-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.wag-customer-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wag-customer-config-header strong {
    font-size: 14px;
    color: #374151;
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 0.3px;
}

.wag-customer-config-body p {
    margin: 0 0 4px;
    font-size: 14px;
    color: #4b5563;
}

.wag-customer-config-price {
    font-weight: 700;
    font-size: 17px;
    color: #1a1a1a;
}

.wag-customer-config-date {
    color: #9ca3af;
    font-size: 12px;
}

.wag-customer-config-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.wag-customer-empty {
    color: #9ca3af;
    text-align: center;
    padding: 60px 20px;
    font-size: 15px;
}

/* ── Detail view ── */
.wag-customer-detail h3 {
    margin: 24px 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wag-detail-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.wag-detail-date {
    color: #9ca3af;
    font-size: 13px;
}

.wag-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.wag-detail-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.wag-detail-table tr:last-child td {
    border-bottom: none;
}

.wag-detail-table td:first-child {
    color: #6b7280;
    width: 40%;
    font-weight: 500;
    background: #f9fafb;
}

/* ── Buttons ── */
.wag-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.4;
}

.wag-btn:hover {
    background: #333;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.wag-btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 6px;
}

.wag-btn-primary {
    background: #f7c502;
    color: #1a1a1a;
}

.wag-btn-primary:hover {
    background: #e6b600;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(247, 197, 2, 0.3);
}

.wag-btn-secondary {
    background: #fff;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
}

.wag-btn-secondary:hover {
    background: #1a1a1a;
    color: #fff;
}

.wag-btn-pdf {
    background: #dc2626;
}

.wag-btn-pdf:hover {
    background: #b91c1c;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

/* ── Status badges ── */
.wag-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.wag-status--open { background: #dbeafe; color: #1e40af; }
.wag-status--in_progress { background: #fef3c7; color: #92400e; }
.wag-status--ordered { background: #d1fae5; color: #065f46; }
.wag-status--closed_no_order { background: #f3f4f6; color: #6b7280; }

/* ── Alerts ── */
.wag-alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.wag-alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.wag-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .wag-customer-portal,
    .wag-customer-detail {
        padding: 20px 16px;
    }
    .wag-customer-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .wag-customer-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .wag-customer-tabs::-webkit-scrollbar { display: none; }
    .wag-customer-tab {
        white-space: nowrap;
        padding: 10px 16px;
        font-size: 13px;
    }
    .wag-customer-config-actions {
        flex-direction: column;
    }
    .wag-detail-table td:first-child {
        width: auto;
    }
}

@media (max-width: 480px) {
    .wag-customer-form {
        margin: 20px auto;
        padding: 28px 20px;
    }
    .wag-customer-header h2 { font-size: 20px; }
    .wag-customer-config-card { padding: 14px 16px; }
}
