/* =========================================================================
   1. ELEGANT DESIGN SYSTEM & TYPOGRAPHY
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --control-height: 46px;
    /* Deep Slate & Indigo Theme (Dark) */
    --bg-color: #0c0e12;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #6366f1;
    /* Indigo */
    --accent-hover: #818cf8;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: #11141b;
    --hover-bg: rgba(255, 255, 255, 0.04);
    --selected-bg: rgba(99, 102, 241, 0.1);
    --th-bg: rgba(255, 255, 255, 0.02);
    --btn-edit-hover: rgba(255, 255, 255, 0.06);
    --glass-bg: rgba(17, 20, 27, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --input-bg: rgba(255, 255, 255, 0.03);
}

[data-theme='light'] {
    /* Soft Slate & Indigo Theme (Light) */
    --bg-color: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-color: #4f46e5;
    --accent-hover: #4338ca;
    --border-color: rgba(0, 0, 0, 0.08);
    --card-bg: #ffffff;
    --hover-bg: rgba(0, 0, 0, 0.03);
    --selected-bg: rgba(79, 70, 229, 0.08);
    --th-bg: rgba(0, 0, 0, 0.01);
    --btn-edit-hover: rgba(0, 0, 0, 0.04);
    --glass-bg: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(0, 0, 0, 0.08);
    --input-bg: rgba(0, 0, 0, 0.03);
}

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

button, label, .badge, .pill, .tag {
    white-space: nowrap;
}

html,
body {
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow: hidden;
}

#root {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

button svg,
.tool-btn svg,
.auth-btn-primary svg,
.auth-btn-text svg,
.nav-btn svg,
.view-switcher-btn svg {
    display: block;
    flex-shrink: 0;
}

.app-svg-icon,
.app-svg-icon>svg,
span[data-icon-name],
span[data-icon-name]>svg {
    display: block;
    width: 100%;
    height: 100%;
}

span[data-icon-name] {
    overflow: hidden;
    flex-shrink: 0;
}

.app-nav-btn-icon>span[data-icon-name] {
    width: 18px;
    height: 18px;
}

.tool-btn>span[data-icon-name],
.sort-btn>span[data-icon-name],
.view-switcher-btn span[data-icon-name],
.hub-action-search-icon {
    width: 18px;
    height: 18px;
}

.dashboard-card span[data-icon-name] {
    width: 18px;
    height: 18px;
}

h1,
h2,
h3,
.app-logo {
    font-family: 'Outfit', sans-serif;
}

/* =========================================================================
   2. AUTHENTICATION & LOGIN UI
   ========================================================================= */

.auth-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    /* Deep base for background image contrast */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    overflow: hidden;
    padding: 2rem;
}

.auth-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    opacity: 0.5;
    /* Good contrast with white login box */
    transform: scale(1.1);
}

/* Mockup matched branding */
.auth-external-branding {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.auth-external-logo {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    border-radius: 20px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.auth-external-logo img {
    max-width: 66%;
    max-height: 66%;
    object-fit: contain;
}

.auth-external-name {
    font-size: 2.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: -1.5px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.auth-external-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.auth-box {
    background: #ffffff;
    border-radius: 28px;
    width: 100%;
    max-width: 440px;
    padding: 3.5rem;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 10;
    animation: authBoxSlide 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='dark'] .auth-box {
    background: #1e1e2d;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes authBoxSlide {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.auth-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    margin-left: 0.2rem;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #edf2f7;
    border-radius: 14px;
    padding: 0.85rem 1.25rem;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.98rem;
    transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 52px;
}

/* Maintain left padding for inputs with icons (Login/Search) */
.auth-input-wrapper .auth-input,
.toolbar-search-wrap .auth-input,
.hub-action-search .auth-input {
    padding-left: 3.25rem;
}

.auth-input:disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

[data-theme='dark'] .auth-input:disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme='dark'] .auth-input {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 0 0 4px var(--selected-bg);
}

.auth-input-icon-left {
    position: absolute;
    left: 1.25rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color 0.2s;
}

.auth-input:focus+.auth-input-icon-left,
.auth-input:focus~.auth-input-icon-left {
    color: var(--accent-color);
}

.auth-input-icon-right {
    position: absolute;
    right: 1.25rem;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.auth-input-icon-right:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.auth-btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 1.15rem;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 0.5rem;
    box-shadow: 0 10px 20px -5px var(--selected-bg);
}

.auth-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 30px -5px var(--selected-bg);
}

.auth-btn-text {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-btn-text:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* =========================================================================
   3. APP LAYOUT & CORE NAVIGATION
   ========================================================================= */

.app-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.top-brand-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 4vw;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(to bottom, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-nav {
    margin-left: 2rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    padding: 6px;
    border-radius: 40px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    transition: box-shadow 0.24s ease, border-color 0.24s ease;
}

.app-nav-indicator {
    position: absolute;
    border-radius: 999px;
    background: var(--accent-color);
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.4);
    transition: left 0.32s cubic-bezier(0.22, 1, 0.36, 1), top 0.32s cubic-bezier(0.22, 1, 0.36, 1), width 0.32s cubic-bezier(0.22, 1, 0.36, 1), height 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
    pointer-events: none;
}

.app-nav-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    height: 44px;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.24s ease, transform 0.24s ease, background 0.24s ease;
    overflow: hidden;
}

.app-nav-btn-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    transition: color 0.24s ease, transform 0.24s ease;
}

