/**
 * NEXUS SHARE - Next-Generation SaaS Design System
 * Ultra-Modern Glassmorphic UI with Micro-Animations & Dynamic Themes
 */

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

:root {
    --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Light Theme (Crisp, Ceramic, High-Contrast) */
    --bg-base: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-hover: #ffffff;
    --bg-surface: #f1f5f9;
    --bg-surface-subtle: #e2e8f0;
    --border-color: rgba(203, 213, 225, 0.8);
    --border-subtle: rgba(226, 232, 240, 0.6);
    --border-focus: #6366f1;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --primary-subtle: rgba(79, 70, 229, 0.1);
    --primary-glow: rgba(79, 70, 229, 0.25);

    --accent: #0284c7;
    --accent-gradient: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    --accent-glow: rgba(6, 182, 212, 0.2);

    --success: #059669;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #d97706;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #dc2626;
    --danger-bg: rgba(239, 68, 68, 0.12);

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(226, 232, 240, 0.8);
    --navbar-bg: rgba(255, 255, 255, 0.82);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 14px 30px -4px rgba(15, 23, 42, 0.1);
    --shadow-xl: 0 24px 50px -10px rgba(15, 23, 42, 0.14);
    --shadow-glow: 0 0 35px var(--primary-glow);
}

[data-theme="dark"] {
    /* Dark Theme (Obsidian Space, Glowing Accents) */
    --bg-base: #060913;
    --bg-card: rgba(13, 19, 36, 0.78);
    --bg-card-hover: rgba(19, 28, 54, 0.9);
    --bg-surface: rgba(20, 30, 58, 0.65);
    --bg-surface-subtle: #1e293b;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-focus: #818cf8;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;

    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --primary-subtle: rgba(99, 102, 241, 0.15);
    --primary-glow: rgba(99, 102, 241, 0.35);

    --accent: #38bdf8;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #06b6d4 100%);
    --accent-glow: rgba(56, 189, 248, 0.3);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.16);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.16);
    --danger: #f43f5e;
    --danger-bg: rgba(244, 63, 94, 0.16);

    --glass-bg: rgba(12, 18, 36, 0.75);
    --glass-border: rgba(255, 255, 255, 0.1);
    --navbar-bg: rgba(8, 12, 24, 0.8);

    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.65);
    --shadow-xl: 0 28px 60px -10px rgba(0, 0, 0, 0.85);
    --shadow-glow: 0 0 45px rgba(99, 102, 241, 0.28);
}

/* Base & Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1 0 auto;
    padding-bottom: 75px;
}

@media (max-width: 640px) {
    main {
        padding-bottom: 55px;
    }
}

/* Background Atmospheric Glow Orbs */
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
    animation: ambientPulse 12s ease-in-out infinite alternate;
}

body::before {
    top: -120px;
    left: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
}

body::after {
    bottom: -150px;
    right: 5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    animation-delay: -6s;
}

[data-theme="dark"] body::before {
    opacity: 0.6;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
}

[data-theme="dark"] body::after {
    opacity: 0.5;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
}

@keyframes ambientPulse {
    0% { transform: translate(0, 0); }
    50% { transform: translate(25px, -15px); }
    100% { transform: translate(-15px, 15px); }
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive Container */
.nexus-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   FLOATING FROSTED NAVBAR
   ========================================================================== */
.nexus-navbar-wrapper {
    position: sticky;
    top: 14px;
    z-index: 1000;
    padding: 0 16px;
    margin-bottom: 24px;
}

.nexus-navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md), 0 0 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    padding: 8px 18px;
}

.nexus-navbar:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(99, 102, 241, 0.1);
}

.nexus-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Brand Logo */
.nexus-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
    text-decoration: none;
}

