﻿/* ================================================================
   AshleyPurchases - site.css  |  RTL Arabic  |  Orange Theme
   ================================================================ */

/* -- Variables -- */
:root {
    --ap-primary: #ea580c;
    --ap-primary-dark: #c2410c;
    --ap-primary-light: #fff7ed;
    --ap-accent: #f97316;
    --ap-success: #16a34a;
    --ap-danger: #dc2626;
    --ap-warning: #d97706;
    --ap-info: #0891b2;
    --ap-text: #1e293b;
    --ap-text-muted: #64748b;
    --ap-border: #e2e8f0;
    --ap-bg: #f1f5f9;
    --ap-surface: #ffffff;
    --ap-sidebar-w: 260px;
    --ap-topbar-h: 62px;
    --ap-footer-h: 50px;
    --ap-radius: 10px;
    --ap-radius-lg: 14px;
    --ap-shadow-sm: 0 1px 3px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .05);
    --ap-shadow-md: 0 4px 16px rgba(234, 88, 12, .13), 0 2px 6px rgba(0, 0, 0, .07);
    --ap-transition: 0.22s ease;
    --ap-sidebar-bg: #1e1e2d;
    --ap-sidebar-text: #a0aec0;
    --ap-sidebar-hover: rgba(234, 88, 12, .12);
    --ap-font-heading: 'Cairo', 'Segoe UI', 'Tahoma', sans-serif;
    --ap-font-body: 'Tajawal', 'Tahoma', 'Arial', sans-serif;
}

/* -- Reset -- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    direction: rtl;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: var(--ap-font-body);
    background: var(--ap-bg);
    color: var(--ap-text);
    line-height: 1.65;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.ap-page-title,
.ap-topbar-title,
.card-header,
.modal-title,
.ap-brand-name,
.ap-nav-group-label,
.ap-user-name,
.ap-stat-value,
.ap-mini-stat-value {
    font-family: var(--ap-font-heading);
}

body,
button,
input,
select,
textarea,
a,
span,
p,
li,
label,
.btn,
.form-control,
.form-select,
.table,
.breadcrumb,
.ap-page-subtitle,
.ap-form-hint,
.ap-detail-value,
.ap-detail-label {
    font-family: var(--ap-font-body);
}

a {
    color: var(--ap-primary);
    text-decoration: none;
    transition: color var(--ap-transition);
}

a:hover {
    color: var(--ap-primary-dark);
}

/* -- Layout -- */
.ap-layout {
    margin-right: var(--ap-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-right var(--ap-transition);
}

/* -- Sidebar -- */
.ap-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--ap-sidebar-w);
    height: 100vh;
    background: var(--ap-sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform var(--ap-transition);
    overflow: hidden;
}

.ap-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    height: var(--ap-topbar-h);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    flex-shrink: 0;
}

.ap-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--ap-primary), var(--ap-accent));
    color: #fff;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}

.ap-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.ap-brand-name span {
    color: var(--ap-accent);
}

.ap-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .1) transparent;
}

.ap-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.ap-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .1);
    border-radius: 4px;
}

.ap-nav-group-label {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: rgba(255, 255, 255, .28);
    padding: 16px 20px 6px;
    user-select: none;
}

.ap-nav-list {
    list-style: none;
    margin: 0;
    padding: 0 10px;
}

.ap-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: var(--ap-radius);
    color: var(--ap-sidebar-text) !important;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--ap-transition), color var(--ap-transition);
    margin-bottom: 2px;
}

.ap-nav-item:hover {
    background: var(--ap-sidebar-hover);
    color: #fff !important;
}

.ap-nav-item.active {
    background: var(--ap-primary);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(234, 88, 12, .4);
}

.ap-nav-icon {
    width: 18px;
    text-align: center;
    font-size: .95rem;
    flex-shrink: 0;
    opacity: .75;
}

.ap-nav-item:hover .ap-nav-icon,
.ap-nav-item.active .ap-nav-icon {
    opacity: 1;
}

.ap-nav-item-sub {
    padding-right: 32px;
    font-size: .83rem;
    opacity: .9;
}

.ap-nav-item-sub .ap-nav-icon {
    font-size: .8rem;
}

.ap-report-card {
    transition: box-shadow var(--ap-transition), transform var(--ap-transition);
    cursor: pointer;
}

.ap-report-card:hover {
    box-shadow: 0 6px 24px rgba(234, 88, 12, .15);
    transform: translateY(-2px);
}

.ap-report-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ap-sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    flex-shrink: 0;
}

.ap-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ap-user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--ap-primary), var(--ap-accent));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
}

.ap-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ap-user-name {
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ap-user-role {
    color: rgba(255, 255, 255, .4);
    font-size: .72rem;
}

.ap-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1049;
}