.app-nav-text {
    position: relative;
    z-index: 1;
    display: inline-block;
    opacity: 1;
    transition: color 0.24s ease;
}

.app-nav-btn.active {
    color: white;
    gap: 0.6rem;
    width: auto;
    min-width: 0;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}

.app-nav-btn.active .app-nav-btn-icon {
    color: white;
}

.app-nav-btn:hover:not(.active) {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.brand-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.75rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.brand-right:hover {
    background: var(--hover-bg);
}

.user-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.app-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 4vw 2rem;
    gap: 1.5rem;
    overflow-y: auto;
}

.main-view-panel,
.admin-tab-panel {
    animation: pageFadeSlide 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-tab-bar-shell {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.admin-tab-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
}

.admin-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 44px;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.24s ease, color 0.24s ease, box-shadow 0.24s ease;
}

.admin-tab-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-tab-btn.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.4);
}

.admin-tab-btn:hover:not(.active) {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.admin-dashboard-shell {
    width: 100%;
}

/* =========================================================================
   4. DATA CONTAINERS (THE "LIST BOX")
   ========================================================================= */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.list-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    /* Remove fixed height to allow internal content to dictate size or scroll */
    min-height: 500px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* =========================================================================
   5. TABLES & TOOLBARS
   ========================================================================= */

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.management-row th {
    padding: 1.5rem 2.5rem;
    /* Increased padding significantly */
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
}

.management-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1rem;
    padding: 0.8rem 1.75rem;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.toolbar-left {
    min-width: 0;
}

.toolbar-right {
    justify-content: flex-end;
    align-self: end;
}

.toolbar-controls-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    min-width: 0;
}

.toolbar-hub-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.toolbar-hub-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-hub-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-hub-bottom-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 34rem;
    min-width: 0;
}

.toolbar-hub-bottom-left .sort-wrapper {
    flex: 0 0 auto;
}

.toolbar-hub-bottom-left .toolbar-search-wrap {
    flex: 1 1 auto;
    min-width: 16rem;
}

.toolbar-hub-add {
    flex: 0 0 auto;
    min-width: 11rem;
}

.toolbar-filter-slot,
.toolbar-view-slot {
    display: flex;
    align-items: center;
    min-width: 0;
}

.toolbar-search-wrap {
    flex: 1 1 22rem;
    min-width: min(100%, 20rem);
}

.toolbar-search-wrap .search-bar {
    min-width: 0;
}

.search-bar {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    width: 280px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
    height: var(--control-height);
}

.hub-action-search .search-bar,
.toolbar-search-wrap .search-bar {
    padding-left: 2.75rem;
}

