/* App Center iframe — ซ่อน header ซ้ำ + ขยายเต็มความกว้าง */

html.embed-appcenter .navbar {
    display: none !important;
}

html.embed-appcenter .greeting {
    display: none !important;
}

html.embed-appcenter .header,
html.embed-appcenter .header-bar,
html.embed-appcenter .topbar {
    display: none !important;
}

html.embed-appcenter .container,
html.embed-appcenter .content {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding-top: 8px;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
}

html.embed-appcenter .container {
    padding-bottom: 24px;
}

html.embed-appcenter .module-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 8px;
}

html.embed-appcenter .section-title {
    margin-bottom: 8px;
}

/* App Center — แยกมุมมอง dashboard vs สั่งงาน/เสนอแนะ */
html.embed-appcenter:not(.view-assign) .mytask-assign-section {
    display: none !important;
}

html.embed-appcenter.view-assign .mytask-dashboard-only {
    display: none !important;
}

html.embed-appcenter.view-assign .mytask-assign-section {
    margin-top: 0 !important;
}

html.embed-appcenter #root:empty {
    min-height: 48vh;
    background: #F4F7F0;
}

@media (min-width: 768px) {
    html.embed-appcenter .container,
    html.embed-appcenter .content {
        padding-left: 16px;
        padding-right: 16px;
    }

    html.embed-appcenter .module-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
}

@media (min-width: 1200px) {
    html.embed-appcenter .module-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}
