:root {
    --panel-bg: #f6f7f9;
    --panel-border: #d9dee7;
    --ink: #1f2937;
    --muted: #6b7280;
}

body {
    background: var(--panel-bg);
    color: var(--ink);
}

.auth-main {
    min-height: calc(100vh - 57px);
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.login-box {
    width: min(440px, 100%);
}

.app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: calc(100vh - 57px);
}

.app-sidebar {
    background: #ffffff;
    border-right: 1px solid var(--panel-border);
    padding: 20px;
}

.app-sidebar a {
    display: block;
    color: #374151;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
}

.app-sidebar a:hover {
    background: #eef2f7;
}

.app-main {
    padding: 28px;
}

.section-panel {
    background: #ffffff;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 18px;
}

.section-title {
    font-size: 18px;
    font-weight: 650;
    margin-bottom: 16px;
}

.help-text {
    color: var(--muted);
    font-size: 13px;
}

.image-thumb {
    width: 112px;
    height: 84px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--panel-border);
}

.generated-copy {
    min-height: 180px;
    resize: vertical;
    background: #fbfcfe;
}

.visual-stage {
    width: 100%;
    min-height: 620px;
    display: grid;
    place-items: center;
    overflow: auto;
    background: #e5eaf1;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 18px;
}

.visual-stage canvas {
    width: min(100%, 520px);
    height: auto;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.2);
}

.social-output-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--panel-border);
}

.social-output-list li:last-child {
    border-bottom: 0;
}

.social-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.social-preview-item {
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.social-preview-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #eef2f7;
    border-radius: 6px;
    border: 1px solid var(--panel-border);
}

.share-preview-image {
    width: 100%;
    max-height: 680px;
    object-fit: contain;
    background: #eef2f7;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--panel-border);
    }

    .app-sidebar a {
        white-space: nowrap;
        margin-bottom: 0;
    }

    .app-main {
        padding: 18px;
    }
}