.active-input:focus,
.search-bar:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.tool-btn {
    padding: 0.65rem 1.25rem;
    /* Fixed: reset icon padding within the large bar */
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    height: var(--control-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-btn {
    background: var(--accent-color);
    color: white;
}

.add-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.edit-btn {
    background: var(--hover-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.remove-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.header-row th {
    padding: 1rem 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.header-row:hover th {
    background: var(--hover-bg);
    /* Highlight header on hover for clickability */
}

/* Location Pills Filter */
.location-pills {
    display: flex;
    gap: 0.75rem;
    padding: 1.8rem 2.5rem 0 2.5rem;
    /* Spacious padding above the toolbar */
    flex-wrap: wrap;
    align-items: center;
    animation: authFadeIn 0.4s ease;
}

.location-pill {
    padding: 0.6rem 1.4rem;
    max-width: min(100%, 18rem);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.location-pill-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.warehouse-pills {
    width: 100%;
}

.warehouse-pills .location-pill {
    flex: 0 1 auto;
}

.location-pill.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.location-pill:hover:not(.active) {
    background: var(--hover-bg);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.data-row td {
    padding: 1.25rem 2rem;
    /* Fat finger! More vertical space */
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    /* Entire cell is interactive */
    transition: background-color 0.15s;
}

.data-row:hover td {
    background: var(--hover-bg);
    /* Full row highlight on hover */
}

.data-row input[type="checkbox"],
.header-row input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--accent-color);
}

.data-row.selected td {
    background: var(--selected-bg);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* =========================================================================
   6. CUSTOM COMPONENTS
   ========================================================================= */

.view-switcher {
    display: flex;
    background: var(--hover-bg);
    padding: 3px;
    border-radius: 10px;
    gap: 2px;
}

.view-switcher-btn {
    min-height: var(--control-height);
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.view-switcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.view-switcher-label {
    display: inline-block;
}

.view-switcher-btn.active {
    background: var(--card-bg);
    color: var(--accent-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* =========================================================================
   7. SETTINGS & SCROLLING
   ========================================================================= */

.settings-tab {
    padding: 4rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.setting-item {
    margin-bottom: 1.5rem;
    padding: 2rem;
    background: var(--hover-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* =========================================================================
   8. PROMPT / MODAL
   ========================================================================= */

.prompt-box {
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    padding: 3.5rem;
    /* Significantly larger padding for spacious prompts */
    width: 100%;
}

/* Scrollbar styling for elegance */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* Item List Card System */
.item-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.item-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.item-image-wrapper {
    height: 180px;
    background: var(--hover-bg);
    position: relative;
    overflow: hidden;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.item-card:hover .item-image {
    transform: scale(1.05);
}

.item-status-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.item-details-box {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.item-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.item-code-tag {
    font-family: 'Outfit';
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

.item-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 4px 0;
    min-height: 2.5em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-stock-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    background: var(--hover-bg);
    padding: 1rem;
    border-radius: 14px;
    margin-top: auto;
}

.stock-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.stock-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.status-badge.reorder {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge.okay {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Organised Navigation / Sort Styles */
.sort-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 240px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    padding: 0.6rem;
    backdrop-filter: blur(20px);
}

.sort-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.sort-item:hover {
    background: var(--hover-bg);
    color: var(--accent-color);
    transform: translateX(4px);
}

.sort-item.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent-color);
    font-weight: 600;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.prompt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

/* =========================================================================
   9. DASHBOARD COMPONENTS
   ========================================================================= */
.dashboard-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dash-card-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.dash-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* =========================================================================
   10. ADMIN & DATA TABLES
   ========================================================================= */

.data-table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table thead th {
    background: var(--th-bg);
    padding: 1rem 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.data-table tbody td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background: var(--hover-bg);
}

.admin-tab-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.dashboard-widget-panel {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--card-bg), var(--hover-bg));
    animation: pageFadeSlide 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.assets-workspace,
.partners-workspace {
    overflow: hidden;
}

.hub-action-bar {
    padding: 1rem 2rem;
}

.hub-action-row,
.hub-selection-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hub-action-left,
.hub-action-right,
.hub-selection-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: 0;
}

.hub-action-left {
    flex: 1 1 42rem;
}

.hub-action-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 24rem;
    min-width: min(100%, 24rem);
}

.hub-action-search-icon {
    position: absolute;
    left: 0.85rem;
    opacity: 0.5;
    pointer-events: none;
    z-index: 2;
}

.hub-search-input {
    width: 100%;
    padding-left: 2.5rem;
    background: var(--hover-bg);
    border-radius: 12px;
}

.hub-action-add {
    flex: 0 0 auto;
    min-width: 11rem;
}

.hub-selection-note {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.7;
}

/* Unified Action Bar Enhancements */
.hub-action-tabs {
    display: flex;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

[data-theme='light'] .hub-action-tabs {
    background: rgba(0, 0, 0, 0.04);
}

.hub-tab-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 9px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-tab-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.hub-tab-item.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.hub-action-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 0.5rem;
}

.hub-action-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.history-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.history-btn:hover:not(:disabled) {
    background: var(--hover-bg);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.history-btn:active:not(:disabled) {
    transform: translateY(0);
}

.display-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.display-toggle:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.display-toggle.active {
    background: var(--selected-bg);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.assets-hero,
.partners-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent);
}

.assets-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.assets-title {
    margin-top: 0.2rem;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.assets-copy {
    margin-top: 0.35rem;
    max-width: 660px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.assets-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 0.5rem;
    min-width: min(100%, 320px);
}

.assets-summary-card {
    padding: 0.75rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.assets-summary-card strong {
    font-size: 1.15rem;
    font-weight: 800;
}

.hub-focus-rail {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    padding: 1rem 1.5rem 0.25rem;
    border-top: 1px solid var(--border-color);
}

.hub-focus-pill {
    min-height: 44px;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.hub-focus-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.28);
}

.hub-focus-pill.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.22);
}

.assets-summary-label,
.partners-metric-label {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.assets-inline-chip {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-color);
    border: 1px solid rgba(99, 102, 241, 0.18);
    font-size: 0.75rem;
    font-weight: 700;
}

.assets-inline-chip.muted {
    background: var(--hover-bg);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.assets-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.partners-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.partners-customer-panel {
    padding: 1.25rem 1.5rem 1.5rem;
}

.partners-customer-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(99, 102, 241, 0.06));
}

.partners-status-badge {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.partners-customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.partners-customer-card {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: linear-gradient(180deg, var(--card-bg), rgba(255, 255, 255, 0.02));
    padding: 1.15rem;
}

.partners-customer-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.9rem;
    border-radius: 14px;
    background: var(--hover-bg);
}

.partners-customer-metrics strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pageFadeSlide {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes dashboardViewEnter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fade-in {
    animation: authFadeIn 0.3s ease-out;
}

.slide-up {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 1100px) {
    .top-brand-bar {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .app-nav {
        order: 3;
        width: 100%;
        max-width: none;
        margin-left: 0;
        min-width: 0;
        justify-content: center;
    }

    .brand-right {
        margin-left: auto;
    }
}

@media (max-width: 900px) {
    .app-layout {
        padding: 1rem 1rem 1.5rem;
    }

    .management-toolbar,
    .location-pills {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .management-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .toolbar-right {
        justify-content: flex-start;
        align-self: stretch;
    }

    .warehouse-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.35rem;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .warehouse-pills::-webkit-scrollbar {
        display: none;
    }

    .warehouse-pills .location-pill {
        flex: 0 0 auto;
        max-width: min(80vw, 16rem);
    }

    .data-table thead th,
    .data-table tbody td,
    .header-row th,
    .data-row td {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .app-nav {
        gap: 0.25rem;
        padding: 6px;
    }

    .app-nav-btn {
        padding: 0.65rem 0.85rem;
        font-size: 0.8rem;
    }

    .app-nav-text {
        display: none;
    }

    .management-toolbar,
    .list-controls {
        flex-direction: column;
        align-items: stretch !important;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: stretch;
    }

    .toolbar-left>*,
    .toolbar-right>* {
        width: 100%;
    }

    .view-switcher {
        width: 100%;
        min-width: 0 !important;
    }

    .inventory-view-switcher {
        min-width: 0 !important;
    }

    .dashboard-view-switcher {
        min-width: 0 !important;
    }

    .inventory-view-switcher .view-switcher-btn {
        padding: 0.6rem 0.85rem;
        justify-content: center;
    }

    .dashboard-view-switcher .view-switcher-btn {
        padding: 0.6rem 0.95rem;
        justify-content: center;
    }

    .inventory-view-switcher .view-switcher-label {
        display: none;
    }

    .dashboard-view-switcher .view-switcher-label {
        display: none;
    }

    .settings-tab,
    .admin-tab-content {
        padding: 1rem;
    }

    .assets-hero,
    .partners-hero,
    .partners-customer-banner {
        flex-direction: column;
    }

    .assets-workspace .toolbar-controls-row,
    .partners-workspace .toolbar-controls-row,
    .toolbar-hub-top,
    .toolbar-hub-bottom,
    .toolbar-hub-bottom-left,
    .hub-action-row,
    .hub-selection-row,
    .hub-action-left,
    .hub-action-right,
    .hub-selection-actions {
        display: flex;
        flex-wrap: wrap;
    }

    .toolbar-hub-bottom-left .toolbar-search-wrap {
        min-width: 100%;
    }

    .hub-action-bar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hub-focus-rail {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hub-action-search {
        min-width: 100%;
    }

    .hub-action-add {
        width: 100%;
    }

    .assets-summary-grid {
        width: 100%;
        min-width: 0;
    }

    .partners-pill-row {
        justify-content: flex-start;
    }

    .admin-dashboard-shell {
        padding: 1rem !important;
    }

    .admin-dashboard-shell>div:first-child {
        margin-bottom: 1.25rem !important;
    }

    .admin-dashboard-shell h1 {
        font-size: 1.5rem !important;
        line-height: 1.1;
    }

    .admin-tab-bar {
        justify-content: flex-start;
        gap: 0.3rem;
        padding: 5px;
    }

    .admin-tab-btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.84rem;
    }

    .admin-tab-panel .admin-tab-content,
    .admin-tab-panel .data-table-container,
    .admin-tab-panel .list-box {
        border-radius: 14px;
    }

    .user-settings-modal {
        width: min(100%, 100%) !important;
        padding: 1.25rem !important;
    }

    .user-settings-header {
        margin-bottom: 1.25rem !important;
        gap: 0.75rem;
    }

    .user-settings-header h2 {
        font-size: 1.5rem !important;
        line-height: 1.1;
        margin: 0;
    }

    .user-settings-card {
        margin-bottom: 1rem !important;
        border-radius: 14px !important;
    }

    .user-settings-card-header {
        padding: 1rem 1rem 0.85rem 1rem !important;
    }

    .user-settings-card-body {
        padding: 0 1rem 1rem 1rem !important;
    }

    .user-settings-profile-row,
    .user-settings-split-row,
    .user-settings-threshold-row,
    .user-settings-danger-row {
        flex-direction: column;
        align-items: stretch !important;
    }

    .user-settings-about-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .user-settings-profile-row>div:last-child,
    .user-settings-split-row>div:first-child,
    .user-settings-danger-row>div:first-child {
        max-width: none !important;
        width: 100%;
    }

    .user-settings-threshold-row>* {
        width: 100%;
        max-width: none !important;
    }

    .user-settings-split-row button,
    .user-settings-danger-row button {
        width: 100%;
        justify-content: center;
    }

    .item-card-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .prompt-overlay {
        padding: 0.75rem;
    }

    .prompt-box {
        padding: 1.25rem;
        border-radius: 18px;
    }
}

@media (max-width: 680px) {
    .top-brand-bar {
        position: sticky;
        top: 0;
        padding: 0.9rem 1rem;
        flex-wrap: nowrap;
        gap: 0.75rem;
        /* Remove backdrop-filter: Chrome bug traps position:fixed children
           (app-nav) inside this element instead of the viewport */
        backdrop-filter: none;
        background: var(--glass-bg);
    }

    .brand-left {
        flex: 1 1 auto;
        min-width: 0;
    }

    .app-logo {
        font-size: 1.1rem;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-right {
        margin-left: 0;
        padding: 0.2rem;
        border-radius: 14px;
    }

    .app-nav {
        position: fixed;
        left: 50%;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
        transform: translateX(-50%);
        width: min(calc(100% - 1rem), 420px);
        max-width: none;
        margin-left: 0;
        gap: 0.25rem;
        padding: 8px;
        border-radius: 999px;
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(255, 255, 255, 0.45);
        box-shadow: 0 20px 48px rgba(15, 23, 42, 0.2), 0 8px 24px rgba(255, 255, 255, 0.22) inset;
        z-index: 60;
        transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .app-layout {
        padding: 0.9rem 0.9rem calc(env(safe-area-inset-bottom, 0px) + 7.25rem);
    }

    .app-nav.mobile-hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) translateY(18px);
    }

    .app-nav.mobile-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    .app-nav-indicator {
        display: none;
    }

    .app-nav-btn {
        min-height: 44px;
        border-radius: 999px;
        flex: 1 1 0;
        padding: 0.35rem 0.25rem;
        color: rgba(15, 23, 42, 0.72);
    }

    .app-nav-btn.active {
        width: auto;
        min-width: 0;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .app-nav-btn:hover:not(.active) {
        background: rgba(255, 255, 255, 0.48);
        color: var(--text-primary);
    }

    .app-nav-btn-icon {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.32);
        color: inherit;
    }

    .app-nav-btn.active {
        color: var(--text-primary);
        background: transparent;
        transform: none;
    }

    .app-nav-btn.active .app-nav-btn-icon {
        background: var(--accent-color);
        color: white;
        box-shadow: 0 10px 24px -14px rgba(99, 102, 241, 0.75);
    }

    .dashboard-content-wrapper,
    .admin-tab-panel {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .admin-dashboard-shell {
        padding: 0.5rem 0 !important;
    }

    .admin-tab-bar-shell {
        overflow: visible;
        margin-bottom: 1rem;
        width: 100%;
    }

    .admin-tab-bar {
        /* Switch to vertical stacked list on mobile */
        flex-direction: column;
        flex-wrap: nowrap;
        width: 100%;
        border-radius: 20px;
        padding: 0.5rem;
        gap: 0;
    }


    .admin-tab-btn {
        flex: none;
        width: 100%;
        justify-content: flex-start;
        border-radius: 14px;
        padding: 0.9rem 1.1rem;
        font-size: 0.9rem;
        min-height: 48px;
        border-bottom: 1px solid var(--border-color);
    }

    /* Remove divider from last button */
    .admin-tab-btn:last-child {
        border-bottom: none;
    }

    .admin-tab-btn.active {
        box-shadow: none;
        transform: none;
    }

    .admin-tab-panel .admin-tab-content {
        padding: 0.9rem !important;
    }

    .admin-overview-stats {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .admin-activity-row {
        align-items: flex-start !important;
    }

    .dashboard-toolbar,
    .dashboard-toolbar-main {
        flex-direction: column;
        align-items: stretch !important;
    }

    .dashboard-title-row {
        justify-content: space-between;
        width: 100%;
    }

    .dashboard-edit-banner {
        left: 0.9rem !important;
        right: 0.9rem !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 5.75rem) !important;
        padding: 0.75rem 1rem !important;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .user-settings-modal {
        padding: 1rem !important;
        border-radius: 16px !important;
    }

    .user-settings-header {
        flex-direction: column;
        align-items: stretch !important;
        margin-bottom: 1rem !important;
    }

    .user-settings-card-header {
        padding: 0.95rem 0.95rem 0.8rem 0.95rem !important;
    }

    .user-settings-card-body {
        padding: 0 0.95rem 0.95rem 0.95rem !important;
    }

    .user-settings-profile-row {
        gap: 1rem !important;
    }

    .user-settings-profile-row img,
    .user-settings-profile-row>div:first-child {
        align-self: center;
    }

    .user-settings-danger-row {
        margin: 1rem -0.95rem -0.95rem -0.95rem !important;
        padding: 0.95rem !important;
    }

    .dashboard-card,
    .list-box,
    .data-table-container {
        border-radius: 14px;
    }

    .assets-hero,
    .partners-hero {
        padding: 1.1rem;
    }

    .assets-title {
        font-size: 1.6rem;
    }

    .assets-summary-grid,
    .partners-customer-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .partners-status-badge {
        white-space: normal;
    }

    .data-table {
        min-width: 640px;
    }

    .inventory-table {
        min-width: 760px;
    }

    .auth-box {
        padding: 1.5rem;
        border-radius: 18px;
        max-width: 100%;
    }

    .dash-card-value {
        font-size: 1.8rem;
    }
}
/* =========================================================================
   ACTION ICON BUTTONS
   ========================================================================= */
.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.action-icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(99, 102, 241, 0.04);
}

.action-icon-btn.danger-hover:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.06);
}

