/**
 * Logiedy Public Styles
 * 
 * Modern dashboard and login page styles
 * Based on white sidebar design with colorful stat cards
 * 
 * @package    Logiedy
 * @since      1.0.0
 */

/* ===================================================================
   GOOGLE FONTS IMPORT
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===================================================================
   CSS VARIABLES - COLOR PALETTE
   =================================================================== */

:root {
    /* Primary Colors */
    --logiedy-primary: #7C3AED;
    --logiedy-primary-dark: #6D28D9;
    --logiedy-primary-light: #A78BFA;
    --logiedy-primary-rgb: 124, 58, 237;
    --logiedy-secondary: #FBBF24;
    --logiedy-secondary-dark: #F59E0B;
    --logiedy-accent: #C026D3;

    /* State Colors */
    --logiedy-success: #10B981;
    --logiedy-success-light: #D1FAE5;
    --logiedy-warning: #FBBF24;
    --logiedy-warning-light: #FEF3C7;
    --logiedy-error: #EC4899;
    --logiedy-error-light: #FCE7F3;
    --logiedy-info: #06B6D4;
    --logiedy-info-light: #CFFAFE;

    /* Neutral Colors */
    --logiedy-bg: #F8FAFC;
    --logiedy-bg-alt: #F1F5F9;
    --logiedy-border: #E2E8F0;
    --logiedy-text: #64748B;
    --logiedy-text-dark: #0F172A;
    --logiedy-text-muted: #94A3B8;
    --logiedy-white: #FFFFFF;

    /* Dimensions */
    --logiedy-sidebar-width: 280px;
    /* Reduced for less wasted space */
    --logiedy-header-height: 65px;
    --logiedy-border-radius: 12px;
    --logiedy-border-radius-sm: 8px;
    --logiedy-border-radius-lg: 16px;
}

/* ===================================================================
   PAGE TRANSITION OVERLAY
   =================================================================== */

.logiedy-page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.logiedy-page-transition.active {
    opacity: 1;
    visibility: visible;
}

.logiedy-page-transition.fade-out {
    opacity: 0;
}

.logiedy-transition-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: logiedy-spin 0.8s linear infinite;
}

@keyframes logiedy-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hidden utility class */
.logiedy-hidden {
    display: none !important;
}

:root {

    /* Shadows */
    --logiedy-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --logiedy-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --logiedy-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --logiedy-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions - Enhanced */
    --logiedy-transition: all 0.2s ease;
    --logiedy-transition-slow: all 0.3s ease;
    --logiedy-transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --logiedy-transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Focus Ring */
    --logiedy-focus-ring: 0 0 0 3px rgba(124, 58, 237, 0.35);
}

/* ===================================================================
   RESET & BASE STYLES
   =================================================================== */

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

body.logiedy-dashboard,
body.logiedy-login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--logiedy-text-dark);
    font-size: 15px;
    line-height: 1.6;
    /* Smooth transition for dark mode */
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

/* ===================================================================
   DASHBOARD LAYOUT
   =================================================================== */

.logiedy-dashboard {
    background: var(--logiedy-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

.logiedy-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===================================================================
   SIDEBAR
   =================================================================== */

.logiedy-sidebar {
    width: var(--logiedy-sidebar-width);
    min-width: var(--logiedy-sidebar-width);
    max-width: var(--logiedy-sidebar-width);
    background: var(--logiedy-white);
    border-right: 1px solid var(--logiedy-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    transition: var(--logiedy-transition-smooth);
}

.logiedy-sidebar::-webkit-scrollbar {
    width: 6px;
}

.logiedy-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.logiedy-sidebar::-webkit-scrollbar-thumb {
    background: var(--logiedy-border);
    border-radius: 3px;
}

/* School Header Section - Same height as main header, no border */
.logiedy-school-header {
    padding: 0 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: transparent;
    flex-shrink: 0;
    height: var(--logiedy-header-height);
    /* Same as main header */
    /* No border */
}

.logiedy-school-logo {
    width: 55px;
    height: 55px;
    max-width: 55px;
    max-height: 55px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
}

.logiedy-school-logo-placeholder {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, #8B5CF6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logiedy-school-logo-placeholder i {
    font-size: 24px;
    color: #FFFFFF;
}

.logiedy-school-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--logiedy-text-dark);
    margin: 0;
    line-height: 1.3;
    text-align: left;
}

/* User Block Section - Like reference design */
.logiedy-user-block {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 12px 12px;
    background: #F8FAFC;
    border-radius: 12px;
}

.logiedy-user-block-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, #8B5CF6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    overflow: hidden;
}

.logiedy-user-block-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logiedy-user-block-info {
    flex: 1;
    min-width: 0;
}

.logiedy-user-block-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--logiedy-text-dark);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logiedy-user-block-role {
    font-size: 12px;
    color: var(--logiedy-text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark mode user block */
body.logiedy-dark-mode .logiedy-user-block {
    background: #1E293B;
}

body.logiedy-dark-mode .logiedy-user-block-name {
    color: var(--logiedy-text);
}

body.logiedy-dark-mode .logiedy-user-block-role {
    color: var(--logiedy-text-muted);
}

/* Legacy logo styles (keep for compatibility) */
.logiedy-logo {
    height: 64px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logiedy-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.logiedy-logo h1 {
    font-size: 15px;
    font-weight: 600;
    color: var(--logiedy-text-dark);
    margin: 0;
    line-height: 1.3;
}

.logiedy-logo h1.logiedy-brand {
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, var(--logiedy-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar Profile Section - Part of scrollable area, no border */
.logiedy-sidebar-profile {
    padding: 20px 16px;
    text-align: center;
    /* No border - scrolls with menu */
}

.logiedy-sidebar-profile .logiedy-user-avatar {
    width: 80px;
    /* Enlarged */
    height: 80px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: transparent;
    /* No background, just shadow */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--logiedy-text-dark);
    font-weight: 600;
    font-size: 28px;
    /* Larger text for larger circle */
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* Light shadow */
    overflow: hidden;
    border: 1px solid #E5E7EB;
    /* Subtle border */
}

.logiedy-sidebar-profile .logiedy-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.logiedy-sidebar-profile .logiedy-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--logiedy-text-dark);
    margin: 0;
}

.logiedy-sidebar-profile .logiedy-user-role {
    font-size: 13px;
    color: var(--logiedy-text-muted);
    margin: 4px 0 0 0;
}

/* User Info Section */
.logiedy-user-info {
    padding: 24px;
    border-top: 1px solid var(--logiedy-border);
    margin-top: auto;
}

.logiedy-user-details {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logiedy-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, var(--logiedy-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.logiedy-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.logiedy-user-meta {
    flex: 1;
    min-width: 0;
}

.logiedy-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--logiedy-text-dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logiedy-user-role {
    font-size: 13px;
    color: var(--logiedy-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logiedy-user-actions {
    margin-top: 12px;
}

.logiedy-logout-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--logiedy-bg-alt);
    border: 1px solid var(--logiedy-border);
    border-radius: var(--logiedy-border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--logiedy-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--logiedy-transition);
}

.logiedy-logout-btn:hover {
    background: var(--logiedy-bg);
    color: var(--logiedy-error);
    border-color: var(--logiedy-error);
}

/* Navigation - Modern Flat Style (like reference design) */
.logiedy-nav {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
}

/* Hide accordion group styling - not needed anymore */
.logiedy-nav-group {
    margin-bottom: 0;
}

.logiedy-nav-group-title {
    display: none;
    /* Hide group titles in flat design */
}

.logiedy-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.logiedy-nav-item {
    margin-bottom: 4px;
}

/* Main nav link - clean pill style */
.logiedy-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #1E293B;
    /* Dark blue text */
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 10px;
    text-decoration: none;
    background: transparent;
}

/* Hover state - light gray background */
.logiedy-nav-link:hover {
    color: #0F172A;
    background: #F1F5F9;
}

/* Active state - Violet/Purple gradient like original */
.logiedy-nav-item.active .logiedy-nav-link {
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, #8B5CF6 100%);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.logiedy-nav-item.active .logiedy-nav-link:hover {
    background: linear-gradient(135deg, var(--logiedy-primary-dark) 0%, #7C3AED 100%);
    color: #FFFFFF;
}

/* Icons styling - lighter blue/gray */
.logiedy-nav-link i,
.logiedy-nav-link .dashicons {
    font-size: 16px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    /* Light gray/blue icons */
    opacity: 1;
    transition: all 0.2s ease;
}

.logiedy-nav-link:hover i,
.logiedy-nav-link:hover .dashicons {
    color: #64748B;
    /* Darker gray on hover */
}

.logiedy-nav-item.active .logiedy-nav-link i,
.logiedy-nav-item.active .logiedy-nav-link .dashicons {
    color: #FFFFFF !important;
    /* White icons when active */
}

/* Texte blanc pour l'élément actif */
.logiedy-nav-item.active .logiedy-nav-link .logiedy-nav-text,
.logiedy-nav-item.active .logiedy-nav-link span {
    color: #FFFFFF !important;
}

/* Plus icon for expandable items (like reference) */
.logiedy-nav-link .logiedy-expand-icon {
    margin-left: auto;
    font-size: 14px;
    color: #CBD5E1;
    transition: transform 0.2s ease;
}

.logiedy-nav-item.active .logiedy-nav-link .logiedy-expand-icon {
    color: #FFFFFF;
}

.logiedy-nav-text {
    flex: 1;
}

/* ===================================================================
   MAIN CONTENT
   =================================================================== */

.logiedy-main {
    flex: 1;
    margin-left: var(--logiedy-sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.logiedy-header {
    height: var(--logiedy-header-height);
    background: var(--logiedy-white);
    border-bottom: 1px solid var(--logiedy-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Added shadow for depth */
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logiedy-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--logiedy-text);
    font-size: 20px;
}

.logiedy-page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--logiedy-text-dark);
}

.logiedy-search-bar {
    display: none;
    /* Hidden - replaced by page title */
    width: 300px;
    position: relative;
    flex-shrink: 0;
}

.logiedy-header-spacer {
    flex: 1;
}

.logiedy-search-bar input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    /* Increased left padding for icon */
    background: var(--logiedy-bg-alt);
    border: 1px solid transparent;
    border-radius: var(--logiedy-border-radius-sm);
    font-size: 14px;
    color: var(--logiedy-text-dark);
    transition: var(--logiedy-transition);
}

.logiedy-search-bar input:focus {
    outline: none;
    background: var(--logiedy-white);
    border-color: var(--logiedy-primary);
}

.logiedy-search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--logiedy-text-muted);
    font-size: 14px;
    pointer-events: none;
    /* Prevent icon from blocking clicks */
}

.logiedy-header-actions {
    display: flex;
    gap: 12px;
    /* Increased from 8px for better spacing */
    align-items: center;
    margin-left: auto;
}

.logiedy-header-action-btn {
    width: 42px;
    /* Enlarged from 38px */
    height: 42px;
    border-radius: var(--logiedy-border-radius-sm);
    background: var(--logiedy-bg-alt);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--logiedy-text);
    cursor: pointer;
    transition: var(--logiedy-transition);
    position: relative;
}

