:root {
    --bg-main: #f8fafc;
    --sidebar-bg: #f4f6f8;
    --brand-blue: #1d4ed8;
    --brand-blue-hover: #1e3a8a;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
}

.wms-detail-actions {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr) auto;
}

.wms-detail-action-group {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
    padding: 1.25rem;
}

.wms-detail-navigation-group {
    min-width: 260px;
}

.wms-detail-action-heading {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
}

.wms-detail-action-heading .small {
    letter-spacing: 0.08em;
}

.wms-detail-action-buttons,
.wms-related-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.wms-related-action-link {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    flex: 1 1 180px;
    flex-direction: column;
    font-weight: 800;
    gap: 0.25rem;
    min-height: 74px;
    padding: 0.9rem 1rem;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wms-related-action-link:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(13, 110, 253, 0.1);
    color: var(--primary);
    transform: translateY(-1px);
}

.wms-related-action-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wms-detail-back-link {
    align-self: stretch;
    display: inline-flex;
    justify-content: center;
    white-space: nowrap;
    width: 100%;
}

@media (max-width: 992px) {
    .wms-detail-actions {
        grid-template-columns: 1fr;
    }

    .wms-detail-back-link {
        justify-self: start;
    }
}

body {
    background-color: var(--bg-main) !important;
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

body.wms-auth-body {
    display: block;
    min-height: 100vh;
    overflow-y: auto;
}

/* Sidebar Layout */
.wms-sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    padding-top: 2rem;
}

.wms-sidebar-brand {
    padding: 0 1.5rem 1rem;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: var(--brand-blue);
    text-transform: uppercase;
}

.wms-nav-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.wms-nav-link:hover, .wms-nav-link.active {
    background-color: #e0e7ff;
    color: var(--brand-blue);
    border-left: 4px solid var(--brand-blue);
}

.wms-main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    background-color: var(--bg-main);
}

.wms-auth-main-content {
    min-height: 100vh;
    padding: 0;
}

/* Global page transition loader */
.wms-page-loader {
    align-items: center;
    background: rgba(248, 250, 252, 0.78);
    backdrop-filter: blur(3px);
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    position: fixed;
    transition: opacity 0.18s ease;
    z-index: 3000;
}

.wms-page-loader[hidden] {
    display: none !important;
}

.wms-page-loader.is-visible {
    opacity: 1;
}

.wms-page-loader-panel {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-blue);
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
    display: flex;
    gap: 0.9rem;
    min-width: 260px;
    padding: 1rem 1.15rem;
    transform: translateY(8px);
    transition: transform 0.18s ease;
}

.wms-page-loader.is-visible .wms-page-loader-panel {
    transform: translateY(0);
}

.wms-page-spinner {
    animation: wmsSpinner 0.75s linear infinite;
    border: 3px solid #dbeafe;
    border-top-color: var(--brand-blue);
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
    height: 2rem;
    width: 2rem;
}

.wms-page-loader-title,
.wms-page-loader-text {
    display: block;
}

.wms-page-loader-title {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wms-page-loader-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

/* Breadcrumbs */
.wms-breadcrumbs {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.wms-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}
.wms-breadcrumbs a:hover { color: var(--brand-blue); }

/* Typography */
.page-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Cards & Badges */
.metric-card {
    background: var(--card-bg);
    border: none;
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    height: 100%;
}
.metric-card:hover { transform: translateY(-2px); }

.detail-card {
    background: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Dashboard */
.wms-dashboard-metric {
    border-radius: 4px;
    min-height: 150px;
    padding: 1.35rem 1.5rem;
}

.wms-dashboard-metric-copy {
    display: flex;
    flex-direction: column;
    min-height: 106px;
}

.wms-dashboard-metric-copy .small:last-child {
    margin-top: auto;
}

.wms-dashboard-metric-value {
    color: var(--text-primary);
    font-size: 2.55rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
}

.wms-dashboard-metric-icon {
    border-radius: 4px;
    display: block;
    flex: 0 0 54px;
    height: 54px;
    line-height: 0;
    position: relative;
    width: 54px;
}

.wms-dashboard-metric-icon svg {
    display: block;
    height: 24px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
}

.wms-dashboard-panel {
    background-color: var(--card-bg);
    padding: 1.5rem;
}

.wms-dashboard-panel-title {
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: 0.1em;
    margin: 0;
    text-transform: uppercase;
}

.wms-dashboard-table thead {
    background-color: #f8fafc;
}

.wms-dashboard-table th {
    border-bottom: 0;
    padding-bottom: 1.15rem;
    padding-top: 1.15rem;
}

.wms-dashboard-table td {
    border-bottom: 0;
    padding-bottom: 1rem;
    padding-top: 1rem;
    vertical-align: middle;
}

.wms-dashboard-table tr:hover td {
    background-color: transparent;
}

.wms-dashboard-storage {
    background-color: #ffffff;
    min-height: 320px;
}

.wms-dashboard-storage-copy {
    font-size: 0.92rem;
    line-height: 1.6;
    margin-top: 2.25rem;
}

.wms-dashboard-section-card {
    overflow: hidden;
}

/* Tables */
.wms-table-container {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.wms-index-metric-row {
    --bs-gutter-y: 1rem;
}

.wms-index-create-button {
    min-width: 240px;
    text-align: center;
}

.wms-list-search-panel {
    display: grid;
    gap: 0.75rem;
}

.wms-list-search-header .small {
    letter-spacing: 0.08em;
}

.wms-list-search-field {
    position: relative;
}

.wms-list-search-field .form-control {
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    font-weight: 600;
    min-height: 2.9rem;
    padding: 0.65rem 3rem 0.65rem 1.4rem;
}

.wms-list-search-field .form-control:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.12);
}

.wms-list-search-icon {
    align-items: center;
    color: var(--text-muted);
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    transition: color 0.2s ease;
    width: 2.25rem;
}

.wms-list-search-field:focus-within .wms-list-search-icon {
    color: var(--brand-blue);
}

.wms-table {
    margin-bottom: 0;
}

.wms-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 1.25rem 1rem;
    border-bottom: 2px solid var(--border-color);
    background-color: #f8fafc;
}
.wms-table td {
    padding: 1rem;
    vertical-align: middle;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.wms-table tr:hover td {
    background-color: #f1f5f9;
}

.action-btn {
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.4rem 1rem;
    background-color: #e0e7ff;
    color: var(--brand-blue);
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}
.action-btn:hover {
    background-color: var(--brand-blue);
    color: white;
}

/* Validation */
.wms-main-content .alert-danger {
    background: #fff5f5;
    border: 1px solid #fecaca !important;
    border-left: 4px solid #dc2626 !important;
    border-radius: 8px;
    color: #991b1b;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.06);
    overflow-wrap: anywhere;
}

.wms-main-content .alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0 !important;
    border-left: 4px solid #16a34a !important;
    border-radius: 8px;
    color: #166534;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.06);
    overflow-wrap: anywhere;
}