.ap-overlay.show {
    display: block;
}

/* -- Topbar -- */
.ap-topbar {
    height: var(--ap-topbar-h);
    background: var(--ap-surface);
    border-bottom: 1px solid var(--ap-border);
    box-shadow: var(--ap-shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1020;
    flex-shrink: 0;
}

.ap-topbar.scrolled {
    box-shadow: var(--ap-shadow-md);
}

.ap-topbar-title {
    font-size: .92rem;
    font-weight: 600;
    color: var(--ap-text);
}

.ap-topbar-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    background: transparent;
    color: var(--ap-text-muted);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background var(--ap-transition), color var(--ap-transition), border-color var(--ap-transition);
}

.ap-topbar-btn:hover {
    background: var(--ap-primary-light);
    color: var(--ap-primary);
    border-color: var(--ap-primary);
}

.ap-topbar-btn:focus {
    outline: none;
    box-shadow: none;
}

.ap-notif-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    min-width: 16px;
    height: 16px;
    background: var(--ap-danger);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.ap-topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--ap-radius);
    font-size: .88rem;
    font-weight: 500;
    color: var(--ap-text);
    transition: background var(--ap-transition);
}

.ap-topbar-user:hover {
    background: var(--ap-primary-light);
}

.ap-topbar-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--ap-primary), var(--ap-accent));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    flex-shrink: 0;
}

.ap-topbar-chevron {
    font-size: .7rem;
    color: var(--ap-text-muted);
}

/* -- Content -- */
.ap-content {
    flex: 1;
    padding: 24px;
    min-height: calc(100vh - var(--ap-topbar-h) - var(--ap-footer-h));
}

/* -- Footer -- */
.ap-footer {
    height: var(--ap-footer-h);
    background: var(--ap-surface);
    border-top: 1px solid var(--ap-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    font-size: .8rem;
    color: var(--ap-text-muted);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.ap-footer a {
    color: var(--ap-text-muted);
    font-weight: 500;
}

.ap-footer a:hover {
    color: var(--ap-primary);
}

/* -- Page Header -- */
.ap-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.ap-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ap-text);
    margin: 0;
    line-height: 1.3;
}

.ap-page-subtitle {
    font-size: .83rem;
    color: var(--ap-text-muted);
    margin: 3px 0 0;
}

/* -- Breadcrumb -- */
.ap-breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: .83rem;
}

.ap-breadcrumb .breadcrumb-item+.breadcrumb-item {
    padding-right: .5rem;
    padding-left: 0;
}

.ap-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: '\2039';
    font-family: inherit;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    font-size: .8rem;
    color: var(--ap-text-muted);
    vertical-align: middle;
    float: right;
    padding-left: .5rem;
    padding-right: 0;
}

.ap-breadcrumb .breadcrumb-item a {
    color: var(--ap-primary);
}

.ap-breadcrumb .breadcrumb-item.active {
    color: var(--ap-text-muted);
}

/* -- Cards -- */
.card {
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-lg);
    box-shadow: var(--ap-shadow-sm);
    background: var(--ap-surface);
    transition: box-shadow var(--ap-transition);
}

.card:hover {
    box-shadow: var(--ap-shadow-md);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--ap-border);
    padding: .9rem 1.25rem;
    font-weight: 600;
    font-size: .93rem;
    color: var(--ap-text);
}

.card-body {
    padding: 1.25rem;
}

/* Stat Cards */
.ap-stat-card {
    background: var(--ap-surface);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-lg);
    padding: 1.25rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--ap-shadow-sm);
    transition: box-shadow var(--ap-transition), transform var(--ap-transition);
}

.ap-stat-card:hover {
    box-shadow: var(--ap-shadow-md);
    transform: translateY(-2px);
}

.ap-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.ap-stat-icon.orange {
    background: #fff7ed;
    color: var(--ap-primary);
}

.ap-stat-icon.green {
    background: #f0fdf4;
    color: var(--ap-success);
}

.ap-stat-icon.yellow {
    background: #fffbeb;
    color: var(--ap-warning);
}

.ap-stat-icon.red {
    background: #fef2f2;
    color: var(--ap-danger);
}

.ap-stat-icon.cyan {
    background: #ecfeff;
    color: var(--ap-info);
}

.ap-stat-label {
    font-size: .73rem;
    color: var(--ap-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ap-stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--ap-text);
    line-height: 1.2;
}

/* -- Products Page -- */
.ap-inline-stats {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.ap-mini-stat {
    min-width: 140px;
    padding: .85rem 1rem;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    border: 1px solid #fed7aa;
    border-radius: var(--ap-radius-lg);
    box-shadow: var(--ap-shadow-sm);
}

.ap-mini-stat-label {
    display: block;
    font-size: .78rem;
    color: var(--ap-text-muted);
    margin-bottom: .2rem;
}

.ap-mini-stat-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ap-primary);
}