.logiedy-header-action-btn:hover {
    background: var(--logiedy-bg);
    color: var(--logiedy-primary);
}

.logiedy-header-action-btn i {
    font-size: 16px;
}

.logiedy-header-action-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--logiedy-error);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Content Area - SCROLLABLE */
.logiedy-content {
    flex: 1;
    padding: 24px;
    overflow-y: scroll;
    overflow-x: hidden;
}

/* Remove padding when content has iframe */
.logiedy-content:has(.logiedy-iframe-container) {
    padding: 0;
    overflow: hidden;
}

/* Welcome Card */
.logiedy-welcome-card {
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, var(--logiedy-accent) 100%);
    border-radius: var(--logiedy-border-radius);
    padding: 32px;
    margin-bottom: 24px;
    color: white;
}

.logiedy-welcome-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.logiedy-welcome-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.logiedy-welcome-date {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 12px;
}

/* ===================================================================
   STATS GRID & CARDS
   =================================================================== */

.logiedy-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.logiedy-stat-card {
    background: var(--logiedy-white);
    border-radius: var(--logiedy-border-radius);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--logiedy-shadow);
    transition: var(--logiedy-transition);
    cursor: pointer;
}

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

.logiedy-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

/* Icon Color Variations */
.logiedy-icon-blue {
    background: #EDE9FE;
    color: #7C3AED;
}

.logiedy-icon-green {
    background: #D1FAE5;
    color: #10B981;
}

.logiedy-icon-yellow {
    background: #FEF3C7;
    color: #F59E0B;
}

.logiedy-icon-orange {
    background: #FFEDD5;
    color: #F97316;
}

.logiedy-icon-purple {
    background: #EDE9FE;
    color: #7C3AED;
}

.logiedy-icon-pink {
    background: #FCE7F3;
    color: #EC4899;
}

.logiedy-icon-cyan {
    background: #CFFAFE;
    color: #06B6D4;
}

.logiedy-icon-red {
    background: #FEE2E2;
    color: #EF4444;
}

.logiedy-icon-indigo {
    background: #E0E7FF;
    color: #6366F1;
}

.logiedy-icon-teal {
    background: #CCFBF1;
    color: #14B8A6;
}

.logiedy-stat-content {
    flex: 1;
    min-width: 0;
}

.logiedy-stat-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--logiedy-text);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.logiedy-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--logiedy-text-dark);
    margin-bottom: 8px;
    line-height: 1;
}

.logiedy-stat-label {
    font-size: 14px;
    color: var(--logiedy-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badges */
.logiedy-stat-badge,
.logiedy-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    gap: 4px;
}

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

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

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

.logiedy-badge-info {
    background: var(--logiedy-info-light);
    color: #0E7490;
}

.logiedy-badge-primary {
    background: #EDE9FE;
    color: var(--logiedy-primary);
}

/* ===================================================================
   LOGIN PAGE
   =================================================================== */

/* ===================================================================
   LOGIN PAGE
   =================================================================== */

.logiedy-login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.logiedy-login-wrapper {
    width: 100%;
    max-width: 460px;
}

.logiedy-login-box {
    background: var(--logiedy-white);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.logiedy-login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.logiedy-logo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 12px;
}

.logiedy-login-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.logiedy-login-subtitle {
    font-size: 14px;
    color: #64748B;
    margin: 0;
    font-weight: 400;
}

.logiedy-login-error {
    background: var(--logiedy-error-light);
    color: var(--logiedy-error);
    padding: 12px 16px;
    border-radius: var(--logiedy-border-radius-sm);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    border: 1px solid var(--logiedy-error);
}

.logiedy-login-error i,
.logiedy-login-error .dashicons {
    font-size: 18px;
    flex-shrink: 0;
}

/* Form Styles */
.logiedy-login-form {
    margin-top: 0;
}

.logiedy-form-group {
    margin-bottom: 18px;
}

.logiedy-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 8px;
}

.logiedy-input-wrapper {
    position: relative;
}

/* Icon at the left of input fields (user, key) */
.logiedy-input-wrapper>i.fa-user,
.logiedy-input-wrapper>i.fa-key {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 14px;
    z-index: 2;
    transition: color 0.3s ease;
    pointer-events: none;
}

.logiedy-input-wrapper:focus-within>i.fa-user,
.logiedy-input-wrapper:focus-within>i.fa-key {
    color: var(--logiedy-primary);
}

.logiedy-input-wrapper input,
.logiedy-form-input {
    width: 100%;
    padding: 12px 16px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-size: 14px;
    color: #1E293B;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.logiedy-form-input {
    padding: 12px 16px;
}

/* Add right padding for password field to make room for toggle button */
.logiedy-input-wrapper input[type="password"] {
    padding-right: 44px;
}

.logiedy-input-wrapper input::placeholder,
.logiedy-form-input::placeholder {
    color: #94A3B8;
    opacity: 1;
}

.logiedy-input-wrapper input:focus,
.logiedy-form-input:focus {
    outline: none;
    border-color: var(--logiedy-primary);
    background: var(--logiedy-white);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Password Toggle Button */
.logiedy-toggle-password {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    padding: 6px !important;
    cursor: pointer;
    color: #94A3B8 !important;
    transition: color 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 3 !important;
    width: auto !important;
    height: auto !important;
    left: auto !important;
    bottom: auto !important;
}

.logiedy-toggle-password:hover {
    color: var(--logiedy-primary) !important;
}

.logiedy-toggle-password i {
    font-size: 16px !important;
    color: inherit !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
}

.logiedy-form-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.logiedy-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #64748B;
    font-weight: 400;
}

.logiedy-form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--logiedy-primary);
}

.logiedy-login-btn,
.logiedy-login-button {
    width: 100% !important;
    padding: 13px 24px !important;
    background: var(--logiedy-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25) !important;
    display: block !important;
    margin: 0 auto !important;
}

.logiedy-login-btn:hover,
.logiedy-login-button:hover {
    background: var(--logiedy-primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35) !important;
}

.logiedy-login-btn:active,
.logiedy-login-button:active {
    transform: translateY(0);
}

.logiedy-form-footer {
    margin-top: 20px;
    text-align: center;
}