.wms-main-content .wms-status-message {
    align-items: center;
    border-bottom-width: 1px !important;
    border-bottom-style: solid !important;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.wms-main-content .alert-danger.wms-status-message {
    border-bottom-color: #fecaca !important;
}

.wms-main-content .alert-success.wms-status-message {
    border-bottom-color: #bbf7d0 !important;
}

.wms-main-content .wms-status-message .btn-close {
    flex: 0 0 auto;
    margin-left: auto;
    opacity: 0.65;
}

.wms-main-content .validation-summary-errors ul,
.wms-main-content .alert-danger ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wms-main-content .validation-summary-errors li,
.wms-main-content .alert-danger li {
    position: relative;
    margin: 0;
    padding-left: 1.25rem;
}

.wms-main-content .validation-summary-errors li + li,
.wms-main-content .alert-danger li + li {
    margin-top: 0.4rem;
}

.wms-main-content .validation-summary-errors li::before,
.wms-main-content .alert-danger li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #dc2626;
    transform: translateY(-50%);
}

.wms-main-content .field-validation-error,
.wms-main-content .text-danger {
    color: #b91c1c !important;
    display: block;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0.4rem;
    overflow-wrap: anywhere;
}

/* Hide empty valid validation containers */
.validation-summary-valid {
    display: none !important;
}

.field-validation-valid {
    display: none !important;
}

/* Invalid input styling */
.input-validation-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.12) !important;
}

/* Valid input styling */
.form-control.valid,
.form-select.valid {
    border-color: #16a34a;
}

    .form-control.valid:focus,
    .form-select.valid:focus {
        border-color: #16a34a;
        box-shadow: 0 0 0 0.2rem rgba(22, 163, 74, 0.12);
    }

/* Validation message spacing */
.wms-validation-message {
    color: #b91c1c !important;
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0.4rem;
    overflow-wrap: anywhere;
}

/* Custom validation summary class, if you use it instead of alert-danger */
.wms-validation-summary {
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    color: #991b1b;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.06);
    overflow-wrap: anywhere;
}

.wms-validation-summary ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wms-validation-summary li {
    position: relative;
    margin: 0;
    padding-left: 1.25rem;
}

.wms-validation-summary li + li {
    margin-top: 0.4rem;
}

.wms-validation-summary li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #dc2626;
    transform: translateY(-50%);
}

/* Autocomplete dropdown */
.wms-autocomplete {
    position: relative;
}

.wms-autocomplete-menu {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    left: 0;
    padding: 0.35rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    max-height: 240px;
    overflow-y: auto;
    transform-origin: top center;
    z-index: 1050;
}

.wms-autocomplete-menu:not([hidden]) {
    animation: wmsAutocompleteMenuIn 0.18s ease both;
}

.wms-autocomplete-option {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--text-primary);
    display: block;
    opacity: 0;
    padding: 0.75rem 0.85rem;
    text-align: left;
    transform: translateY(-4px);
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    width: 100%;
    animation: wmsAutocompleteOptionIn 0.22s ease both;
    animation-delay: calc(var(--wms-option-index, 0) * 40ms);
}

