:root {
    /* Color Scheme */
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-light: #dbeafe;
    --color-primary-lighter: #eff6ff;
    --color-secondary: #525252;
    --color-accent: #3b82f6;
    --color-success: #16a34a;
    --color-success-dark: #15803d;
    --color-warning: #f59e0b;
    --color-warning-dark: #e69009;
    --color-danger: #dc2626;
    --color-danger-dark: #b91c1c;
    --color-info: #0284c7;
    --color-info-dark: #0369a1;
    --color-background: #f8fafc;
    --color-background-alt: #f1f5f9;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-tertiary: #94a3b8;

    /* Grayscale */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --color-white: #ffffff;
    --color-black: #000000;

    /* Social Colors */
    --color-google: #db4437;
    --color-microsoft: #0078d4;
    --color-facebook: #1877f2;
    
    /* UI Colors */
    --color-menu-bg: var(--color-white);
    --color-menu-hover: rgba(241, 245, 249, 0.8);
    --color-menu-border: #e2e8f0;
    --color-menu-text: var(--color-text);
    --color-menu-disabled: rgba(156, 163, 175, 0.5);
    
    /* Dimensions */
    --size-menu-height: 3.5rem;
    --size-toolbar-height: 3rem;
    --size-sidebar-width: 17.5rem;
    --size-sidebar-min-width: 200px;
    --size-sidebar-max-width: 50vw;
    
    /* Transitions */
    --transition-speed-fast: 0.15s;
    --transition-speed: 0.25s;
    --transition-speed-slow: 0.4s;
    --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-easing-bounce: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    
    /* Border Radius */
    --radius-xs: 0.125rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Z-index */
    --z-index-base: 1;
    --z-index-menu: 1000;
    --z-index-submenu: 1010;
    --z-index-tooltip: 1020;
    --z-index-modal-overlay: 1040;
    --z-index-modal: 1050;
    --z-index-toast: 1100;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-none: 1;
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;   
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;    
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark mode color scheme */
        --color-primary: #3b82f6;
        --color-primary-dark: #2563eb;
        --color-primary-light: #1e3a8a;
        --color-primary-lighter: #1e40af;
        --color-secondary: #a1a1aa;
        --color-accent: #60a5fa;
        --color-success: #22c55e;
        --color-success-dark: #16a34a;
        --color-warning: #f59e0b;
        --color-warning-dark: #e69009;
        --color-danger: #ef4444;
        --color-danger-dark: #dc2626;
        --color-info: #0ea5e9;
        --color-info-dark: #0284c7;
        
        /* Dark mode backgrounds and text */
        --color-background: #0f172a;
        --color-background-alt: #1e293b;
        --color-border: #334155;
        --color-text: #f8fafc;
        --color-text-secondary: #94a3b8;
        --color-text-tertiary: #64748b;
        
        /* Dark mode grayscale */
        --color-gray-50: #111827;
        --color-gray-100: #1f2937;
        --color-gray-200: #374151;
        --color-gray-300: #4b5563;
        --color-gray-400: #6b7280;
        --color-gray-500: #9ca3af;
        --color-gray-600: #d1d5db;
        --color-gray-700: #e5e7eb;
        --color-gray-800: #f3f4f6;
        --color-gray-900: #f9fafb;
        --color-white: #1e1e2d;
        --color-black: #ffffff;
        
        /* Dark mode UI colors */
        --color-menu-bg: #111827;
        --color-menu-hover: rgba(30, 41, 59, 0.8);
        --color-menu-border: #334155;
        --color-menu-text: #f8fafc;
        --color-menu-disabled: rgba(148, 163, 184, 0.5);
        
        /* Dark mode shadows */
        --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
        --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
        --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
        --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-modal-overlay);
    opacity: 0;
    transition: opacity var(--transition-speed) var(--transition-easing);
    backdrop-filter: blur(4px);
}

@media (prefers-color-scheme: dark) {
    .loading-overlay {
        background-color: rgba(15, 23, 42, 0.9);
    }
}