.nexus-brand .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 19px;
    box-shadow: 0 4px 14px var(--primary-glow);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.nexus-brand:hover .brand-icon {
    transform: scale(1.08) rotate(4deg);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.nexus-brand span.highlight {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation Links */
.nexus-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nexus-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.22s ease;
    position: relative;
}

.nexus-nav-link:hover {
    color: var(--text-main);
    background-color: var(--primary-subtle);
}

.nexus-nav-link.active {
    color: var(--primary);
    background: var(--primary-subtle);
    font-weight: 700;
}

.nexus-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 3px;
    border-radius: 3px;
    background: var(--primary-gradient);
}

/* Navbar Actions */
.nexus-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Theme Toggle Button */
.nexus-btn-theme {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nexus-btn-theme:hover {
    transform: rotate(30deg) scale(1.08);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.nexus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.nexus-btn:active {
    transform: scale(0.97);
}

/* Shimmer shine animation on primary button */
.nexus-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.nexus-btn:hover::before {
    left: 100%;
}

.nexus-btn-primary {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 6px 18px var(--primary-glow);
}

.nexus-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--primary-glow);
    color: #ffffff;
}

.nexus-btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main) !important;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.nexus-btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nexus-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.nexus-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.nexus-btn-sm {
    padding: 6px 14px;
    font-size: 0.84rem;
}

.nexus-btn-lg {
    padding: 13px 28px;
    font-size: 1.05rem;
}

.w-full {
    width: 100%;
}

/* ==========================================================================
   CARDS & CONTAINERS (GLASSMORPHIC)
   ========================================================================== */
.nexus-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.nexus-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(99, 102, 241, 0.08);
}

/* Card Header with Glowing Bar */
.nexus-card-glowing-edge {
    position: relative;
}

.nexus-card-glowing-edge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.85;
}

/* ==========================================================================
   FORM CONTROLS & INPUTS
   ========================================================================== */
.nexus-form-group {
    margin-bottom: 20px;
}

.nexus-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.nexus-input, .nexus-select, .nexus-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.22s ease;
    outline: none;
}

.nexus-input:focus, .nexus-select:focus, .nexus-textarea:focus {
    background: var(--bg-card);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.nexus-input::placeholder, .nexus-textarea::placeholder {
    color: var(--text-light);
}

/* ==========================================================================
   METRIC & STATS GRID
   ========================================================================== */
.nexus-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.nexus-stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-sm);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.nexus-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 20px var(--primary-glow);
}

.nexus-stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

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

.nexus-stat-card .stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.nexus-stat-card .stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */
.nexus-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.nexus-badge-primary {
    background: var(--primary-subtle);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.nexus-badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.nexus-badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.nexus-badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Pulsing Status Dot */
.nexus-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.nexus-pulse-dot-success {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: statusPulse 1.8s infinite;
}

.nexus-pulse-dot-warning {
    background-color: var(--warning);
    box-shadow: 0 0 8px var(--warning);
    animation: statusPulse 1.8s infinite;
}

.nexus-pulse-dot-danger {
    background-color: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   PROGRESS BARS
   ========================================================================== */
.nexus-progress {
    height: 10px;
    border-radius: var(--radius-full);
    background-color: var(--bg-surface-subtle);
    overflow: hidden;
    position: relative;
}

.nexus-progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    background-size: 200% 100%;
    animation: gradientFlow 3s linear infinite;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px var(--primary-glow);
}

@keyframes gradientFlow {
    0% { background-position: 100% 0%; }
    100% { background-position: -100% 0%; }
}

/* ==========================================================================
   FUTURISTIC DROPZONE
   ========================================================================== */
.nexus-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, var(--bg-card), var(--bg-surface));
    padding: 56px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.nexus-dropzone:hover, .nexus-dropzone.drag-active {
    border-color: var(--primary);
    background: var(--primary-subtle);
    box-shadow: 0 0 35px var(--primary-glow);
    transform: scale(1.01);
}