.ap-mini-stat-badge {
    font-size: .9rem;
    font-weight: 700;
    padding: .5rem .7rem;
    border-radius: 999px;
}

.ap-mini-stat-danger {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fef2f2, #ffffff);
}

.ap-mini-stat-danger .ap-mini-stat-value {
    color: #b91c1c;
}

.ap-mini-stat-warning {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.ap-mini-stat-warning .ap-mini-stat-value {
    color: #a16207;
}

.ap-mini-stat-cyan {
    border-color: #a5f3fc;
    background: linear-gradient(135deg, #ecfeff, #ffffff);
}

.ap-mini-stat-cyan .ap-mini-stat-value {
    color: #0e7490;
}

.ap-mini-stat-orange {
    border-color: #fdba74;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.ap-mini-stat-orange .ap-mini-stat-value {
    color: #c2410c;
}

.ap-home-alert-card {
    overflow: hidden;
    border: 1px solid #fecaca;
}

.ap-home-alert-card-danger {
    border-color: #fecaca;
}

.ap-home-alert-card-warning {
    border-color: #fde68a;
}

.ap-home-alert-card-cyan {
    border-color: #a5f3fc;
}

.ap-home-alert-card-orange {
    border-color: #fdba74;
}

.ap-home-alert-card .card-header {
    background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
    border-bottom: 1px solid #fee2e2;
    color: #991b1b;
    font-weight: 700;
}

.ap-home-alert-card-warning .card-header {
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
    border-bottom-color: #fef3c7;
    color: #92400e;
}

.ap-home-alert-card-cyan .card-header {
    background: linear-gradient(180deg, #ecfeff 0%, #ffffff 100%);
    border-bottom-color: #cffafe;
    color: #155e75;
}

.ap-home-alert-card-orange .card-header {
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
    border-bottom-color: #fed7aa;
    color: #9a3412;
}

.ap-home-alert-headline {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .93rem;
    color: #7f1d1d;
}

.ap-home-alert-table thead th {
    background: #fff7ed;
    color: #9a3412;
    border-bottom-width: 1px;
}

.ap-home-alert-table tbody tr td {
    vertical-align: middle;
}

.ap-home-alert-reason-row td {
    background: #fffaf5;
    color: #7c2d12;
    font-size: .82rem;
    border-top: 0;
}

.ap-home-alert-empty {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem;
    border: 1px dashed #86efac;
    border-radius: var(--ap-radius-lg);
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.ap-home-alert-empty i {
    color: #16a34a;
    font-size: 1.7rem;
    margin-top: .1rem;
}

.ap-home-alert-empty h3 {
    margin: 0 0 .35rem;
    font-size: 1.02rem;
    color: #14532d;
}

.ap-home-alert-empty p {
    margin: 0;
    color: #166534;
    font-size: .9rem;
}

.ap-home-alert-empty-warning {
    border-color: #fcd34d;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.ap-home-alert-empty-warning i,
.ap-home-alert-empty-warning h3,
.ap-home-alert-empty-warning p {
    color: #92400e;
}

.ap-home-alert-empty-cyan {
    border-color: #67e8f9;
    background: linear-gradient(180deg, #ecfeff 0%, #ffffff 100%);
}

.ap-home-alert-empty-cyan i,
.ap-home-alert-empty-cyan h3,
.ap-home-alert-empty-cyan p {
    color: #155e75;
}

.ap-home-alert-empty-orange {
    border-color: #fb923c;
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.ap-home-alert-empty-orange i,
.ap-home-alert-empty-orange h3,
.ap-home-alert-empty-orange p {
    color: #9a3412;
}

.ap-product-form-card,
.ap-product-list-card {
    overflow: hidden;
}

.ap-product-modal {
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-lg);
    overflow: hidden;
}

.ap-product-modal .modal-header {
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--ap-border);
    background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
}

.ap-product-modal .modal-body {
    padding: 1.25rem;
}

.ap-product-modal .btn-close {
    margin: 0;
}

.ap-validation-summary {
    border-radius: var(--ap-radius);
    font-size: .86rem;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
}

.ap-validation-summary ul {
    margin: 0;
    padding-right: 1rem;
}

.field-validation-error {
    display: block;
    margin-top: .35rem;
    font-size: .8rem;
    font-weight: 600;
}

.ap-form-hint {
    color: var(--ap-text-muted);
    font-size: .88rem;
    margin-bottom: 1.25rem;
}

.ap-btn-primary {
    min-width: 140px;
}

.ap-upload-field {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.ap-upload-dropzone {
    position: relative;
    min-height: 220px;
    border: 2px dashed #fdba74;
    border-radius: var(--ap-radius-lg);
    background: linear-gradient(180deg, #fffaf5 0%, #ffffff 100%);
    padding: 1rem;
    cursor: pointer;
    transition: border-color var(--ap-transition), background var(--ap-transition), box-shadow var(--ap-transition), transform var(--ap-transition);
}

.ap-upload-dropzone:hover,
.ap-upload-dropzone:focus,
.ap-upload-dropzone.is-dragover {
    border-color: var(--ap-primary);
    background: #fff7ed;
    box-shadow: 0 0 0 4px rgba(234, 88, 12, .10);
    transform: translateY(-1px);
    outline: none;
}

.ap-upload-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 186px;
    border-radius: calc(var(--ap-radius-lg) - 4px);
    overflow: hidden;
    background: rgba(255, 255, 255, .8);
}

.ap-upload-preview-image {
    width: 100%;
    height: 186px;
    object-fit: cover;
    border-radius: calc(var(--ap-radius-lg) - 6px);
}

.ap-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    text-align: center;
    color: var(--ap-text-muted);
    padding: 1rem;
}

.ap-upload-placeholder i {
    font-size: 2rem;
    color: var(--ap-primary);
}

.ap-upload-placeholder strong {
    color: var(--ap-text);
    font-size: .95rem;
}

.ap-upload-placeholder span,
.ap-upload-meta {
    font-size: .8rem;
    color: var(--ap-text-muted);
}

.ap-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.ap-product-thumb-link {
    display: inline-flex;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    box-shadow: var(--ap-shadow-sm);
}

.ap-product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ap-product-detail-image-wrap {
    width: 100%;
}

.ap-product-detail-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: var(--ap-radius-lg);
    border: 1px solid #fed7aa;
    box-shadow: var(--ap-shadow-sm);
}

.ap-product-table thead th {
    background: #f8fafc;
    color: var(--ap-text-muted);
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}

.ap-code-badge {
    display: inline-flex;
    align-items: center;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: #fff7ed;
    color: var(--ap-primary-dark);
    font-weight: 700;
    font-size: .8rem;
}

.ap-category-badge {
    display: inline-flex;
    align-items: center;
    padding: .3rem .7rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .8rem;
    font-weight: 600;
}

.ap-link-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .32rem .7rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--ap-border);
    color: var(--ap-text);
    font-size: .8rem;
}

.ap-link-chip:hover {
    background: var(--ap-primary-light);
    border-color: #fdba74;
    color: var(--ap-primary-dark);
}

.ap-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.ap-empty-icon {
    font-size: 2.4rem;
    color: #cbd5e1;
}

.ap-product-list-card .dataTables_wrapper {
    padding: 1rem 1.25rem 1.25rem;
}

.ap-product-list-card .dt-container .dt-layout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ap-product-list-card .dt-container .dt-layout-row:not(.dt-layout-table) {
    margin: 0;
}

.ap-product-list-card .dt-container .dt-layout-start,
.ap-product-list-card .dt-container .dt-layout-end {
    display: flex;
    align-items: center;
    flex: 1 1 0;
}

.ap-product-list-card .dt-container .dt-layout-start {
    justify-content: flex-start;
    text-align: left;
}

.ap-product-list-card .dt-container .dt-layout-end {
    justify-content: flex-end;
    text-align: right;
}

.ap-product-list-card .dt-container .dt-search {
    display: flex;
    justify-content: flex-start;
    text-align: left;
}

.ap-product-list-card .dt-container .dt-length,
.ap-product-list-card .dt-container .dt-info {
    display: flex;
    justify-content: flex-end;
    text-align: right;
}

.ap-product-list-card .dt-container .dt-paging {
    display: flex;
    justify-content: flex-start;
    text-align: left;
}

.ap-product-list-card .dt-container .dt-paging nav {
    justify-content: flex-start;
}

.ap-product-list-card .dataTables_wrapper .row {
    align-items: center;
}

.ap-product-list-card .dataTables_wrapper .row:first-child,
.ap-product-list-card .dataTables_wrapper .row:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ap-product-list-card .dataTables_wrapper .row:first-child>[class*='col-'],
.ap-product-list-card .dataTables_wrapper .row:last-child>[class*='col-'] {
    display: flex;
    align-items: center;
    flex: 1 1 0;
}

.ap-product-list-card .dataTables_filter,
.ap-product-list-card .dataTables_length {
    margin-bottom: 1rem;
}

.ap-product-list-card .dataTables_filter {
    display: flex;
    justify-content: flex-start;
    text-align: left;
}

.ap-product-list-card .dataTables_length {
    display: flex;
    justify-content: flex-end;
    text-align: right;
}

.ap-product-list-card .dataTables_info {
    display: flex;
    justify-content: flex-end;
    text-align: right;
}

.ap-product-list-card .dataTables_paginate {
    display: flex;
    justify-content: flex-start;
    text-align: left;
}

.ap-product-list-card .dataTables_filter label,
.ap-product-list-card .dataTables_length label,
.ap-product-list-card .dataTables_info,
.ap-product-list-card .dataTables_paginate,
.ap-product-list-card .dt-container .dt-search label,
.ap-product-list-card .dt-container .dt-length label,
.ap-product-list-card .dt-container .dt-info,
.ap-product-list-card .dt-container .dt-paging {
    color: var(--ap-text-muted);
    font-size: .85rem;
    font-weight: 500;
}

.ap-product-list-card .dataTables_filter input,
.ap-product-list-card .dataTables_length select,
.ap-product-list-card .dt-container .dt-search input,
.ap-product-list-card .dt-container .dt-length select {
    min-height: 38px;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    background: var(--ap-surface);
    color: var(--ap-text);
    padding: .45rem .75rem;
    margin: 0 .4rem;
}

.ap-product-list-card .dataTables_filter input:focus,
.ap-product-list-card .dataTables_length select:focus,
.ap-product-list-card .dt-container .dt-search input:focus,
.ap-product-list-card .dt-container .dt-length select:focus {
    border-color: var(--ap-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, .14);
}

.ap-product-list-card .dataTables_info {
    padding-top: 1rem;
}

.ap-product-list-card .dataTables_paginate {
    padding-top: .75rem;
}

/* --- Pagination: clean & simple --- */
.ap-product-list-card .dt-container .dt-paging {
    padding: .3rem 0;
}

.ap-product-list-card .dt-container .dt-paging nav {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
}

.ap-product-list-card .dt-container .dt-paging .dt-paging-button {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--ap-border) !important;
    border-radius: 8px !important;
    background: var(--ap-surface) !important;
    color: var(--ap-text-muted) !important;
    font-size: .85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
    transition: border-color .18s, background .18s, color .18s;
    white-space: nowrap;
}

.ap-product-list-card .dt-container .dt-paging .dt-paging-button:hover {
    border-color: #fdba74 !important;
    background: #fff7ed !important;
    color: var(--ap-primary-dark) !important;
}

.ap-product-list-card .dt-container .dt-paging .dt-paging-button.current,
.ap-product-list-card .dt-container .dt-paging .dt-paging-button.current:hover {
    border-color: var(--ap-primary) !important;
    background: var(--ap-primary) !important;
    color: #fff !important;
    font-weight: 700;
}

.ap-product-list-card .dt-container .dt-paging .dt-paging-button.disabled,
.ap-product-list-card .dt-container .dt-paging .dt-paging-button.disabled:hover {
    opacity: .4;
    cursor: not-allowed;
    border-color: var(--ap-border) !important;
    background: var(--ap-surface) !important;
    color: var(--ap-text-muted) !important;
}

/* Navigation arrow buttons */
.ap-product-list-card .dt-container .dt-paging .dt-paging-button.first,
.ap-product-list-card .dt-container .dt-paging .dt-paging-button.previous,
.ap-product-list-card .dt-container .dt-paging .dt-paging-button.next,
.ap-product-list-card .dt-container .dt-paging .dt-paging-button.last {
    font-size: 0;
}

.ap-product-list-card .dt-container .dt-paging .dt-paging-button.first::before,
.ap-product-list-card .dt-container .dt-paging .dt-paging-button.previous::before,
.ap-product-list-card .dt-container .dt-paging .dt-paging-button.next::before,
.ap-product-list-card .dt-container .dt-paging .dt-paging-button.last::before {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.ap-product-list-card .dt-container .dt-paging .dt-paging-button.first::before {
    content: '«';
}

.ap-product-list-card .dt-container .dt-paging .dt-paging-button.previous::before {
    content: '‹';
}

.ap-product-list-card .dt-container .dt-paging .dt-paging-button.next::before {
    content: '›';
}

.ap-product-list-card .dt-container .dt-paging .dt-paging-button.last::before {
    content: '»';
}

.ap-product-list-card .dataTables_paginate .pagination {
    justify-content: flex-start;
    margin-bottom: 0;
}

.ap-product-list-card .paginate_button {
    border-radius: var(--ap-radius) !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--ap-text-muted) !important;
    transition: all var(--ap-transition);
}

.ap-product-list-card .paginate_button:hover {
    border-color: #fdba74 !important;
    background: var(--ap-primary-light) !important;
    color: var(--ap-primary-dark) !important;
}

.ap-product-list-card .paginate_button.current,
.ap-product-list-card .paginate_button.current:hover {
    border-color: var(--ap-primary) !important;
    background: var(--ap-primary) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(234, 88, 12, .18);
}

.ap-product-list-card .dataTables_processing {
    border: 1px solid #fed7aa;
    border-radius: var(--ap-radius-lg);
    background: #fffaf5;
    color: var(--ap-primary-dark);
    box-shadow: var(--ap-shadow-md);
}

.ap-details-card {
    overflow: hidden;
}

.ap-detail-item {
    height: 100%;
    padding: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
    border: 1px solid #f1f5f9;
    border-radius: var(--ap-radius-lg);
}

.ap-detail-label {
    display: block;
    margin-bottom: .55rem;
    color: var(--ap-text-muted);
    font-size: .78rem;
    font-weight: 700;
}

.ap-detail-value {
    color: var(--ap-text);
    font-size: .96rem;
    font-weight: 700;
    line-height: 1.7;
}

.ap-detail-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.ap-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.ap-kpi-grid {
    align-items: stretch;
}

.ap-kpi-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--ap-radius-lg);
    background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.ap-kpi-title {
    color: var(--ap-text-muted);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.5;
}