.loading-overlay.visible {
    display: flex;
    opacity: 1;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid var(--color-primary-light);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-message {
    color: var(--color-text);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    max-width: 80%;
    text-align: center;
    line-height: var(--line-height-tight);
}

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

/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100%;
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: var(--line-height-normal);
    font-size: var(--font-size-base);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Accessibility classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* app container layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: var(--color-background);
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    background: var(--color-menu-bg);
    color: var(--color-menu-text);
    height: var(--size-menu-height);
    padding: 0 var(--space-md);
    box-shadow: var(--shadow-sm);
    z-index: var(--z-index-menu);
    user-select: none;
    position: relative;
    border-bottom: 1px solid var(--color-menu-border);
}

.app-logo {
    display: flex;
    align-items: center;
    margin-right: var(--space-lg);
    gap: var(--space-sm);
}

.app-title {
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    white-space: nowrap;
    letter-spacing: 0.015625rem;
    color: var(--color-primary);
}

.app-version {
    font-size: var(--font-size-xs);
    opacity: 0.8;
    margin-left: var(--space-xs);
    font-weight: var(--font-weight-normal);
}

/* Menu Bar - Enhanced hover states */
.menu-bar {
    display: flex;
    flex-grow: 1;
    height: 100%;
    padding: var(--space-xs);
    position: relative;
    font-family: var(--font-sans);
}

.menu-item {
    position: relative;
    padding: 0 var(--space-md);
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all var(--transition-speed) var(--transition-easing);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.015em;
    border-radius: var(--radius-sm);
    margin: 0 var(--space-xs);
}

.menu-item:hover, .menu-item:focus-within {
    background-color: var(--color-menu-hover);
}

.menu-text-container {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
}

.menu-shortcut {
    color: var(--color-text-secondary);
    margin-left: var(--space-md);
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
}

/* Submenu System - More polished appearance */
.submenu {
    position: absolute;
    min-width: 220px;
    background-color: var(--color-menu-bg);
    border: 1px solid var(--color-menu-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: none;
    z-index: var(--z-index-submenu);
    padding: var(--space-xs) 0;
    animation: fadeIn var(--transition-speed) var(--transition-easing);
    backdrop-filter: blur(8px);
}

.menu-item > .submenu {
    top: 100%;
    left: 0;
    margin-top: var(--space-xs);
}

.submenu .submenu {
    left: 100%;
    top: calc(var(--space-xs) * -1);
    margin-left: var(--space-xs);
}

.submenu-item {
    padding: var(--space-sm) var(--space-md);
    display: flex;
    gap: var(--space-sm);
    opacity: 1;
    cursor: pointer;
    align-items: center;
    transition: all var(--transition-speed) var(--transition-easing);
    position: relative;
    color: var(--color-menu-text);
    font-size: var(--font-size-sm);
    margin: 0 var(--space-xs);
    border-radius: var(--radius-sm);
}

.submenu-item:hover, .submenu-item:focus {
    background-color: var(--color-menu-hover);
}

.submenu-item.has-submenu::after {
    margin-left: auto;
    color: var(--color-text-secondary);
}

.menu-separator {
    height: 1px;
    background-color: var(--color-menu-border);
    margin: var(--space-xs) 0;
    border: none;
}

.disabled, .toolbar-btn:disabled {
    opacity: 0.5;
    color: var(--color-menu-disabled);
    pointer-events: none;
    cursor: not-allowed;
}

/* User Controls */
.user-controls {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: var(--space-md);
    padding-left: var(--space-md);
}

.user-status {
    font-size: var(--font-size-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-secondary);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: var(--color-success);
}

/* Button Styles */
.btn {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-speed) var(--transition-easing);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-none);
    user-select: none;
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background-color: var(--color-gray-50);
    border-color: var(--color-gray-400);
}

.btn-danger {
    background-color: var(--color-danger);
    color: var(--color-white);
}

.btn-danger:hover {
    background-color: var(--color-danger-dark);
}

.btn-success {
    background-color: var(--color-success);
    color: var(--color-white);
}

.btn-success:hover {
    background-color: var(--color-success-dark);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Toolbar Styles */
.toolbar-container {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-bottom: 1px solid var(--medium-gray);
    z-index: var(--z-index-toolbar);
}

.toolbar-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg, rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 20%,
        rgba(0, 0, 0, 0.1) 80%,
        rgba(0, 0, 0, 0) 100%
    );
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 12px;
    align-items: center;
    justify-content: flex-start;
}

