/* ShopForge Customer Portal — mobile-first */

#sf-portal {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2d3748;
    min-height: 80vh;
}

.portal-loading { text-align: center; padding: 60px 20px; color: #718096; }
.portal-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e2e8f0; border-top-color: #4299e1;
    border-radius: 50%; animation: pspin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes pspin { to { transform: rotate(360deg); } }

.portal-header {
    background: linear-gradient(135deg, #2b6cb0, #2c5282);
    color: #fff; padding: 24px 20px; text-align: center;
    border-radius: 0 0 12px 12px;
}
.portal-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.portal-welcome { font-size: 14px; opacity: 0.9; margin: 0; }

/* Tabs */
.portal-tabs {
    display: flex; overflow-x: auto; gap: 0; padding: 0 8px;
    border-bottom: 2px solid #e2e8f0; margin-top: 16px;
}
.portal-tab {
    padding: 10px 16px; border: none; background: none;
    font-size: 13px; font-weight: 600; color: #718096;
    cursor: pointer; white-space: nowrap;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all 0.15s;
}
.portal-tab:hover { color: #2b6cb0; }
.portal-tab.active { color: #2b6cb0; border-bottom-color: #2b6cb0; }

/* Panels */
.portal-panel { padding: 16px 12px; }

/* Table */
.portal-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.portal-table th {
    text-align: left; padding: 8px 10px; font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: #718096; border-bottom: 2px solid #e2e8f0;
}
.portal-table td {
    padding: 10px 10px; border-bottom: 1px solid #edf2f7;
}
.portal-table tr:hover td { background: #f7fafc; }

/* Status badges */
.portal-status {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 600;
}
.portal-status-draft { background: #edf2f7; color: #4a5568; }
.portal-status-estimate { background: #e2e8f0; color: #4a5568; }
.portal-status-approved { background: #bee3f8; color: #2b6cb0; }
.portal-status-in-progress { background: #fefcbf; color: #975a16; }
.portal-status-completed { background: #c6f6d5; color: #276749; }
.portal-status-invoiced { background: #e9d8fd; color: #6b46c1; }
.portal-status-cancelled { background: #fed7d7; color: #9b2c2c; }
.portal-status-sent-to-customer { background: #fefcbf; color: #975a16; }
.portal-status-overdue { background: #fed7d7; color: #9b2c2c; }
.portal-status-due { background: #fefcbf; color: #975a16; }
.portal-status-scheduled { background: #c6f6d5; color: #276749; }
.portal-status-declined { background: #fed7d7; color: #9b2c2c; }

.portal-link {
    color: #2b6cb0; font-size: 12px; font-weight: 600;
    text-decoration: none;
}
.portal-link:hover { text-decoration: underline; }

/* Cards */
.portal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.portal-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.portal-card-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.portal-card-detail { font-size: 12px; color: #718096; margin-bottom: 2px; }

.portal-empty {
    text-align: center; padding: 40px 20px; color: #cbd5e0; font-size: 14px;
}

.portal-footer { text-align: center; padding: 24px; }
.portal-call-btn {
    display: inline-block; padding: 12px 28px;
    background: #2b6cb0; color: #fff; border-radius: 8px;
    font-size: 15px; font-weight: 600; text-decoration: none;
}
.portal-call-btn:hover { background: #2c5282; color: #fff; }

@media (max-width: 600px) {
    .portal-tab { padding: 8px 10px; font-size: 12px; }
    .portal-table { font-size: 12px; }
    .portal-table th, .portal-table td { padding: 6px 6px; }
}
