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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f7f8fa;
    min-height: 100vh;
    padding: 16px;
    color: #111827;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ─── Header ─── */
header {
    background: #fff;
    border-radius: 10px;
    padding: 16px 24px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

h1 {
    color: #111827;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* ─── Logo ─── */
.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.login-logo {
    display: block;
    margin: 0 auto 12px;
    height: 100px;
    width: auto;
    object-fit: contain;
}

.register-title {
    text-align: center;
    margin-bottom: 4px;
    font-size: 22px;
}

.header-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ─── Navigation Tabs ─── */
.nav-tabs {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    padding: 3px;
    border-radius: 8px;
}

.nav-tab {
    padding: 7px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
}

.nav-tab:hover {
    color: #111827;
    background: #e5e7eb;
}

.nav-tab.active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* ─── User Info ─── */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #6b7280;
}

.btn-logout {
    background: none;
    color: #dc2626;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #fecaca;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #fef2f2;
}

/* ─── Controls / Filters ─── */
.controls {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.search-box {
    margin-bottom: 12px;
}

#searchInput {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.2s;
}

#searchInput:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-btn {
    padding: 7px 14px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.filter-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.filter-btn.alert {
    background: #fffbeb;
    border-color: #d97706;
    color: #92400e;
}

.filter-btn.alert:hover {
    background: #fef3c7;
}

/* ─── Sub-Filter Buttons (Hardwood: Solid/Engineered/Bamboo) ─── */
.sub-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-left: 4px;
}

.sub-filter-btn {
    padding: 4px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: #f9fafb;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
    color: #4b5563;
}

.sub-filter-btn:hover {
    background: #e5e7eb;
}

.sub-filter-btn.active {
    background: #374151;
    color: white;
    border-color: #374151;
}

/* ─── Sub-Type Badge ─── */
.product-subtype {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    background: #ede9fe;
    color: #5b21b6;
}

/* ─── Stat Cards ─── */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.stat-number {
    font-size: 28px;
    font-weight: 600;
    color: #2563eb;
}

.stat-label {
    color: #6b7280;
    margin-top: 4px;
    font-size: 13px;
}

/* ─── Product Grid ─── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.product-card.low-stock {
    border-left: 3px solid #d97706;
}

/* ─── Product Image Thumbnails ─── */
.product-img {
    width: calc(100% + 36px);
    height: 140px;
    margin: -18px -18px 12px -18px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    background: #f3f4f6;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.product-sku {
    color: #9ca3af;
    font-size: 12px;
    margin-bottom: 12px;
}

.product-quantity {
    font-size: 22px;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 4px;
}

.product-sqft {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 12px;
}

.btn-update {
    width: 100%;
    padding: 8px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-update:hover {
    background: #1d4ed8;
}

/* ─── Modal ─── */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
}

.modal-content {
    background: #fff;
    margin: 8% auto;
    padding: 28px;
    border-radius: 12px;
    width: 90%;
    max-width: 460px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.close {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
}

.close:hover {
    color: #111827;
}

.modal-product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #111827;
}

.form-group {
    margin-bottom: 16px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: #f9fafb;
    color: #111827;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.current-qty {
    font-size: 22px;
    font-weight: 600;
    color: #2563eb;
    padding: 8px 0;
}

.btn-save {
    width: 100%;
    padding: 10px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:hover {
    background: #047857;
}

/* ─── Success Toast ─── */
.success-message {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    background: #059669;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 2000;
    font-size: 14px;
}

/* ─── Login Page ─── */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f7f8fa;
}

.login-container {
    width: 100%;
    max-width: 380px;
}

.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 36px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 8px;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 28px;
    font-size: 14px;
}

.btn-login {
    width: 100%;
    padding: 10px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #1d4ed8;
}

.error-message {
    color: #dc2626;
    text-align: center;
    margin-top: 12px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #fecaca;
}

/* ─── Dashboard ─── */
.stat-warning {
    color: #dc2626;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.chart-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

.chart-card h3 {
    color: #111827;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-subtitle {
    color: #9ca3af;
    font-size: 13px;
    margin-top: -8px;
    margin-bottom: 12px;
}

/* ─── Stock Levels ─── */
.stock-levels-list {
    max-height: 400px;
    overflow-y: auto;
}

.stock-item {
    margin-bottom: 10px;
}

.stock-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 13px;
}