.toolbar::-webkit-scrollbar {
    display: none;
}

.toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding-right: 12px;
    margin-right: 12px;
    border-right: 1px solid var(--medium-gray);
    position: relative;
}

.toolbar-group:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

.toolbar-group img {
    width: 24px;
    height: 24px;
}

.toolbar-group:after {
    content: "";
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background-color: var(--color-gray-200);
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-group:last-child:after {
    display: none;
}

.toolbar-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) var(--transition-easing);
    color: var(--color-gray-700);
    position: relative;
}

.toolbar-btn img,
.toolbar-btn svg {
    width: 24px;
    height: 24px;
}

.toolbar-btn:hover {
    background-color: var(--color-gray-100);
    color: var(--color-primary);
}

.toolbar-btn:active {
    transform: scale(0.95);
}

.toolbar-btn.active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-gray-800);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--transition-speed);
    z-index: var(--z-index-submenu);
    pointer-events: none;
    box-shadow: var(--shadow-sm);
}

.toolbar-btn:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 200px;
    background-color: var(--color-white);
}

.resize-handle-vertical {
    height: 5px;
    cursor: row-resize;
    background-color: var(--color-gray-200);
    transition: background-color 0.2s;
    position: relative;
    z-index: 801;
}

.resize-handle-vertical:hover {
    background-color: var(--color-primary);
}

/* Logger content */
.log-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
}

.sidebar-container {
    display: flex;
    height: 100%;
    position: relative;
}

.sidebar-container .sidebar.collapsed {
    display: flex; 
}

.logger {
    height: 200px; /* Initial height */
    min-height: 100px; /* Minimum height */
    max-height: 70vh; /* Maximum height */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--color-background-alt);
    border-top: 1px solid var(--color-border);
}

.logger-header {
    display: flex;
    justify-content: flex-end;
    background: #4e5f70;
    padding: 4px 8px;
    border-bottom: 1px solid #444;
}

.logger-controls .logger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    margin-left: 8px;
    cursor: pointer;
}

.logger-controls .logger-btn:hover {
    color: #1abc9c;
}

.log-entry {
    padding: 5px 10px;
    font-family: monospace;
    display: flex;
    gap: 8px;
    align-items: center;
}

.log-time {
    color: #aaa;
    min-width: 80px;
}

.log-icon i {
    min-width: 20px;
}

.log-info    { color: #3498db; }
.log-success { color: #2ecc71; }
.log-warning { color: #f39c12; }
.log-error   { color: #e74c3c; }

.log-message i {
    margin-right: 5px;
}

/* Sidebar Styles */
.sidebar {
    width: var(--size-sidebar-width);
    min-width: 200px; /* Minimum width */
    max-width: 50vw; /* Maximum width */
    background-color: var(--color-white);
    border-right: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width var(--transition-speed) var(--transition-easing);
    z-index: 800;
    resize: none; /* Disable default resize */
}

.sidebar.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-white);
    user-select: none;
    color: var(--color-gray-800);
}

.sidebar-controls {
    display: flex;
    gap: 4px;
}

.sidebar-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-600);
    font-size: 12px;
    transition: all var(--transition-speed) var(--transition-easing);
}

.sidebar-btn:hover {
    background-color: var(--color-gray-100);
    color: var(--color-gray-900);
}

.resize-handle {
    width: 5px;
    cursor: col-resize;
    background-color: var(--color-gray-200);
    transition: background-color 0.2s;
    position: relative;
    z-index: 801;
}

.resize-handle:hover {
    background-color: var(--color-primary);
}

.project-explorer {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--color-gray-200);
    font-size: 12px;
    color: var(--color-gray-600);
    background-color: var(--color-gray-50);
}

.disk-usage {
    margin-top: 8px;
}

.usage-bar {
    height: 6px;
    background-color: var(--color-gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 4px;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* Auth Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    font-family: "Segoe UI", sans-serif;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
  
.modal.active {
    opacity: 1;
    visibility: visible;
}
  
.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}
  
.modal.active .modal-content {
    transform: translateY(0);
}
  
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-gray-500);
}

