/* =========================================================
   SENSEBOARD LICENSING SYSTEM - XINTRA CREATIVE UI
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
@import url('login.css');

/* =========================================================
   KEYFRAME ANIMATIONS
   ========================================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(132, 90, 223, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(132, 90, 223, 0.5);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(132, 90, 223, 0.2);
    }

    50% {
        border-color: rgba(132, 90, 223, 0.5);
    }
}

@keyframes rowSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

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

:root {
    /* Xintra Refined Color Palette */
    --color-primary: #845ADF;
    /* Xintra Purple */
    --color-secondary: #23B7E5;
    /* Xintra Blue */
    --color-success: #26BF94;
    /* Xintra Green */
    --color-warning: #F5B849;
    /* Xintra Yellow */
    --color-danger: #E6533C;
    /* Xintra Red */
    --color-info: #49B6F5;

    /* Structured Sidebar */
    --sidebar-bg: #0f172a; /* Premium dark slate background */
    --sidebar-menu-hover: rgba(255, 255, 255, 0.08);
    --sidebar-menu-active: linear-gradient(135deg, var(--color-primary) 0%, #6366f1 100%);
    --sidebar-active-text: #ffffff;

    /* Backgrounds */
    --bg-main: #F0F1F7;
    --bg-white: #ffffff;

    /* Text */
    --text-dark: #333335;
    --text-heading: #1B1B1B;
    --text-muted: #8C9097;

    /* Borders & Table */
    --border-color: #E3E8F1;
    --table-header-bg: #F3F6F8;

    /* Soft Tints */
    --color-primary-light: rgba(132, 90, 223, 0.1);
    --color-success-light: rgba(38, 191, 148, 0.1);
    --color-warning-light: rgba(245, 184, 73, 0.1);
    --color-danger-light: rgba(230, 83, 60, 0.1);
    --color-info-light: rgba(73, 182, 245, 0.1);
    --color-orange-light: rgba(245, 132, 90, 0.1);
    --color-pink-light: rgba(230, 83, 141, 0.1);

    /* UI Measurements */
    --sidebar-width: 250px;
    --header-height: 60px;

    /* Xintra Shadows & Radii */
    --card-shadow: 0 0.125rem 0 rgba(10, 10, 10, 0.01), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.12);

    --radius-sm: 0.5rem;
    /* 8px */
    --radius-md: 0.625rem;
    /* 10px */
    --radius-lg: 0.75rem;
    /* 12px */
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    font-size: 0.8125rem;
    /* 13px */
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.card-title,
.kpi-value {
    color: var(--text-heading);
    letter-spacing: -0.025em;
    /* Trendy tight tracking for headings */
    margin-top: 0;
}

.text-muted {
    color: var(--text-muted);
}

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

/* =========================================================
   LAYOUT
   ========================================================= */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-wrapper {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* =========================================================
   XINTRA SIDEBAR (DARK)
   ========================================================= */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #7B8FA8;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    animation: fadeInLeft 0.5s ease;
    transition: transform 0.3s ease;
}

/* Sidebar Collapsed State */
body.sidebar-collapsed .sidebar {
    width: 70px;
}

body.sidebar-collapsed .main-wrapper {
    margin-left: 70px;
}

body.sidebar-collapsed .sidebar-header {
    padding: 24px 0 10px;
    text-align: center;
    display: flex;
    justify-content: center;
}

body.sidebar-collapsed .brand-title img {
    height: 24px;
    margin-left: 0;
}

body.sidebar-collapsed .brand-subtitle,
body.sidebar-collapsed .menu-label,
body.sidebar-collapsed .sidebar-footer {
    display: none;
}

body.sidebar-collapsed .nav-link {
    font-size: 0;
    justify-content: center;
    padding: 12px 0;
}

body.sidebar-collapsed .nav-link:hover {
    padding-left: 0;
}

body.sidebar-collapsed .nav-link i {
    font-size: 20px;
    margin-right: 0;
}