.wms-autocomplete-option:hover,
.wms-autocomplete-option:focus {
    background: #e0e7ff;
    color: var(--brand-blue);
    outline: none;
    transform: translateX(3px);
}

.wms-autocomplete-option.is-selected {
    animation: wmsAutocompleteSelected 0.18s ease both;
    background: #dcfce7;
    color: #15803d;
}

.wms-autocomplete-option-title {
    display: block;
    font-weight: 800;
    line-height: 1.2;
}

.wms-autocomplete-option-subtitle {
    color: var(--text-muted);
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0.2rem;
}

.wms-autocomplete-empty {
    animation: wmsAutocompleteOptionIn 0.22s ease both;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.8rem 0.9rem;
}

/* Custom date and time picker */
.wms-datetime-picker {
    position: relative;
}

.wms-datetime-menu {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    left: 0;
    padding: 0.85rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 1050;
}

.wms-datetime-header {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.wms-datetime-title {
    color: var(--text-primary);
    flex: 1;
    font-weight: 800;
    text-align: center;
    text-transform: capitalize;
}

.wms-datetime-nav {
    align-items: center;
    background: #e0e7ff;
    border: 0;
    border-radius: 999px;
    color: var(--brand-blue);
    display: inline-flex;
    font-weight: 900;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.wms-datetime-nav:hover,
.wms-datetime-nav:focus {
    background: var(--brand-blue);
    color: #ffffff;
    outline: none;
}

.wms-datetime-weekdays,
.wms-datetime-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
}

.wms-datetime-weekdays {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    text-align: center;
    text-transform: uppercase;
}

.wms-datetime-day,
.wms-datetime-empty-day {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
}

.wms-datetime-day {
    background: transparent;
    border: 0;
    color: var(--text-primary);
    font-weight: 800;
}

.wms-datetime-day:hover,
.wms-datetime-day:focus {
    background: #e0e7ff;
    color: var(--brand-blue);
    outline: none;
}

.wms-datetime-day.is-selected {
    background: var(--brand-blue);
    color: #ffffff;
}

.wms-datetime-time {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.85rem;
}

.wms-datetime-time label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.wms-datetime-time input {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-primary);
    font-weight: 800;
    margin-top: 0.25rem;
    padding: 0.45rem 0.75rem;
    width: 100%;
}

.wms-datetime-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.85rem;
}

/* Useful UI animations */
.wms-list-fade-out {
    opacity: 0.35;
    transform: translateY(2px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.wms-search-loading .wms-table {
    opacity: 0.62;
    transition: opacity 0.22s ease;
}

.wms-table-container.wms-search-loading {
    overflow-x: auto;
}

.wms-skeleton-overlay {
    background: rgba(255, 255, 255, 0.84);
    bottom: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 3.8rem;
    z-index: 4;
}

.wms-skeleton-status {
    align-items: center;
    color: var(--text-muted);
    display: flex;
    font-size: 0.8rem;
    font-weight: 800;
    gap: 0.55rem;
    padding: 0.85rem 1rem 0.25rem;
    text-transform: uppercase;
}

.wms-loading-spinner {
    animation: wmsSpinner 0.75s linear infinite;
    border: 2px solid #cbd5e1;
    border-top-color: var(--brand-blue);
    border-radius: 999px;
    display: inline-block;
    height: 1rem;
    width: 1rem;
}

.wms-skeleton-rows {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem 1rem 1rem;
}

.wms-skeleton-row {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.1fr 1.8fr 0.8fr;
}

.wms-skeleton-cell {
    animation: wmsSkeleton 1.45s ease-in-out infinite;
    background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%);
    background-size: 220% 100%;
    border-radius: 999px;
    display: block;
    height: 0.85rem;
}

.wms-skeleton-cell-wide {
    width: 100%;
}

.wms-skeleton-cell-medium {
    width: 82%;
}

.wms-skeleton-cell-small {
    width: 58%;
}

.wms-table-row-enter {
    animation: wmsTableRowEnter 0.34s ease both;
}

.wms-empty-row td {
    animation: wmsEmptyStateIn 0.36s ease both;
    background: #f8fafc;
}

.wms-autocomplete-selected .wms-autocomplete-input {
    animation: wmsSelectPulse 0.8s ease;
}

.wms-autocomplete-invalid .wms-autocomplete-input,
.input-validation-error {
    animation: wmsValidationShake 0.28s ease;
}

.field-validation-error {
    animation: wmsValidationMessage 0.2s ease both;
}

.wms-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1.1;
    padding: 0.42rem 0.75rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.wms-status-badge,
.wms-stock-badge {
    animation: wmsBadgeLivePulse 3s ease-in-out infinite;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.wms-badge-primary {
    --wms-pulse-rgb: 29, 78, 216;
    background: #dbeafe;
    color: #1d4ed8;
}

.wms-badge-info {
    --wms-pulse-rgb: 14, 116, 144;
    background: #cffafe;
    color: #0e7490;
}

.wms-badge-success {
    --wms-pulse-rgb: 21, 128, 61;
    background: #dcfce7;
    color: #15803d;
}

.wms-badge-warning {
    --wms-pulse-rgb: 146, 64, 14;
    background: #fef3c7;
    color: #92400e;
}

.wms-badge-danger {
    --wms-pulse-rgb: 185, 28, 28;
    background: #fee2e2;
    color: #b91c1c;
}

.wms-badge-pop {
    animation: wmsBadgePulse 0.75s ease;
}

.wms-toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2000;
}

.wms-toast {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
    display: flex;
    gap: 0.85rem;
    min-width: 280px;
    max-width: 360px;
    opacity: 0;
    padding: 1rem;
    transform: translateY(-12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.wms-toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.wms-toast-icon {
    align-items: center;
    background: #dbeafe;
    border-radius: 999px;
    color: #1d4ed8;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 800;
    height: 1.75rem;
    justify-content: center;
    min-width: 1.75rem;
    padding: 0 0.45rem;
}

.wms-toast-create {
    border-color: #bbf7d0;
    border-left-color: #16a34a;
}

.wms-toast-create .wms-toast-icon {
    background: #dcfce7;
    color: #15803d;
}

.wms-toast-edit {
    border-color: #bfdbfe;
    border-left-color: #2563eb;
}

.wms-toast-edit .wms-toast-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.wms-toast-delete {
    border-color: #fecaca;
    border-left-color: #dc2626;
}

.wms-toast-delete .wms-toast-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.wms-toast-title {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
}

.wms-toast-message {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0.15rem;
}

.wms-toast-close {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    margin-left: auto;
    padding: 0;
}

.wms-auth-page {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1rem;
    width: 100%;
}

.wms-auth-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    max-width: 460px;
    padding: 2rem;
    width: 100%;
    overflow-wrap: anywhere;
}

.wms-auth-header {
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
}

.wms-auth-icon {
    align-items: center;
    background: var(--brand-blue);
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    flex: 0 0 64px;
    font-weight: 800;
    height: 64px;
    justify-content: center;
    letter-spacing: 0.04em;
}

.wms-auth-eyebrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wms-auth-header h1 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0.2rem 0;
}

.wms-auth-header p {
    color: var(--text-muted);
    font-weight: 600;
    margin: 0;
}

.wms-auth-form {
    display: grid;
    gap: 1rem;
}

.wms-auth-field .form-control {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-weight: 700;
}

.wms-auth-field .form-control:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.12);
}

