/* Shared, restrained presentation for the client and talent portals. */
.portal { background: #f6f7f9; line-height: 1.6; }
.portal main { min-width: 0; }
.portal main h1 { font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 700; }
.portal main h2, .portal main h3 { line-height: 1.4; }
.portal main .text-xs { font-size: .875rem; line-height: 1.6; }
.portal main .font-black, .portal main .font-extrabold { font-weight: 700; }
.portal main .rounded-3xl { border-radius: 1rem; }
.portal main .shadow-lg, .portal main .shadow-xl { box-shadow: 0 2px 8px rgb(15 23 42 / .06); }
.portal main [class*="bg-gradient-to-"] { background-image: none; background-color: var(--tw-gradient-from, #fff); }
.portal main .animate-pulse, .portal header .animate-pulse, .portal header .animate-ping { animation: none; }
.portal main p, .portal main td { overflow-wrap: anywhere; }
.portal main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.portal main select, .portal main textarea { font-size: 1rem; }
.portal button:not([id^="tourDot_"]):not(.admin-icon-action):not(.absolute):not([onclick*="close"]), 
.portal:not(.admin-portal) main a[class*="px-"],
.portal.admin-portal main a[class*="px-"]:not(.admin-icon-action) { min-height: 2.75rem; }
.portal :is(a, button, input, select, textarea):focus-visible { outline: 3px solid #4f46e5; outline-offset: 3px; }
.portal header nav a { min-height: 2.75rem; font-size: .875rem; font-weight: 600; }
.portal header { box-shadow: none; }
.portal #notification-dropdown { width: min(24rem, calc(100vw - 2rem)); }
.portal #mobile-menu, .portal #mobile-menu-drawer { max-height: calc(100dvh - 4rem); overflow-y: auto; }
.portal #mobile-menu a, .portal #mobile-menu-drawer a { padding-block: .75rem; font-size: .875rem; }
.portal .brief-content { line-height: 1.75; overflow-wrap: anywhere; white-space: pre-line; }
.portal .brief-content ul { list-style: disc; padding-left: 1.5rem; }
.portal .brief-content ol { list-style: decimal; padding-left: 1.5rem; }
.portal .brief-content p { margin-bottom: .75rem; }
.portal .skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 10000; padding: .75rem 1rem; background: white; color: #0f172a; border-radius: .5rem; }
.portal .skip-link:focus { top: .5rem; }
@media (max-width: 639px) {
    .portal #notification-dropdown { position: fixed; top: 4.5rem; right: 1rem; }
    .portal main > div > div:first-child { flex-wrap: wrap; }
    .portal main .text-4xl { font-size: 1.875rem; }
}
@media (prefers-reduced-motion: reduce) {
    .portal *, .portal *::before, .portal *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.portal header nav a { white-space: nowrap; }

/* ============================================================== */
/* 🌶️ CABE TRANSITION & SEAMLESS PAGE NAVIGATION                  */
/* ============================================================== */

/* Modern Cross-Document View Transitions (Chromium 126+) */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: 160ms cubic-bezier(0.16, 1, 0.3, 1) both cabeViewTransitionFadeOut;
}

::view-transition-new(root) {
    animation: 200ms cubic-bezier(0.16, 1, 0.3, 1) both cabeViewTransitionFadeIn;
}

@keyframes cabeViewTransitionFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.998); }
}

@keyframes cabeViewTransitionFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Universal Page Entrance Animation for main content (all browsers) */
.portal main,
.portal #main-content,
.cabe-page-transition {
    animation: cabeContentEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cabeContentEnter {
    0% {
        opacity: 0;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigating out state: prevent white screen flash & double clicks */
body.portal-is-navigating main,
body.portal-is-navigating .cabe-page-transition {
    opacity: 0.88;
    filter: saturate(0.95);
    transition: opacity 0.15s ease-out, filter 0.15s ease-out;
}

/* Top Progress Bar (NProgress-style, vibrant chili gradient) */
#cabe-top-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #f43f5e 0%, #e11d48 50%, #fb7185 100%);
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.85), 0 0 4px #e11d48;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transition: width 0.24s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 0.2s ease-in-out;
}

#cabe-top-loader.active {
    opacity: 1;
}

#cabe-top-loader.finished {
    width: 100% !important;
    opacity: 0;
    transition: width 0.15s ease-out, opacity 0.22s ease-out 0.08s;
}

#cabe-top-loader::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 90px;
    height: 3px;
    box-shadow: 0 0 14px #f43f5e, 0 0 6px #fb7185;
    opacity: 0.95;
}

/* Floating Loading / Process Pill ("kalau buka perlu proses ya buat proses loading saja") */
#cabe-process-indicator {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    z-index: 999998;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

#cabe-process-indicator.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.cabe-process-card {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.625rem 1.125rem;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 9999px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15);
    letter-spacing: -0.01em;
}

.cabe-spinner {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #f43f5e;
    border-right-color: #fb7185;
    border-radius: 50%;
    animation: cabeSpin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes cabeSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .portal main,
    .portal #main-content,
    .cabe-page-transition,
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none !important;
        transform: none !important;
    }
    #cabe-top-loader {
        transition: none !important;
    }
    #cabe-process-indicator {
        transition: opacity 0.1s linear !important;
        transform: translateX(-50%) !important;
    }
}

/* ============================================================== */
/* 🌶️ CENTERED CONFIRMATION POPUP MODAL                          */
/* ============================================================== */

.cabe-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.cabe-confirm-backdrop.visible {
    opacity: 1;
}

.cabe-confirm-dialog {
    position: relative;
    width: 100%;
    max-width: 26.5rem;
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(226, 232, 240, 0.9);
    transform: scale(0.94) translateY(8px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: #1e293b;
    box-sizing: border-box;
}

.cabe-confirm-backdrop.visible .cabe-confirm-dialog {
    transform: scale(1) translateY(0);
}

.cabe-confirm-body {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cabe-confirm-icon-wrap {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 1rem;
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    color: #e11d48;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cabe-confirm-icon {
    width: 1.375rem;
    height: 1.375rem;
}

.cabe-confirm-content {
    flex: 1;
    min-width: 0;
}

.cabe-confirm-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin: 0;
}

.cabe-confirm-message {
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.5;
    margin-top: 0.375rem;
    word-break: break-word;
}

.cabe-confirm-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.cabe-confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.125rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    outline: none;
}

.cabe-confirm-btn-cancel {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.cabe-confirm-btn-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.cabe-confirm-btn-ok {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.cabe-confirm-btn-ok:hover {
    background: linear-gradient(135deg, #be123c, #9f1239);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.4);
    transform: translateY(-1px);
}