.nexus-dropzone .dropzone-icon {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: var(--primary-gradient);
    color: #ffffff;
    font-size: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px var(--primary-glow);
    animation: floatIcon 3.5s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.nexus-dropzone .dropzone-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.nexus-dropzone .dropzone-sub {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* File items inside selected list */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.file-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

/* ==========================================================================
   TABLES & LISTINGS
   ========================================================================== */
.nexus-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.nexus-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.92rem;
}

.nexus-table th {
    background-color: var(--bg-surface);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.76rem;
    letter-spacing: 0.6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.nexus-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
    transition: background-color 0.15s ease;
}

.nexus-table tbody tr:hover td {
    background-color: var(--bg-surface);
}

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

/* ==========================================================================
   ALERTS & NOTIFICATIONS
   ========================================================================== */
.nexus-alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid transparent;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nexus-alert-success {
    background: var(--success-bg);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.nexus-alert-danger {
    background: var(--danger-bg);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.nexus-alert-warning {
    background: var(--warning-bg);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.nexus-alert-info {
    background: var(--primary-subtle);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary);
}

/* ==========================================================================
   BOTTOM-RIGHT FLOATING TOAST NOTIFICATION SYSTEM (2-3s Auto-Vanish)
   ========================================================================== */
#nexus-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    max-width: 420px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.nexus-toast {
    pointer-events: auto;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.nexus-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.nexus-toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.nexus-toast-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.nexus-toast-body {
    flex: 1;
    min-width: 0;
}

.nexus-toast-message {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.45;
}

.nexus-toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 1.25rem;
    border-radius: 6px;
    line-height: 1;
    transition: all 0.15s ease;
}

.nexus-toast-close:hover {
    color: var(--text-main);
    background: var(--bg-surface);
}

.nexus-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    animation: toastTimer linear forwards;
}

@keyframes toastTimer {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.nexus-toast-success { border-left: 4px solid var(--success); }
.nexus-toast-danger { border-left: 4px solid var(--danger); }
.nexus-toast-warning { border-left: 4px solid var(--warning); }
.nexus-toast-info { border-left: 4px solid var(--primary); }

/* ==========================================================================
   DASHBOARD TWO-COLUMN LAYOUT (Sidebar + Content)
   ========================================================================== */
.nexus-dashboard-container {
    display: flex;
    min-height: calc(100vh - 76px);
    width: 100%;
    position: relative;
}

.nexus-sidebar {
    width: 290px;
    flex-shrink: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 76px;
    height: calc(100vh - 76px);
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nexus-sidebar::-webkit-scrollbar {
    width: 5px;
}
.nexus-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.nexus-sidebar-user {
    padding: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nexus-sidebar-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nexus-sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 6px 14px var(--primary-glow);
    flex-shrink: 0;
}

.nexus-sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.nexus-sidebar-user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nexus-sidebar-user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nexus-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nexus-sidebar-heading {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 12px 14px 6px;
    margin-top: 4px;
}

.nexus-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.nexus-sidebar-link i {
    font-size: 1.18rem;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.nexus-sidebar-link:hover {
    color: var(--text-main);
    background: var(--bg-surface);
    transform: translateX(4px);
}

.nexus-sidebar-link:hover i {
    transform: scale(1.15);
    color: var(--primary);
}

.nexus-sidebar-link.active {
    color: var(--primary);
    background: var(--primary-subtle);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--primary);
}

.nexus-sidebar-link.active i {
    color: var(--primary);
}

.nexus-sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nexus-dashboard-content {
    flex: 1;
    min-width: 0;
    padding: 32px 36px 60px;
    max-width: 1400px;
}

.nexus-sidebar-toggle-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    margin-bottom: 20px;
}

.nexus-sidebar-overlay {
    display: none;
}

/* ==========================================================================
   AMAZING CUSTOM LOGO & GLOWING ICON BADGES (Replacing Ugly Square Blocks)
   ========================================================================== */
.nexus-icon-badge {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto 20px;
    animation: floatIcon 3.5s ease-in-out infinite;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nexus-icon-badge::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 26px;
    background: inherit;
    filter: blur(16px);
    opacity: 0.65;
    z-index: -1;
    animation: statusPulse 3s ease-in-out infinite;
}

.nexus-icon-badge-key {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(234, 88, 12, 0.38));
    border: 1.5px solid rgba(245, 158, 11, 0.55);
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.32), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    color: #fbbf24;
}