.wms-auth-field .text-danger {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.35rem;
}

.wms-auth-options {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.wms-auth-check {
    align-items: center;
    color: var(--text-muted);
    display: flex;
    font-size: 0.92rem;
    font-weight: 700;
    gap: 0.5rem;
    margin: 0;
}

.wms-auth-options a,
.wms-auth-switch a,
.wms-auth-muted-link {
    color: var(--brand-blue);
    font-weight: 800;
    text-decoration: none;
}

.wms-auth-options a:hover,
.wms-auth-switch a:hover,
.wms-auth-muted-link:hover {
    color: var(--brand-blue-hover);
    text-decoration: underline;
}

.wms-auth-submit {
    background: var(--brand-blue);
    border: none;
    border-radius: 999px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    padding: 0.85rem 1.2rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.wms-auth-submit:hover {
    background: var(--brand-blue-hover);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.wms-auth-switch {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    font-weight: 700;
    gap: 0.4rem;
    justify-content: center;
    padding: 0.9rem;
}

.wms-auth-muted-link {
    display: inline-block;
    font-size: 0.9rem;
    text-align: center;
}

.wms-auth-guest-form {
    margin-top: 1rem;
}

.wms-auth-guest-button {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.95rem 1rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    width: 100%;
}

.wms-auth-guest-button:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 10px 24px rgba(29, 78, 216, 0.1);
    transform: translateY(-1px);
}

.wms-auth-guest-button strong {
    color: var(--brand-blue);
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
}

.wms-auth-guest-button small {
    color: var(--text-muted);
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.wms-auth-divider {
    align-items: center;
    color: var(--text-muted);
    display: flex;
    font-size: 0.8rem;
    font-weight: 800;
    gap: 0.75rem;
    letter-spacing: 0.08em;
    margin: 1.5rem 0;
    text-transform: uppercase;
}

.wms-auth-divider::before,
.wms-auth-divider::after {
    background: var(--border-color);
    content: "";
    flex: 1;
    height: 1px;
}

.wms-auth-external {
    display: grid;
    gap: 0.75rem;
}

.wms-auth-external button {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: var(--text-primary);
    font-weight: 800;
    padding: 0.75rem 1rem;
}

.wms-auth-external button:hover {
    background: #f1f5f9;
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.wms-auth-validation {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    font-weight: 700;
    padding: 0.85rem 1rem;
}

.wms-auth-validation:empty {
    display: none;
}

.wms-sidebar-guest {
    border-top: 1px solid var(--border-color);
    margin: auto 1rem 1rem;
    padding-top: 1rem;
}

.wms-sidebar-guest-label {
    color: var(--text-muted);
    display: grid;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.wms-sidebar-guest-badge {
    background: #e0e7ff;
    border-radius: 999px;
    color: var(--brand-blue);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.55rem;
    text-transform: uppercase;
    width: fit-content;
}

.wms-sidebar-guest-button {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: var(--brand-blue);
    font-weight: 800;
    padding: 0.65rem 0.9rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    width: 100%;
}

.wms-sidebar-guest-button:hover {
    background: #e0e7ff;
    border-color: var(--brand-blue);
    transform: translateY(-1px);
}

.wms-profile-avatar-section {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 1.5rem;
    padding: 1.25rem;
}

.wms-avatar-dropzone {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 700;
    min-height: 150px;
    padding: 1.25rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.wms-avatar-dropzone.dz-drag-hover {
    border-color: var(--brand-blue);
    background: #e0e7ff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.12);
}

.wms-avatar-dropzone .dz-message {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 800;
}

.wms-avatar-dropzone .dz-preview {
    background: transparent;
    border: 0;
    box-shadow: none;
    margin: 0.75rem;
    min-height: 0;
    padding: 0;
}

.wms-avatar-dropzone .dz-preview .dz-image {
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    height: 120px;
    overflow: hidden;
    width: 120px;
}

.wms-avatar-dropzone .dz-preview .dz-image img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.wms-avatar-dropzone .dz-preview .dz-details {
    display: none;
}

.wms-avatar-dropzone .dz-preview .dz-progress,
.wms-avatar-dropzone .dz-preview .dz-success-mark,
.wms-avatar-dropzone .dz-preview .dz-error-mark,
.wms-avatar-dropzone .dz-preview .dz-error-message {
    display: none;
}

.wms-avatar-dropzone .dz-preview:hover,
.wms-avatar-dropzone .dz-preview:hover .dz-image,
.wms-avatar-dropzone .dz-preview:hover .dz-image img {
    background: transparent;
    filter: none;
    opacity: 1;
    transform: none;
}

.wms-avatar-dropzone .dz-preview.dz-image-preview {
    background: transparent;
}

.wms-avatar-dropzone .dz-preview .dz-remove {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    color: #e11d48;
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 0.65rem;
    padding: 0.35rem 0.8rem;
    text-decoration: none;
}

.wms-avatar-dropzone .dz-preview .dz-remove:hover {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #e11d48;
    text-decoration: none;
    transform: none;
}

.wms-avatar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.wms-avatar-actions .btn {
    min-width: 140px;
}

.wms-avatar-preview {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.wms-avatar-image {
    border: 3px solid #ffffff;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
    height: 82px;
    object-fit: cover;
    width: 82px;
}

.wms-avatar-info {
    min-width: 0;
}

.wms-avatar-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 700;
    padding: 1rem;
    text-align: center;
}

.wms-sidebar-user {
    border-top: 1px solid var(--border-color);
    margin: auto 1rem 1rem;
    padding-top: 1rem;
}

.wms-sidebar-profile-link {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wms-sidebar-profile-link:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 10px 24px rgba(29, 78, 216, 0.1);
    transform: translateY(-1px);
}

.wms-sidebar-profile-static,
.wms-sidebar-profile-static:hover {
    border-color: var(--border-color);
    box-shadow: none;
    cursor: default;
    transform: none;
}

.wms-sidebar-avatar,
.wms-sidebar-avatar-placeholder {
    border-radius: 999px;
    flex: 0 0 42px;
    height: 42px;
    width: 42px;
}

.wms-sidebar-avatar {
    object-fit: cover;
}

.wms-sidebar-avatar-placeholder {
    align-items: center;
    background: #e0e7ff;
    color: var(--brand-blue);
    display: flex;
    font-weight: 800;
    justify-content: center;
}

.wms-sidebar-user-text {
    display: grid;
    min-width: 0;
}

.wms-sidebar-user-email {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wms-sidebar-user-role {
    color: var(--brand-blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wms-sidebar-logout-button {
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: var(--text-muted);
    font-weight: 800;
    margin-top: 0.75rem;
    padding: 0.6rem 0.85rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    width: 100%;
}

.wms-sidebar-logout-button:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}

.wms-account-layout {
    align-items: flex-start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 260px minmax(0, 1fr);
}

.wms-account-sidebar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
}

.wms-account-nav {
    display: grid;
    gap: 0.35rem;
}

.wms-account-nav-link {
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 800;
    padding: 0.75rem 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.wms-account-nav-link:hover,
.wms-account-nav-link.active {
    background: #e0e7ff;
    color: var(--brand-blue);
}

.wms-account-panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    padding: 1.5rem;
}

.wms-account-panel-header {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.wms-account-eyebrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wms-account-panel h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0.2rem 0 0;
}

.wms-account-panel .form-control {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-weight: 700;
}

.wms-account-panel .form-control:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.12);
}

.wms-account-panel .btn-primary {
    background: var(--brand-blue);
    border: none;
    border-radius: 999px;
    font-weight: 800;
    padding: 0.75rem 1.25rem;
}

.wms-account-panel .btn-primary:hover {
    background: var(--brand-blue-hover);
}

.wms-account-copy {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.wms-account-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1rem 1.1rem;
}

.wms-account-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.wms-account-primary-button,
.wms-account-secondary-button,
.wms-account-danger-button {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 46px;
    padding: 0.7rem 1.4rem;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.wms-account-primary-button {
    background: var(--brand-blue);
    border: 1px solid var(--brand-blue);
    color: #ffffff;
}

.wms-account-primary-button:hover {
    background: var(--brand-blue-hover);
    border-color: var(--brand-blue-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.wms-account-secondary-button {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--brand-blue);
}

.wms-account-secondary-button:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: var(--brand-blue-hover);
    transform: translateY(-1px);
}

.wms-account-danger-button {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
}

.wms-account-danger-button:hover {
    background: #e11d48;
    border-color: #e11d48;
    color: #ffffff;
    transform: translateY(-1px);
}

.wms-email-verified-badge {
    align-items: center;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: 8px;
    color: #166534;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.65rem 0.9rem;
    text-transform: uppercase;
}

.wms-global-search {
    position: relative;
    margin: 1rem 0.75rem 1.25rem;
}

.wms-global-search-input {
    width: 100%;
    border: 1px solid #d9e3f0;
    border-radius: 999px;
    padding: 0.75rem 2.65rem 0.75rem 1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: #ffffff;
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.wms-global-search-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.14);
}

.wms-global-search-icon {
    align-items: center;
    color: #6b7c93;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    transition: color 0.2s ease;
    width: 2rem;
}

.wms-global-search:focus-within .wms-global-search-icon {
    color: #0d6efd;
}

.wms-global-search-results {
    position: absolute;
    z-index: 80;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    max-height: 360px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #d6e0ee;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    padding: 0.5rem;
}

.wms-global-search-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.18s ease, color 0.18s ease;
}

.wms-global-search-item:hover {
    background: #edf4ff;
    color: var(--text-primary);
}

.wms-global-search-item strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.2;
}

.wms-global-search-item small {
    display: block;
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1.25;
}

.wms-global-search-type {
    justify-self: start;
    margin-bottom: 0.3rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #e8f1ff;
    color: #0d6efd;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wms-global-search-empty {
    padding: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    text-align: center;
}

@media (min-width: 769px) {
    #wmsMobileNav {
        display: flex !important;
        flex: 1;
        flex-direction: column;
        min-height: 0;
    }

    .wms-nav-items {
        flex: 0 0 auto;
    }
}

@keyframes wmsSpinner {
    to {
        transform: rotate(360deg);
    }
}

@keyframes wmsAutocompleteMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes wmsAutocompleteOptionIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wmsAutocompleteSelected {
    from {
        transform: scale(0.98);
    }
    to {
        transform: scale(1);
    }
}

@keyframes wmsSkeleton {
    from {
        background-position: 180% 0;
    }
    to {
        background-position: -180% 0;
    }
}

@keyframes wmsTableRowEnter {
    from {
        opacity: 0;
        transform: translateY(7px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wmsEmptyStateIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wmsSelectPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.25);
    }
    45% {
        border-color: #16a34a;
        box-shadow: 0 0 0 0.25rem rgba(22, 163, 74, 0.16);
    }
    100% {
        box-shadow: none;
    }
}

@keyframes wmsValidationShake {
    0%, 100% {
        transform: translateX(0);
    }
    30% {
        transform: translateX(-4px);
    }
    60% {
        transform: translateX(4px);
    }
}

@keyframes wmsValidationMessage {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wmsBadgePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--wms-pulse-rgb, 37, 99, 235), 0.22);
        transform: scale(1);
    }
    35% {
        box-shadow: 0 0 0 0.28rem rgba(var(--wms-pulse-rgb, 37, 99, 235), 0.14);
        transform: scale(1.07);
    }
    70% {
        box-shadow: 0 0 0 0.12rem rgba(var(--wms-pulse-rgb, 37, 99, 235), 0.08);
        transform: scale(1.02);
    }
    100% {
        box-shadow: none;
        transform: scale(1);
    }
}