/* Auth Container Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    color: var(--color-menu-text);
    background-color: var(--color-background);
    background-image: linear-gradient(135deg, var(--color-background) 0%, var(--color-background-alt) 100%);
}

.auth-wrapper {
    width: 100%;
    max-width: 28rem;
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2xl);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-tagline {
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
    font-size: 1.1rem;
    font-weight: 400;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-gray-200);
    margin-bottom: 0.75rem; /* Reduced from 1.5rem */
}

.auth-tab {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--color-gray-500);
    cursor: pointer;
    position: relative;
    margin-bottom: -1px;
    font-size: 0.9rem;
}

.auth-tab.active {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
}
 
.auth-tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
}
  
.auth-form {
    display: none;
}
  
.auth-form.active {
    display: block;
}
  
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-gray-700);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
}
  
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--color-primary);
    text-decoration: none;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--color-gray-600);
}

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

.user-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    cursor: pointer;
    padding: 8px 12px; /* Adjust the padding to make the button larger */
    font-size: 12px; /* Adjust the font size for the text inside */
}

.user-dropdown i {
    font-size: 24px; /* Adjust the size of the dropdown icon */
    margin-right: 8px; /* Adjust the space between icon and text */
}

.user-dropdown:hover {
    opacity: 0.85;
}

.user-dropdown:focus-within {
    outline: 2px solid var(--color-accent);
}


.btn i {
    margin-right: 6px;
}

.dropdown-content {
    background-color: #f1f1f1; /* Set the background color of the dropdown */
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 220px;
    padding: 8px 0;
    position: absolute;
    right: 0;
    z-index: 100;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content .dropdown-item:hover {
    background-color: #e2e2e2; /* Slightly darker color on hover */
}

.dropdown-item {
    display: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #ececec;
}

.dropdown-divider {
    border-top: 1px solid #ddd;
    margin: 8px 0;
}

.user-email, .user-organization, .user-plan {
    padding: 4px 0;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.show-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed-fast);
}

.password-group {
    position: relative;
}

.password-input-container {
    position: relative;
}

.password-input-container input {
    padding-right: 2.5rem;
}

.show-password:hover {
    color: var(--color-primary);
    background-color: var(--color-background-alt);
}
  
.btn-block {
    width: 100%;
}
  
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.wide-form {
    margin: 0 auto;
    padding: 2rem;
}

.auth-message-container {
    margin-bottom: 1.5rem;
    min-height: 3rem;
}

.auth-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

.auth-message.error {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--color-danger);
    border-left: 3px solid var(--color-danger);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-out;
}

.auth-message.success {
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--color-success);
    border-left: 3px solid var(--color-success);
}

.auth-message.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border-left: 3px solid var(--color-warning);
}

.auth-message i {
    margin-right: 0.5rem;
}

/* Social Auth Buttons */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--color-border);
    margin: 0 1rem;
}

.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.btn-google {
    background-color: var(--color-google);
    color: white;
}

.btn-google:hover {
    background-color: #c1351d;
}

.btn-microsoft {
    background-color: var(--color-microsoft);
    color: white;
}

.btn-microsoft:hover {
    background-color: #106ebe;
}

/* Button Loading State */
.btn-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-spinner {
    display: block;
}

/* Animation */
@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.submenu-arrow {
    margin-left: 8px;
    color: var(--color-menu-text);
}

/* Show submenu on hover and focus */
.menu-item:hover > .submenu,
.menu-item:focus-within > .submenu,
.submenu-item.has-submenu:hover > .submenu,
.submenu-item.has-submenu:focus-within > .submenu {
    display: block;
}

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




.logo-image {
    height: 0.5rem;
    margin-right: 0.75rem;
}

.container {
    display: 'grid';
    gap: '10px';
}



.content-logger-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}
.material-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.material-dialog .dialog-content {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.material-dialog h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-grid {
    display: grid;
    gap: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 10px;
    align-items: center;
}

.form-row label {
    font-weight: bold;
}

.form-row .icon-btn {
    grid-column: 3;
}

.coordinate-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
}

