/* =============================================================
   LAYOUT
   ============================================================= */
.ub-user-layout-shell {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 12px;
}

.ub-user-layout-shell--guest {
    justify-content: center;
}

.ub-user-mobile-menu {
    display: none;
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 12px 0;
}

.ub-user-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.ub-user-mobile-menu-btn:hover {
    background: #f9fafb;
}

.ub-user-sidebar-column {
    width: 100%;
    max-width: 270px;
    flex: 0 0 270px;
}

.ub-user-content-column {
    min-width: 0;
    flex: 1 1 auto;
}

.ub-user-content-column--guest {
    width: 100%;
    max-width: 960px;
}

.ub-user-panel {
    width: 100%;
    padding: 0 14px;
}

@media (max-width: 1199.98px) {
    .ub-user-mobile-menu {
        display: block;
    }

    .ub-user-layout-shell {
        flex-direction: column;
        gap: 12px;
    }

    .ub-user-sidebar-column {
        display: none;
        max-width: none;
        flex-basis: auto;
    }

    .ub-user-panel {
        padding: 0;
    }
}

/* =============================================================
   SIDEBAR SHELL
   ============================================================= */
.ub-user-sidenav {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

/* Mobile close row */
.nav-mobile-close {
    display: flex;
    justify-content: flex-end;
    padding: 8px 10px 0;
}

/* =============================================================
   USER INFO STRIP
   ============================================================= */
.nav-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.nav-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
    display: block;
}

.nav-user-details {
    min-width: 0;
}

.nav-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-user-email {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================================
   NAV BODY
   ============================================================= */
.nav-body {
    padding: 8px 10px 4px;
}

.nav-section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    padding: 10px 6px 4px;
    margin: 0;
}

.nav-items {
    list-style: none;
    padding: 0;
    margin: 0 0 2px;
}

.nav-items li {
    margin: 0;
}

/* Nav link */
.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 8px 8px 6px;
    border-radius: 6px;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    position: relative;
    border-left: 2px solid transparent;
}

.nav-item:hover {
    background: #f9fafb;
    color: #111827;
    text-decoration: none;
}

.nav-item.active {
    background: #fdfaf3;
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--primary);
}

.nav-item.active .nav-icon {
    color: var(--primary);
}

/* SVG icon */
.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #9ca3af;
    transition: color 0.15s;
}

.nav-item:hover .nav-icon {
    color: #374151;
}

/* Notification dot */
.nav-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    margin-left: auto;
    flex-shrink: 0;
}

/* Unread count badge */
.nav-count {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
    background: #ef4444;
    border-radius: 10px;
    padding: 1px 6px;
    line-height: 1.5;
    flex-shrink: 0;
}

/* Danger (delete account) */
.nav-item-danger {
    color: #9ca3af;
}
.nav-item-danger:hover {
    background: #fef2f2;
    color: #ef4444;
}
.nav-item-danger:hover .nav-icon {
    color: #ef4444;
}

/* =============================================================
   LOGOUT
   ============================================================= */
.nav-logout-wrap {
    padding: 8px 10px 10px;
    border-top: 1px solid #f3f4f6;
    margin-top: 4px;
}

.nav-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 9px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.nav-logout-btn:hover {
    opacity: 0.88;
    color: #fff;
    text-decoration: none;
}

/* =============================================================
   TABLE / LISTING HELPERS
   ============================================================= */
.hidden { display: none; }

.custom_listing_border {
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

@media (min-width: 768px) {
    .custom_listing_border {
        border: 1px solid #f1f1f4;
        box-shadow: 0 4px 10px rgba(35,39,52,.04);
        padding: 12px 15px;
        border-radius: 8px;
        background: #fff;
        margin-bottom: 10px;
    }
}

.user_dashboard_table_container {
    border: 1px solid #f1f1f4;
    box-shadow: 0 4px 10px rgba(35,39,52,.04);
    padding: 10px 15px;
    border-radius: 8px;
    background: #fff;
}

.order-history-filtters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
}

/* =============================================================
   TABLE LAYOUT
   ============================================================= */
.ubx-table-layout {
    border-collapse: separate;
    border-spacing: 0 var(--row-spacing, 0);
    width: 100%;
    margin-bottom: 1rem;
}

.ubx-table-layout thead th {
    background: var(--header-bg, #f8fafc);
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: none;
    white-space: nowrap;
    vertical-align: bottom;
    border-bottom: hidden !important;
}

.ubx-table-layout tbody tr {
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.ubx-table-layout tbody tr:hover {
    background: var(--hover-bg, #f8fafc);
    box-shadow: 0 2px 6px rgba(0,0,0,.07);
}

.ubx-table-layout tbody td {
    padding: 0.5rem;
    vertical-align: middle;
    border: none;
    font-size: 0.8rem;
}

.ubx-table-container {
    --border-color: #e5e7eb;
    --hover-bg: #f8fafc;
    --header-bg: #f8fafc;
    width: 100%;
    overflow: scroll;
}

@media (max-width: 1024px) {
    .ubx-table-layout { overflow-x: scroll; }
}
