/* CSS Variables matching the SaaS theme */
:root {
    --bg-body: #F4F6F9;
    --bg-sidebar: #FFFFFF;
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    /* Accents */
    --teal: #0D9488;
    --teal-hover: #0F766E;
    --teal-light: #E6F4F2;
    --orange: #EA580C;
    --orange-light: #FDF2E9;
    --blue: #2563EB;
    --blue-light: #EFF6FF;
    --red: #DC2626;
    --red-light: #FEF2F2;
    --indigo: #4F46E5;
    --indigo-light: #EEF2FF;

    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    --sidebar-width: 260px;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Subtle grid background overlay for the content area */
.grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Particle Background Canvas (soft light mode particles) */
#network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Layout Container */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* LEFT SIDEBAR */
aside .sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.brand-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav-label {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0 1.5rem 0.75rem 1.5rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item.active a {
    background-color: var(--teal-light);
    color: var(--teal);
}

.nav-item:not(.active) a:hover {
    background-color: #F8FAFC;
    color: var(--text-primary);
}

.nav-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

.badge-soon {
    font-size: 0.65rem;
    background-color: #F1F5F9;
    color: var(--text-muted);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: auto;
    font-weight: 500;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0 0.75rem;
}

/* MAIN CONTENT AREA */
main.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2rem 2.5rem;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header / Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.top-bar h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-pill {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Hero / Coming Soon Container */
.hero-section {
    max-width: 900px;
    margin: 0 auto 4rem auto;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-badge {
    background-color: var(--teal-light);
    border: 1px solid rgba(13, 148, 136, 0.3);
    color: var(--teal);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.status-badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--teal);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px var(--teal);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.4;
    }
}

.hero-section h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero-section h2 span {
    color: var(--teal);
}

.hero-subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* Coming Soon Form Card (SaaS Panel style, NO glassmorphism) */
.coming-soon-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 580px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    text-align: left;
    margin-bottom: 1.5rem;
    position: relative;
}

.form-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: block;
}

.signup-form {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.input-wrapper {
    flex-grow: 1;
    position: relative;
}

.email-input {
    width: 100%;
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.2s ease;
}

.email-input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.email-input.error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.error-message {
    position: absolute;
    bottom: -22px;
    left: 4px;
    font-size: 0.75rem;
    color: var(--red);
    display: none;
    font-weight: 500;
}

/* Notify Button */
.notify-btn {
    background-color: var(--teal);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.notify-btn:hover {
    background-color: var(--teal-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.notify-btn:active {
    transform: translateY(1px);
}

/* Loading Spinner */
.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: spin 0.8s linear infinite;
}

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

/* Success screen inside card */
.success-wrapper {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0;
    animation: cardFadeIn 0.4s ease forwards;
}

.success-icon-container {
    width: 56px;
    height: 56px;
    background-color: var(--teal-light);
    color: var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.success-icon {
    width: 28px;
    height: 28px;
}

.success-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.success-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* What to Expect Features Section */
.features-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: left;
}

/* Features Grid - matching the dashboard metric cards style */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

/* Metrics-style solid white feature card */
.metric-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border-color: #CBD5E1;
}

/* Squircle Icon containers with different light backgrounds */
.metric-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Theme-specific styles matching SaaS screenshot squircle icons */
.icon-orange {
    background-color: var(--orange-light);
    color: var(--orange);
}

.icon-teal {
    background-color: var(--teal-light);
    color: var(--teal);
}

.icon-blue {
    background-color: var(--blue-light);
    color: var(--blue);
}

.icon-red {
    background-color: var(--red-light);
    color: var(--red);
}

.icon-indigo {
    background-color: var(--indigo-light);
    color: var(--indigo);
}

.metric-svg {
    width: 22px;
    height: 22px;
    stroke-width: 2px;
}

.metric-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
}

.metric-label {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.metric-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.15rem;
}

/* Specific card details matching dashboard style (e.g. Left accent indicator bar on Complaints Card) */
.metric-card-accented::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--red);
}

/* Footer */
footer {
    margin-top: auto;
    padding-top: 4rem;
    padding-bottom: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.footer-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    aside .sidebar {
        transform: translateX(-100%);
    }

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

    main.main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 640px) {
    .signup-form {
        flex-direction: column;
        gap: 1rem;
    }

    .notify-btn {
        width: 100%;
    }

    .error-message {
        bottom: -18px;
    }

    .coming-soon-card {
        padding: 1.75rem 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