/* Custom Modal */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.custom-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.custom-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 40px;
    width: 440px;
    max-width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.custom-modal-overlay.open .custom-modal {
    transform: translateY(0) scale(1);
}

.custom-modal-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.custom-modal-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-heading);
    letter-spacing: -0.01em;
}

.custom-modal-message {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
}

.custom-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.custom-modal-actions .btn {
    padding: 10px 24px;
    font-size: 14px;
    min-width: 140px;
}

/* Filter Highlight */
.filter-section-highlight {
    background: linear-gradient(135deg, rgba(132, 90, 223, 0.08) 0%, rgba(132, 90, 223, 0.02) 100%) !important;
    border: 1px solid rgba(132, 90, 223, 0.3) !important;
    box-shadow: 0 8px 24px -4px rgba(132, 90, 223, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* macOS Dots */
.mac-controls {
    padding: 16px 20px 0;
    display: flex;
    gap: 6px;
    display: none;
}

.mac-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.85;
}

.mac-close {
    background-color: #FF5F56;
}

.mac-min {
    background-color: #FFBD2E;
}

.mac-max {
    background-color: #27C93F;
}

/* Branding */
.sidebar-header {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.3;
}

.brand-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: #38bdf8; /* Vibrant light blue for high visibility */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 6px;
}

/* Navigation */
.sidebar-menu {
    padding: 16px 12px;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-label {
    font-size: 10px;
    font-weight: 700;
    color: #4A6A8A;
    margin: 20px 0 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: none;
}

.nav-link {
    color: #94a3b8; /* Soft blue-gray for visibility */
    padding: 11px 16px;
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 13.5px;
    border-radius: var(--radius-md);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 6px;
    position: relative;
}

.nav-link i {
    width: 20px;
    font-size: 15px;
    margin-right: 12px;
    text-align: center;
    opacity: 0.8;
    transition: all 0.25s ease;
}

.nav-link:hover {
    color: #FFFFFF;
    background-color: var(--sidebar-menu-hover);
    padding-left: 20px;
}

.nav-link:hover i {
    opacity: 1;
    color: #38bdf8;
    transform: scale(1.15);
}

.nav-link.active {
    background: var(--sidebar-menu-active);
    color: var(--sidebar-active-text) !important;
    font-weight: 600;
    border-left: none; /* Modern rounded gradient item */
    box-shadow: 0 4px 12px rgba(132, 90, 223, 0.35);
}

.nav-link.active i {
    color: var(--sidebar-active-text) !important;
    opacity: 1;
}

/* Footer */
.sidebar-footer {
    padding: 16px 20px;
    font-size: 11px;
    color: #8C9097;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.online-indicator {
    width: 7px;
    height: 7px;
    background-color: var(--color-success);
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    box-shadow: 0 0 6px rgba(38, 191, 148, 0.4);
}

/* =========================================================
   TOP HEADER (XINTRA STYLE)
   ========================================================= */
.top-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(233, 237, 244, 0.7);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
}

.hamburger-icon {
    font-size: 18px;
    color: var(--text-dark);
    cursor: pointer;
}

/* Global Search */
.search-box {
    position: relative;
    width: 280px;
}

.search-box input {
    width: 100%;
    height: 38px;
    padding-left: 38px;
    padding-right: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    font-size: 13px;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #FFF;
    box-shadow: 0 0 0 3px rgba(132, 90, 223, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 12px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    position: relative;
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.icon-btn:hover {
    background-color: var(--bg-main);
    color: var(--color-primary);
}

.notification-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    background-color: var(--color-danger);
    border-radius: 50%;
    border: 2px solid #FFF;
}

.header-divider {
    width: 1px;
    height: 28px;
    background-color: var(--border-color);
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
    position: relative;
}

.user-profile:hover {
    background-color: var(--bg-main);
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #845ADF, #5a33b5);
    color: #FFF;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

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

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-heading);
    line-height: 1.2;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* User Dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 220px;
    background: #FFF;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1050;
    padding: 8px 0;
}

