:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #ec4899;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 0.5rem;
}

.ad-slot {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    min-height: 90px;
    border-radius: var(--radius);
    text-align: center;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--gray);
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

/* Dashboard */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--gray);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.text-primary {
    color: var(--primary);
}

.text-gray {
    color: var(--gray);
}

.hero p {
    color: var(--gray);
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.module-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
    text-align: center;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.module-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 1rem;
    background: #e0e7ff;
    border-radius: 50%;
    color: var(--primary);
}

.module-card h2 {
    margin-bottom: 0.5rem;
}

.module-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--primary-hover);
}

/* Editor Specifics */
.editor-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    height: calc(100vh - 73px);
    /* 100vh - header height */
    overflow: hidden;
}

.toolbar-sidebar {
    background: white;
    border-right: 1px solid var(--border);
    padding: 1rem;
    overflow-y: auto;
}

.editor-canvas-area {
    background: #f1f5f9;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
}

.canvas-container-wrapper {
    box-shadow: var(--shadow);
    background: white;
    position: relative;
}


/* Document Editor Pages */
.doc-page {
    background: white;
    width: 210mm;
    /* A4 width */
    min-height: 297mm;
    /* A4 height */
    margin-bottom: 2rem;
    padding: 25mm 25mm;
    /* Margins */
    box-shadow: var(--shadow);
    outline: none;
    position: relative;
}

/* Tools */
.tool-group {
    margin-bottom: 1.5rem;
}

.tool-group h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.tool-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tool-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tool-btn:hover,
.tool-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .editor-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .toolbar-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        height: auto;
        max-height: 200px;
    }

    .doc-page {
        width: 100%;
        height: auto;
        min-height: 600px;
        padding: 1rem;
    }

    .editor-canvas-area {
        padding: 1rem;
    }
}