.nexus-icon-badge-download {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.25), rgba(6, 182, 212, 0.38));
    border: 1.5px solid rgba(99, 102, 241, 0.55);
    box-shadow: 0 14px 32px rgba(99, 102, 241, 0.32), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    color: #818cf8;
}

.nexus-icon-badge-upload {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(79, 70, 229, 0.38));
    border: 1.5px solid rgba(168, 85, 247, 0.55);
    box-shadow: 0 14px 32px rgba(168, 85, 247, 0.32), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    color: #c084fc;
}

.nexus-icon-badge-shield {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 182, 212, 0.38));
    border: 1.5px solid rgba(16, 185, 129, 0.55);
    box-shadow: 0 14px 32px rgba(16, 185, 129, 0.32), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    color: #34d399;
}

.nexus-icon-badge svg {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

/* ==========================================================================
   RICH SAAS FOOTER WITH DEVELOPER/DESIGNER PORTFOLIO SHOWCASE
   ========================================================================== */
.nexus-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 60px 0 28px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.nexus-footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1.2fr 2.6fr;
    gap: 48px;
    margin-bottom: 40px;
}

.nexus-footer-col h4 {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-main);
    margin-bottom: 18px;
}

.nexus-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nexus-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nexus-footer-links a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.nexus-dev-showcase {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

.nexus-dev-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nexus-dev-avatar {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 6px 16px var(--primary-glow);
    flex-shrink: 0;
}

.nexus-dev-contacts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.83rem;
}

.nexus-dev-contacts a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.15s ease;
}

.nexus-dev-contacts a:hover {
    color: var(--primary);
}

.nexus-social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.nexus-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nexus-social-btn:hover {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px var(--primary-glow);
}

/* Eye-Catching Luminous Footer Bottom Bar */
.nexus-footer-divider {
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.4) 15%, rgba(6, 182, 212, 0.75) 50%, rgba(168, 85, 247, 0.4) 85%, transparent 100%);
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.4);
    margin-bottom: 24px;
}

.nexus-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    font-size: 0.88rem;
    padding: 16px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nexus-dev-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 6px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(6, 182, 212, 0.12));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-full);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}

.nexus-dev-pill:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.25), rgba(6, 182, 212, 0.25));
    box-shadow: 0 8px 24px var(--primary-glow);
    color: var(--primary);
}

.nexus-dev-pill-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px var(--primary-glow);
}

.nexus-status-capsule {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   CUSTOM 3-BAR MORPHING HAMBURGER BUTTON
   ========================================================================== */
.nexus-hamburger-btn {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    z-index: 10001;
}

.nexus-hamburger-btn * {
    pointer-events: none;
}

.nexus-hamburger-btn:hover,
.nexus-hamburger-btn:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 0 14px var(--primary-glow);
    transform: scale(1.05);
}