.logiedy-forgot-password {
    color: #64748B;
    font-size: 13px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.logiedy-forgot-password:hover {
    color: var(--logiedy-primary);
    text-decoration: none;
}

/* ===================================================================
   LOADING STATE
   =================================================================== */

.logiedy-loading {
    display: none;
    text-align: center;
    padding: 60px 20px;
}

.logiedy-loading.active {
    display: block;
}

.logiedy-spinner {
    animation: spin 1s linear infinite;
    font-size: 32px;
    color: var(--logiedy-primary);
    margin-bottom: 12px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===================================================================
   UTILITIES
   =================================================================== */

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

.logiedy-text-primary {
    color: var(--logiedy-primary);
}

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

.logiedy-text-error {
    color: var(--logiedy-error);
}

.logiedy-mb-1 {
    margin-bottom: 8px;
}

.logiedy-mb-2 {
    margin-bottom: 16px;
}

.logiedy-mb-3 {
    margin-bottom: 24px;
}

.logiedy-mt-1 {
    margin-top: 8px;
}

.logiedy-mt-2 {
    margin-top: 16px;
}

.logiedy-mt-3 {
    margin-top: 24px;
}

/* ===================================================================
   RESPONSIVE DESIGN - COMPREHENSIVE MEDIA QUERIES
   =================================================================== */

/* --- CSS Variables for Responsive --- */
:root {
    --logiedy-sidebar-width-collapsed: 70px;
    --logiedy-touch-target-min: 44px;
}

/* ===================================================================
   DESKTOP (> 1024px) - Default styles already applied
   =================================================================== */

@media (min-width: 1025px) {
    .logiedy-sidebar {
        width: var(--logiedy-sidebar-width);
    }

    .logiedy-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .logiedy-main {
        margin-left: var(--logiedy-sidebar-width);
    }
}

/* ===================================================================
   TABLET (768px - 1024px) - Sidebar collapsed with icons only
   =================================================================== */

@media (min-width: 768px) and (max-width: 1024px) {

    /* Collapsed Sidebar */
    .logiedy-sidebar {
        width: var(--logiedy-sidebar-width-collapsed);
    }

    .logiedy-main {
        margin-left: var(--logiedy-sidebar-width-collapsed);
    }

    /* Hide text, show only icons */
    .logiedy-nav-text {
        display: none;
    }

    .logiedy-nav-group-title {
        display: none;
    }

    .logiedy-logo h1 {
        display: none;
    }

    .logiedy-logo {
        padding: 16px;
        justify-content: center;
    }

    .logiedy-logo-img {
        width: 36px;
        height: 36px;
    }

    /* Center nav icons */
    .logiedy-nav-link {
        padding: 14px 0;
        justify-content: center;
        gap: 0;
    }

    .logiedy-nav-link i,
    .logiedy-nav-link .dashicons {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }

    .logiedy-nav-link::before {
        display: none;
    }

    /* User info at bottom - compact */
    .logiedy-user-info {
        padding: 12px 8px;
    }

    .logiedy-user-details {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .logiedy-user-meta {
        display: none;
    }

    .logiedy-user-avatar {
        width: 42px;
        height: 42px;
        font-size: 14px;
    }

    .logiedy-logout-btn {
        padding: 10px;
        justify-content: center;
    }

    .logiedy-logout-btn span {
        display: none;
    }

    /* Tooltip for nav items on hover */
    .logiedy-nav-item {
        position: relative;
    }

    .logiedy-nav-link::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%);
        background: var(--logiedy-text-dark);
        color: white;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 13px;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        z-index: 1001;
        pointer-events: none;
    }

    .logiedy-nav-link:hover::after {
        opacity: 1;
        visibility: visible;
    }

    /* Stats Grid - 2 columns */
    .logiedy-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Search bar compact */
    .logiedy-search-wrapper {
        width: 220px;
    }

    .logiedy-search-bar {
        max-width: 220px;
    }

    /* Header adjustments */
    .logiedy-page-title {
        font-size: 18px;
    }

    /* Content padding adjustment */
    .logiedy-content {
        padding: 20px;
    }

    /* Notifications dropdown position */
    .logiedy-notifications-dropdown {
        width: 340px;
        right: -30px;
    }

    .logiedy-notifications-dropdown::before {
        right: 46px;
    }
}

/* ===================================================================
   MOBILE (< 768px) - Sidebar hidden, full mobile experience
   =================================================================== */

@media (max-width: 767px) {

    /* Sidebar - Off-canvas with slide animation */
    .logiedy-sidebar {
        transform: translateX(-100%);
        width: var(--logiedy-sidebar-width);
        box-shadow: none;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            box-shadow 0.3s ease;
    }

    .logiedy-sidebar.active,
    body.logiedy-sidebar-open .logiedy-sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }

    /* Main content - full width */
    .logiedy-main {
        margin-left: 0;
        width: 100%;
    }

    /* Show menu toggle button */
    .logiedy-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: var(--logiedy-touch-target-min);
        height: var(--logiedy-touch-target-min);
        min-width: var(--logiedy-touch-target-min);
        min-height: var(--logiedy-touch-target-min);
    }

    /* Header - Compact */
    .logiedy-header {
        padding: 0 12px;
        height: 56px;
        gap: 12px;
    }

    .logiedy-page-title {
        font-size: 16px;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Hide search bar on mobile */
    .logiedy-search-wrapper,
    .logiedy-search-bar {
        display: none;
    }

    /* Header actions - Touch-friendly */
    .logiedy-header-actions {
        gap: 4px;
        margin-left: auto;
    }

    .logiedy-header-action-btn {
        width: var(--logiedy-touch-target-min);
        height: var(--logiedy-touch-target-min);
        min-width: var(--logiedy-touch-target-min);
        min-height: var(--logiedy-touch-target-min);
    }

    /* Stats Grid - 1 column */
    .logiedy-stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Content area - reduced padding */
    .logiedy-content {
        padding: 16px;
    }

    /* Welcome card adjustments */
    .logiedy-welcome-card {
        padding: 24px 20px;
        margin-bottom: 20px;
    }

    .logiedy-welcome-title {
        font-size: 22px;
    }

    .logiedy-welcome-subtitle {
        font-size: 14px;
    }

    /* Stat cards - touch-friendly */
    .logiedy-stat-card {
        padding: 20px;
        min-height: var(--logiedy-touch-target-min);
    }

    .logiedy-stat-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .logiedy-stat-value {
        font-size: 26px;
    }

    /* Dropdowns - Full width or adjusted */
    .logiedy-dropdown {
        min-width: 260px;
    }

    .logiedy-notifications-dropdown {
        width: calc(100vw - 24px);
        max-width: 340px;
        right: -50px;
    }

    .logiedy-notifications-dropdown::before {
        right: 66px;
    }

    .logiedy-profile-dropdown {
        right: 0;
        width: 220px;
    }

    /* Iframe container - full viewport */
    .logiedy-iframe-container {
        height: calc(100vh - 56px - 32px);
        border-radius: var(--logiedy-border-radius-sm);
    }

    /* Nav group titles visible again for mobile */
    .logiedy-nav-group-title.logiedy-collapsible {
        display: flex;
        padding: 10px 16px;
    }

    .logiedy-nav-text {
        display: inline;
    }

    .logiedy-nav-link {
        padding: 14px 20px;
        gap: 12px;
        justify-content: flex-start;
    }
}

/* ===================================================================
   SMALL MOBILE (< 480px) - Extra compact adjustments
   =================================================================== */

@media (max-width: 480px) {

    /* Compact header */
    .logiedy-header {
        padding: 0 10px;
        gap: 8px;
    }

    .logiedy-page-title {
        font-size: 15px;
    }

    /* Compact content */
    .logiedy-content {
        padding: 12px;
    }

    /* Stat cards even more compact */
    .logiedy-stat-card {
        padding: 16px;
        gap: 12px;
    }

    .logiedy-stat-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .logiedy-stat-value {
        font-size: 22px;
    }

    .logiedy-stat-title {
        font-size: 11px;
    }

    .logiedy-stat-label {
        font-size: 12px;
    }

    /* Full-width notifications dropdown */
    .logiedy-notifications-dropdown {
        width: calc(100vw - 20px);
        right: -80px;
        left: auto;
    }

    .logiedy-notifications-dropdown::before {
        right: 96px;
    }

    /* Welcome card compact */
    .logiedy-welcome-card {
        padding: 20px 16px;
    }

    .logiedy-welcome-title {
        font-size: 20px;
    }

    .logiedy-welcome-subtitle {
        font-size: 13px;
    }

    /* Header action buttons slightly smaller */
    .logiedy-header-action-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .logiedy-header-action-btn i {
        font-size: 14px;
    }

    /* Badge position adjustment */
    .logiedy-header-action-btn .badge {
        top: -2px;
        right: -2px;
        font-size: 9px;
        padding: 2px 4px;
        min-width: 16px;
    }
}

/* ===================================================================
   LOGIN PAGE - MOBILE OPTIMIZED
   =================================================================== */

/* Touch-friendly form elements for all screen sizes */
.logiedy-login-page .logiedy-form-input,
.logiedy-login-page .logiedy-input-wrapper input {
    min-height: var(--logiedy-touch-target-min);
    font-size: 16px;
    /* Prevents zoom on iOS */
}

.logiedy-login-page .logiedy-login-btn {
    min-height: var(--logiedy-touch-target-min);
    font-size: 16px;
}

.logiedy-login-page .logiedy-form-checkbox label {
    min-height: var(--logiedy-touch-target-min);
    display: flex;
    align-items: center;
}

.logiedy-login-page .logiedy-form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
}

@media (max-width: 767px) {

    /* Login page - centered vertically */
    .logiedy-login-page {
        min-height: 100vh;
        min-height: 100dvh;
        /* Dynamic viewport height for mobile browsers */
        padding: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logiedy-login-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .logiedy-login-box {
        padding: 28px 20px;
        border-radius: var(--logiedy-border-radius);
    }

    .logiedy-login-logo h1 {
        font-size: 26px;
    }

    .logiedy-login-subtitle {
        font-size: 14px;
    }

    .logiedy-login-form {
        margin-top: 24px;
    }

    .logiedy-form-group {
        margin-bottom: 18px;
    }

    .logiedy-form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .logiedy-form-input,
    .logiedy-input-wrapper input {
        padding: 14px 16px 14px 44px;
        font-size: 16px;
        min-height: 48px;
    }

    .logiedy-input-wrapper i {
        left: 14px;
    }

    .logiedy-login-btn {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 50px;
    }

    .logiedy-forgot-password {
        font-size: 14px;
        display: inline-block;
        padding: 8px 0;
    }
}

@media (max-width: 380px) {
    .logiedy-login-box {
        padding: 24px 16px;
    }

    .logiedy-login-logo h1 {
        font-size: 24px;
    }
}

/* ===================================================================
   OVERLAY
   =================================================================== */

.logiedy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.logiedy-overlay.logiedy-overlay-visible,
body.logiedy-sidebar-open .logiedy-overlay {
    opacity: 1;
    visibility: visible;
}

/* ===================================================================
   BODY STATES
   =================================================================== */

body.logiedy-sidebar-open {
    overflow: hidden;
}

body.logiedy-sidebar-open .logiedy-sidebar {
    transform: translateX(0);
}

/* ===================================================================
   LOADER
   =================================================================== */

.logiedy-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 250, 252, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    z-index: 50;
}

.logiedy-loader.active {
    display: flex;
}

.logiedy-content.logiedy-loading {
    position: relative;
    min-height: 200px;
}

.logiedy-loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--logiedy-border);
    border-top-color: var(--logiedy-primary);
    border-radius: 50%;
    animation: logiedy-spin 0.8s linear infinite;
}

@keyframes logiedy-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.logiedy-loader span {
    font-size: 14px;
    color: var(--logiedy-text);
    font-weight: 500;
}

/* ===================================================================
   IFRAME CONTAINER
   =================================================================== */

.logiedy-iframe-container {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--logiedy-header-height));
    background: var(--logiedy-white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.logiedy-iframe-container iframe,
#logiedy-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.logiedy-iframe-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--logiedy-bg);
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 24px;
    overflow: hidden;
}

.logiedy-iframe-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Skeleton Animation */
@keyframes logiedy-shimmer {
    0% {
        background-position: -200% 0;
    }

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

.logiedy-skeleton {
    background: linear-gradient(90deg,
            #e2e8f0 25%,
            #f1f5f9 50%,
            #e2e8f0 75%);
    background-size: 200% 100%;
    animation: logiedy-shimmer 1.5s infinite ease-in-out;
    border-radius: var(--logiedy-border-radius-sm);
}

/* Skeleton Header */
.logiedy-skeleton-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--logiedy-border);
}

.logiedy-skeleton-title {
    height: 28px;
    width: 200px;
}

.logiedy-skeleton-breadcrumb {
    height: 16px;
    width: 150px;
}

/* Skeleton Table */
.logiedy-skeleton-table {
    background: var(--logiedy-white);
    border-radius: var(--logiedy-border-radius);
    padding: 20px;
    box-shadow: var(--logiedy-shadow);
}

.logiedy-skeleton-table-header {
    display: flex;
    gap: 20px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--logiedy-border);
}

.logiedy-skeleton-th {
    height: 16px;
    flex: 1;
}

.logiedy-skeleton-row {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.logiedy-skeleton-td {
    height: 14px;
    flex: 1;
}

/* Skeleton Stats Cards */
.logiedy-skeleton-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.logiedy-skeleton-card {
    background: var(--logiedy-white);
    border-radius: var(--logiedy-border-radius);
    padding: 20px;
    display: flex;
    gap: 16px;
    box-shadow: var(--logiedy-shadow);
}

.logiedy-skeleton-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
}

.logiedy-skeleton-card-content {
    flex: 1;
}

.logiedy-skeleton-card-title {
    height: 14px;
    width: 80%;
    margin-bottom: 8px;
}