@keyframes wmsBadgeLivePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--wms-pulse-rgb, 37, 99, 235), 0);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 0.18rem rgba(var(--wms-pulse-rgb, 37, 99, 235), 0.12);
        transform: scale(1.025);
    }
}

/* Responsive Overrides */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .wms-sidebar {
        width: 100%;
        height: auto;
        padding-top: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .wms-sidebar-brand {
        padding: 0;
        text-align: left;
    }

    .wms-nav-items {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }

    .wms-sidebar-guest {
        margin: 1rem;
    }

    .wms-nav-link {
        flex-shrink: 0;
        border-left: 4px solid transparent !important;
        border-bottom: none;
        border-radius: 0;
        padding: 0.85rem 1.5rem;
    }

    .wms-nav-link:hover, .wms-nav-link.active {
        background-color: #e0e7ff;
        border-left: 4px solid var(--brand-blue) !important;
        border-bottom: none;
    }

    .wms-main-content {
        padding: 1rem;
        overflow-x: hidden;
    }

    .wms-auth-main-content {
        min-height: 100dvh;
        padding: 0;
    }

    .page-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .detail-card, .metric-card {
        padding: 1rem;
    }

    .wms-index-metric-row {
        margin-bottom: 1.25rem !important;
    }

    .wms-index-create {
        justify-content: stretch !important;
    }

    .wms-index-create-button {
        min-width: 0;
        width: 100%;
    }

    .wms-list-search-panel {
        margin-bottom: 1rem !important;
    }

    .wms-list-search-field .form-control {
        font-size: 0.95rem;
        min-height: 2.8rem;
        padding-left: 1rem;
    }

    .wms-dashboard-metric-grid {
        margin-bottom: 1.5rem !important;
    }

    .wms-dashboard-metric {
        min-height: auto;
        padding: 1rem !important;
    }

    .wms-dashboard-metric > .d-flex {
        align-items: center !important;
    }

    .wms-dashboard-metric-copy {
        min-height: auto;
    }

    .wms-dashboard-metric-copy .small:last-child {
        margin-top: 0;
    }

    .wms-dashboard-metric-value {
        font-size: 2.15rem;
        margin-bottom: 0.6rem;
    }

    .wms-dashboard-metric-icon {
        flex-basis: 48px;
        height: 48px;
        width: 48px;
    }

    .wms-dashboard-metric-icon svg {
        height: 22px;
        width: 22px;
    }

    .wms-dashboard-section-card {
        border: 1px solid var(--border-color) !important;
        padding: 1rem !important;
    }

    .wms-dashboard-section-header {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 0.45rem;
        margin-bottom: 1rem !important;
    }

    .wms-dashboard-section-header h6,
    .wms-dashboard-section-card h6 {
        line-height: 1.35;
    }

    .wms-dashboard-table {
        min-width: 620px;
    }

    .wms-dashboard-list-row {
        gap: 0.75rem;
    }

    .wms-dashboard-quick-actions {
        align-items: flex-start !important;
    }

    .wms-dashboard-action-buttons {
        width: 100%;
    }

    .wms-dashboard-action-buttons .btn {
        flex: 1 1 220px;
        min-height: 44px;
    }

    .wms-auth-page {
        align-items: center;
        min-height: 100dvh;
        padding: 1rem;
    }

    .wms-auth-card {
        box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
        padding: 1.5rem;
    }

    .wms-auth-header {
        align-items: center;
        gap: 0.85rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
    }

    .wms-auth-icon {
        flex-basis: 58px;
        height: 58px;
        width: 58px;
    }

    .wms-auth-eyebrow {
        font-size: 0.7rem;
        letter-spacing: 0.1em;
    }

    .wms-auth-header h1 {
        font-size: 1.55rem;
        line-height: 1.1;
    }

    .wms-auth-header p {
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .wms-auth-options {
        align-items: center;
        flex-direction: row;
    }

    /* Account management pages: keep navigation and form controls usable on phones. */
    .wms-account-layout {
        gap: 1rem;
        grid-template-columns: minmax(0, 1fr);
    }

    .wms-account-sidebar {
        padding: 0.55rem;
    }

    .wms-account-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .wms-account-nav-link {
        font-size: 0.9rem;
        padding: 0.7rem 0.55rem;
        text-align: center;
    }

    .wms-account-nav-link:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .wms-account-panel {
        padding: 1rem;
    }

    .wms-account-panel-header {
        margin-bottom: 1rem;
        padding-bottom: 0.85rem;
    }

    .wms-account-panel h2 {
        font-size: 1.35rem;
    }

    .wms-account-panel .form-control {
        min-height: 3.35rem;
    }

    .wms-profile-avatar-section {
        margin-top: 1rem;
        padding: 1rem;
    }

    .wms-avatar-dropzone {
        min-height: 130px;
        padding: 0.9rem;
    }

    .wms-avatar-actions,
    .wms-account-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .wms-avatar-actions .btn,
    .wms-account-primary-button,
    .wms-account-secondary-button,
    .wms-account-danger-button {
        min-width: 0;
        width: 100%;
    }

    .wms-avatar-preview {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Mobile sidebar: keep the desktop navigation unchanged and turn the existing
   Bootstrap collapse into a compact off-canvas panel on small screens. */
@media (max-width: 767.98px) {
    body.wms-mobile-nav-open {
        overflow: hidden;
    }

    .wms-sidebar {
        background: transparent;
        border: 0;
        height: auto;
        min-height: 0;
        padding: 0;
        position: relative;
        width: 100%;
        z-index: 1045;
    }

    .wms-sidebar > .d-flex {
        background-color: var(--sidebar-bg);
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0 !important;
        min-height: 4.5rem;
        position: relative;
        z-index: 2;
    }

    .wms-sidebar > .wms-global-search {
        background-color: var(--sidebar-bg);
        margin: 0;
        padding: 0.75rem 1rem 1rem;
        position: relative;
        z-index: 2;
    }

    .wms-sidebar.is-mobile-nav-open {
        animation: wms-mobile-sidebar-enter 0.26s cubic-bezier(0.22, 0.8, 0.28, 1) both;
        background-color: var(--sidebar-bg);
        box-shadow: 18px 0 40px rgba(15, 23, 42, 0.22);
        display: flex;
        flex-direction: column;
        height: 100dvh;
        inset: 0 auto 0 0;
        max-width: 320px;
        position: fixed;
        width: 85vw;
    }

    .wms-sidebar.is-mobile-nav-open ~ .wms-main-content::before {
        animation: wms-mobile-sidebar-overlay-enter 0.2s ease-out both;
        background: rgba(15, 23, 42, 0.56);
        content: "";
        inset: 0;
        position: fixed;
        z-index: 1040;
    }

    .wms-sidebar #wmsMobileNav.show,
    .wms-sidebar #wmsMobileNav.collapsing {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        height: auto !important;
        min-height: 0;
        overflow-y: auto;
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        transition: none;
    }

    .wms-sidebar #wmsMobileNav.show .wms-nav-items,
    .wms-sidebar #wmsMobileNav.collapsing .wms-nav-items {
        margin-top: 0.35rem;
    }

    .wms-sidebar #wmsMobileNav.show .wms-nav-link,
    .wms-sidebar #wmsMobileNav.collapsing .wms-nav-link {
        padding-bottom: 0.6rem;
        padding-top: 0.6rem;
    }

    .wms-sidebar #wmsMobileNav.show .wms-sidebar-user,
    .wms-sidebar #wmsMobileNav.collapsing .wms-sidebar-user {
        margin: auto 1rem 0;
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }

    .wms-global-search-icon {
        height: 1.5rem;
        right: 1.5rem;
        width: 2.25rem;
    }

    .wms-global-search-icon svg {
        height: 20px;
        width: 20px;
    }

    .wms-global-search-results {
        top: calc(100% - 1rem);
    }

    @keyframes wms-mobile-sidebar-enter {
        from {
            transform: translateX(-105%);
        }
        to {
            transform: translateX(0);
        }
    }

    @keyframes wms-mobile-sidebar-overlay-enter {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .wms-sidebar.is-mobile-nav-open,
        .wms-sidebar.is-mobile-nav-open ~ .wms-main-content::before {
            animation: none;
        }
    }
}