.coord-input {
    text-align: center;
}


.form-control {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.icon-btn img {
    width: 20px;
    height: 20px;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.constraint-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.constraint-dialog .dialog-content {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.constraint-dialog h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.primary-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.secondary-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.primary-btn:hover {
    background-color: #0069d9;
}

.secondary-btn:hover {
    background-color: #5a6268;
}

#fracsimAboutDialog {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-out;
}

#fracsimLicenseDialog {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.about-content {
    margin: 15px 0;
    line-height: 1.6;
}

.license-scroll-container {
    overflow-y: auto;
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    flex-grow: 1;
    max-height: 60vh;
}

.license-content {
    white-space: pre-wrap;
    font-family: monospace;
    line-height: 1.4;
    margin: 0;
}

.dialog-actions {
    text-align: right;
    margin-top: 20px;
}

.close-dialog {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.close-dialog:hover {
    background-color: #0056b3;
}


.billing-toggle {
    display: flex;
    gap: 1rem;
    margin-top: 10px;
}
.billing-toggle label {
    font-weight: 500;
    cursor: pointer;
}
.billing-toggle .save {
    color: green;
    font-size: 0.8rem;
}







/* Icons - Consistent icon sizing */
.menu-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: inherit;
}

.shortcut {
    margin-left: auto;
    padding-left: 16px;
    color: var(--color-gray-400);
    font-size: 11px;
    font-family: 'Roboto Mono', monospace;
}



.app-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.action-buttons-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding: 12px 0;
    border-top: 1px solid #e0e0e0;
}

/* FormBuilder Base Styles */
.form-builder-element {
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
}

/* Label styling */
.form-builder-label {
    align-self: center;
    font-weight: 600;
}

/* Input fields */
.form-builder-input, 
.form-builder-select {
    width: 93%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Checkbox */
.form-builder-checkbox {
    transform: scale(1.2);
}

/* Separator */
.form-builder-separator {
    border: none;
    height: 1px;
    background-color: #ddd;
    margin: 10px 0;
}

.form-builder-input:focus,
.form-builder-select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.2);
}

.form-builder-button {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.form-builder-icon {
    width: 32px;
    height: 32px;
}

/* Modal Form Grid Layout */
#form {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    padding-top: 10px;
}


.btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-cancel {
    border: 1px solid #ccc;
    background: white;
    color: #333;
}

.btn-cancel:hover {
    background: #f5f5f5;
}

.btn-primary {
    padding: 8px 24px;
    border: none;
    background: #1976d2;
    color: white;
    font-weight: 500;
}

.btn-primary:hover {
    background: #1565c0;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.vtk-container {
    flex: 1;
    position: relative;
    min-height: 500px;
    background-color: white;
    overflow: hidden;
    min-width: 300px; /* Ensure VTK container doesn't collapse too much */
}

#vtkContainer {
    width: 100%;
    height: 100%;
}

.status-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start; /* or space-between / center, depending on layout */
    padding: 6px 12px;
    background-color: var(--color-gray-100);
    border-top: 1px solid var(--color-gray-300);
    font-size: 13px;
    color: var(--color-gray-700);
    gap: 24px; /* spacing between items */
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px; /* space between icon and text */
    white-space: nowrap;
}

#registerForm {
    overflow-y: auto;
    padding-right: 8px; /* Prevent scrollbar overlap */
}

#registerForm.wide-form {
    padding: 1rem;
    margin: 0 auto;
}

