
:root {
    --background: #080d19;
    --surface: #111827;
    --primary: #6d5dfc;
    --accent: #a78bfa;
    --text: #f8fafc;
    --muted: #94a3b8;
    --border: #263247;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

button, input, textarea, select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

a {
    color: inherit;
    text-decoration: none;
}

.sidebar {
    position: fixed;
    width: 245px;
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.logo {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 45px;
}

.logo span {
    color: var(--accent);
}

.workspace-label, .plan-label, .eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 15px;
}

.nav-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-align: left;
    padding: 13px 15px;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: 0.2s;
}

.nav-item:hover {
    background: #1e293b;
    color: white;
}

.nav-item.active {
    background: #30205e;
    color: #c4b5fd;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 18px;
    background: #1b1834;
    border: 1px solid #443578;
    border-radius: 12px;
}

.sidebar-bottom p {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 15px;
}

main {
    margin-left: 245px;
    min-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 35px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.muted {
    color: var(--muted);
}

.profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: grid;
    place-items: center;
    font-weight: bold;
}

.content {
    padding: 35px;
    max-width: 1500px;
    margin: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: appear 0.25s ease;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -1px;
}

h2 {
    font-size: 21px;
    margin-bottom: 12px;
}

.subtitle {
    color: var(--muted);
    margin: 8px 0 30px;
}

.welcome {
    background: linear-gradient(
        120deg, #30205e, #111827
    );
    padding: 35px;
    border: 1px solid #443578;
    border-radius: 18px;
    margin-bottom: 25px;
}

.welcome p {
    color: #cbd5e1;
    margin: 8px 0 24px;
}

.primary, .secondary {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 11px 19px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
}

.primary {
    background: var(--primary);
}

.primary:hover {
    background: #8476ff;
}

.secondary {
    background: transparent;
    border-color: #475569;
}

.secondary:hover {
    background: #1e293b;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 20px;
    min-width: 0;
}

.panel p {
    color: var(--muted);
    margin-bottom: 15px;
}

.stat {
    margin: 0;
}

.stat h2 {
    color: var(--accent);
    font-size: 38px;
    margin-bottom: 5px;
}

.stat p {
    margin-bottom: 5px;
}

small {
    color: var(--muted);
    font-size: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tool, .email-row {
    width: 100%;
    text-align: left;
    padding: 16px;
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--background);
    color: var(--text);
    transition: 0.2s;
}

.tool {
    display: flex;
    justify-content: space-between;
}

.tool:hover, .email-row:hover {
    border-color: var(--accent);
    background: #1b1834;
}

.tool span {
    color: var(--accent);
}

.email-row strong {
    display: block;
    font-size: 14px;
}

.email-row small {
    display: block;
    margin-top: 5px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

input:not([type="checkbox"]),
textarea, select {
    width: 100%;
    background: var(--background);
    border: 1px solid #334155;
    border-radius: 9px;
    padding: 14px;
    color: white;
    margin-bottom: 20px;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--accent);
}

.output {
    padding: 20px;
    margin: 20px 0;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 9px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-height: 100px;
    color: #cbd5e1;
}

.followup-row, .setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
}

.followup-row {
    justify-content: flex-start;
}

.followup-row input {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.followup-row.completed span {
    text-decoration: line-through;
    color: var(--muted);
}

#followup-list {
    margin-bottom: 25px;
}

footer {
    padding: 25px 0;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .sidebar nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .sidebar-bottom, .workspace-label {
        display: none;
    }

    .logo {
        margin-bottom: 20px;
    }

    main {
        margin-left: 0;
    }

    .content, .topbar {
        padding: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 550px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .profile span {
        display: none;
    }

    .welcome, .panel {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