.logiedy-skeleton-card-value {
    height: 24px;
    width: 60%;
}

/* Dark Mode Skeleton */
body.logiedy-dark-mode .logiedy-iframe-loader {
    background: #0f172a;
}

body.logiedy-dark-mode .logiedy-skeleton {
    background: linear-gradient(90deg,
            #1e293b 25%,
            #334155 50%,
            #1e293b 75%);
    background-size: 200% 100%;
}

body.logiedy-dark-mode .logiedy-skeleton-table,
body.logiedy-dark-mode .logiedy-skeleton-card {
    background: #1e293b;
}

/* Responsive Skeleton */
@media (max-width: 992px) {
    .logiedy-skeleton-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .logiedy-skeleton-cards {
        grid-template-columns: 1fr;
    }
}

/* Iframe error message */
.logiedy-iframe-error {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: var(--logiedy-border-radius);
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--logiedy-shadow-lg);
    z-index: 20;
    animation: logiedy-slide-up 0.3s ease;
    max-width: 500px;
    text-align: left;
}

@keyframes logiedy-slide-up {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.logiedy-iframe-error i {
    font-size: 32px;
    color: #EF4444;
    align-self: center;
    margin-bottom: 8px;
}

.logiedy-iframe-error h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #991B1B;
    font-weight: 600;
    text-align: center;
}

.logiedy-iframe-error p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #991B1B;
    font-weight: 400;
    text-align: center;
}

.logiedy-iframe-error ul {
    margin: 0 0 12px 0;
    padding-left: 24px;
    font-size: 13px;
    color: #991B1B;
}

.logiedy-iframe-error ul li {
    margin-bottom: 4px;
}

.logiedy-retry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--logiedy-primary);
    color: white;
    border: none;
    border-radius: var(--logiedy-border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: center;
}

.logiedy-retry-btn:hover {
    background: var(--logiedy-primary-dark);
    transform: translateY(-1px);
}

.logiedy-retry-btn i {
    font-size: 12px;
    color: white;
}

/* Dark mode iframe error */
body.logiedy-dark-mode .logiedy-iframe-error {
    background: #450A0A;
    border-color: #991B1B;
}

body.logiedy-dark-mode .logiedy-iframe-error h3 {
    color: #FCA5A5;
}

body.logiedy-dark-mode .logiedy-iframe-error p {
    color: #FCA5A5;
}

body.logiedy-dark-mode .logiedy-iframe-error ul {
    color: #FCA5A5;
}

body.logiedy-dark-mode .logiedy-iframe-error i {
    color: #F87171;
}

/* Responsive iframe error */
@media (max-width: 576px) {
    .logiedy-iframe-error {
        width: calc(100% - 32px);
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
}

/* ===================================================================
   MENU GROUPS COLLAPSIBLE (STAFF) - REFERENCE DESIGN STYLE
   Style: Clean accordion with icon, title, and +/- toggle
   =================================================================== */

.logiedy-nav-group {
    margin-bottom: 4px;
    border-radius: 0;
    overflow: visible;
}

/* Category title - Main accordion header */
.logiedy-nav-group-title.logiedy-collapsible {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin: 0;
    background: transparent;
    border-radius: 12px;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #4B5563;
    border: none;
    width: 100%;
    text-align: left;
}

/* Group title content with icon */
.logiedy-group-title-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logiedy-group-title-content i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--logiedy-primary);
    opacity: 0.8;
}

.logiedy-nav-group-title.logiedy-collapsible:hover {
    color: #1F2937;
    background: rgba(124, 58, 237, 0.06);
}

.logiedy-nav-group-title.logiedy-collapsible:hover .logiedy-group-title-content i {
    opacity: 1;
}

/* Active group (contains active menu item) - gradient background */
.logiedy-nav-group.logiedy-group-active .logiedy-nav-group-title.logiedy-collapsible {
    color: #FFFFFF;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, var(--logiedy-primary) 100%);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.logiedy-nav-group.logiedy-group-active .logiedy-group-title-content i {
    color: #FFFFFF;
    opacity: 1;
}

/* Open group (not active) - subtle background */
.logiedy-nav-group.logiedy-group-open:not(.logiedy-group-active) .logiedy-nav-group-title.logiedy-collapsible {
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--logiedy-primary);
}

.logiedy-nav-group.logiedy-group-open:not(.logiedy-group-active) .logiedy-group-title-content i {
    color: var(--logiedy-primary);
    opacity: 1;
}

