/* ── SW CPQ Account / Auth Styles ─────────────────────────────────────────── */

.sw-cpq-account-wrap {
    max-width: 680px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: #1a1a1a;
}

/* ── Tabs ── */
.sw-cpq-account-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
}
.sw-cpq-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 10px 20px;
    font-size: .95rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.sw-cpq-tab-btn:hover  { color: #0F4C81; }
.sw-cpq-tab-btn.active { color: #0F4C81; border-bottom-color: #0F4C81; }

.sw-cpq-tab-panel { display: none; }
.sw-cpq-tab-panel.active { display: block; }

/* ── Auth forms ── */
.sw-cpq-auth-form h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0F4C81;
    margin-bottom: 4px;
}
.sw-cpq-auth-sub {
    font-size: .9rem;
    color: #6b7280;
    margin-bottom: 20px;
}
.sw-cpq-form-group {
    margin-bottom: 14px;
}
.sw-cpq-form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.sw-cpq-form-group input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: .95rem;
    color: #1a1a1a;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.sw-cpq-form-group input:focus {
    outline: none;
    border-color: #0F4C81;
    box-shadow: 0 0 0 3px rgba(15,76,129,.12);
}
.sw-cpq-form-row {
    display: flex;
    gap: 12px;
}
.sw-cpq-form-row .sw-cpq-form-group { flex: 1; }

/* ── Buttons ── */
.sw-cpq-btn-primary {
    display: block;
    width: 100%;
    padding: 11px 20px;
    background: #0F4C81;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-top: 6px;
}
.sw-cpq-btn-primary:hover    { background: #0a3a63; }
.sw-cpq-btn-primary:active   { transform: scale(.98); }
.sw-cpq-btn-primary:disabled { background: #9ca3af; cursor: not-allowed; }

.sw-cpq-btn-outline {
    padding: 8px 16px;
    background: transparent;
    color: #0F4C81;
    border: 1.5px solid #0F4C81;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.sw-cpq-btn-outline:hover { background: #0F4C81; color: #fff; }

/* ── Messages ── */
.sw-cpq-form-msg {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: .9rem;
    margin-bottom: 14px;
}
.sw-cpq-form-msg.success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.sw-cpq-form-msg.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Dashboard profile header ── */
.sw-cpq-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f0f6ff;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
}
.sw-cpq-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #0F4C81;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sw-cpq-profile-name { font-size: 1.1rem; font-weight: 700; color: #1a1a1a; }
.sw-cpq-profile-meta { font-size: .85rem; color: #6b7280; margin-top: 2px; }

/* ── Quotes table ── */
.sw-cpq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.sw-cpq-table th {
    background: #0F4C81;
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    font-size: .85rem;
    font-weight: 600;
}
.sw-cpq-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}
.sw-cpq-table tr:hover td { background: #f9fafb; }

/* ── Status badges ── */
.sw-cpq-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: .78rem;
    font-weight: 600;
    text-transform: capitalize;
}
.sw-cpq-status-draft     { background: #f3f4f6; color: #6b7280; }
.sw-cpq-status-pending   { background: #fef3c7; color: #92400e; }
.sw-cpq-status-processing{ background: #dbeafe; color: #1e40af; }
.sw-cpq-status-completed { background: #d1fae5; color: #065f46; }
.sw-cpq-status-cancelled { background: #fee2e2; color: #991b1b; }
.sw-cpq-status-on-hold   { background: #ede9fe; color: #5b21b6; }

.sw-cpq-link {
    color: #0F4C81;
    text-decoration: none;
    font-weight: 600;
    font-size: .85rem;
}
.sw-cpq-link:hover { text-decoration: underline; }

/* ── Dashboard header actions (Back to Configurator + Sign Out) ── */
.sw-cpq-dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Back to Configurator button ── */
.sw-cpq-btn-configurator {
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* ── Quote number clickable link (button styled as link) ── */
.sw-cpq-quote-num-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: inherit;
    font-weight: 700;
    color: #0F4C81;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.sw-cpq-quote-num-link:hover { color: #0a3a63; }

/* ── Mobile horizontal scroll for Saved Quotes / Order History tables ── */
.sw-cpq-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Responsive ── */
@media (max-width: 540px) {
    .sw-cpq-form-row { flex-direction: column; gap: 0; }
    .sw-cpq-profile-header { flex-wrap: wrap; }
    .sw-cpq-btn-outline { margin-left: 0 !important; margin-top: 8px; }
    .sw-cpq-dashboard-header-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
    .sw-cpq-btn-configurator { font-size: .82rem; padding: 6px 12px; }
}
