body {
    background-color: #f8fafc;
    font-family: 'Inter', sans-serif;
}

/* Sidebar navigation links */
aside nav a {
    text-decoration: none;
    color: inherit;
}

.sidebar-active {
    background: #eff6ff !important;
    color: #2563eb !important;
    border-right: 4px solid #2563eb;
}

/* Top nav dropdown links */
nav a {
    text-decoration: none;
}

.card-hover {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    contain: layout style paint;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
}

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

.h-screen-minus-nav {
    height: calc(100vh - 4rem);
}

/* Auto-fill card grid: cards stay ~240px wide, columns adapt to container */
.auto-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

/* Grid loading overlay */
.grid-loading-wrapper {
    position: relative;
}

.grid-loading-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(248, 250, 252, 0.7);
    backdrop-filter: blur(2px);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    animation: gridFadeIn 0.1s ease-out;
}

.grid-loading-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    z-index: 21;
    animation: gridSpin 0.6s linear infinite;
}

@keyframes gridSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes gridFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Perfume drawer: read-only mode */
.perfume-readonly input:disabled,
.perfume-readonly textarea:disabled {
    border-color: transparent;
    background: transparent;
    opacity: 1;
    cursor: default;
    padding-left: 0;
    resize: none;
    color: #334155; /* slate-700 */
}
.perfume-readonly [data-action="select-gender"] {
    pointer-events: none;
    cursor: default;
}
.perfume-readonly [data-perfume-footer] {
    display: none;
}

/* ─── Shared Modal System ─── */
.pm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    animation: pmFadeIn 0.15s ease-out;
}
@keyframes pmFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.pm-modal-box {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 420px;
    margin: 1rem;
    animation: pmSlideUp 0.2s ease-out;
    overflow: hidden;
}
@keyframes pmSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pm-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pm-modal-icon-confirm { background: #fef3c7; }
.pm-modal-icon-confirm i { color: #d97706; font-size: 1.25rem; }
.pm-modal-icon-success { background: #d1fae5; }
.pm-modal-icon-success i { color: #059669; font-size: 1.25rem; }
.pm-modal-icon-error   { background: #fee2e2; }
.pm-modal-icon-error   i { color: #dc2626; font-size: 1.25rem; }
.pm-modal-icon-info    { background: #e0e7ff; }
.pm-modal-icon-info    i { color: #4f46e5; font-size: 1.25rem; }

/* Button loading spinner */
.pm-btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}
.pm-btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pmBtnSpin 0.6s linear infinite;
}
@keyframes pmBtnSpin {
    to { transform: rotate(360deg); }
}

/* Toast */
.pm-toast {
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    z-index: 10000;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
    animation: pmToastIn 0.25s ease-out;
    max-width: 400px;
    word-break: break-word;
}
.pm-toast-success { background: #059669; }
.pm-toast-error   { background: #dc2626; }
.pm-toast-info    { background: #4f46e5; }
.pm-toast-warning { background: #d97706; }
@keyframes pmToastIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ─── Page Loading Overlay ─── */
.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(6px);
    transition: opacity 0.3s ease-out;
}
.page-loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}
.page-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.page-loading-ring {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: pageLoadingSpin 0.7s linear infinite;
}
@keyframes pageLoadingSpin {
    to { transform: rotate(360deg); }
}
.page-loading-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}
