/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Based on Toolomix Logo */
    --primary-color: #f53939;
    --primary-hover: #e02d2d;
    --secondary-color: #fb912f;
    --accent-color: #f86934;
    --success-color: #10b981;
    --danger-color: #f53939;
    --warning-color: #fb912f;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #111111;
    --bg-sidebar: #111111;
    
    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-white: #ffffff;
    
    /* Border Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #475569;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Spacing */
    --sidebar-width: 320px;
    --header-height: 80px;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 50px !important;
    margin-bottom: 50px !important;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.mobile-menu-toggle:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-white);
    border-radius: 1px;
    transition: all var(--transition-normal);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    color: var(--text-white);
    padding: 32px 24px;
    overflow-y: auto;
    transition: transform var(--transition-normal);
    z-index: 1000;
    box-shadow: var(--shadow-xl);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Logo Section */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    width: 120px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.logo:hover {
    transform: scale(1.05);
}



/* Navigation Menu */
.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    color: var(--text-tertiary);
    text-decoration: none;
    border-radius: 12px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left var(--transition-slow);
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.nav-item.active .nav-link {
    color: var(--text-white);
    background: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Main Content */
.main-content {
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* Content Header */
.content-header {
    background: var(--bg-primary);
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Dashboard Content */
.dashboard-content {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 40px;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.welcome-card h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.welcome-card p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.6;
}


/* Featured Tools Section */
.featured-tools {
    margin-bottom: 40px;
}

.featured-tools h4 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: left var(--transition-normal);
}

.tool-card:hover::before {
    left: 0;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.tool-icon {
    font-size: 32px;
    margin-bottom: 16px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 16px;
}

.tool-card h5 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Recent Activity Section */
.recent-activity h4 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.activity-list {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    transition: background-color var(--transition-fast);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: var(--bg-secondary);
}

.activity-icon {
    font-size: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 12px;
    flex-shrink: 0;
}

.activity-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(4px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-content {
        padding: 24px;
    }
    
    .welcome-card {
        padding: 32px 24px;
    }
    
    .welcome-card h3 {
        font-size: 28px;
    }
    
    .welcome-card p {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .logo {
        width: 100px;
    }
    
    
    .content-header {
        padding: 20px 24px 20px 80px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .header-actions {
        gap: 12px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .dashboard-content {
        padding: 20px 16px;
    }
    
    .welcome-card {
        padding: 24px 20px;
    }
    
    .welcome-card h3 {
        font-size: 24px;
    }
    
    .welcome-card p {
        font-size: 15px;
    }
    
    
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tool-card {
        padding: 24px 20px;
    }
    
    .activity-item {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 80px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px 20px 16px 70px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .welcome-card h3 {
        font-size: 20px;
    }
    
    .welcome-card p {
        font-size: 14px;
    }
    
    
    
    .nav-text {
        font-size: 13px;
    }
    
    .nav-link {
        padding: 14px 16px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.btn:focus,
.nav-link:focus,
.mobile-menu-toggle:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}


/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000000;
        --text-secondary: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Search Container Styles */
.search-container {
    position: relative;
}

.search-input {
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    width: 280px;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: block !important;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 57, 57, 0.1);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}