/* Open AND Active group */
.logiedy-nav-group.logiedy-group-open.logiedy-group-active .logiedy-nav-group-title.logiedy-collapsible {
    color: #FFFFFF;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, var(--logiedy-primary) 100%);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Plus/Minus icon - clean design */
.logiedy-nav-group-title.logiedy-collapsible::after {
    content: '+';
    font-family: inherit;
    font-weight: 300;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
    color: #9CA3AF;
    flex-shrink: 0;
}

.logiedy-nav-group-title.logiedy-collapsible:hover::after {
    color: var(--logiedy-primary);
}

.logiedy-nav-group.logiedy-group-active .logiedy-nav-group-title.logiedy-collapsible::after {
    color: rgba(255, 255, 255, 0.8);
}

.logiedy-nav-group.logiedy-group-open .logiedy-nav-group-title.logiedy-collapsible::after {
    content: '−';
}

.logiedy-nav-group.logiedy-group-open:not(.logiedy-group-active) .logiedy-nav-group-title.logiedy-collapsible::after {
    color: var(--logiedy-primary);
}

/* Submenu list - clean animation */
.logiedy-nav-group .logiedy-nav-list {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.25s ease,
        padding 0.25s ease;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    list-style: none;
}

.logiedy-nav-group.logiedy-group-open .logiedy-nav-list {
    max-height: 1000px;
    opacity: 1;
    padding: 4px 0 4px 0;
}

/* Hide submenu without animation for non-JS fallback */
.logiedy-nav-group:not(.logiedy-group-open):not(.logiedy-accordion-initialized) .logiedy-nav-list {
    display: none;
}

/* Submenu items spacing */
.logiedy-nav-group .logiedy-nav-item {
    margin: 0;
}

/* Submenu links - indented list style like reference */
.logiedy-nav-group .logiedy-nav-link {
    padding: 8px 16px 8px 52px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 400;
    letter-spacing: 0;
    color: #374151;
    position: relative;
    transition: all 0.15s ease;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: none;
}

/* Hover - subtle background */
.logiedy-nav-group .logiedy-nav-link:hover {
    background: rgba(124, 58, 237, 0.06);
    color: #1F2937;
}

/* Active submenu item - same style as hover */
.logiedy-nav-group .logiedy-nav-item.active .logiedy-nav-link,
.logiedy-nav-group.logiedy-group-active .logiedy-nav-item.active .logiedy-nav-link,
.logiedy-nav-group .logiedy-nav-list .logiedy-nav-item.active .logiedy-nav-link {
    background: rgba(124, 58, 237, 0.12) !important;
    color: #000000 !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

.logiedy-nav-group .logiedy-nav-item.active .logiedy-nav-link::before,
.logiedy-nav-group .logiedy-nav-item.active .logiedy-nav-link::after {
    display: none;
    box-shadow: none !important;
}

/* Force black text for submenu active items - override global white text rule */
.logiedy-nav-group .logiedy-nav-item.active .logiedy-nav-link .logiedy-nav-text,
.logiedy-nav-group .logiedy-nav-item.active .logiedy-nav-link span,
.logiedy-nav-group.logiedy-group-active .logiedy-nav-item.active .logiedy-nav-link .logiedy-nav-text,
.logiedy-nav-group.logiedy-group-active .logiedy-nav-item.active .logiedy-nav-link span,
.logiedy-nav-group .logiedy-nav-list .logiedy-nav-item.active .logiedy-nav-link .logiedy-nav-text,
.logiedy-nav-group .logiedy-nav-list .logiedy-nav-item.active .logiedy-nav-link span {
    color: #000000 !important;
}

/* Icons in submenu - hidden for cleaner look */
.logiedy-nav-group .logiedy-nav-link i {
    display: none;
}

/* ===================================================================
   DARK MODE
   =================================================================== */

/* Dark mode CSS variables */
body.logiedy-dark-mode {
    --logiedy-bg: #0F172A;
    --logiedy-bg-alt: #1E293B;
    --logiedy-surface: #1E293B;
    --logiedy-border: #334155;
    --logiedy-text: #F8FAFC;
    --logiedy-text-dark: #F8FAFC;
    --logiedy-text-secondary: #94A3B8;
    --logiedy-text-muted: #64748B;
    --logiedy-white: #1E293B;
    --logiedy-sidebar-bg: #1E293B;
    --logiedy-header-bg: #1E293B;
}

/* Smooth transitions for all elements in dark mode */
body.logiedy-dark-mode .logiedy-sidebar,
body.logiedy-dark-mode .logiedy-header,
body.logiedy-dark-mode .logiedy-stat-card,
body.logiedy-dark-mode .logiedy-welcome-card,
body.logiedy-dark-mode .logiedy-content,
body.logiedy-dark-mode .logiedy-nav-link,
body.logiedy-dark-mode .logiedy-header-action-btn,
body.logiedy-dark-mode .logiedy-search-bar input,
body.logiedy-dark-mode .logiedy-login-box {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body.logiedy-dark-mode .logiedy-sidebar {
    background: var(--logiedy-sidebar-bg);
    border-color: var(--logiedy-border);
}

body.logiedy-dark-mode .logiedy-header {
    background: var(--logiedy-header-bg);
    border-color: var(--logiedy-border);
}

body.logiedy-dark-mode .logiedy-stat-card {
    background: var(--logiedy-surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.logiedy-dark-mode .logiedy-search-bar input {
    background: var(--logiedy-bg);
    color: var(--logiedy-text);
    border-color: var(--logiedy-border);
}

body.logiedy-dark-mode .logiedy-search-bar input::placeholder {
    color: var(--logiedy-text-muted);
}

body.logiedy-dark-mode .logiedy-header-action-btn {
    background: var(--logiedy-bg);
    color: var(--logiedy-text-secondary);
}

body.logiedy-dark-mode .logiedy-header-action-btn:hover {
    background: var(--logiedy-border);
    color: var(--logiedy-primary-light);
}

body.logiedy-dark-mode .logiedy-loader {
    background: rgba(15, 23, 42, 0.95);
}

body.logiedy-dark-mode .logiedy-nav-link {
    color: var(--logiedy-text-secondary);
}

body.logiedy-dark-mode .logiedy-nav-link:hover,
body.logiedy-dark-mode .logiedy-nav-item.active .logiedy-nav-link {
    color: var(--logiedy-primary-light);
    background: rgba(124, 58, 237, 0.15);
}

body.logiedy-dark-mode .logiedy-user-name {
    color: var(--logiedy-text);
}

body.logiedy-dark-mode .logiedy-user-role {
    color: var(--logiedy-text-muted);
}

body.logiedy-dark-mode .logiedy-logout-btn {
    background: var(--logiedy-bg);
    border-color: var(--logiedy-border);
    color: var(--logiedy-text-secondary);
}

body.logiedy-dark-mode .logiedy-logout-btn:hover {
    background: var(--logiedy-surface);
    border-color: var(--logiedy-error);
    color: var(--logiedy-error);
}

body.logiedy-dark-mode .logiedy-logo h1,
body.logiedy-dark-mode .logiedy-school-name {
    color: var(--logiedy-text);
}

body.logiedy-dark-mode .logiedy-nav-group-title {
    color: #9CA3AF;
}

/* Dark mode accordion styles - ERP Style */
body.logiedy-dark-mode .logiedy-nav-group-title.logiedy-collapsible {
    background: transparent;
    color: #E5E7EB;
}

body.logiedy-dark-mode .logiedy-nav-group-title.logiedy-collapsible:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

body.logiedy-dark-mode .logiedy-nav-group.logiedy-group-active .logiedy-nav-group-title.logiedy-collapsible {
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, #8B5CF6 100%);
    color: #FFFFFF;
}

body.logiedy-dark-mode .logiedy-nav-group.logiedy-group-open .logiedy-nav-group-title.logiedy-collapsible {
    background: transparent;
    color: #E5E7EB;
}

body.logiedy-dark-mode .logiedy-nav-group.logiedy-group-open.logiedy-group-active .logiedy-nav-group-title.logiedy-collapsible {
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, #8B5CF6 100%);
    color: #FFFFFF;
}

body.logiedy-dark-mode .logiedy-nav-group-title.logiedy-collapsible::after {
    color: #6B7280;
}

body.logiedy-dark-mode .logiedy-nav-group .logiedy-nav-list {
    background: transparent;
}

body.logiedy-dark-mode .logiedy-nav-group .logiedy-nav-link {
    color: #D1D5DB;
}

body.logiedy-dark-mode .logiedy-nav-group .logiedy-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #F3F4F6;
}

body.logiedy-dark-mode .logiedy-nav-group .logiedy-nav-item.active .logiedy-nav-link,
body.logiedy-dark-mode .logiedy-nav-group.logiedy-group-active .logiedy-nav-item.active .logiedy-nav-link,
body.logiedy-dark-mode .logiedy-nav-group .logiedy-nav-list .logiedy-nav-item.active .logiedy-nav-link {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

body.logiedy-dark-mode .logiedy-nav-group .logiedy-nav-item.active .logiedy-nav-link .logiedy-nav-text,
body.logiedy-dark-mode .logiedy-nav-group .logiedy-nav-item.active .logiedy-nav-link span,
body.logiedy-dark-mode .logiedy-nav-group.logiedy-group-active .logiedy-nav-item.active .logiedy-nav-link .logiedy-nav-text,
body.logiedy-dark-mode .logiedy-nav-group.logiedy-group-active .logiedy-nav-item.active .logiedy-nav-link span,
body.logiedy-dark-mode .logiedy-nav-group .logiedy-nav-list .logiedy-nav-item.active .logiedy-nav-link .logiedy-nav-text,
body.logiedy-dark-mode .logiedy-nav-group .logiedy-nav-list .logiedy-nav-item.active .logiedy-nav-link span {
    color: #FFFFFF !important;
}

/* Dark mode base navigation */
body.logiedy-dark-mode .logiedy-nav-link {
    color: #E5E7EB;
}

body.logiedy-dark-mode .logiedy-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

body.logiedy-dark-mode .logiedy-nav-item.active .logiedy-nav-link {
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, #8B5CF6 100%);
    color: #FFFFFF;
}

body.logiedy-dark-mode .logiedy-nav-link i,
body.logiedy-dark-mode .logiedy-nav-link .dashicons {
    color: var(--logiedy-primary-light);
}

body.logiedy-dark-mode .logiedy-nav-item.active .logiedy-nav-link i,
body.logiedy-dark-mode .logiedy-nav-item.active .logiedy-nav-link .dashicons {
    color: #FFFFFF;
}

body.logiedy-dark-mode .logiedy-page-title {
    color: var(--logiedy-text);
}

body.logiedy-dark-mode .logiedy-stat-title {
    color: var(--logiedy-text-secondary);
}

body.logiedy-dark-mode .logiedy-stat-value {
    color: var(--logiedy-text);
}

body.logiedy-dark-mode .logiedy-stat-label {
    color: var(--logiedy-text-muted);
}

/* Login page dark mode */
body.logiedy-dark-mode.logiedy-login-page {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

body.logiedy-dark-mode .logiedy-login-box {
    background: var(--logiedy-surface);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body.logiedy-dark-mode .logiedy-login-subtitle {
    color: var(--logiedy-text-secondary);
}

body.logiedy-dark-mode .logiedy-form-label {
    color: var(--logiedy-text);
}

body.logiedy-dark-mode .logiedy-input-wrapper input,
body.logiedy-dark-mode .logiedy-form-input {
    background: var(--logiedy-bg);
    color: var(--logiedy-text);
    border-color: var(--logiedy-border);
}

body.logiedy-dark-mode .logiedy-input-wrapper input:focus,
body.logiedy-dark-mode .logiedy-form-input:focus {
    background: var(--logiedy-surface);
    border-color: var(--logiedy-primary);
}

body.logiedy-dark-mode .logiedy-form-checkbox label {
    color: var(--logiedy-text-secondary);
}

/* ===================================================================
   DARK MODE - SCROLLBARS (Browser & Menu)
   =================================================================== */

/* Firefox scrollbar */
html.logiedy-dark-mode,
body.logiedy-dark-mode,
body.logiedy-dark-mode * {
    scrollbar-color: #5a5a6a #1e1e2e !important;
    scrollbar-width: auto !important;
}

/* WebKit scrollbar - main page */
html.logiedy-dark-mode::-webkit-scrollbar,
body.logiedy-dark-mode::-webkit-scrollbar {
    width: 12px !important;
    height: 12px !important;
    background: #1e1e2e !important;
}

html.logiedy-dark-mode::-webkit-scrollbar-track,
body.logiedy-dark-mode::-webkit-scrollbar-track {
    background: #1e1e2e !important;
}

html.logiedy-dark-mode::-webkit-scrollbar-thumb,
body.logiedy-dark-mode::-webkit-scrollbar-thumb {
    background: #5a5a6a !important;
    border-radius: 6px !important;
    border: 3px solid #1e1e2e !important;
}

html.logiedy-dark-mode::-webkit-scrollbar-thumb:hover,
body.logiedy-dark-mode::-webkit-scrollbar-thumb:hover {
    background: #7c3aed !important;
}

html.logiedy-dark-mode::-webkit-scrollbar-corner,
body.logiedy-dark-mode::-webkit-scrollbar-corner {
    background: #1e1e2e !important;
}

/* WebKit scrollbar - all elements including sidebar menu */
body.logiedy-dark-mode ::-webkit-scrollbar {
    width: 10px !important;
    height: 10px !important;
    background: #1e1e2e !important;
}

body.logiedy-dark-mode ::-webkit-scrollbar-track {
    background: #1e1e2e !important;
}

body.logiedy-dark-mode ::-webkit-scrollbar-thumb {
    background: #5a5a6a !important;
    border-radius: 5px !important;
    border: 2px solid #1e1e2e !important;
}

body.logiedy-dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #7c3aed !important;
}

body.logiedy-dark-mode ::-webkit-scrollbar-corner {
    background: #1e1e2e !important;
}

/* Sidebar specific scrollbar */
body.logiedy-dark-mode .logiedy-sidebar::-webkit-scrollbar {
    width: 8px !important;
}

body.logiedy-dark-mode .logiedy-sidebar::-webkit-scrollbar-track {
    background: #1a1a2e !important;
}

body.logiedy-dark-mode .logiedy-sidebar::-webkit-scrollbar-thumb {
    background: #4a4a5a !important;
    border-radius: 4px !important;
}

body.logiedy-dark-mode .logiedy-sidebar::-webkit-scrollbar-thumb:hover {
    background: #7c3aed !important;
}

/* ===================================================================
   TOOLTIPS
   =================================================================== */

.logiedy-tooltip {
    position: relative;
}

.logiedy-tooltip::before,
.logiedy-tooltip::after {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.logiedy-tooltip::before {
    content: attr(data-tooltip);
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 6px 12px;
    background: #1E293B;
    color: #F8FAFC;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logiedy-tooltip::after {
    content: '';
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 5px solid transparent;
    border-top-color: #1E293B;
}

.logiedy-tooltip:hover::before,
.logiedy-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Dark mode tooltips */
body.logiedy-dark-mode .logiedy-tooltip::before {
    background: #F8FAFC;
    color: #1E293B;
}

body.logiedy-dark-mode .logiedy-tooltip::after {
    border-top-color: #F8FAFC;
}

/* Disable tooltips on header action buttons */
.logiedy-header-action-btn.logiedy-tooltip::before,
.logiedy-header-action-btn.logiedy-tooltip::after {
    display: none !important;
}

/* ===================================================================
   FULLSCREEN STATE
   =================================================================== */

/* Fullscreen mode - keep sidebar visible, just expand content */
body.logiedy-fullscreen .logiedy-sidebar {
    /* Keep sidebar visible in fullscreen */
    display: flex;
}

body.logiedy-fullscreen .logiedy-main {
    /* Content takes available space */
    margin-left: 260px;
}

@media (max-width: 768px) {
    body.logiedy-fullscreen .logiedy-sidebar {
        display: flex;
    }

    body.logiedy-fullscreen .logiedy-main {
        margin-left: 0;
    }
}

/* ===================================================================
   ACCESSIBILITY - ENHANCED FOCUS STATES & WCAG COMPLIANCE
   =================================================================== */

/* Focus states for interactive elements */
.logiedy-nav-link:focus,
.logiedy-header-action-btn:focus,
.logiedy-menu-toggle:focus,
.logiedy-logout-btn:focus,
.logiedy-login-btn:focus,
.logiedy-form-input:focus,
.logiedy-stat-card:focus,
.logiedy-dropdown-link:focus,
.logiedy-mark-read:focus,
.logiedy-forgot-password:focus {
    outline: none;
    box-shadow: var(--logiedy-focus-ring);
}

/* Focus visible for keyboard navigation only */
.logiedy-nav-link:focus:not(:focus-visible),
.logiedy-header-action-btn:focus:not(:focus-visible),
.logiedy-menu-toggle:focus:not(:focus-visible),
.logiedy-logout-btn:focus:not(:focus-visible),
.logiedy-stat-card:focus:not(:focus-visible) {
    box-shadow: none;
}

.logiedy-nav-link:focus-visible,
.logiedy-header-action-btn:focus-visible,
.logiedy-menu-toggle:focus-visible,
.logiedy-logout-btn:focus-visible,
.logiedy-stat-card:focus-visible {
    box-shadow: var(--logiedy-focus-ring);
}

/* Input focus states (already styled, ensuring consistency) */
.logiedy-form-input:focus,
.logiedy-input-wrapper input:focus,
.logiedy-search-bar input:focus {
    outline: none;
    border-color: var(--logiedy-primary);
    box-shadow: var(--logiedy-focus-ring);
}

/* Skip to content link (hidden until focused) */
.logiedy-skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 12px 24px;
    background: var(--logiedy-primary);
    color: white;
    z-index: 9999;
    font-weight: 600;
    transition: top 0.2s;
    border-radius: 0 0 var(--logiedy-border-radius-sm) 0;
}

.logiedy-skip-link:focus {
    top: 0;
    outline: none;
    box-shadow: var(--logiedy-focus-ring);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .logiedy-sidebar {
        transition: none;
    }

    .logiedy-dropdown,
    .logiedy-search-results,
    .logiedy-overlay {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --logiedy-border: #000000;
    }

    .logiedy-nav-link:focus,
    .logiedy-header-action-btn:focus,
    .logiedy-menu-toggle:focus {
        outline: 3px solid currentColor;
        outline-offset: 2px;
        box-shadow: none;
    }

    .logiedy-stat-card {
        border: 2px solid var(--logiedy-text-dark);
    }
}

/* Ensure touch targets are accessible */
.logiedy-nav-link,
.logiedy-header-action-btn,
.logiedy-menu-toggle,
.logiedy-logout-btn,
.logiedy-dropdown-link,
.logiedy-notification-item {
    min-height: 44px;
}

/* Screen reader only class for visually hidden but accessible content */
.logiedy-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================================================================
   REBRANDING - MASQUAGE DES ÉLÉMENTS DE MARQUE EXTERNES
   Ces styles masquent/remplacent les éléments de marque du plugin
   original dans les iframes same-origin.
   =================================================================== */

/* Masquer les logos et marques du plugin original */
.logiedy-dashboard iframe .wlsm-branding,
.logiedy-dashboard iframe .wlsm-logo,
.logiedy-dashboard iframe .school-management-branding,
.logiedy-dashboard iframe .sms-branding,
.logiedy-dashboard iframe [class*="school-management-logo"],
.logiedy-dashboard iframe [class*="wlsm-footer-branding"],
.logiedy-dashboard iframe .wlsm-powered-by {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Masquer les liens vers le plugin original */
.logiedy-dashboard iframe a[href*="weblizar.com"],
.logiedy-dashboard iframe a[href*="school-management"],
.logiedy-dashboard iframe a[href*="codecanyon"] {
    display: none !important;
    visibility: hidden !important;
}

/* Masquer les textes de copyright du plugin original */
.logiedy-dashboard iframe .wlsm-copyright,
.logiedy-dashboard iframe .sms-copyright,
.logiedy-dashboard iframe [class*="powered-by-weblizar"] {
    display: none !important;
}

/* Style pour les éléments rebrandés via JavaScript */
.logiedy-rebranded {
    font-family: inherit;
}

/* Assurer que le contenu Logiedy prend tout l'espace */
.logiedy-dashboard .logiedy-content iframe {
    border: none;
    width: 100%;
    min-height: calc(100vh - var(--logiedy-header-height) - 48px);
}

/* Masquer les barres de menu/header du plugin original dans les iframes */
.logiedy-dashboard iframe #wlsm-header,
.logiedy-dashboard iframe .wlsm-header,
.logiedy-dashboard iframe .wlsm-sidebar,
.logiedy-dashboard iframe #wlsm-sidebar,
.logiedy-dashboard iframe .wlsm-top-bar,
.logiedy-dashboard iframe #wlsm-top-bar {
    display: none !important;
}

/* Ajuster le contenu principal pour occuper tout l'espace */
.logiedy-dashboard iframe .wlsm-main-content,
.logiedy-dashboard iframe #wlsm-main-content,
.logiedy-dashboard iframe .wlsm-content-wrapper {
    margin-left: 0 !important;
    padding-top: 0 !important;
    width: 100% !important;
}

/* Harmoniser les couleurs avec le thème Logiedy */
.logiedy-dashboard iframe .btn-primary,
.logiedy-dashboard iframe .wlsm-btn-primary {
    background-color: var(--logiedy-primary) !important;
    border-color: var(--logiedy-primary) !important;
}

.logiedy-dashboard iframe .btn-primary:hover,
.logiedy-dashboard iframe .wlsm-btn-primary:hover {
    background-color: var(--logiedy-primary-dark) !important;
    border-color: var(--logiedy-primary-dark) !important;
}

/* Style des liens dans les iframes */
.logiedy-dashboard iframe a:not(.btn) {
    color: var(--logiedy-primary);
}

.logiedy-dashboard iframe a:not(.btn):hover {
    color: var(--logiedy-primary-dark);
}

/* Masquer les notices d'upgrade/promotion */
.logiedy-dashboard iframe .wlsm-upgrade-notice,
.logiedy-dashboard iframe .wlsm-promo-banner,
.logiedy-dashboard iframe .sms-upgrade-banner,
.logiedy-dashboard iframe [class*="upgrade-to-pro"],
.logiedy-dashboard iframe [class*="buy-pro"] {
    display: none !important;
}

/* ===================================================================
   FIN DES STYLES DE REBRANDING
   =================================================================== */

/* ===================================================================
   SEARCH BAR & SEARCH RESULTS
   =================================================================== */

.logiedy-search-wrapper {
    position: relative;
    width: 300px;
    flex-shrink: 0;
}

.logiedy-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--logiedy-white);
    border-radius: var(--logiedy-border-radius);
    box-shadow: var(--logiedy-shadow-lg);
    border: 1px solid var(--logiedy-border);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.logiedy-search-results.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.logiedy-search-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.logiedy-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--logiedy-transition);
}

.logiedy-search-item:hover {
    background: var(--logiedy-bg-alt);
}

.logiedy-search-item i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--logiedy-primary);
    font-size: 14px;
}

.logiedy-search-item span {
    flex: 1;
    font-size: 14px;
    color: var(--logiedy-text-dark);
}

.logiedy-search-item .logiedy-search-hint {
    font-size: 12px;
    color: var(--logiedy-text-muted);
}

.logiedy-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--logiedy-text-muted);
    gap: 8px;
}