.form-error {
    color: var(--color-danger);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    height: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.form-error.show {
    opacity: 1;
}

.form-section {
    padding: 0.5rem;
    background: var(--color-background-alt);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-section-title {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

/* Enhanced Form Controls */
.custom-select {
    position: relative;
}

.custom-select select {
    appearance: none;
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    background-color: white;
}

.custom-select::after {
    content: "⌄";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.password-strength {
    position: relative;
}

.strength-meter {
    height: 3px;
    background: var(--color-border);
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.password-requirements li {
    display: flex;
    align-items: center;
}

.password-requirements li::before {
    content: "◯";
    font-size: 0.8rem;
}

.password-requirements li[data-requirement="met"]::before {
    content: "✔";
    color: var(--color-success);
}

/* Terms Styling */
.terms-group {
    margin: 1rem 0;
    padding: 0.75rem;
    font-size: 0.875rem;
}

.terms-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.terms-link {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: var(--color-primary-dark);
}

/* Account Settings Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
  
.modal.active {
    opacity: 1;
    visibility: visible;
}
  
.modal-content {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    transition: transform 0.3s ease;
  }
  
.modal.active .modal-content {
    transform: translateY(0);
  }
  
.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
  
.modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: #1c1c1c;
}

.modal-header p {
    margin: 5px 0 0;
    color: #777;
    font-size: 15px;
}
  
.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-body {
    padding: 1.5rem;
  }
  
.modal-footer {
    padding: 20px 32px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    color: #666;
}
  
.modal-footer a {
    color: #0078d7;
    text-decoration: none;
}

.modal-footer a:hover {
    text-decoration: underline;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
  }
  
  .security-badge {
    margin-top: 10px;
    font-size: 13px;
    color: #999;
}

.security-badge i {
    margin-right: 6px;
}  
  .profile-avatar {
    font-size: 3rem;
    color: var(--color-primary);
    margin-right: 1rem;
  }
  
  .profile-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
  }
  
  .profile-info p {
    margin: 0.25rem 0;
    color: var(--color-gray-600);
    font-size: 0.875rem;
  }
  
  .account-section {
    margin-bottom: 2rem;
  }
  
  .account-section h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--color-gray-700);
  }
  
  .plan-details {
    background-color: var(--color-background-alt);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
  }
  
  .plan-badge {
    display: inline-flex;
    align-items: center;
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    margin-bottom: 0.5rem;
  }
  
  .trial-days {
    background-color: var(--color-warning);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    margin-left: 0.5rem;
  }
  
  .plan-description {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    margin-bottom: 1rem;
  }
  
  .account-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }
  
  /* Plan Options */
  .plan-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .plan-option {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all 0.3s ease;
  }
  
  .plan-option:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
  }
  
  .plan-option h4 {
    margin-top: 0;
    font-size: 1.1rem;
  }
  
  .plan-price {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.5rem 0;
  }
  
  .plan-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    font-size: 0.875rem;
  }
  
  .plan-features li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.25rem;
  }
  
  .plan-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-success);
  }
  
  .select-plan {
    width: 100%;
    margin-top: 1rem;
  }

/* Compact Form Styles */
.compact-form {
    padding: 0.5rem;
  }
  
  .compact-grid {
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .compact-group {
    margin-bottom: 0.75rem;
  }
  
  .compact-group label {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
  }
  
  .compact-group input,
  .compact-select select {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .compact-password {
    margin-top: 0.25rem;
  }
  
  .compact-requirements {
    margin-top: 0.25rem;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    font-size: 0.75rem;
  }
  
  .compact-requirements li {
    padding: 0.1rem 0;
  }
  
  .compact-license {
    margin-top: 0.25rem;
    font-size: 0.75rem;
  }
  
  .compact-terms {
    margin: 0.5rem 0;
    font-size: 0.8125rem;
  }
  
  .compact-terms .terms-label {
    line-height: 1.3;
  }
  
  .btn-compact {
    padding: 0.6rem;
    font-size: 0.875rem;
    margin: 0.5rem 0;
  }
  
  .compact-footer {
    margin-top: 0.75rem;
    font-size: 0.875rem;
  }  

.tree-view {
    --tree-item-height: 32px;
    --tree-icon-size: 15px;
    --tree-indent: 24px;
    --tree-icon-color: var(--color-gray-500);
    --tree-active-icon-color: var(--color-primary);
    --tree-hover-bg: var(--color-gray-50);
    --tree-active-bg: color-mix(in srgb, var(--color-primary-light) 15%, transparent);
    
    list-style: none;
    padding: 4px 0;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: var(--color-gray-800);
}

/* Tree Items - Enhanced with better transitions */
.tree-item {
    cursor: pointer;
    display: block;
    position: relative;
    user-select: none;
    padding-left: 8px; 
    margin-bottom: 2px;
    border-radius: var(--radius-md);
    transition: 
        background-color var(--transition-speed) var(--transition-easing),
        color var(--transition-speed) var(--transition-easing);
    
    &:focus-visible {
        outline: 2px solid var(--color-primary-light);
        outline-offset: 2px;
    }
}

.tree-details-container {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    background-color: var(--color-gray-50); /* subtle background for contrast */
    border-radius: var(--radius-md);
    border: 1px solid var(--color-gray-200); /* light border */
    margin: 4px 8px;
    gap: 4px;
}

.tree-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-gray-200);
    font-size: 13px;
    line-height: 1.4;
    transition: background-color 0.2s ease;
}