.stock-item-name {
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.stock-item-qty {
    font-weight: 600;
    color: #2563eb;
}

.stock-item-qty.low {
    color: #dc2626;
}

.stock-bar-bg {
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}

.stock-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ─── Forecast ─── */
.forecast-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.forecast-item.urgent {
    background: #fef2f2;
    border-color: #fecaca;
    border-left: 3px solid #dc2626;
}

.forecast-item.warning {
    background: #fffbeb;
    border-color: #fde68a;
    border-left: 3px solid #d97706;
}

.forecast-item.ok {
    border-left: 3px solid #059669;
}

.forecast-product {
    font-weight: 600;
    color: #111827;
    min-width: 200px;
    font-size: 14px;
}

.forecast-details {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

.forecast-days {
    font-weight: 600;
    color: #111827;
}

/* ─── Export Bar ─── */
.export-bar {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.btn-export {
    padding: 8px 16px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-export:hover {
    background: #047857;
}

/* ─── Transaction History ─── */
.page-title {
    color: #111827;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group input,
.filter-group select {
    padding: 7px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    background: #f9fafb;
    color: #111827;
    transition: border-color 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.filter-group span {
    align-self: center;
    color: #9ca3af;
    font-size: 13px;
}

.filter-group input[type="date"] {
    width: 145px;
}

.filter-group input[type="text"] {
    width: 170px;
}

/* ─── Data Table ─── */
.table-container {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

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

.data-table th {
    background: #f9fafb;
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    color: #374151;
}

.data-table tr:hover {
    background: #f9fafb;
}

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

.date-cell {
    white-space: nowrap;
}

.time-sub {
    display: block;
    font-size: 11px;
    color: #9ca3af;
}

.positive {
    color: #059669;
    font-weight: 600;
}

.negative {
    color: #dc2626;
    font-weight: 600;
}

.category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: #eff6ff;
    color: #2563eb;
    text-transform: capitalize;
}

.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
}

.type-adjustment { background: #eff6ff; color: #1d4ed8; }
.type-sale { background: #fef2f2; color: #dc2626; }
.type-restock { background: #ecfdf5; color: #059669; }

.notes-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9ca3af;
}

/* ─── Pagination ─── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 16px;
}

.pagination-info {
    color: #9ca3af;
    font-size: 13px;
    margin-right: 12px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #f3f4f6;
}

.page-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.page-ellipsis {
    padding: 6px 4px;
    color: #9ca3af;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    body {
        padding: 8px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        justify-content: center;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .nav-brand {
        justify-content: center;
    }

    .nav-logo {
        height: 32px;
    }

    .nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        width: 100%;
        scrollbar-width: none;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tab {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 7px 12px;
        font-size: 12px;
    }

    .user-info {
        font-size: 12px;
        gap: 8px;
    }

    .login-logo {
        height: 80px;
    }

    .header-logo {
        height: 40px;
    }

    .public-brand {
        gap: 10px;
    }

    .public-brand h1 {
        font-size: 18px;
    }

    .public-header .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .filter-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .filter-buttons::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .forecast-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .forecast-details {
        flex-direction: column;
        gap: 4px;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-group input[type="date"],
    .filter-group input[type="text"],
    .filter-group select {
        width: 100%;
    }

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

    .export-bar {
        flex-direction: column;
    }
}

/* ===== Phase 2.0: Registration & Admin ===== */

.register-box {
    max-width: 420px;
}

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

.register-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

.select-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.success-msg {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    margin-top: 12px;
}

/* Admin Panel */

.admin-section {
    margin-top: 24px;
}

.admin-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #111827;
}

.admin-filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    background: #f9fafb;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.admin-table tr:hover {
    background: #f9fafb;
}

.actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-approve {
    background: #059669;
    color: white;
}

.btn-approve:hover {
    background: #047857;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.role-select {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
}

.perm-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6b7280;
}

.perm-toggle input[type="checkbox"] {
    width: 32px;
    height: 18px;
    appearance: none;
    -webkit-appearance: none;
    background: #d1d5db;
    border-radius: 9px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.perm-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.perm-toggle input[type="checkbox"]:checked {
    background: #059669;
}

.perm-toggle input[type="checkbox"]:checked::after {
    transform: translateX(14px);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-role {
    background: #dbeafe;
    color: #1e40af;
    text-transform: capitalize;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    padding: 32px;
    font-style: italic;
}

/* ===== Phase 2.0: Public Availability Page ===== */

.public-page {
    background: #f0f4f8;
}

.public-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.btn-login-link {
    padding: 8px 16px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.btn-login-link:hover {
    background: #1d4ed8;
}

.store-info-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.store-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.store-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: #374151;
}

.store-info-item strong {
    font-size: 15px;
    color: #111827;
    margin-bottom: 4px;
}

.public-results-count {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.public-card {
    cursor: default;
}

.public-card:hover {
    transform: none;
}

.avail-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.avail-in-stock {
    background: #d1fae5;
    color: #065f46;
}

.avail-low-stock {
    background: #fef3c7;
    color: #92400e;
}

.avail-out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

.capitalize {
    text-transform: capitalize;
}

.public-footer {
    text-align: center;
    padding: 24px 0;
    color: #6b7280;
    font-size: 14px;
}

.public-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.public-footer a:hover {
    text-decoration: underline;
}

/* ===== Phase 2.0: Portal Styles ===== */

.portal-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #6b7280;
}

.discount-info {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.portal-card {
    position: relative;
}

.fav-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #d1d5db;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.fav-btn:hover,
.fav-btn.fav-active {
    color: #f59e0b;
}

.product-qty {
    font-size: 18px;
    font-weight: 600;
    margin: 8px 0 4px;
}

.qty-ok {
    color: #059669;
}

.qty-low {
    color: #d97706;
}

.low-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    font-weight: 500;
    vertical-align: middle;
}

.low-stock-card {
    border-left: 4px solid #f59e0b;
}

.price-line {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.your-price {
    font-size: 16px;
    font-weight: 600;
    color: #059669;
}

.retail-price {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
}

.msg-badge {
    background: #dc2626;
    color: white;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
    font-weight: 600;
}

/* ===== Phase 2.0: Quotes ===== */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0 16px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary:hover { background: #e5e7eb; }

.btn-success {
    background: #059669;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.btn-success:hover { background: #047857; }
.btn-success:disabled { background: #6ee7b7; cursor: not-allowed; }

.quotes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quote-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.quote-card:hover {
    border-color: #2563eb;
}

.quote-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.quote-id {
    font-weight: 600;
    color: #111827;
}

.quote-card-meta {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 4px;
}

.badge-draft { background: #f3f4f6; color: #374151; }
.badge-sent { background: #dbeafe; color: #1e40af; }
.badge-converted { background: #d1fae5; color: #065f46; }

.quote-form-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    margin-top: 16px;
}

.quote-info-panel,
.quote-items-panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.quote-items-panel h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #111827;
}

.add-item-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

.product-select {
    flex: 1;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.qty-input {
    width: 70px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.qty-input-sm {
    width: 55px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.quote-items-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.quote-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 14px;
}

.quote-item-info strong {
    display: block;
}

.quote-item-sku {
    font-size: 12px;
    color: #9ca3af;
}

.quote-item-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quote-item-total {
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

.quote-total-bar {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 2px solid #e5e7eb;
    font-size: 18px;
    font-weight: 600;
}

.quote-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ===== Phase 2.0: Project Timeline ===== */

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-event {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.timeline-icon {
    flex-shrink: 0;
    font-size: 11px;
    min-width: 80px;
    text-align: center;
}

.timeline-content {
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.timeline-date {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

/* ===== Phase 2.0: Messaging & Notifications ===== */

.msg-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.msg-panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.compose-form {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.compose-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.msg-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.msg-item:hover {
    background: #f9fafb;
}

.msg-unread {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.msg-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.msg-company {
    font-size: 12px;
    color: #9ca3af;
}

.msg-date {
    font-size: 12px;
    color: #9ca3af;
    margin-left: auto;
}

.msg-subject {
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

.msg-preview {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

.msg-open {
    background: #f9fafb;
    border-color: #d1d5db;
}

.msg-body {
    font-size: 14px;
    color: #374151;
    margin-top: 8px;
    padding: 8px 0;
    white-space: pre-wrap;
    line-height: 1.5;
}

.compose-label {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
    color: #111827;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notif-item {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    align-items: flex-start;
}

.notif-unread {
    background: #eff6ff;
}

.notif-read {
    opacity: 0.6;
}

.notif-content {
    flex: 1;
    font-size: 13px;
}

.notif-date {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

.special-order-form {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px;
}

.share-link {
    margin-top: 12px;
    padding: 10px;
    background: #d1fae5;
    border-radius: 6px;
    font-size: 13px;
    word-break: break-all;
}

.share-link a {
    color: #065f46;
    font-weight: 500;
}

.selection-share-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.selection-share-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.selection-notes {
    color: #6b7280;
    font-style: italic;
    margin-top: 8px;
}

.selection-item-note {
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f3f4f6;
}

/* ===== Phase 2.7: Threaded Conversations ===== */

.msg-tabs {
    display: flex;
    gap: 2px;
    background: #f3f4f6;
    padding: 3px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.msg-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.msg-tab:hover { background: #e5e7eb; }

.msg-tab.active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.msg-tab-icon {
    border: none;
    background: transparent;
    padding: 8px;
    cursor: pointer;
    font-size: 16px;
    color: #6b7280;
    border-radius: 6px;
    flex-shrink: 0;
}

.msg-tab-icon:hover { background: #e5e7eb; }

.tab-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 5px;
    margin-left: 4px;
}

.convo-search {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
}

.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 60vh;
    overflow-y: auto;
}

.convo-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.convo-item:hover { background: #f9fafb; }

.convo-item.convo-active {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.convo-item.convo-unread {
    border-left: 3px solid #3b82f6;
}

.convo-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.convo-from {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.convo-time {
    font-size: 11px;
    color: #9ca3af;
    flex-shrink: 0;
}

.convo-subject {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 2px;
}

.convo-preview {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.convo-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Thread view */
#threadView {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.thread-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.thread-title {
    flex: 1;
    min-width: 0;
}

.thread-title h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.thread-meta {
    font-size: 12px;
    color: #9ca3af;
}

.btn-back {
    border: none;
    background: #f3f4f6;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover { background: #e5e7eb; }

.thread-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
    min-height: 200px;
    max-height: 50vh;
}

.thread-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.thread-msg-other {
    background: #f3f4f6;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.thread-msg-mine {
    background: #3b82f6;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.thread-msg-sender {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 2px;
    opacity: 0.7;
}

.thread-msg-mine .thread-msg-sender { color: rgba(255,255,255,0.8); }

.thread-msg-body {
    white-space: pre-wrap;
    word-break: break-word;
}

.thread-msg-time {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.5;
    text-align: right;
}

.thread-reply {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    margin-top: 12px;
}

.thread-reply textarea {
    flex: 1;
    resize: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    min-height: 44px;
}

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

/* Notification preferences panel */
.notif-prefs-panel {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.pref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.pref-row:last-of-type { border-bottom: none; }

.pref-row select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    font-size: 13px;
}

/* Announcement cards */
.ann-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 8px;
}

.ann-card.ann-urgent {
    border-left: 3px solid #ef4444;
    background: #fef2f2;
}

.ann-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.ann-date {
    font-size: 12px;
    color: #9ca3af;
}

.ann-card-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
}

.ann-card-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

@media (max-width: 768px) {
    .quote-form-grid,
    .msg-layout {
        grid-template-columns: 1fr;
    }
    .msg-tabs {
        flex-wrap: wrap;
    }
    .msg-tab {
        font-size: 12px;
        padding: 6px 8px;
    }
    .thread-msg { max-width: 90%; }
    .convo-search { font-size: 16px; }
    .thread-reply textarea { font-size: 16px; }
    .add-item-row {
        flex-wrap: wrap;
    }
    .quote-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .admin-filter-row {
        flex-wrap: wrap;
    }
    .project-detail-grid {
        grid-template-columns: 1fr;
    }
    .timeline-item {
        padding-left: 16px;
    }
    .selection-share-card h2 {
        font-size: 18px;
    }
}

/* ===== Supplier Showcase — Luxury Redesign ===== */

/* --- Public showcase page layout --- */
.showcase-page {
    font-family: 'Quicksand', 'Segoe UI', sans-serif;
    margin: 0;
    background: #fafafa;
    color: #1a1a1a;
}

.sc-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 24px;
}

.sc-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.sc-logo img {
    height: 40px;
}

.sc-nav {
    display: flex;
    gap: 32px;
}

.sc-nav a {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.sc-nav a:hover,
.sc-nav a.active {
    color: #111;
}

/* --- Hero banner --- */
.sc-hero {
    background: #fff;
    color: #1a1a1a;
    text-align: center;
    padding: 36px 24px 28px;
    border-bottom: 1px solid #eee;
}

.sc-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.sc-hero p {
    font-size: 15px;
    color: #888;
    margin: 0;
    max-width: 560px;
    margin: 0 auto;
}

/* Portal variant — same clean look */
.sc-hero-portal {
    background: #fff;
    color: #1a1a1a;
    padding: 32px 24px 28px;
    border-bottom: 1px solid #eee;
}

.sc-hero-portal h1 {
    color: #1a1a1a;
    font-size: 24px;
}

.sc-hero-portal p {
    color: #888;
}

/* --- Container & toolbar --- */
.sc-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}

.sc-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.sc-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 16px;
    max-width: 400px;
}

.sc-search input {
    border: none;
    outline: none;
    font-size: 14px;
    font-family: 'Quicksand', sans-serif;
    width: 100%;
    background: transparent;
}

.sc-filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sc-filter {
    padding: 7px 18px;
    border: 1px solid #ddd;
    border-radius: 24px;
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.sc-filter:hover {
    border-color: #111;
    color: #111;
}

.sc-filter.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* --- Product type tags --- */
.sc-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 3px;
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    z-index: 2;
    pointer-events: none;
}
.sc-tag-engineered { background: #5b4a3f; }
.sc-tag-laminate { background: #2563eb; }
.sc-tag-spc { background: #0891b2; }
.sc-tag-adhesive { background: #dc2626; }
.sc-tag-floor_prep { background: #d97706; }
.sc-tag-moisture { background: #4338ca; }
.sc-tag-tile_setting { background: #7c3aed; }
.sc-tag-tile_boards { background: #6d28d9; }
.sc-tag-tile_shower { background: #2563eb; }
.sc-tag-grout { background: #059669; }
.sc-tag-sealers { background: #0d9488; }
.sc-tag-tile_prep { background: #7c3aed; }
.sc-tag-underlayment { background: #92400e; }
.sc-tag-sound_control { background: #1e40af; }
.sc-tag-carpet_pad { background: #be185d; }
.sc-tag-carpet_supplies { background: #9d174d; }
.sc-tag-tools { background: #374151; }
.sc-tag-transitions { background: #78716c; }
.sc-tag-floor_protection { background: #b45309; }
.sc-tag-misc { background: #6b7280; }
.sc-tag-schluter { background: #ea580c; }

.sc-count {
    font-size: 13px;
    color: #999;
    margin-bottom: 16px;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- Product grid --- */
.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.sc-collection-header {
    grid-column: 1 / -1;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #111;
    padding: 32px 0 8px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: -8px;
}

.sc-collection-header:first-child {
    padding-top: 0;
}

.sc-collection-count {
    font-weight: 400;
    color: #999;
    font-size: 12px;
    margin-left: 8px;
    letter-spacing: 0;
}

.sc-card {
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.sc-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.sc-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
}

.sc-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sc-card:hover .sc-card-img img {
    transform: scale(1.04);
}

.sc-card-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #bbb;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sc-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.sc-btn-outline-secondary {
    background: rgba(255,255,255,0.15) !important;
    border-color: rgba(255,255,255,0.5) !important;
    font-size: 10px !important;
    padding: 7px 16px !important;
    letter-spacing: 0.1em !important;
}

.sc-card:hover .sc-card-overlay {
    opacity: 1;
}

.sc-card-info {
    padding: 14px 4px 18px;
}

.sc-card-supplier {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 4px;
}

.sc-card-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #222;
}

/* Portal card pricing */
.sc-card-price {
    margin-top: 6px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.sc-price-amount {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.sc-price-unit {
    font-size: 12px;
    color: #999;
}

.sc-price-discount {
    font-size: 10px;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 4px;
    font-weight: 500;
}

/* Admin/staff cost & margin display */
.sc-card-cost,
.sc-detail-cost {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* "from" label for multi-grade products */
.sc-price-from {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

/* Dual grade pricing in detail modal */
.sc-detail-grades {
    margin-top: 8px;
}
.sc-grade-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}
.sc-grade-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    min-width: 80px;
}

.sc-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

/* --- Buttons --- */
.sc-btn-dark {
    display: inline-block;
    padding: 12px 28px;
    background: #111;
    color: #fff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.sc-btn-dark:hover {
    background: #333;
}

.sc-btn-outline {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.sc-btn-outline:hover {
    background: #fff;
    color: #111;
}

.sc-btn-full {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

/* --- Modals --- */
.sc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.sc-modal {
    background: #fff;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px;
    position: relative;
}

.sc-modal-sm {
    max-width: 440px;
    padding: 32px;
}

.sc-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.sc-modal-close:hover {
    color: #111;
}

.sc-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 6px;
}

.sc-modal-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* --- Detail modal content --- */
.sc-detail-layout {
    display: flex;
    gap: 36px;
}

.sc-detail-left {
    flex: 1;
    min-width: 0;
}

.sc-detail-right {
    flex: 1;
    min-width: 0;
}

.sc-detail-gallery {
    margin-bottom: 8px;
}

.sc-detail-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
}

.sc-detail-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sc-detail-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.sc-thumb {
    width: 64px;
    height: 64px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.sc-thumb.active {
    border-color: #111;
}

.sc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sc-detail-supplier {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 6px;
}

.sc-detail-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin: 0 0 6px;
    color: #111;
}

.sc-detail-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.sc-detail-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin: 0 0 16px;
}

.sc-detail-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 12px 0 16px;
}

.sc-detail-price .sc-price-amount {
    font-size: 20px;
}

/* --- Specs --- */
.sc-specs {
    margin: 16px 0;
}

.sc-specs h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #666;
    margin: 0 0 10px;
}

.sc-specs table {
    width: 100%;
    border-collapse: collapse;
}

.sc-specs td {
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.sc-specs td:first-child {
    font-weight: 600;
    color: #333;
    width: 40%;
    padding-right: 12px;
}

.sc-specs td:last-child {
    color: #666;
}

/* --- Room scenes --- */
.sc-room-scenes {
    margin: 20px 0 0;
}

.sc-room-scenes h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #666;
    margin: 0 0 10px;
}

.sc-room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.sc-room-img {
    overflow: hidden;
    cursor: pointer;
}

.sc-room-img img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    transition: transform 0.3s;
}

.sc-room-img:hover img {
    transform: scale(1.05);
}

/* --- Form groups (inquiry / quote modals) --- */
.sc-form-group {
    margin-bottom: 14px;
}

.sc-form-group label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 5px;
}

.sc-form-group input,
.sc-form-group select,
.sc-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.sc-form-group input:focus,
.sc-form-group select:focus,
.sc-form-group textarea:focus {
    border-color: #111;
    outline: none;
}

.sc-form-group textarea {
    resize: vertical;
}

/* --- Toast notification --- */
.sc-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111;
    color: #fff;
    padding: 14px 28px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.sc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Text Us floating button --- */
.sc-text-us-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #111;
    color: #fff;
    padding: 14px 22px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    z-index: 1500;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.sc-text-us-float:hover {
    background: #333;
    transform: translateY(-2px);
    color: #fff;
}

.sc-text-us-float svg {
    flex-shrink: 0;
}

/* --- Text Us detail button --- */
.sc-btn-text-us {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #111;
    color: #fff;
    padding: 14px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 10px;
}

.sc-btn-text-us:hover {
    background: #333;
    color: #fff;
}

.sc-btn-outline-dark {
    display: block;
    text-align: center;
    background: transparent;
    color: #111;
    padding: 12px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.sc-btn-outline-dark:hover {
    border-color: #111;
}

@media (max-width: 600px) {
    .sc-text-us-float {
        bottom: 16px;
        right: 16px;
        padding: 12px 18px;
        font-size: 12px;
    }
}

/* --- Footer --- */
.sc-footer {
    text-align: center;
    padding: 32px 24px;
    color: #999;
    font-size: 14px;
    border-top: 1px solid #eee;
}

.sc-footer a {
    color: #111;
    text-decoration: underline;
}

/* ===== Showcase Admin (kept from original) ===== */
.showcase-admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #f3f4f6;
    padding: 3px;
    border-radius: 8px;
    width: fit-content;
}

.showcase-admin-tab {
    padding: 7px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    transition: all 0.2s;
}

.showcase-admin-tab.active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    margin: 0;
}

.form-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 10px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-primary {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fecaca;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-xs {
    padding: 2px 6px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: rgba(255,255,255,0.85);
}

.text-muted {
    color: #9ca3af;
    font-size: 12px;
}

.text-truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.capitalize {
    text-transform: capitalize;
}

.modal-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.status-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
}

/* Image management */
.image-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.image-upload-zone:hover {
    border-color: #2563eb;
}

.image-upload-zone p {
    margin: 4px 0;
    color: #6b7280;
    font-size: 14px;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.image-preview-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.image-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.image-preview-item .image-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 4px;
}

.image-type-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

.image-primary-marker {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #059669;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

.spec-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.spec-row .form-group {
    margin-bottom: 0;
}

/* --- Showcase responsive --- */
@media (max-width: 768px) {
    .sc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .sc-header-inner {
        flex-direction: column;
        height: auto;
        padding: 12px 0;
        gap: 8px;
    }
    .sc-nav {
        gap: 16px;
    }
    .sc-nav a {
        font-size: 11px;
    }
    .sc-hero h1 {
        font-size: 20px;
    }
    .sc-detail-layout {
        flex-direction: column;
        gap: 20px;
    }
    .sc-modal {
        padding: 20px;
        max-width: 100%;
    }
    .sc-detail-name {
        font-size: 18px;
    }
    .sc-room-grid {
        grid-template-columns: 1fr 1fr;
    }
    /* Admin responsive */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .showcase-admin-tabs {
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .sc-grid {
        grid-template-columns: 1fr;
    }
    .sc-search {
        max-width: 100%;
    }
    .sc-filter {
        padding: 6px 12px;
        font-size: 10px;
    }
}

/* ===== Phase 2.7: Project Hub (Files, Pins, Members) ===== */

.proj-tab-content { margin-top: 8px; }

/* File Upload */
.file-upload-zone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
}
.file-hint {
    color: #6b7280;
    font-size: 13px;
}

/* File Items */
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
}
.file-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.file-info strong {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-meta {
    font-size: 12px;
    color: #6b7280;
}
.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Pin Items */
.pin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.pin-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.pin-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.pin-link {
    color: #2563eb;
    font-size: 13px;
    word-break: break-all;
}

/* Member Items */
.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
}
.member-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.member-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Timeline Events */
.timeline-event {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}
.timeline-event:last-child { border-bottom: none; }
.timeline-content {
    flex: 1;
}
.timeline-date {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

/* Project Chat Bubbles (reuses thread styles) */
#projChatMessages {
    overflow-y: auto;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
#projChatMessages .thread-msg {
    max-width: 80%;
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    clear: both;
}
#projChatMessages .thread-msg-other {
    background: #e5e7eb;
    float: left;
}
#projChatMessages .thread-msg-mine {
    background: #2563eb;
    color: #fff;
    float: right;
}
#projChatMessages .thread-msg::after {
    content: '';
    display: table;
    clear: both;
}

/* Project mobile adjustments */
@media (max-width: 768px) {
    .file-item, .pin-item, .member-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .file-actions, .member-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .file-upload-zone {
        flex-direction: column;
        text-align: center;
    }
    #projChatMessages .thread-msg {
        max-width: 90%;
    }
}

/* ===== Admin Inbox ===== */

.inbox-stats {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}
.badge-danger {
    background: #dc2626;
    color: #fff;
}

/* Nav Badge (notification count in header) */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
    line-height: 1;
    vertical-align: middle;
}