.logiedy-search-empty i {
    font-size: 24px;
    opacity: 0.5;
}

.logiedy-search-empty span {
    font-size: 14px;
}

/* ===================================================================
   DROPDOWN WRAPPER & GENERAL DROPDOWN STYLES
   =================================================================== */

.logiedy-dropdown-wrapper {
    position: relative;
}

.logiedy-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--logiedy-white);
    border-radius: var(--logiedy-border-radius);
    box-shadow: var(--logiedy-shadow-xl);
    border: 1px solid var(--logiedy-border);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s ease;
    min-width: 280px;
}

.logiedy-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.logiedy-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: var(--logiedy-white);
    border-left: 1px solid var(--logiedy-border);
    border-top: 1px solid var(--logiedy-border);
    transform: rotate(45deg);
}

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

.logiedy-dropdown-header span {
    font-size: 15px;
    font-weight: 600;
    color: var(--logiedy-text-dark);
}

.logiedy-mark-read {
    background: none;
    border: none;
    font-size: 12px;
    color: var(--logiedy-primary);
    cursor: pointer;
    font-weight: 500;
    transition: var(--logiedy-transition);
}

.logiedy-mark-read:hover {
    color: var(--logiedy-primary-dark);
    text-decoration: underline;
}

.logiedy-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    max-height: 320px;
    overflow-y: auto;
}

.logiedy-dropdown-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--logiedy-border);
    text-align: center;
}

.logiedy-dropdown-footer a {
    font-size: 13px;
    font-weight: 500;
    color: var(--logiedy-primary);
    transition: var(--logiedy-transition);
}

.logiedy-dropdown-footer a:hover {
    color: var(--logiedy-primary-dark);
    text-decoration: underline;
}

/* ===================================================================
   NOTIFICATIONS DROPDOWN
   =================================================================== */

.logiedy-notifications-dropdown {
    width: 360px;
}

.logiedy-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--logiedy-transition);
    position: relative;
}

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

.logiedy-notification-item.unread {
    background: rgba(124, 58, 237, 0.04);
}

.logiedy-notification-item.unread::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--logiedy-primary);
    border-radius: 50%;
}

.logiedy-notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.logiedy-notification-content {
    flex: 1;
    min-width: 0;
}

.logiedy-notification-text {
    font-size: 14px;
    color: var(--logiedy-text-dark);
    margin: 0 0 4px 0;
    line-height: 1.4;
}

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

/* ===================================================================
   PROFILE DROPDOWN
   =================================================================== */

.logiedy-profile-dropdown {
    width: 240px;
}

.logiedy-dropdown-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--logiedy-border);
}