.tree-detail-row:last-child {
    border-bottom: none; /* remove bottom border from last item */
}

.tree-detail-row:hover {
    background-color: var(--color-gray-100); /* subtle hover effect */
}

.detail-label {
    flex: 0 0 80%;
    font-weight: 500;
    color: var(--color-gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-value {
    flex: 0 0 20%;
    text-align: right;
    color: var(--color-gray-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


  
/* Responsive improvements */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        left: 0;
        top: var(--size-menu-height);
        bottom: 0;
        z-index: var(--z-index-modal);
        box-shadow: var(--shadow-lg);
    }
    
    .compact-grid {
        grid-template-columns: 1fr;
      }
      
      .compact-requirements {
        grid-template-columns: repeat(2, 1fr);
      }

    .sidebar-collapsed {
        transform: translateX(-100%);
    }

    .toolbar {
        gap: 4px;
        flex-wrap: wrap;
        padding: 4px;
    }
    .toolbar-group {
        padding-right: 8px;
        gap: 2px;
        flex-wrap: wrap;
    }    

    .wide-form {
        padding: 1rem;
        max-width: 95%;
    }

    .tree-view {
        --tree-indent: 18px;
    }
    
    .tree-details {
        grid-template-columns: 1fr;
        
        .tree-detail-label {
            text-align: left;
            padding-right: 0;
            padding-top: 4px;
            border-bottom: 1px dashed var(--color-gray-200);
        }
    }    
}



.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-group label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    display: block;
}

.form-group input,
.custom-select select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

.show-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-gray-500);
    cursor: pointer;
    padding: 0.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--color-gray-600);
}

.auth-footer a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-error {
    color: var(--color-danger);
    background-color: rgba(220, 38, 38, 0.1);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.auth-success {
    color: var(--color-success);
    background-color: rgba(22, 163, 74, 0.1);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-wrapper {
        padding: 1.5rem;
    }
    
    .auth-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (forced-colors: active) {
    .disabled {
        color: GrayText;
    }
}

/* Animation for smoother transitions */
@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}


/* Tab Styles */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Pricing table */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 15px;
    text-align: center;
}

.pricing-table th,
.pricing-table td {
    padding: 16px 12px;
    border: 1px solid #eee;
}