.profile-dropdown.open {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- NOTIFICATIONS --- */
.notification-btn-wrapper {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    z-index: 1000;
    display: none;
    flex-direction: column;
}

.notification-dropdown.open {
    display: flex;
}

.notification-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-heading);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: background 0.2s;
    cursor: pointer;
    text-align: left;
}

.notification-item:hover {
    background: var(--bg-main);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #EBF4FF;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notification-footer {
    padding: 12px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
}

.notification-footer:hover {
    text-decoration: underline;
}

.dropdown-item {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s;
    text-decoration: none;
    cursor: pointer;
}

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

.dropdown-item i {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.2s;
}

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

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

/* =========================================================
   GLOBAL CARDS & CONTAINERS
   ========================================================= */
.page-content {
    padding: 24px;
}

.card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.4s ease;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-heading);
    margin: 0;
}

.card-body {
    padding: 20px;
    flex-grow: 1;
}

.view-all {
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.view-all:hover {
    text-decoration: underline;
}

/* =========================================================
   XINTRA KPI CARDS (White card + colored icon circle on right)
   ========================================================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.kpi-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease backwards;
}

.kpi-card:nth-child(1) {
    animation-delay: 0.05s;
}

.kpi-card:nth-child(2) {
    animation-delay: 0.1s;
}

.kpi-card:nth-child(3) {
    animation-delay: 0.15s;
}

.kpi-card:nth-child(4) {
    animation-delay: 0.2s;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(132, 90, 223, 0.12);
    border-color: rgba(132, 90, 223, 0.25);
}

.kpi-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.kpi-card:hover .kpi-icon-box {
    transform: scale(1.1) rotate(5deg);
}

.kpi-content {
    display: flex;
    flex-direction: column;
}

.kpi-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 4px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.kpi-sub {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-muted);
}

.kpi-sub .up {
    color: #e2e2e2;
}

.kpi-sub .down {
    color: var(--color-danger);
}

.kpi-card-colorful .kpi-sub .up,
.kpi-card-colorful .kpi-sub .down {
    color: inherit;
}

/* Xintra KPI Icon Tints */
.kpi-blue {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.kpi-green {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.kpi-warning {
    background-color: var(--color-warning-light);
    color: var(--color-warning);
}

.kpi-danger {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
}

.kpi-info {
    background-color: var(--color-info-light);
    color: var(--color-info);
}

.kpi-purple {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.kpi-orange {
    background-color: var(--color-orange-light);
    color: var(--color-orange);
}

.kpi-pink {
    background-color: var(--color-pink-light);
    color: var(--color-pink);
}

/* =========================================================
   MODERN COLORFUL KPI CARDS (Gradient + Background Icon)
   ========================================================= */
.kpi-card-colorful {
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    animation: fadeInUp 0.5s ease backwards;
}

/* Glossy Shine Overlay */
.kpi-card-colorful::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.kpi-card-colorful:nth-child(1) {
    animation-delay: 0.05s;
}

.kpi-card-colorful:nth-child(2) {
    animation-delay: 0.12s;
}

.kpi-card-colorful:nth-child(3) {
    animation-delay: 0.19s;
}

.kpi-card-colorful:nth-child(4) {
    animation-delay: 0.26s;
}

.kpi-card-colorful:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25), inset 0 1px 3px rgba(255, 255, 255, 0.6);
}

.kpi-card-colorful .kpi-icon-bg {
    font-size: 26px;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.kpi-card-colorful:hover .kpi-icon-bg {
    transform: scale(1.15) rotate(-10deg);
    background-color: rgba(255, 255, 255, 0.3);
}

.kpi-card-colorful .kpi-content {
    z-index: 2;
    position: relative;
}

.kpi-card-colorful .kpi-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.kpi-card-colorful .kpi-value {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.kpi-card-colorful .kpi-sub {
    font-size: 11.5px;
    font-weight: 500;
}

/* Xintra Colorful Variants (Modern Gradients) */
.kpi-card-blue {
    background: linear-gradient(135deg, #3A1C71 0%, #D76D77 50%, #FFAF7B 100%);
}

.kpi-card-blue .kpi-title {
    color: rgba(255, 255, 255, 0.9);
}

.kpi-card-blue .kpi-value {
    color: #FFFFFF;
}

.kpi-card-blue .kpi-sub {
    color: rgba(255, 255, 255, 0.85);
}

.kpi-card-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.kpi-card-green .kpi-title {
    color: #C6F6D5;
}

.kpi-card-green .kpi-value {
    color: #FFFFFF;
}

.kpi-card-green .kpi-sub {
    color: #E6FFFA;
}

.kpi-card-purple {
    background: linear-gradient(135deg, #8E54E9 0%, #4776E6 100%);
}

.kpi-card-purple .kpi-title {
    color: #E9D8FD;
}

.kpi-card-purple .kpi-value {
    color: #FFFFFF;
}

.kpi-card-purple .kpi-sub {
    color: #FAF5FF;
}

.kpi-card-orange {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
}

.kpi-card-orange .kpi-title {
    color: #FFFDF5;
}

.kpi-card-orange .kpi-value {
    color: #FFFFFF;
}

.kpi-card-orange .kpi-sub {
    color: #FFFDF0;
}

.kpi-card-red {
    background: linear-gradient(135deg, #e53e3e 0%, #9b2c2c 100%);
}

.kpi-card-red .kpi-title {
    color: #FED7D7;
}

.kpi-card-red .kpi-value {
    color: #FFFFFF;
}

.kpi-card-red .kpi-sub {
    color: #FFF5F5;
}

.kpi-card-gray {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
}

.kpi-card-gray .kpi-title {
    color: #e2e8f0;
}

.kpi-card-gray .kpi-value {
    color: #FFFFFF;
}

.kpi-card-gray .kpi-sub {
    color: #cbd5e1;
}

.kpi-card-cyan {
    background: linear-gradient(135deg, #00B4DB 0%, #0083B0 100%);
}

.kpi-card-cyan .kpi-title {
    color: #C4F1F9;
}

.kpi-card-cyan .kpi-value {
    color: #FFFFFF;
}

.kpi-card-cyan .kpi-sub {
    color: #E2F8FD;
}

/* =========================================================
   DASHBOARD: 3-COLUMN MID ROW
   ========================================================= */
.dashboard-mid-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Activity Lists */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.activity-content {
    flex-grow: 1;
}

.activity-action {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-heading);
    margin-bottom: 2px;
}

.activity-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}

/* =========================================================
   DATA TABLES (XINTRA STYLE)
   ========================================================= */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.custom-table th {
    background-color: var(--table-header-bg);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.custom-table td {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-white);
    transition: all 0.2s ease;
    vertical-align: middle;
}

.custom-table tbody tr {
    animation: rowSlideIn 0.3s ease backwards;
}

.custom-table tbody tr:nth-child(1) {
    animation-delay: 0.03s;
}

.custom-table tbody tr:nth-child(2) {
    animation-delay: 0.06s;
}

.custom-table tbody tr:nth-child(3) {
    animation-delay: 0.09s;
}

.custom-table tbody tr:nth-child(4) {
    animation-delay: 0.12s;
}

.custom-table tbody tr:nth-child(5) {
    animation-delay: 0.15s;
}

.custom-table tbody tr:hover td {
    background-color: rgba(132, 90, 223, 0.03);
}

/* Xintra Action Icons */
/* Xintra Action Icons with Distinct Default Colors */
.action-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background-color: #f3f4f6; /* Subtle default background */
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
}

/* Specific action icon color classes */
.action-icon.view {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.action-icon.view:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 10px rgba(132, 90, 223, 0.25);
}

.action-icon.edit {
    color: var(--color-success);
    background-color: var(--color-success-light);
}

.action-icon.edit:hover {
    background-color: var(--color-success);
    color: #ffffff;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 10px rgba(38, 191, 148, 0.25);
}

.action-icon.delete, .action-icon.suspend {
    color: var(--color-danger);
    background-color: var(--color-danger-light);
}

.action-icon.delete:hover, .action-icon.suspend:hover {
    background-color: var(--color-danger);
    color: #ffffff;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 10px rgba(230, 83, 60, 0.25);
}

.action-icon.activate {
    color: var(--color-success);
    background-color: var(--color-success-light);
}

.action-icon.activate:hover {
    background-color: var(--color-success);
    color: #ffffff;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 10px rgba(38, 191, 148, 0.25);
}

/* Xintra Styled Checkboxes */
.custom-table input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #d3d8e5;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    background-color: #fff;
    margin: 0;
    vertical-align: middle;
}

.custom-table input[type="checkbox"]:hover {
    border-color: var(--color-primary);
}

.custom-table input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.custom-table input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: white;
    font-size: 9px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Xintra Badges - Animated */
.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.badge-success {
    color: var(--color-success);
    background-color: var(--color-success-light);
}

.badge-warning {
    color: #d09c21;
    background-color: var(--color-warning-light);
}

.badge-danger {
    color: var(--color-danger);
    background-color: var(--color-danger-light);
}

.badge-primary {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.badge-neutral {
    color: var(--text-muted);
    background-color: #f3f4f6;
}

.badge-info {
    color: var(--color-info);
    background-color: var(--color-info-light);
}

/* =========================================================
   BUTTONS (XINTRA STYLE)
   ========================================================= */
.btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: #7048c7;
    border-color: #7048c7;
    box-shadow: 0 4px 12px rgba(132, 90, 223, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #26BF94 0%, #1fa67f 100%);
    border-color: transparent;
    color: #FFF;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1fa67f 0%, #18956d 100%);
    box-shadow: 0 6px 20px rgba(38, 191, 148, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger) 0%, #d83e3e 100%);
    border-color: transparent;
    color: #FFF;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d83e3e 0%, #b82b2b 100%);
    box-shadow: 0 6px 20px rgba(230, 83, 60, 0.3);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
}

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

.btn-outline:hover {
    background-color: var(--bg-main);
    border-color: #d3d8e5;
}

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

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* =========================================================
   DRAWERS 
   ========================================================= */
.drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 440px;
    height: 100vh;
    background-color: var(--bg-white);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.drawer.open {
    right: 0;
}

.drawer.open~.page-content {
    filter: brightness(0.97);
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: var(--bg-white);
}

.drawer-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-heading);
    margin: 0 0 4px 0;
}

.drawer-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.drawer-close:hover {
    background-color: var(--bg-main);
    color: var(--text-heading);
}

.drawer-body {
    padding: 24px;
    flex-grow: 1;
    overflow-y: auto;
}

.drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: var(--bg-white);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(132, 90, 223, 0.08);
    transform: translateY(-1px);
}

select.form-control {
    appearance: auto;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Info Box */
.info-box {
    background-color: var(--color-info-light);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    margin-top: 16px;
    border: 1px solid rgba(73, 182, 245, 0.15);
}

.info-box i {
    color: var(--color-info);
    margin-top: 2px;
}

.info-box p {
    margin: 0;
    font-size: 12px;
    color: var(--text-dark);
}

/* Utility Classes */
.text-danger {
    color: var(--color-danger);
}

.text-success {
    color: var(--color-success);
}

.text-muted {
    color: var(--text-muted);
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* =========================================================
   CREATIVE ENHANCEMENTS & MICRO-INTERACTIONS
   ========================================================= */

/* Page content fade-in */
.page-content {
    animation: fadeInUp 0.4s ease;
}

/* Animated page title */
.page-title {
    animation: fadeInLeft 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(132, 90, 223, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(132, 90, 223, 0.4);
}

/* Sidebar scrollbar */
.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Online indicator pulse */
.online-indicator {
    animation: pulse 2s ease-in-out infinite;
}

/* Search box animated icon */
.search-box input:focus+.search-icon,
.search-box input:focus~.search-icon {
    color: var(--color-primary);
}

/* Notification badge bounce */
.notification-dot {
    animation: pulse 2s ease-in-out infinite;
}

/* Mac dots hover */
.mac-dot {
    transition: transform 0.2s ease;
}

.mac-dot:hover {
    transform: scale(1.3);
}

/* Table checkbox animation */
.custom-table input[type="checkbox"]:checked {
    animation: scaleIn 0.2s ease;
}

/* Shimmer effect for loading states */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Tooltip-style title attributes */
[title] {
    position: relative;
}

/* Selection color */
::selection {
    background-color: rgba(132, 90, 223, 0.2);
    color: var(--text-heading);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Smooth page transitions */
.main-wrapper {
    transition: filter 0.3s ease;
}

.brand-title img {
    width: 200px !important;
    height: auto !important;
}

/* --- MODERN EDIT ORG PAGE STYLES --- */
.edit-layout-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
}

.profile-summary-card {
    background: linear-gradient(145deg, #ffffff, #f8fafd);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 90px;
}

.profile-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #4A6A8A);
    color: white;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 6px 16px rgba(22, 100, 255, 0.3);
}

.form-section-card {
    background: #ffffff;
    border: 1px solid #7e43e9b5;
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 15px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.3s ease;
}

.form-section-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    padding-bottom: 9px;
    border-bottom: 1px dashed var(--border-color);
}

.form-section-header i {
    color: var(--color-primary);
    font-size: 15px;
    background: var(--bg-primary-subtle);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-section-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading);
}

/* Modern inputs */
.modern-input {
    background-color: #F8FAFC;
    border: 1px solid transparent;
    border-radius: 10px;
    height: 48px;
    padding: 0 16px;
    transition: all 0.3s ease;
}

.modern-input:focus {
    background-color: #FFFFFF;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(22, 100, 255, 0.1);
}

/* Segmented Control for Status */
.segmented-control {
    display: flex;
    background: #F1F5F9;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.segmented-control input[type="radio"] {
    display: none;
}

.segmented-control label {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
}

.segmented-control input[type="radio"]:checked+label {
    background: #FFFFFF;
    color: var(--text-heading);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.segmented-control input[type="radio"].status-active:checked+label {
    color: var(--color-success);
}

.segmented-control input[type="radio"].status-inactive:checked+label {
    color: var(--text-muted);
}

.segmented-control input[type="radio"].status-expiring:checked+label {
    color: var(--color-warning);
}

/* Bulk Action Bar for Tables */
.bulk-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 10;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    background-color: #F8FAFC;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}


/* Auth / Login Layout matching Xintra Creative UI */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: radial-gradient(circle at top right, rgba(132, 90, 223, 0.08), transparent 45%), radial-gradient(circle at bottom left, rgba(35, 183, 229, 0.05), transparent 45%), #0F172A;
}

.auth-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

    .auth-card:hover {
        border-color: rgba(132, 90, 223, 0.3);
        box-shadow: 0 20px 45px rgba(132, 90, 223, 0.1);
    }

    .auth-card .form-group {
        margin-bottom: 20px;
    }

    .auth-card .form-label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        color: #E2E8F0;
        margin-bottom: 8px;
    }

    .auth-card .form-control-custom {
        width: 100%;
        height: 44px;
        padding: 10px 16px;
        background: rgba(15, 23, 42, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-sm);
        color: #F8FAFC;
        font-size: 14px;
        transition: all 0.3s ease;
    }

        .auth-card .form-control-custom:focus {
            border-color: var(--color-primary);
            outline: none;
            box-shadow: 0 0 0 3px rgba(132, 90, 223, 0.15);
        }

    .auth-card .btn-custom {
        background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
        border: none;
        color: white;
        font-weight: 600;
        font-size: 15px;
        height: 44px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(132, 90, 223, 0.2);
        transition: all 0.3s ease;
    }

        .auth-card .btn-custom:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(132, 90, 223, 0.3);
        }