.logiedy-user-avatar-sm {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, var(--logiedy-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.logiedy-user-info-sm {
    flex: 1;
    min-width: 0;
}

.logiedy-user-name-sm {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--logiedy-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logiedy-user-role-sm {
    display: block;
    font-size: 12px;
    color: var(--logiedy-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logiedy-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    /* Better spacing */
    font-size: 14px;
    color: var(--logiedy-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

/* Uniform hover for ALL dropdown links (profile, logout, etc.) */
.logiedy-dropdown-list .logiedy-dropdown-link:hover,
.logiedy-dropdown-list .logiedy-dropdown-link.logiedy-nav-link:hover,
.logiedy-dropdown-list .logiedy-dropdown-link.logiedy-logout-link:hover {
    background: #F3F4F6 !important;
    color: var(--logiedy-text-dark) !important;
    padding-left: 20px;
    border-left-color: var(--logiedy-primary);
}

.logiedy-dropdown-link i {
    width: 18px;
    font-size: 14px;
    text-align: center;
}

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

/* ===================================================================
   DARK MODE - DROPDOWNS
   =================================================================== */

body.logiedy-dark-mode .logiedy-dropdown,
body.logiedy-dark-mode .logiedy-search-results {
    background: var(--logiedy-surface);
    border-color: var(--logiedy-border);
}

body.logiedy-dark-mode .logiedy-dropdown::before {
    background: var(--logiedy-surface);
    border-color: var(--logiedy-border);
}

body.logiedy-dark-mode .logiedy-dropdown-header,
body.logiedy-dark-mode .logiedy-dropdown-footer,
body.logiedy-dark-mode .logiedy-dropdown-user,
body.logiedy-dark-mode .logiedy-dropdown-divider {
    border-color: var(--logiedy-border);
}

body.logiedy-dark-mode .logiedy-dropdown-header span,
body.logiedy-dark-mode .logiedy-notification-text,
body.logiedy-dark-mode .logiedy-user-name-sm,
body.logiedy-dark-mode .logiedy-search-item span {
    color: var(--logiedy-text);
}

body.logiedy-dark-mode .logiedy-dropdown-link {
    color: var(--logiedy-text-secondary);
}

/* Uniform hover for ALL dropdown links in dark mode */
body.logiedy-dark-mode .logiedy-dropdown-list .logiedy-dropdown-link:hover,
body.logiedy-dark-mode .logiedy-dropdown-list .logiedy-dropdown-link.logiedy-nav-link:hover,
body.logiedy-dark-mode .logiedy-dropdown-list .logiedy-dropdown-link.logiedy-logout-link:hover,
body.logiedy-dark-mode .logiedy-search-item:hover {
    background: rgba(124, 58, 237, 0.25) !important;
    color: #FFFFFF !important;
}

body.logiedy-dark-mode .logiedy-notification-item.unread {
    background: rgba(124, 58, 237, 0.1);
}

body.logiedy-dark-mode .logiedy-notification-item:hover {
    background: var(--logiedy-bg);
}

/* ===================================================================
   RESPONSIVE - DROPDOWN ADJUSTMENTS (Additional touch support)
   =================================================================== */

/* Touch-friendly dropdown items */
@media (hover: none) and (pointer: coarse) {

    .logiedy-dropdown-link,
    .logiedy-notification-item,
    .logiedy-search-item {
        padding: 14px 16px;
    }

    /* Larger touch targets for touch devices */
    .logiedy-header-action-btn {
        padding: 12px;
    }

    /* Disable hover effects on touch */
    .logiedy-stat-card:hover {
        transform: none;
    }

    .logiedy-nav-link:hover::after {
        display: none;
    }
}

/* ===================================================================
   RESPONSIVE DESIGN - FINITIONS (Étape 10)
   Améliorations finales pour une expérience mobile/tablette optimale
   =================================================================== */

/* --- Transitions et Animations Fluides --- */

/* Sidebar slide-in animation améliorée */
.logiedy-sidebar {
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@media (max-width: 767px) {
    .logiedy-sidebar {
        transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            box-shadow 0.35s ease;
    }

    .logiedy-sidebar.active {
        animation: logiedy-sidebar-slide-in 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

@keyframes logiedy-sidebar-slide-in {
    from {
        transform: translateX(-100%);
        box-shadow: none;
    }

    to {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }
}

/* Dropdown fade-in animation */
@keyframes logiedy-dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

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

.logiedy-dropdown.active {
    animation: logiedy-dropdown-fade-in 0.2s ease-out forwards;
}

.logiedy-search-results.active {
    animation: logiedy-dropdown-fade-in 0.2s ease-out forwards;
}

/* Hover states subtils avec micro-animations */
.logiedy-stat-card {
    will-change: transform, box-shadow;
}

/* Clickable Stat Cards */
a.logiedy-stat-card-clickable {
    text-decoration: none;
    cursor: pointer;
    display: flex;
}

a.logiedy-stat-card-clickable:hover {
    transform: translateY(-6px);
    box-shadow: var(--logiedy-shadow-lg);
}

a.logiedy-stat-card-clickable::after {
    content: '\f061';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 12px;
    color: var(--logiedy-text-muted);
    opacity: 0;
    transition: var(--logiedy-transition);
}

a.logiedy-stat-card-clickable:hover::after {
    opacity: 1;
    color: var(--logiedy-primary);
}

@media (hover: hover) and (pointer: fine) {
    .logiedy-stat-card {
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
            box-shadow 0.25s ease;
    }

    .logiedy-stat-card:hover {
        transform: translateY(-4px);
    }

    .logiedy-nav-link {
        transition: all 0.2s ease, padding-left 0.2s ease;
    }

    .logiedy-nav-link:hover {
        padding-left: 28px;
    }

    .logiedy-header-action-btn {
        transition: all 0.2s ease, transform 0.15s ease;
    }

    .logiedy-header-action-btn:hover {
        transform: scale(1.05);
    }

    .logiedy-header-action-btn:active {
        transform: scale(0.95);
    }
}

/* --- Tablette Landscape Mode (1024px - 1200px) --- */
@media (min-width: 1025px) and (max-width: 1200px) {
    .logiedy-sidebar {
        width: 240px;
    }

    .logiedy-main {
        margin-left: 240px;
    }

    .logiedy-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .logiedy-search-wrapper {
        width: 250px;
    }

    .logiedy-header {
        padding: 0 20px;
    }

    .logiedy-content {
        padding: 20px;
    }
}

/* --- Large Screen Optimizations (> 1400px) --- */
@media (min-width: 1400px) {
    .logiedy-sidebar {
        width: 280px;
    }

    .logiedy-main {
        margin-left: 280px;
    }

    .logiedy-content {
        padding: 28px;
    }

    .logiedy-stats-grid {
        gap: 28px;
    }

    .logiedy-stat-card {
        padding: 28px;
    }

    .logiedy-stat-value {
        font-size: 32px;
    }

    .logiedy-welcome-card {
        padding: 40px;
    }

    .logiedy-welcome-title {
        font-size: 32px;
    }
}

/* --- Mobile Orientation Landscape --- */
@media (max-width: 767px) and (orientation: landscape) {
    .logiedy-header {
        height: 50px;
    }

    .logiedy-content {
        padding: 12px;
    }

    .logiedy-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .logiedy-stat-card {
        padding: 14px;
    }

    .logiedy-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .logiedy-stat-value {
        font-size: 20px;
    }

    .logiedy-welcome-card {
        padding: 16px 20px;
        margin-bottom: 12px;
    }

    .logiedy-welcome-title {
        font-size: 18px;
    }

    .logiedy-iframe-container {
        height: calc(100vh - 50px - 24px);
    }
}

/* --- Login Page Mobile Landscape --- */
@media (max-width: 767px) and (orientation: landscape) {
    .logiedy-login-page {
        padding: 12px;
        min-height: 100vh;
        align-items: flex-start;
        overflow-y: auto;
    }

    .logiedy-login-box {
        padding: 20px;
        margin: auto 0;
    }

    .logiedy-login-logo {
        margin-bottom: 16px;
    }

    .logiedy-login-logo h1 {
        font-size: 22px;
    }

    .logiedy-login-form {
        margin-top: 16px;
    }

    .logiedy-form-group {
        margin-bottom: 12px;
    }
}

/* --- Iframe Responsive Finitions --- */
.logiedy-iframe-container {
    display: flex;
    flex-direction: column;
}

.logiedy-iframe-container iframe {
    flex: 1;
    min-height: 0;
}

/* Loader centré avec animation améliorée */
.logiedy-iframe-loader i {
    animation: logiedy-spin 0.8s linear infinite,
        logiedy-pulse 1.5s ease-in-out infinite;
}

@keyframes logiedy-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Scroll smooth pour l'iframe sur iOS */
.logiedy-iframe-container {
    -webkit-overflow-scrolling: touch;
}

/* --- Accessibilité Renforcée --- */

/* Focus visible amélioré */
:focus-visible {
    outline: 3px solid var(--logiedy-primary);
    outline-offset: 2px;
}

/* Navigation clavier visible */
.logiedy-nav-link:focus-visible {
    background: rgba(124, 58, 237, 0.1);
    outline: none;
    box-shadow: inset 0 0 0 2px var(--logiedy-primary);
}

.logiedy-stat-card:focus-visible {
    outline: 3px solid var(--logiedy-primary);
    outline-offset: 2px;
}

/* Labels ARIA - éléments masqués visuellement mais accessibles */
[aria-label] {
    position: relative;
}

/* Indicateur de focus pour les éléments interactifs */
.logiedy-dropdown-link:focus-visible,
.logiedy-notification-item:focus-visible,
.logiedy-search-item:focus-visible {
    background: var(--logiedy-bg-alt);
    outline: 2px solid var(--logiedy-primary);
    outline-offset: -2px;
}

/* Contraste amélioré pour le texte désactivé */
[disabled],
.logiedy-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* État actif visible pour les liens de navigation */
.logiedy-nav-item.active .logiedy-nav-link {
    font-weight: 600;
}

/* États hover/focus cohérents */
.logiedy-logout-btn:focus-visible {
    outline: 3px solid var(--logiedy-primary);
    outline-offset: 2px;
}

/* Login form accessibility */
.logiedy-login-form .logiedy-form-input:focus-visible {
    outline: none;
    border-color: var(--logiedy-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

/* Button states clearly distinguishable */
.logiedy-login-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.logiedy-login-btn:active {
    transform: translateY(1px);
    box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
}

/* --- Safe Area Support pour iPhone X+ --- */
@supports (padding: env(safe-area-inset-bottom)) {
    .logiedy-sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .logiedy-content {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .logiedy-login-page {
        padding-bottom: env(safe-area-inset-bottom);
    }

    @media (max-width: 767px) {
        .logiedy-header {
            padding-left: calc(12px + env(safe-area-inset-left));
            padding-right: calc(12px + env(safe-area-inset-right));
        }
    }
}

/* --- Print Styles --- */
@media print {

    .logiedy-sidebar,
    .logiedy-header,
    .logiedy-overlay,
    .logiedy-menu-toggle {
        display: none !important;
    }

    .logiedy-main {
        margin-left: 0 !important;
    }

    .logiedy-content {
        padding: 0 !important;
    }

    .logiedy-stat-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .logiedy-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================================================
   DASHBOARD CHARTS
   =================================================================== */

.logiedy-charts-section {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.logiedy-charts-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.logiedy-chart-card {
    background: var(--logiedy-white);
    border-radius: var(--logiedy-border-radius);
    padding: 24px;
    box-shadow: var(--logiedy-shadow);
    display: flex;
    flex-direction: column;
    min-height: 400px;
    transition: var(--logiedy-transition);
}

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

.logiedy-chart-full {
    width: 100%;
}

.logiedy-chart-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logiedy-chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--logiedy-text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.logiedy-chart-title i {
    color: var(--logiedy-primary);
    font-size: 18px;
}

.logiedy-chart-body {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 300px;
}

/* Dark Mode Charts */
.logiedy-dashboard.dark-mode .logiedy-chart-card {
    background: var(--logiedy-surface);
}

.logiedy-dashboard.dark-mode .logiedy-chart-title {
    color: var(--logiedy-white);
}

/* Responsive Charts */
@media (max-width: 767px) {
    .logiedy-charts-row {
        grid-template-columns: 1fr;
    }

    .logiedy-chart-card {
        padding: 16px;
        min-height: 350px;
    }
}

/* ===================================================================
   DASHBOARD TABLES
   =================================================================== */

.logiedy-tables-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.logiedy-table-card {
    background: var(--logiedy-white);
    border-radius: var(--logiedy-border-radius);
    box-shadow: var(--logiedy-shadow);
    overflow: hidden;
}

.logiedy-table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--logiedy-border);
    background: var(--logiedy-bg-alt);
}

.logiedy-table-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--logiedy-text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.logiedy-table-title i {
    color: var(--logiedy-primary);
    font-size: 18px;
}

.logiedy-table-wrapper {
    overflow-x: auto;
}

.logiedy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.logiedy-table thead {
    background: var(--logiedy-bg);
}

.logiedy-table th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    color: var(--logiedy-text);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--logiedy-border);
    white-space: nowrap;
}

.logiedy-table td {
    padding: 14px 16px;
    color: var(--logiedy-text-dark);
    border-bottom: 1px solid var(--logiedy-border);
}

.logiedy-table tbody tr:hover {
    background: var(--logiedy-bg-alt);
}

.logiedy-table tbody tr:last-child td {
    border-bottom: none;
}

.logiedy-table-message {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--logiedy-text-muted);
}

.logiedy-table-link {
    color: var(--logiedy-primary);
    font-weight: 500;
    transition: var(--logiedy-transition);
}

.logiedy-table-link:hover {
    color: var(--logiedy-primary-dark);
    text-decoration: underline;
}

/* Additional Icon Colors */
.logiedy-icon-gray {
    background: #F1F5F9;
    color: #64748B;
}

.logiedy-icon-brown {
    background: #FDE68A;
    color: #92400E;
}

.logiedy-icon-gold {
    background: #FEF3C7;
    color: #B45309;
}

/* Badge secondary */
.logiedy-badge-secondary {
    background: #F1F5F9;
    color: #64748B;
}

/* Responsive Tables */
@media (max-width: 767px) {
    .logiedy-table-card {
        border-radius: var(--logiedy-border-radius-sm);
    }

    .logiedy-table-header {
        padding: 16px;
    }

    .logiedy-table th,
    .logiedy-table td {
        padding: 12px;
        font-size: 13px;
    }

    .logiedy-table-message {
        max-width: 120px;
    }
}

/* Dark Mode Tables */
.logiedy-dashboard.dark-mode .logiedy-table-card {
    background: var(--logiedy-text-dark);
}

.logiedy-dashboard.dark-mode .logiedy-table-header {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.logiedy-dashboard.dark-mode .logiedy-table-title {
    color: var(--logiedy-white);
}

.logiedy-dashboard.dark-mode .logiedy-table thead {
    background: rgba(255, 255, 255, 0.05);
}

.logiedy-dashboard.dark-mode .logiedy-table th {
    color: var(--logiedy-text-muted);
    border-color: rgba(255, 255, 255, 0.1);
}

.logiedy-dashboard.dark-mode .logiedy-table td {
    color: var(--logiedy-white);
    border-color: rgba(255, 255, 255, 0.1);
}

.logiedy-dashboard.dark-mode .logiedy-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ===================================================================
   REAL-TIME NOTIFICATIONS - Pulse Animation & Toast
   =================================================================== */

/* Badge Pulse Animation */
@keyframes logiedy-pulse-animation {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.logiedy-pulse {
    animation: logiedy-pulse-animation 0.6s ease-in-out 3;
}

/* Notification Toast */
.logiedy-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, var(--logiedy-primary), var(--logiedy-primary-dark));
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.35);
    z-index: 10000;
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 14px;
    font-weight: 500;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logiedy-toast::before {
    content: '\f0f3';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 16px;
}

.logiedy-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Dark Mode Toast */
.logiedy-dashboard.dark-mode .logiedy-toast {
    background: linear-gradient(135deg, #1e1b4b, var(--logiedy-primary-dark));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* New notification indicator in dropdown */
.logiedy-notification-item.is-new {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(124, 58, 237, 0.03));
    border-left: 3px solid var(--logiedy-primary);
}

.logiedy-notification-item.is-new::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--logiedy-primary);
    border-radius: 50%;
}

/* Mobile responsiveness for toast */
@media (max-width: 480px) {
    .logiedy-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

/* ========================================
   PROFILE PAGE STYLES
   ======================================== */

.logiedy-profile-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

/* Profile Header Card */
.logiedy-profile-header-card {
    background: linear-gradient(135deg, var(--logiedy-primary) 0%, var(--logiedy-primary-dark) 100%);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    color: white;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);
}

.logiedy-profile-avatar-section {
    flex-shrink: 0;
}

.logiedy-profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: white;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.logiedy-profile-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

/* Avatar Upload */
.logiedy-avatar-upload-wrapper {
    position: relative;
    display: inline-block;
}

.logiedy-avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    border: 2px solid #7c3aed;
}

.logiedy-avatar-upload-btn i {
    color: #7c3aed;
    font-size: 14px;
}

.logiedy-avatar-upload-btn:hover {
    background: #7c3aed;
    transform: scale(1.1);
}

.logiedy-avatar-upload-btn:hover i {
    color: white;
}

.logiedy-profile-header-info {
    flex: 1;
}

.logiedy-profile-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: white;
}

.logiedy-profile-role {
    font-size: 14px;
    opacity: 0.9;
    margin: 0 0 8px 0;
}

.logiedy-profile-email {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logiedy-profile-email i {
    font-size: 12px;
}

/* Profile Cards */
.logiedy-profile-card {
    background: white;
    border-radius: 16px;
    border: none;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.logiedy-profile-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f6f8 100%);
}

.logiedy-profile-card-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logiedy-profile-card-header h3 i {
    color: #7c3aed;
    font-size: 14px;
    background: rgba(124, 58, 237, 0.1);
    padding: 8px;
    border-radius: 8px;
}

.logiedy-card-hint {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

.logiedy-profile-card-body {
    padding: 20px;
}

/* Form Styles */
.logiedy-profile-form {
    width: 100%;
}

.logiedy-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.logiedy-form-group {
    margin-bottom: 16px;
}

.logiedy-form-row .logiedy-form-group {
    margin-bottom: 0;
}

.logiedy-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--logiedy-text);
    margin-bottom: 6px;
}

.logiedy-required {
    color: #7c3aed;
}

.logiedy-form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px;
    background: white !important;
    color: #374151;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.logiedy-form-input:hover {
    border-color: #d1d5db !important;
}

.logiedy-form-input:focus {
    outline: none;
    border-color: #7c3aed !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.logiedy-form-input::placeholder {
    color: #9ca3af;
}

/* Disabled Input */
.logiedy-form-input-disabled,
.logiedy-form-input:disabled {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    cursor: not-allowed;
}

/* Input with hint */
.logiedy-input-with-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.logiedy-input-with-hint .logiedy-form-input {
    flex: 1;
    min-width: 200px;
}

.logiedy-input-hint {
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

/* Password Input Wrapper */
.logiedy-password-input-wrapper {
    position: relative;
}

.logiedy-password-input-wrapper .logiedy-form-input {
    padding-right: 44px;
}

.logiedy-password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    color: #9ca3af !important;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    font-size: 16px;
}

.logiedy-password-toggle:hover {
    color: #7c3aed !important;
}

/* Password Strength Indicator */
.logiedy-password-strength {
    margin-top: 8px;
    font-size: 12px;
    min-height: 18px;
}

.logiedy-password-strength.weak {
    color: #ef4444;
}

.logiedy-password-strength.medium {
    color: #f59e0b;
}

.logiedy-password-strength.strong {
    color: #10b981;
}

/* Weak Password Confirmation */
.logiedy-weak-password-confirm {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.logiedy-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #991b1b;
}

.logiedy-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
    cursor: pointer;
}

/* Profile Actions */
.logiedy-profile-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.logiedy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logiedy-btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
    border: none !important;
}

.logiedy-btn-primary:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.logiedy-btn-primary:disabled {
    background: #9ca3af !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.logiedy-btn-primary .fa-spinner {
    animation: spin 1s linear infinite;
}

/* Alert Messages */
#logiedy-profile-alerts {
    margin-bottom: 20px;
}

.logiedy-alert {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.logiedy-alert i {
    font-size: 16px;
    margin-top: 2px;
}

.logiedy-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
}

.logiedy-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.logiedy-alert-content {
    flex: 1;
}

/* Responsive Profile Page */
@media (max-width: 768px) {
    .logiedy-profile-page {
        padding: 16px;
    }

    .logiedy-profile-header-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .logiedy-profile-email {
        justify-content: center;
    }

    .logiedy-form-row {
        grid-template-columns: 1fr;
    }

    .logiedy-profile-actions {
        justify-content: stretch;
    }

    .logiedy-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {

    .logiedy-profile-avatar-large,
    .logiedy-profile-avatar-img {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }

    .logiedy-profile-name {
        font-size: 20px;
    }

    .logiedy-profile-card-header {
        padding: 14px 16px;
    }

    .logiedy-profile-card-body {
        padding: 16px;
    }
}