* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

.dashboard {
    display: flex;
    height: 100vh;
    max-height: 100vh;
}

/* Navigation Panel */
.nav-panel {
    width: 280px;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(.2, .9, .2, 1);
}

.nav-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.nav-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.nav-header p {
    color: #64748b;
    font-size: 0.875rem;
}

.nav-menu {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-menu::-webkit-scrollbar {
    width: 4px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.nav-item {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-left-color: rgba(99, 102, 241, 0.3);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-left-color: #6366f1;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-icon {
    font-size: 1.25rem;
    width: 2rem;
    text-align: center;
}

.nav-text {
    flex: 1;
}

.nav-text > div:first-child {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.925rem;
}

.nav-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.125rem;
}

.nav-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #16a34a;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #16a34a;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Content Panel */
.content-panel {
    flex: 1;
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.content-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    flex-shrink: 0;
    z-index: 20;
}

.content-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    color: #64748b;
    font-size: 0.875rem;
}

.content-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Welcome Screen */
.welcome-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    padding-bottom: 120px;
    overflow-y: auto;
}

/* Center the welcome content */
#welcome-content .content-container {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 80px;
}

/* Welcome Screen - stacked icon above title */
#welcome-content .welcome-icon {
    display: block;
    font-size: 4rem;        /* big icon */
    margin-bottom: 1rem;    /* space below icon */
    text-align: center;
}

#welcome-content .content-container h2 {
    display: block;
    font-size: 2.25rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
    text-align: center;
}

#welcome-content .content-container p {
    margin: 0 auto 1.75rem;
    color: #64748b;
    max-width: 760px;
    line-height: 1.6;
    text-align: center;
}

/* Container general */
.content-container {
    max-width: 600px;
    text-align: left;
    line-height: 1.6;
    width: 100%;
    padding-bottom: 80px;
}

.content-container h3 {
    color: #1e293b;
    margin: 1.5rem 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.content-container ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-container p {
    margin-bottom: 1.5rem;
}

.text-section {
    width: 100%;
}

/* Tool Grid — 3 cards side-by-side */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
}

.tool-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tool-preview:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.tool-preview-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-preview h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.tool-preview p {
    opacity: 0.9;
    font-size: 0.925rem;
}

.content-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: block;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.mobile-nav-toggle span {
    width: 24px;
    height: 3px;
    background: #1e293b;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.show {
    display: block;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard {
        position: relative;
    }

    .nav-panel {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        width: 280px;
        background: rgba(255, 255, 255, 0.98);
    }

    .nav-panel.open {
        transform: translateX(0);
    }

    .content-panel {
        width: 100%;
    }

    .content-header {
        padding: 1rem;
        padding-top: 4rem;
    }

    .welcome-screen {
        padding: 1rem;
    }

    .tool-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tool-preview {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-panel {
        width: 100vw;
    }

    .content-title {
        font-size: 1.25rem;
    }

    .welcome-screen h2 {
        font-size: 1.5rem;
    }

    .welcome-screen p {
        font-size: 1rem;
    }

    .welcome-icon {
        font-size: 3rem;
    }
}

/* Tablet landscape */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-panel {
        width: 240px;
        min-width: 240px;
    }

    .nav-item {
        padding: 0.625rem 1rem;
    }

    .content-header {
        padding: 1.25rem 1.5rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .nav-panel {
        width: 320px;
        min-width: 320px;
    }

    .content-header {
        padding: 2rem 2.5rem;
    }
}

/* Print styles */
@media print {
    .nav-panel,
    .mobile-nav-toggle {
        display: none;
    }

    .content-panel {
        width: 100%;
    }
}