@media (max-width: 480px) {
    body.wms-auth-body {
        background: #f8fafc !important;
    }

    .wms-auth-page {
        align-items: flex-start;
        padding: 0.85rem;
    }

    .wms-welcome-page {
        align-items: center;
        min-height: 100dvh;
    }

    .wms-auth-card {
        padding: 1.15rem;
    }

    .wms-auth-header {
        align-items: flex-start;
    }

    .wms-auth-icon {
        flex-basis: 54px;
        height: 54px;
        min-width: 54px;
        width: 54px;
    }

    .wms-auth-header h1 {
        font-size: 1.42rem;
    }

    .wms-auth-form {
        gap: 0.85rem;
    }

    .wms-auth-field .form-control {
        min-height: 3.35rem;
    }

    .wms-auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .wms-auth-submit,
    .wms-auth-external button,
    .wms-auth-guest-button {
        min-height: 3.35rem;
    }

    .wms-auth-switch {
        padding: 0.8rem;
        text-align: center;
    }

    .wms-auth-divider {
        margin: 1.15rem 0;
    }

    .wms-dashboard-metric-grid {
        --bs-gutter-y: 0.85rem;
    }

    .wms-dashboard-metric {
        padding: 0.95rem !important;
    }

    .wms-dashboard-metric-value {
        font-size: 2rem;
    }

    .wms-dashboard-metric-icon {
        flex-basis: 44px;
        height: 44px;
        width: 44px;
    }

    .wms-dashboard-section-card {
        padding: 0.95rem !important;
    }

    .wms-dashboard-section-card .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .wms-dashboard-table {
        min-width: 620px;
    }

    .wms-dashboard-list-row {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .wms-dashboard-list-row .wms-badge {
        align-self: flex-start;
    }

    .wms-dashboard-action-buttons .btn {
        flex-basis: 100%;
        width: 100%;
    }

    .wms-account-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .wms-account-nav-link:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .wms-account-panel {
        padding: 0.9rem;
    }

    .wms-account-eyebrow {
        font-size: 0.68rem;
    }

    .wms-account-warning,
    .wms-account-copy {
        font-size: 0.95rem;
    }

    .wms-avatar-dropzone .dz-preview .dz-image {
        height: 108px;
        width: 108px;
    }
}

@media (max-width: 360px) {
    .wms-auth-page {
        padding: 0.65rem;
    }

    .wms-auth-card {
        padding: 1rem;
    }

    .wms-auth-header {
        flex-direction: column;
    }

    .wms-auth-header h1 {
        font-size: 1.35rem;
    }

    .wms-dashboard-metric > .d-flex {
        align-items: flex-start !important;
    }

    .wms-dashboard-metric-icon {
        flex-basis: 40px;
        height: 40px;
        width: 40px;
    }
}
