:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #eff6ff;
    --accent: #ef4444;
    --accent-light: #fef2f2;
    --bg-app: #f8fafc;
    --bg-panel: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-white: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --radius: 0.75rem;
    /* 12px for modern look */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

.topbar {
    background-color: #ffffff;
    /* White background like modern dashboards */
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.9);
}

.topbar__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand__logo {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.5px;
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    /* Softer radius */
}

.brand__meta {
    line-height: 1.2;
}

.brand__name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
}

.brand__tag {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.topbar__nav {
    display: flex;
    gap: 8px;
    /* Remove background container */
    padding: 0;
}

.topbar__nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.topbar__nav a:hover,
.topbar__nav a.active {
    background: var(--bg-app);
    color: var(--primary);
}

#goApp {
    background: var(--primary);
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    height: 40px;
    padding: 0 24px;
    border-radius: 99px;
    /* Pill shape */
    font-size: 14px;
}

#goApp:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero {
    background: white;
    margin-top: 32px;
    padding: 64px;
    border-radius: 24px;
    /* Large radius */
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.chip {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 99px;
    margin-bottom: 24px;
    display: inline-block;
    letter-spacing: 0.5px;
}

.hero h1 {
    color: var(--text-main);
    font-size: 48px;
    /* Larger title */
    font-weight: 800;
    margin: 0 0 24px 0;
    line-height: 1.1;
    letter-spacing: -1px;
}

.lead {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero__cta {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    height: 44px;
}

.btn--primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn--primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn:not(.btn--primary):not(.btn--danger):not(.btn--outline):not(.btn-icon) {
    background-color: white;
    border-color: var(--border);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.btn:not(.btn--primary):not(.btn--danger):not(.btn--outline):not(.btn-icon):hover {
    background-color: var(--bg-app);
    border-color: #cbd5e1;
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 16px;
}

.btn--outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn--danger {
    background-color: #fff;
    color: var(--accent);
    border: 1px solid #fee2e2;
    background: #fef2f2;
}

.btn--danger:hover {
    background-color: #fee2e2;
    border-color: #fecaca;
}

.btn--icon-only {
    padding: 0;
    width: 44px;
}

.section {
    padding: 64px 0;
}

.section h2 {
    font-size: 24px;
    color: var(--text-main);
    /* Modern heading style */
    border-left: none;
    padding-left: 0;
    margin-bottom: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.card {
    background: white;
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

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

.card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-main);
}

.card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.appShell {
    background: white;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 24px;
}

.appShell__header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.appTitle {
    font-size: 20px;
    color: var(--text-main);
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.appShell__header .muted {
    font-size: 14px;
    margin-top: 4px;
}

.appShell__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.v-sep {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 8px;
}

.appGrid {
    display: grid;
    grid-template-columns: 350px 1fr;
}

.panel:first-child {
    background: #fafafa;
    border-right: 1px solid var(--border);
    padding: 32px;
}

.panel:last-child {
    padding: 32px;
    background: white;
}

.panel__title {
    background: transparent;
    color: var(--text-muted);
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: none;
    margin-bottom: 24px;
    border-radius: 0;
}

.formGrid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field label {
    display: block;
}

.field span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
    display: block;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--text-main);
    background: white;
    transition: all 0.15s;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.field input::placeholder,
.field textarea::placeholder {
    color: #94a3b8;
}

.sheetWrap {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    /* For rounding corners */
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sheet {
    width: 100%;
    border-collapse: collapse;
}

.sheet th {
    background: var(--bg-app);
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border-light);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 12px 16px;
    text-align: left;
    letter-spacing: 0.5px;
}

.sheet th:last-child {
    border-right: none;
}

.sheet td {
    border-bottom: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    padding: 0;
    height: 40px;
    /* Taller rows */
}

.sheet td:last-child {
    border-right: none;
}

.cell {
    width: 100%;
    height: 100%;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
}

.cell.r {
    justify-content: flex-end;
}

.cell:focus {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.sheet tr:nth-child(even) td {
    background-color: #fafafa;
}

.sheet tr:hover td {
    background-color: #f1f5f9;
}

.stats {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.stat {
    background: white;
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat::after {
    display: none;
}

/* Remove side border */

.stat__label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat__value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 8px;
    letter-spacing: -1px;
}

.hero__right {
    display: none;
}

@media(min-width: 900px) {
    .hero__right {
        display: block;
    }
}

.preview {
    background: #202022;
    /* Dark frame for preview */
    border: 1px solid #333;
    padding: 12px;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.preview__title {
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 16px;
}

.preview__card {
    background: white;
    border-radius: 12px;
    /* Inner radius */
    padding: 24px;
    min-height: 400px;
}

.footer {
    text-align: center;
    padding: 64px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 80px;
    background: white;
}

.alert {
    margin-top: 16px;
    padding: 16px;
    font-size: 14px;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(197, 43, 43, 0.2);
    border-radius: 12px;
    line-height: 1.5;
    font-weight: 500;
}

.r {
    text-align: right;
}

.muted {
    color: var(--text-muted);
}

@media (max-width: 800px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px 24px;
    }

    .appGrid {
        grid-template-columns: 1fr;
    }

    .panel:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .container {
        padding: 0 16px;
    }
}

/* Helper for bullets in hero */
.hero__bullets {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bullet {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
}

.bullet__dot {
    min-width: 24px;
    height: 24px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.bullet__dot::before {
    content: "✓";
    font-size: 14px;
}

/* Sidebar & Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 320px;
    background: white;
    z-index: 201;
    padding: 0;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar__header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar__header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
}

.btn-icon:hover {
    background: var(--border-light);
    color: var(--text-main);
}

.sidebar__content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.sidebar__footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: #fafafa;
}

.btn--full {
    width: 100%;
}

.project-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.project-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.project-item.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.p-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.p-date {
    font-size: 11px;
    color: var(--text-muted);
}

.p-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.badge-project {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 40px;
}

.icon-sm {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}