.pricing-table thead th {
    background-color: #f9fafc;
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.pricing-table .highlighted {
    background-color: #f0f6ff;
    border: 2px solid #0078d7;
}

.pricing-table .price {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #0078d7;
    margin-top: 4px;
}

.pricing-table .tag {
    display: inline-block;
    background-color: #0078d7;
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 6px;
}

.btn.btn-primary {
    background-color: #0078d7;
    color: white;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.fas.fa-check {
    color: #28a745;
    font-size: 16px;
}

.fas.fa-times {
    color: #d9534f;
    font-size: 16px;
}

.btn.btn-primary:hover {
    background-color: #005fa3;
}

.tab-btn.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

.tab-btn:hover:not(.active) {
    color: #333;
    border-bottom-color: #ddd;
}

.tab-content {
    display: none;
}

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

/* Account Card Styles */
.account-card {
    max-width: 700px;
    margin: auto;
    padding: 1rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
  
.payment-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}


.method-icon i,
.method-icon img {
  font-size: 28px;
  height: 28px;
  width: 28px;
}

.method-icon img {
  object-fit: contain;
}

.method-details {
  font-size: 0.9rem;
  color: #444;
}

.add-method-wrapper {
  margin-top: 1.5rem;
  text-align: center;
}

.add-payment-method {
  background: #007bff;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.3rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.method-selector {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed #ccc;
  background: #fefefe;
  border-radius: 8px;
}

.method-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.method-button {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.method-button:hover {
    background: #f0f0f0;
}

.method-button::after {
    content: attr(data-label);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.method-button:hover::after {
    opacity: 1;
}

.payment-icon {
    width: 40px;
    height: auto;
    font-size: 2em; /* for Font Awesome icons */
}

.method-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.method-options button:hover {
  background: #e9ecef;
}

.card-header {
    margin-bottom: 20px;
}

.card-header h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.card-header p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

/* Profile Header Styles */
.profile-header {
    display: flex;
    align-items: center;
    padding: 20px;
}

.profile-avatar {
    position: relative;
    margin-right: 20px;
}

.avatar-initials {
    width: 80px;
    height: 80px;
    background-color: #0066cc;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
}

.verification-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.verification-badge i {
    color: #4CAF50;
    font-size: 18px;
}

.profile-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.3em;
}

.user-meta {
    margin-bottom: 10px;
    color: #666;
}

.user-meta span {
    display: block;
    margin-bottom: 3px;
}

.account-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* FAQ Section */
.plan-faq {
    padding: 30px 32px;
    background-color: #f9fafc;
    border-top: 1px solid #eee;
}

.plan-faq h5 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #333;
}

.faq-item {
    margin-bottom: 12px;
}

.faq-question {
    font-weight: 600;
    color: #222;
}

.faq-answer {
    color: #555;
    margin-top: 4px;
}


.status-badge {
    background: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.member-since {
    color: #666;
    font-size: 0.9em;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.error-message {
    color: red;
    display: none;
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #0066cc;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Plan Details */
.plan-details {
    margin-top: 20px;
}

.plan-header {
    margin-bottom: 20px;
}

.plan-badge {
    background: #f0f7ff;
    border: 1px solid #cce0ff;
    border-radius: 6px;
    padding: 10px 15px;
    display: inline-flex;
    flex-direction: column;
}

#currentPlan {
    font-weight: bold;
    font-size: 1.2em;
    color: #0066cc;
}

.trial-days {
    font-size: 0.9em;
    color: #666;
}

.plan-progress {
    margin-top: 15px;
}

.progress-bar {
    height: 6px;
    background: #0066cc;
    border-radius: 3px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.8em;
    color: #666;
}

.plan-features-highlight {
    margin: 25px 0;
}

.plan-features-highlight h5 {
    margin-bottom: 10px;
    color: #333;
}

.plan-features-highlight ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features-highlight li {
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features-highlight i {
    color: #4CAF50;
}

.plan-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Usage Statistics */
.usage-stats {
    margin-top: 15px;
}

.stat-item {
    margin-bottom: 15px;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-weight: 500;
    margin-bottom: 5px;
}

/* Danger Zone */
.danger-zone {
    border: 1px solid #ffebee;
    background-color: #fff5f5;
}

.danger-zone .card-header h4 {
    color: #d32f2f;
}

.danger-actions {
    margin-top: 15px;
}

.danger-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #ffebee;
}

.danger-content h5 {
    margin: 0 0 5px 0;
    color: #d32f2f;
}

.danger-content p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.btn-danger {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background-color: #b71c1c;
}

.dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.title-bar {
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 8px 8px 0 0;
}

.title {
    margin: 0;
    font-size: 1.6em;
}

.close-button {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    position: absolute;
    top: 10px;
    right: 10px;
}

.form {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 0px;
    padding-bottom: 20px;
    font-family: Arial, sans-serif;
}

.buttons-section {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cancel-btn, .submit-btn {
    padding: 12px 20px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.cancel-btn {
    background-color: #f44336;
}

.cancel-btn:hover {
    background-color: #e53935;
}

.submit-btn {
    background-color: #4CAF50;
}

.submit-btn:hover {
    background-color: #388e3c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .settings-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 10px;
        font-size: 0.9em;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .account-status {
        justify-content: center;
    }
    
    .form-actions, .plan-actions {
        flex-direction: column;
    }
    
    .danger-action {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}


