/* WP Deal EXE front-end shell — mirrors Laravel app layout */

body.wp-deal-exe-active .entry-header,
body.wp-deal-exe-active .page-header,
body.wp-deal-exe-active .wp-block-post-title {
    display: none;
}

body.wp-deal-exe-active .entry-content,
body.wp-deal-exe-active .wp-block-post-content {
    max-width: none;
    padding: 0;
    margin: 0;
}

.wp-deal-exe-app {
    font-family: Figtree, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    min-height: 70vh;
    margin: 0 -20px 0;
    padding: 20px;
    background: var(--brand-shell-bg, #f3f4f6);
    color: #111827;
}

.wp-deal-exe-app *,
.wp-deal-exe-app *::before,
.wp-deal-exe-app *::after {
    box-sizing: inherit;
}

.wp-deal-exe-app--minimal {
    padding: 24px;
    border-radius: 12px;
}

/* Navigation */
.wp-deal-exe-nav {
    background: var(--brand-nav-bg, #fff);
    border-bottom: 1px solid #f3f4f6;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

.wp-deal-exe-nav__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    min-height: 64px;
}

.wp-deal-exe-nav__brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1f2937;
    min-width: 0;
}

.wp-deal-exe-nav__logo {
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.wp-deal-exe-nav__logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--brand-primary, #4f46e5);
    color: #fff;
    font-weight: 700;
}

.wp-deal-exe-nav__company {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 14rem;
}

.wp-deal-exe-nav__toggle {
    display: none;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: var(--brand-primary, #4f46e5);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

.wp-deal-exe-nav__menu {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
}

.wp-deal-exe-nav__links {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
}

.wp-deal-exe-nav__link {
    display: inline-block;
    padding: 8px 2px;
    text-decoration: none;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.wp-deal-exe-nav__link:hover,
.wp-deal-exe-nav__link.is-active {
    color: var(--brand-primary, #4f46e5);
    border-bottom-color: var(--brand-primary, #4f46e5);
}

.wp-deal-exe-nav__user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.wp-deal-exe-nav__username {
    font-weight: 600;
    color: #374151;
}

.wp-deal-exe-nav__user-link {
    color: var(--brand-primary, #4f46e5);
    text-decoration: none;
}

.wp-deal-exe-nav__user-link:hover {
    text-decoration: underline;
}

/* Page header */
.wp-deal-exe-page-header {
    background: var(--brand-primary, #4f46e5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.wp-deal-exe-page-header__inner {
    padding: 24px 20px;
}

.wp-deal-exe-page-header__title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* Main content */
.wp-deal-exe-main {
    padding: 20px;
    background: var(--brand-shell-bg, #f3f4f6);
    border-radius: 0 0 12px 12px;
}

.wp-deal-exe-module__body {
    width: 100%;
}

.wp-deal-exe-panel {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.wp-deal-exe-placeholder {
    margin: 0 0 16px;
    color: #4b5563;
    line-height: 1.6;
}

/* Dashboard */
.wp-deal-exe-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.wp-deal-exe-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wp-deal-exe-stat-card__label {
    font-size: 0.875rem;
    color: #6b7280;
}

.wp-deal-exe-stat-card__value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
}

.wp-deal-exe-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Buttons */
.wp-deal-exe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    background: var(--brand-primary, #4f46e5);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.wp-deal-exe-btn:hover {
    filter: brightness(1.08);
}

/* Notices */
.wp-deal-exe-notice {
    padding: 16px 20px;
    border-radius: 10px;
    margin: 0;
}

.wp-deal-exe-notice p {
    margin: 0 0 8px;
}

.wp-deal-exe-notice p:last-child {
    margin-bottom: 0;
}

.wp-deal-exe-notice--warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.wp-deal-exe-notice--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
}

.wp-deal-exe-notice--success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
}

.wp-deal-exe-notice__hint {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Login */
.wp-deal-exe-login-panel {
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.wp-deal-exe-login-panel label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.wp-deal-exe-login-panel input[type="text"],
.wp-deal-exe-login-panel input[type="password"] {
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
}

.wp-deal-exe-login-panel input[type="submit"] {
    background: var(--brand-primary, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Portal grid */
.wp-deal-exe-portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-deal-exe-portal-grid__link {
    display: block;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    min-height: 100%;
}

.wp-deal-exe-portal-grid__link:hover {
    border-color: var(--brand-primary, #4f46e5);
    background: color-mix(in srgb, var(--brand-primary, #4f46e5) 8%, white);
}

.wp-deal-exe-portal-grid__link strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
}

.wp-deal-exe-portal-grid__link span {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Embed nav */
.wp-deal-exe-nav-embed__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-deal-exe-nav-embed a {
    color: var(--brand-primary, #4f46e5);
    font-weight: 600;
    text-decoration: none;
}

.wp-deal-exe-nav-embed a:hover {
    text-decoration: underline;
}

/* Message FAB */
.wp-deal-exe-message-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    background: var(--brand-primary, #4f46e5);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    text-decoration: none !important;
}

.wp-deal-exe-message-fab--inline {
    position: static;
    width: auto;
    height: auto;
    border-radius: 9999px;
    padding: 12px 18px;
}

/* Responsive */
@media (max-width: 960px) {
    .wp-deal-exe-nav__toggle {
        display: inline-flex;
    }

    .wp-deal-exe-nav__menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding-bottom: 16px;
    }

    .wp-deal-exe-nav__menu.is-open {
        display: flex;
    }

    .wp-deal-exe-nav__bar {
        flex-wrap: wrap;
    }

    .wp-deal-exe-nav__links {
        flex-direction: column;
        overflow: visible;
    }

    .wp-deal-exe-nav__company {
        display: none;
    }
}

@media (min-width: 768px) {
    .wp-deal-exe-nav__company {
        display: inline;
    }
}
