/* assets/css/theme.css */

/* --- 1. VARIABLES & RESET --- */
:root {
    /* Base Variables (Default Light Theme) */
    --primary: #7367F0;
    --primary-light: #8e85f3;
    --primary-dark: #6258d1;
    --primary-soft: rgba(115, 103, 240, 0.1);

    --secondary: #8e9196;
    --success: #28C76F;
    --danger: #EA5455;
    --warning: #FF9F43;
    --info: #00CFE8;

    /* Backgrounds */
    --bg-body: #F8F7FF;
    --bg-card: #FFFFFF;
    --bg-sidebar: rgba(255, 255, 255, 0.7);
    --bg-header: rgba(255, 255, 255, 0.5);

    /* Glassmorphism Props */
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: blur(12px);

    /* Text */
    --text-main: #34335c;
    --text-light: #676782;
    --text-muted: #a1a1b5;

    /* Spacing & Borders */
    --radius: 1rem;
    --radius-sm: 0.6rem;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 10px 40px rgba(115, 103, 240, 0.1);
    --border-color: #e6e6f2;

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    /* Updated for clean & professional look */
}

/* --- CUSTOM FONTS (Legacy) --- */
/* Panchang removed for cleaner look */

/* --- THEME: DARK (Legacy/Default Dark) --- */
[data-theme="dark"] {
    --bg-body: #0f111a;
    --bg-card: #1c1f2e;
    --bg-sidebar: rgba(28, 31, 46, 0.7);
    --bg-header: rgba(28, 31, 46, 0.5);
    --glass-bg: rgba(28, 31, 46, 0.5);
    --glass-border: rgba(255, 255, 255, 0.05);
    --text-main: #e2e4ea;
    --text-light: #9fa4b3;
    --text-muted: #6e727d;
    --border-color: #2b3042;
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* --- THEME 1: DARK ORANGE (Requested Image 1) --- */
[data-theme="theme-1"] {
    --bg-body: #151521;
    /* Deepest Navy/Black */
    --bg-card: #1E1E2D;
    /* Dark Blue-Grey Card */
    --bg-sidebar: #1E1E2D;
    --bg-header: #1E1E2D;
    /* Solid header for this theme */

    --primary: #FF9F43;
    /* Vibrant Orange */
    --primary-light: #ffb976;
    --primary-dark: #e08b39;
    --primary-soft: rgba(255, 159, 67, 0.15);

    --secondary: #A8AAAE;
    --success: #28C76F;
    /* Green for positive stats */
    --danger: #EA5455;

    --glass-bg: rgba(30, 30, 45, 0.95);
    /* Less glass, more solid */
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-blur: none;
    /* Solid look as per image */

    --text-main: #E1E1E6;
    --text-light: #B4B7BD;
    --text-muted: #787C85;

    --border-color: #2B2B40;
    --shadow-soft: 0 4px 24px 0 rgba(0, 0, 0, 0.25);
    --shadow-premium: 0 10px 40px 0 rgba(0, 0, 0, 0.4);

    --radius: 0.8rem;
    /* Slightly more squarish but rounded */
}

/* --- THEME: MODERN LIGHT (Image 1) --- */
[data-theme="modern-light"] {
    --bg-body: #eef2f7;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.8);
    --primary: #4e73df;
    --primary-dark: #2e59d9;
    --primary-soft: rgba(78, 115, 223, 0.1);
    --text-main: #2e384d;
    --text-light: #5a67d8;
    /* Highlighted blue-ish text */
    --text-muted: #858796;
    --border-color: #d1d9e6;
    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.03);
    --shadow-premium: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* --- THEME: ELEGANT DARK (Image 2) --- */
[data-theme="elegant-dark"] {
    --bg-body: #242b3d;
    --bg-card: rgba(43, 51, 71, 0.6);
    --bg-sidebar: rgba(27, 34, 51, 0.8);
    --bg-header: rgba(36, 43, 61, 0.5);
    --primary: #94b9ff;
    --primary-dark: #7aa2f7;
    --primary-soft: rgba(148, 185, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    --text-main: #e0e6ed;
    --text-light: #9499ad;
    --text-muted: #636b7f;
    --border-color: rgba(255, 255, 255, 0.05);
    --shadow-premium: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Dark Mode Overrides for Hardcoded Styles */
[data-theme="dark"] .form-control,
[data-theme="industrial-dark"] .form-control,
[data-theme="elegant-dark"] .form-control {
    background: #283046 !important;
    border-color: #3b4253 !important;
    color: #D0D2D6 !important;
}

[data-theme="dark"] .custom-table th,
[data-theme="industrial-dark"] .custom-table th,
[data-theme="elegant-dark"] .custom-table th {
    background-color: #343d55 !important;
    color: #D0D2D6 !important;
    border-color: #3b4253 !important;
}

[data-theme="dark"] .custom-table td,
[data-theme="industrial-dark"] .custom-table td,
[data-theme="elegant-dark"] .custom-table td {
    border-color: #3b4253 !important;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="industrial-dark"] .nav-link:hover,
[data-theme="elegant-dark"] .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .page-header h2,
[data-theme="industrial-dark"] .page-header h2,
[data-theme="elegant-dark"] .page-header h2,
[data-theme="dark"] .page-header p,
[data-theme="industrial-dark"] .page-header p,
[data-theme="elegant-dark"] .page-header p {
    color: #D0D2D6 !important;
}

[data-theme="dark"] .custom-table tbody tr:hover,
[data-theme="industrial-dark"] .custom-table tbody tr:hover,
[data-theme="elegant-dark"] .custom-table tbody tr:hover {
    background-color: #343d55 !important;
}

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

/* --- 2. GLOBAL LAYOUT --- */
body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    background-image:
        radial-gradient(at 0% 0%, rgba(115, 103, 240, 0.05) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(115, 103, 240, 0.03) 0, transparent 50%);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    font-size: 13.5px;
    /* Reduced from 15px */
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.brand h2 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

#app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- 2. GLOBAL LAYOUT --- */
.sidebar {
    width: 260px;
    /* Restored width for elegance */
    height: calc(100vh - 40px);
    max-height: calc(100vh - 40px);
    margin: 20px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Subtle glass border */
    display: flex;
    flex-direction: column;
    padding: 2rem 1.2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    flex-shrink: 0;
    border-radius: 20px;
    /* Softer corners */
    overflow: hidden;
}

/* Main Content (Right) */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: margin-left 0.4s ease;
}

/* Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -300px;
        margin: 0;
        height: 100vh;
        max-height: 100vh;
        width: 280px;
        border-radius: 0;
        z-index: 9999;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
        padding: 1.5rem;
        background: var(--bg-card);
    }

    .sidebar.active {
        left: 0;
    }

    #app {
        overflow-x: hidden;
    }

    main {
        width: 100vw;
    }

    #top-bar {
        padding: 0.8rem 1rem !important;
        margin: 10px !important;
    }

    #content-area {
        padding: 1rem !important;
    }
}

#top-bar {
    position: relative;
    z-index: 1001;
    margin: 20px 20px 0 20px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.03);
}

#content-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    scroll-behavior: smooth;
}

/* --- 3. COMPONENTS --- */

/* Brand */
.brand {
    padding: 0.5rem 0 2.5rem 0.5rem;
    /* More spacing below brand */
    text-align: left;
    /* Aligned left for premium feel */
}

.brand h2 {
    font-size: 1.6rem;
    font-weight: 800;
    /* Bolder */
    color: var(--text-main);
    /* Darker, cleaner */
    text-transform: none;
    /* Removed uppercase for elegance */
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand h2 i {
    color: var(--primary);
    font-size: 1.4rem;
}

/* Navigation - Premium Refined */
.nav-menu {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    /* Hide scrollbar */
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    /* Increased vertical gap */
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    /* Wider gap between icon and text */
    padding: 0.85rem 1.2rem;
    margin-bottom: 2px;
    color: var(--text-muted);
    /* Softer default color */
    text-decoration: none;
    border-radius: 14px;
    /* Soft rounding */
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
    /* Prevent jump on active */
    position: relative;
    letter-spacing: 0.01em;
}

.nav-link i {
    font-size: 1.3rem;
    transition: all 0.3s ease;
    opacity: 0.8;
    width: 24px;
    /* Fixed width for alignment */
    text-align: center;
}

/* Subtle Hover */
.nav-link:hover {
    color: var(--text-main);
    background-color: rgba(0, 0, 0, 0.02);
    transform: translateX(3px);
    /* Gentle movement */
}

.nav-link:hover i {
    opacity: 1;
    color: var(--primary);
    transform: scale(1.05);
    /* Subtle scale */
}

/* Premium Active State: No full color block, just refined accent */
.nav-link.active {
    background-color: var(--primary-soft);
    /* Very light tint */
    color: var(--primary);
    font-weight: 700;
    box-shadow: none;
    /* Clean flat look */
}

.nav-link.active i {
    color: var(--primary);
    opacity: 1;
    transform: scale(1.1);
}

/* Removed the sliding background ::before for a cleaner look */
.nav-link::before {
    display: none;
}

.nav-divider {
    margin: 1rem 0.5rem;
    border-top: 1px solid var(--border-color);
    opacity: 0.4;
}

/* Cards (Standardized) */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1.2rem;
    /* Reduced from 1.5rem */
    margin-bottom: 1.2rem;
    /* Reduced from 1.5rem */
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

/* Titles */
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.card h2,
.card h3,
.card h4 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 0.65rem 1.3rem;
    /* Reduced from 0.8rem 1.6rem */
    font-size: 0.9rem;
    /* Reduced from 0.95rem */
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 0.4rem;
}

.btn-xs {
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
    border-radius: 0.3rem;
    line-height: 1.2;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.03em;
    min-width: 75px;
    /* Ensure visual consistency */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Removed btn-icon as we are back to text */
.btn-icon-only {
    /* Renamed just in case needed elsewhere, but mainly redundant now */
    width: 28px;
    height: 28px;
    padding: 0;
    min-width: auto;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(115, 103, 240, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.btn-outline:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-success {
    background: linear-gradient(135deg, #28C76F 0%, #17a356 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #EA5455 0%, #c4383a 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #FF9F43 0%, #ffc107 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #00CFE8 0%, #00b0c7 100%);
    color: white;
}

/* Inputs */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.custom-table th {
    background-color: #fbfcff;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 1.2rem 1rem;
    color: var(--text-muted);
    border-bottom: 2px solid #f1f0f7;
    text-align: left;
}

.custom-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #f1f0f7;
    color: var(--text-main);
    vertical-align: middle;
    font-size: 0.95rem;
}

.custom-table tbody tr {
    transition: all 0.2s ease;
}

.custom-table tbody tr:hover {
    background-color: var(--primary-soft) !important;
}

/* Badges */
/* Badges & Utilities */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.bg-light-success {
    background: rgba(40, 199, 111, 0.12);
    color: var(--success);
}

.bg-light-danger {
    background: rgba(234, 84, 85, 0.12);
    color: var(--danger);
}

.bg-light-warning {
    background: rgba(255, 159, 67, 0.12);
    color: var(--warning);
}

.bg-light-primary {
    background: rgba(115, 103, 240, 0.12);
    color: var(--primary);
}

.bg-light-info {
    background: rgba(0, 207, 232, 0.12);
    color: var(--info);
}

/* Utilities */
.hidden {
    display: none !important;
}

.d-flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.w-100 {
    width: 100%;
}

.text-right {
    text-align: right;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* Modal Premium 2.0 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 17, 26, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-container {
    width: 100%;
    max-width: 650px;
    margin: auto;
}

.modal-content-premium {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 0;
    width: 100%;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    position: relative;
}

.modal-header-premium {
    padding: 1.5rem 2rem;
    background: var(--primary);
    color: white;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

/* --- 4. ANIMATIONS & INTERACTIONS --- */

/* Page Transition Fade In */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.fade-in-entry {
    animation: fadeInScale 0.35s ease-out forwards;
}

/* Table Row Hover Effect */
.custom-table tbody tr {
    transition: background-color 0.2s ease;
}

.custom-table tbody tr:hover {
    background-color: #f3f2ff !important;
    /* Very light purple tint */
    cursor: default;
}

/* --- 5. REPORTS MODULE (Arabic/RTL) --- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    direction: rtl;
    /* Enforce RTL for Grid */
}

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.kpi-trend {
    font-size: 0.8rem;
    color: var(--text-light);
}

.reports-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    direction: rtl;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    margin: 0;
    white-space: nowrap;
}

.reports-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 5px;
    direction: rtl;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.75rem 1.7rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: rgba(115, 103, 240, 0.05);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(115, 103, 240, 0.3);
}

.tab-content {
    display: none;
    animation: fadeInScale 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

/* --- 6. NOTIFICATIONS --- */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(234, 84, 85, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(234, 84, 85, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(234, 84, 85, 0);
    }
}

.notif-item:hover {
    background-color: #f8f8f8 !important;
}

[data-theme="dark"] #notif-menu {
    background: #283046 !important;
    border-color: #3b4253 !important;
    color: #D0D2D6 !important;
}

[data-theme="dark"] .notif-item {
    border-bottom-color: #3b4253 !important;
}

[data-theme="dark"] .notif-item.unread {
    background: rgba(115, 103, 240, 0.08) !important;
}

[data-theme="dark"] .notif-item:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Floating Toast Notification */
.floating-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.floating-toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(115, 103, 240, 0.1);
    border-radius: 12px;
    padding: 15px;
    width: 330px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s ease;
}

.floating-toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

[data-theme="dark"] .floating-toast {
    background: rgba(43, 51, 70, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

.floating-toast .notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
    flex-shrink: 0;
}

.floating-toast .notif-content {
    flex: 1;
}

.floating-toast .notif-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 3px;
}

[data-theme="dark"] .floating-toast .notif-title {
    color: #eee;
}

.floating-toast .notif-msg {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

[data-theme="dark"] .floating-toast .notif-msg {
    color: #b4b7bd;
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

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

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* --- 7. PRODUCTS & FAMILIES PREMIUM COMPONENTS --- */
.view-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 1000px;
    max-width: 95%;
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(255, 255, 255, 0.4);
    overflow: hidden;
    animation: premiumModalIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes premiumModalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

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

.view-header {
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.3);
}

.view-body {
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .view-body {
        grid-template-columns: 1fr;
    }
}

.p-img-wrapper,
.k-img-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 133.33%;
    /* 3:4 Aspect Ratio */
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background-color: #f8f8f8;
    /* Bulletproof Fallback: CSS Background */
    background-image: url('../img/placeholder.png');
    background-size: cover;
    background-position: center;
}

.view-img-container {
    width: 100%;
    height: 240px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.p-img-wrapper img,
.k-img-wrapper img,
.view-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-fam-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.view-sku {
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    color: var(--text-light);
    background: #f1f0f7;
    padding: 4px 10px;
    border-radius: 5px;
    display: inline-block;
}

.info-box {
    padding: 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.info-box:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.info-box.purple {
    background: rgba(115, 103, 240, 0.03);
    border-color: rgba(115, 103, 240, 0.1);
}

.info-box.green {
    background: rgba(40, 199, 111, 0.03);
    border-color: rgba(40, 199, 111, 0.1);
}

.info-box .label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-box .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.view-stock-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-width: 60px;
}

.view-stock-item span:first-child {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-light);
}

.view-stock-item span:last-child {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

/* Families specific */
.family-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.family-card:hover {
    transform: scale(1.02);
}

/* --- PREMIUM UI ENHANCEMENTS --- */

/* Card Interactions */
.card,
.stat-card,
.kpi-premium-card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.3s ease,
        border-color 0.3s ease !important;
}

.card:hover,
.stat-card:hover,
.kpi-premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(115, 103, 240, 0.15) !important;
}

/* Animated Entry for Content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.row>[class*="col-"] {
    animation: fadeInUp 0.5s ease backwards;
}

/* Staggered animation for grid items */
.row>[class*="col-"]:nth-child(1) {
    animation-delay: 0.1s;
}

.row>[class*="col-"]:nth-child(2) {
    animation-delay: 0.15s;
}

.row>[class*="col-"]:nth-child(3) {
    animation-delay: 0.2s;
}

.row>[class*="col-"]:nth-child(4) {
    animation-delay: 0.25s;
}

.row>[class*="col-"]:nth-child(5) {
    animation-delay: 0.3s;
}

.row>[class*="col-"]:nth-child(6) {
    animation-delay: 0.35s;
}

/* Status Badges Glow */
.status-badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.status-badge:hover {
    filter: brightness(1.05);
    transform: scale(1.05);
}

/* Micro-interaction for numbers */
#app span,
#app div {
    transition: color 0.3s ease;
}