.ap-kpi-value {
    color: var(--ap-text);
    font-family: var(--ap-font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.4;
}

.ap-kpi-note {
    color: #64748b;
    font-size: .76rem;
    line-height: 1.6;
}

.ap-kpi-risk-card {
    border-width: 2px;
}

.ap-kpi-supply-gap-danger {
    border-color: rgba(220, 38, 38, 0.33);
    background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
}

.ap-kpi-supply-gap-danger .ap-kpi-value {
    color: #b91c1c;
}

.ap-kpi-supply-gap-success {
    border-color: rgba(22, 163, 74, 0.33);
    background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
}

.ap-kpi-supply-gap-success .ap-kpi-value {
    color: #15803d;
}

.ap-kpi-supply-gap-balanced {
    border-color: rgba(100, 116, 139, 0.33);
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.ap-kpi-supply-gap-balanced .ap-kpi-value {
    color: #334155;
}

.ap-kpi-risk-danger {
    border-color: rgba(220, 38, 38, 0.38);
    background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
}

.ap-kpi-risk-danger .ap-kpi-value {
    color: #b91c1c;
}

.ap-kpi-risk-warning {
    border-color: rgba(217, 119, 6, 0.4);
    background: linear-gradient(180deg, #fff 0%, #fffbeb 100%);
}

.ap-kpi-risk-warning .ap-kpi-value {
    color: #b45309;
}

.ap-kpi-risk-success {
    border-color: rgba(22, 163, 74, 0.35);
    background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
}

.ap-kpi-risk-success .ap-kpi-value {
    color: #15803d;
}

.ap-kpi-risk-secondary {
    border-color: rgba(100, 116, 139, 0.3);
}

.ap-kpi-risk-hint {
    padding-top: .2rem;
    color: #475569;
}

@media (max-width: 576px) {
    .ap-kpi-value {
        font-size: 1.08rem;
    }
}

/* -- Product Image Showcase (Details Page) -- */
.ap-showcase-link {
    display: block;
    position: relative;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 380px;
    background-color: #0f172a;
    cursor: zoom-in;
    border-radius: var(--ap-radius-lg);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ap-showcase-backdrop {
    position: absolute;
    inset: -30px;
    background-size: cover;
    background-position: center;
    filter: blur(25px) brightness(0.65) saturate(1.2);
    z-index: 0;
    transition: filter 0.5s ease, transform 0.5s ease;
    transform: scale(1.1);
}

.ap-showcase-link:hover .ap-showcase-backdrop {
    filter: blur(15px) brightness(0.5) saturate(1.1);
    transform: scale(1.15);
}

.ap-showcase-img-container {
    position: absolute;
    inset: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.ap-showcase-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.ap-showcase-link:hover .ap-showcase-img {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

.ap-showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 60%, rgba(15, 23, 42, 0.8) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 2rem;
    gap: .5rem;
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.ap-showcase-link:hover .ap-showcase-overlay {
    opacity: 1;
}

.ap-showcase-overlay i {
    font-size: 1.6rem;
    transform: translateY(15px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.ap-showcase-overlay span {
    transform: translateY(15px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.05s;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.ap-showcase-link:hover .ap-showcase-overlay i,
.ap-showcase-link:hover .ap-showcase-overlay span {
    transform: translateY(0);
}

.ap-showcase-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    background: #ffffff;
    border-top: 1px solid var(--ap-border);
    flex-shrink: 0;
}

.ap-status-dot {
    width: 10px;
    height: 10px;
    background-color: var(--ap-success);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    animation: apPulse 2s infinite;
}

@keyframes apPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

.ap-showcase-open-btn {
    font-size: .82rem;
    font-weight: 700;
    color: var(--ap-primary);
    display: inline-flex;
    align-items: center;
    background: var(--ap-primary-light);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.ap-showcase-open-btn:hover {
    color: #fff;
    background: var(--ap-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
}

.ap-showcase-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    min-height: 380px;
    padding: 2.5rem;
    text-align: center;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.ap-showcase-empty-icon {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #cbd5e1;
    position: relative;
}

.ap-showcase-empty-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px dashed #e2e8f0;
}

.ap-showcase-empty p {
    margin: 0;
    font-size: .95rem;
    font-weight: 500;
    color: var(--ap-text-muted);
}

/* -- Tables -- */
.table {
    color: var(--ap-text);
    font-size: .88rem;
    --bs-table-striped-bg: #f8fafc;
    --bs-table-hover-bg: #f1f5f9;
}

.table thead th {
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--ap-text-muted);
    background: var(--ap-bg);
    border-bottom: 2px solid var(--ap-border);
    white-space: nowrap;
    padding: .7rem 1rem;
}

.table td {
    padding: .65rem 1rem;
    vertical-align: middle;
    border-color: var(--ap-border);
}

.ap-table-card {
    border-radius: var(--ap-radius-lg);
    overflow: hidden;
    border: 1px solid var(--ap-border);
    box-shadow: var(--ap-shadow-sm);
    background: var(--ap-surface);
}

/* -- Buttons -- */
.btn {
    font-weight: 500;
    font-size: .88rem;
    border-radius: var(--ap-radius);
    transition: all var(--ap-transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--ap-primary);
    border-color: var(--ap-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--ap-primary-dark);
    border-color: var(--ap-primary-dark);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(234, 88, 12, .18);
}

/* -- Forms -- */
.form-control,
.form-select {
    border-radius: var(--ap-radius);
    border-color: var(--ap-border);
    font-size: .88rem;
    color: var(--ap-text);
    background: var(--ap-surface);
    transition: border-color var(--ap-transition), box-shadow var(--ap-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ap-primary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, .14);
}

.form-label {
    font-weight: 500;
    font-size: .86rem;
    color: var(--ap-text);
    margin-bottom: 5px;
}

/* -- Pills -- */
.ap-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .74rem;
    font-weight: 600;
}

.ap-pill-success {
    background: #dcfce7;
    color: #15803d;
}

.ap-pill-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.ap-pill-warning {
    background: #fef3c7;
    color: #b45309;
}

.ap-pill-info {
    background: #cffafe;
    color: #0e7490;
}

.ap-pill-muted {
    background: #f1f5f9;
    color: var(--ap-text-muted);
}

.ap-pill-orange {
    background: #fff7ed;
    color: var(--ap-primary);
}

/* -- Divider -- */
.ap-divider {
    border: none;
    border-top: 1px solid var(--ap-border);
    margin: 1.5rem 0;
}

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* -- Selection -- */
::selection {
    background: rgba(234, 88, 12, .15);
    color: var(--ap-primary-dark);
}

/* -- Utilities -- */
.text-primary {
    color: var(--ap-primary) !important;
}

.bg-primary {
    background-color: var(--ap-primary) !important;
}

.ap-shadow-sm {
    box-shadow: var(--ap-shadow-sm) !important;
}

.ap-shadow-md {
    box-shadow: var(--ap-shadow-md) !important;
}

.ap-radius {
    border-radius: var(--ap-radius) !important;
}

.ap-radius-lg {
    border-radius: var(--ap-radius-lg) !important;
}

/* -- Responsive -- */
@media (max-width: 991.98px) {
    .ap-sidebar {
        transform: translateX(100%);
    }

    .ap-sidebar.open {
        transform: translateX(0);
        box-shadow: -6px 0 24px rgba(0, 0, 0, .25);
    }

    .ap-layout {
        margin-right: 0;
    }
}

@media (max-width: 575.98px) {
    .ap-content {
        padding: 16px;
    }

    .ap-topbar {
        padding: 0 14px;
    }

    .ap-footer {
        padding: 0 14px;
        font-size: .74rem;
    }

    .ap-page-title {
        font-size: 1.1rem;
    }

    .ap-stat-value {
        font-size: 1.25rem;
    }

    .ap-upload-dropzone {
        min-height: 190px;
    }

    .ap-upload-preview,
    .ap-upload-preview-image {
        min-height: 156px;
        height: 156px;
    }

    .ap-upload-actions {
        flex-direction: column;
    }

    .ap-product-list-card .dt-container .dt-layout-row {
        flex-direction: column;
        align-items: stretch;
        gap: .75rem;
    }

    .ap-product-list-card .dt-container .dt-layout-start,
    .ap-product-list-card .dt-container .dt-layout-end,
    .ap-product-list-card .dt-container .dt-search,
    .ap-product-list-card .dt-container .dt-length,
    .ap-product-list-card .dt-container .dt-info,
    .ap-product-list-card .dt-container .dt-paging,
    .ap-product-list-card .dt-container .dt-paging nav {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .ap-product-list-card .dt-container .dt-paging {
        border-radius: var(--ap-radius-lg);
    }

    .ap-product-list-card .dt-container .dt-paging nav {
        gap: .35rem;
    }

    .ap-product-list-card .dt-container .dt-paging .dt-paging-button {
        min-width: 34px;
        height: 34px;
        padding: 0 .6rem !important;
        font-size: .82rem;
    }

    .ap-product-list-card .dataTables_wrapper .row:first-child,
    .ap-product-list-card .dataTables_wrapper .row:last-child {
        flex-direction: column;
        align-items: stretch;
        gap: .75rem;
    }

    .ap-product-list-card .dataTables_wrapper .row:first-child>[class*='col-'],
    .ap-product-list-card .dataTables_wrapper .row:last-child>[class*='col-'] {
        width: 100%;
        justify-content: center;
    }

    .ap-product-list-card .dataTables_wrapper {
        padding: .85rem;
    }

    .ap-product-list-card .dataTables_filter,
    .ap-product-list-card .dataTables_length,
    .ap-product-list-card .dataTables_info,
    .ap-product-list-card .dataTables_paginate {
        text-align: center;
    }
}

/* -- Sidebar Collapsed (Desktop only) -- */
@media (min-width: 992px) {
    :root {
        --ap-sidebar-collapsed-w: 68px;
    }

    .ap-sidebar {
        transition: width var(--ap-transition);
        overflow: hidden;
    }

    .ap-sidebar.collapsed {
        width: var(--ap-sidebar-collapsed-w);
    }

    .ap-sidebar.collapsed .ap-brand-name,
    .ap-sidebar.collapsed .ap-nav-group-label,
    .ap-sidebar.collapsed .ap-nav-item span,
    .ap-sidebar.collapsed .ap-user-info {
        opacity: 0;
        width: 0;
        overflow: hidden;
        white-space: nowrap;
        transition: opacity var(--ap-transition), width var(--ap-transition);
    }

    .ap-sidebar.collapsed .ap-sidebar-brand {
        justify-content: center;
        padding: 0 10px;
    }

    .ap-sidebar.collapsed .ap-nav-list {
        padding: 0 6px;
    }

    .ap-sidebar.collapsed .ap-nav-item {
        justify-content: center;
        padding: 10px;
        gap: 0;
    }

    .ap-sidebar.collapsed .ap-nav-icon {
        width: auto;
        font-size: 1.1rem;
        opacity: 1;
    }

    .ap-sidebar.collapsed .ap-sidebar-footer {
        padding: 12px 6px;
    }

    .ap-sidebar.collapsed .ap-user-card {
        justify-content: center;
    }

    .ap-layout {
        transition: margin-right var(--ap-transition);
    }

    .ap-layout.sidebar-collapsed {
        margin-right: var(--ap-sidebar-collapsed-w);
    }
}

/* -- User Dropdown -- */
.ap-user-dropdown-wrap {
    position: relative;
}

.ap-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 200px;
    background: var(--ap-surface);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-lg);
    box-shadow: var(--ap-shadow-md);
    z-index: 1100;
    overflow: hidden;
    animation: apDropIn .18s ease;
}

.ap-user-dropdown.show {
    display: block;
}

@keyframes apDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

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

.ap-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--ap-border);
    background: var(--ap-bg);
}

.ap-dropdown-header .ap-dh-name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--ap-text);
    display: block;
}

.ap-dropdown-header .ap-dh-role {
    font-size: .75rem;
    color: var(--ap-text-muted);
}

.ap-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: .87rem;
    color: var(--ap-text);
    cursor: pointer;
    transition: background var(--ap-transition), color var(--ap-transition);
    border: none;
    background: transparent;
    width: 100%;
    text-align: right;
}

.ap-dropdown-item:hover {
    background: var(--ap-bg);
    color: var(--ap-primary);
}

.ap-dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--ap-text-muted);
    font-size: .85rem;
}

.ap-dropdown-item:hover i {
    color: var(--ap-primary);
}

.ap-dropdown-item.danger:hover {
    background: #fef2f2;
    color: var(--ap-danger);
}

.ap-dropdown-item.danger:hover i {
    color: var(--ap-danger);
}

.ap-dropdown-divider {
    border: none;
    border-top: 1px solid var(--ap-border);
    margin: 4px 0;
}