.nexus-hamburger-box {
    width: 22px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.nexus-hamburger-line {
    display: block;
    height: 2.2px;
    border-radius: 4px;
    background-color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nexus-hamburger-line.line-top {
    width: 22px;
    transform-origin: left center;
}

.nexus-hamburger-line.line-mid {
    width: 14px;
    margin-left: auto;
    background: var(--primary-gradient);
    box-shadow: 0 0 8px var(--primary-glow);
}

.nexus-hamburger-line.line-bot {
    width: 18px;
    transform-origin: left center;
}

/* Morph to 'X' on active/open state */
.nexus-hamburger-btn.is-active {
    border-color: var(--primary);
    background: var(--bg-surface);
}

.nexus-hamburger-btn.is-active .nexus-hamburger-line.line-top {
    transform: rotate(42deg) translate(2px, -1px);
    width: 23px;
    background: var(--primary);
}

.nexus-hamburger-btn.is-active .nexus-hamburger-line.line-mid {
    opacity: 0;
    transform: translateX(12px);
}

.nexus-hamburger-btn.is-active .nexus-hamburger-line.line-bot {
    transform: rotate(-42deg) translate(2px, 1px);
    width: 23px;
    background: var(--primary);
}

/* ==========================================================================
   OFF-CANVAS MOBILE NAVIGATION DRAWER (SLIDES FROM RIGHT)
   ========================================================================== */
body.nexus-drawer-open {
    overflow: hidden !important;
}

.nexus-drawer-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.68) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 99999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.nexus-drawer-backdrop.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.nexus-mobile-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 310px !important;
    max-width: 86vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: var(--bg-card) !important;
    border-left: 1px solid var(--border-color) !important;
    z-index: 100000 !important;
    transform: translateX(100%) !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.45) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.nexus-mobile-drawer.open {
    transform: translateX(0) !important;
}

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

.nexus-drawer-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.nexus-drawer-close-btn:hover {
    color: var(--danger);
    border-color: var(--danger);
    transform: rotate(90deg);
}

.nexus-drawer-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nexus-drawer-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.user-avatar-capsule {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.user-avatar-capsule .nexus-pulse-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    border: 2px solid var(--bg-card);
}

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

.user-meta .user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta .user-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nexus-drawer-guest-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nexus-drawer-section-title {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    color: var(--text-muted);
    margin-top: 4px;
}

.nexus-drawer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nexus-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.94rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nexus-drawer-link i {
    font-size: 1.15rem;
}

.nexus-drawer-link:hover,
.nexus-drawer-link.active {
    background: var(--bg-surface);
    color: var(--primary);
    border-color: var(--border-color);
}

.nexus-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
}

/* ==========================================================================
   HERO ACTIONS & TRANSFER LIMITS RIBBON
   ========================================================================== */
.nexus-hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.nexus-limits-ribbon {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 44px;
}

.nexus-limit-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.nexus-limit-pill:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 991px) {
    .nexus-nav-links {
        display: none !important;
    }

    .nexus-nav-desktop-auth {
        display: none !important;
    }

    .nexus-hamburger-btn {
        display: flex !important;
    }

    .nexus-navbar {
        padding: 8px 14px;
    }

    .nexus-brand span {
        font-size: 1.15rem;
    }

    .nexus-footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .nexus-dashboard-container {
        flex-direction: column;
    }

    .nexus-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        z-index: 100000;
        transform: translateX(-100%);
        width: 290px;
        box-shadow: var(--shadow-xl);
    }

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

    .nexus-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 99999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .nexus-sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .nexus-sidebar-toggle-btn {
        display: inline-flex;
    }

    .nexus-dashboard-content {
        padding: 20px 16px 40px;
    }
}

@media (max-width: 640px) {
    .nexus-container {
        padding: 0 14px;
    }

    .nexus-hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .nexus-hero-actions .nexus-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 18px;
        font-size: 0.95rem;
    }

    .nexus-limits-ribbon {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 24px;
    }

    .nexus-limit-pill {
        padding: 8px 10px;
        font-size: 0.78rem;
        justify-content: center;
        border-radius: 12px;
        gap: 6px;
    }

    .nexus-limit-pill i {
        font-size: 0.95rem;
    }

    .nexus-dropzone {
        padding: 30px 14px;
    }

    .dropzone-title {
        font-size: 1.15rem;
    }

    .nexus-card {
        padding: 20px 16px;
    }

    #nexus-toast-container {
        left: 12px;
        right: 12px;
        max-width: calc(100% - 24px);
        width: auto;
        bottom: 14px;
    }

    .nexus-toast {
        min-width: 0;
        width: 100%;
    }

    .nexus-footer-bottom {
        padding: 16px 14px;
    }
}

