/**
 * POTENSI APK experience
 * A mobile-only visual layer. Functional IDs, routing, and persona visibility
 * remain owned by navigation.js/dashboard.js.
 */

.hero-welcome-kicker {
    display: none;
}

body.device-mobile {
    --apk-bg: #f3f5f3;
    --apk-panel: #ffffff;
    --apk-panel-soft: #f8faf9;
    --apk-ink: #122b3d;
    --apk-muted: #65788a;
    --apk-line: #dfe7e6;
    --apk-brand: #0d3b66;
    --apk-brand-deep: #082f49;
    --apk-accent: #e85d04;
    --apk-accent-soft: #fff0e5;
    --apk-green: #117864;
    --apk-green-soft: #e6f5f0;
    --apk-blue-soft: #e8f1f7;
    --apk-shadow-sm: 0 6px 18px rgba(18, 43, 61, 0.07);
    --apk-shadow-md: 0 16px 38px rgba(18, 43, 61, 0.13);
    --apk-radius-sm: 14px;
    --apk-radius: 20px;
    --apk-radius-lg: 28px;
    --page-pad-bottom-mobile: calc(128px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    background: var(--apk-bg);
    color: var(--apk-ink);
}

body.device-mobile.persona-blue-collar {
    --apk-persona: var(--apk-accent);
    --apk-persona-soft: var(--apk-accent-soft);
}

body.device-mobile.persona-white-collar {
    --apk-persona: #176b87;
    --apk-persona-soft: #e6f3f6;
}

body.device-mobile[data-theme="dark"] {
    --apk-bg: #0e1923;
    --apk-panel: #162532;
    --apk-panel-soft: #1a2c3a;
    --apk-ink: #f4f8fa;
    --apk-muted: #a6b7c3;
    --apk-line: rgba(207, 226, 235, 0.14);
    --apk-brand: #5ca6cc;
    --apk-brand-deep: #123f5b;
    --apk-accent: #ff7a30;
    --apk-accent-soft: rgba(255, 122, 48, 0.15);
    --apk-green: #55c4a8;
    --apk-green-soft: rgba(85, 196, 168, 0.14);
    --apk-blue-soft: rgba(92, 166, 204, 0.14);
    --apk-shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.2);
    --apk-shadow-md: 0 18px 42px rgba(0, 0, 0, 0.32);
}

body.device-mobile #main-app {
    background: var(--apk-bg);
    color: var(--apk-ink);
    /* Header owns the status-bar inset. Container pad was a blank band above it. */
    padding-top: 0;
}

body.device-mobile #main-app .app-container {
    background:
        radial-gradient(circle at 100% 0, rgba(232, 93, 4, 0.06), transparent 260px),
        var(--apk-bg);
    color: var(--apk-ink);
}

body.device-mobile.window-compact #main-app .app-container {
    padding: 8px 16px var(--page-pad-bottom-mobile) !important;
}

/* One gutter owner on phones — stacked user-tab / dashboard / stat-grid pads are dead. */
body.device-mobile.window-compact #user-tab {
    padding-inline: 0;
}

body.device-mobile.window-compact .mobile-dashboard-container {
    padding-inline: 0;
}

body.device-mobile.window-compact .mobile-stat-grid {
    padding-inline: 0;
}

body.device-mobile.window-compact #user-tab .level-welcome {
    margin-inline: 0 !important;
}

body.device-mobile #main-app .tab-content {
    width: 100%;
    max-width: 680px;
    margin-inline: auto;
}

body.device-mobile #main-app h1,
body.device-mobile #main-app h2,
body.device-mobile #main-app h3,
body.device-mobile #main-app h4,
body.device-mobile #main-app p {
    text-align: left;
}

/* Header track follows chrome height (safe-top + 48) instead of a 64px grid row. */
body.device-mobile #main-app.dashboard-container {
    grid-template-rows: auto minmax(0, 1fr);
}

/* App chrome */
body.device-mobile #main-app .app-header {
    min-height: calc(48px + var(--safe-top, env(safe-area-inset-top, 0px)));
    height: auto !important;
    padding: var(--safe-top, env(safe-area-inset-top, 0px)) 14px 0 !important;
    border: 0;
    border-bottom: 1px solid rgba(18, 43, 61, 0.08);
    background: var(--apk-panel);
}

body.device-mobile[data-theme="dark"] #main-app .app-header {
    border-bottom-color: var(--apk-line);
}

body.device-mobile #main-app .header-left {
    width: 100%;
    gap: 10px;
}

body.device-mobile #main-app .header-brand {
    order: 1;
    min-width: 0;
    gap: 10px;
}

body.device-mobile #main-app .header-app-logo {
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 12px;
    background: var(--apk-blue-soft);
    box-shadow: inset 0 0 0 1px rgba(13, 59, 102, 0.08);
}

body.device-mobile #main-app .brand-info h2,
body.device-mobile #main-app #app-brand-name {
    margin: 0;
    color: var(--apk-ink);
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: 0.04em;
}

body.device-mobile #main-app .mobile-menu-btn {
    order: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--apk-line);
    border-radius: 14px;
    background: var(--apk-panel);
    color: var(--apk-ink);
    box-shadow: var(--apk-shadow-sm);
    font-size: 24px;
    line-height: 0;
}

body.device-mobile #main-app .mobile-menu-btn .p-icon {
    display: block;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    margin: 0;
    font-size: 24px !important;
    line-height: 0;
    vertical-align: 0;
    transform: none;
    -webkit-mask-size: 24px 24px;
    mask-size: 24px 24px;
    -webkit-mask-position: center;
    mask-position: center;
}

body.device-mobile #main-app .mobile-menu-btn:active {
    transform: scale(0.94);
    background: var(--apk-panel-soft);
}

body.device-mobile #main-app .header-company-badge {
    min-width: 0;
    max-width: 150px;
    padding: 5px 8px;
    border: 0;
    border-radius: 999px;
    background: var(--apk-panel-soft);
    color: var(--apk-muted);
}

/* Home action */
body.device-mobile #mobile-home-clock:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 78px;
    margin: 0 0 14px !important;
    padding: 12px 14px;
    gap: 12px;
    border: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, #f16b22 0%, #e65300 100%);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(232, 93, 4, 0.27);
    text-align: left;
    overflow: hidden;
    position: relative;
}

body.device-mobile #mobile-home-clock:not([hidden])::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    top: -48px;
    right: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.11);
    pointer-events: none;
}

body.device-mobile #mobile-home-clock.is-clocked-in {
    background: linear-gradient(135deg, #143e5a 0%, #0b2c42 100%);
    box-shadow: 0 14px 30px rgba(8, 47, 73, 0.26);
}

body.device-mobile .mobile-home-clock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.device-mobile .mobile-home-clock-icon .p-icon {
    width: 25px;
    height: 25px;
    color: #ffffff;
}

body.device-mobile .mobile-home-clock-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

body.device-mobile .mobile-home-clock-copy strong {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
}

body.device-mobile .mobile-home-clock-copy small {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.76rem;
    font-weight: 500;
}

body.device-mobile .mobile-home-clock-arrow {
    position: relative;
    z-index: 1;
    font-size: 1.15rem;
}

/* Personalized hero */
body.device-mobile #user-tab .level-welcome {
    margin: 0 0 14px !important;
    padding: 20px !important;
    border: 0 !important;
    border-radius: var(--apk-radius-lg) !important;
    background:
        radial-gradient(circle at 88% 14%, rgba(255, 255, 255, 0.18), transparent 82px),
        linear-gradient(145deg, #123e5c 0%, #0a2d43 100%) !important;
    box-shadow: var(--apk-shadow-md) !important;
    color: #ffffff;
    overflow: hidden;
    isolation: isolate;
}

body.device-mobile.persona-blue-collar #user-tab .level-welcome {
    background:
        radial-gradient(circle at 88% 14%, rgba(255, 255, 255, 0.16), transparent 82px),
        linear-gradient(145deg, #16445d 0%, #0b3046 62%, #572c17 145%) !important;
}

body.device-mobile .level-welcome::before {
    top: auto;
    right: -42px;
    bottom: -62px;
    width: 154px;
    height: 154px;
    background: rgba(232, 93, 4, 0.2);
}

body.device-mobile .level-welcome::after {
    top: -44px;
    left: -54px;
    bottom: auto;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.06);
}

body.device-mobile .hero-welcome-inner {
    align-items: center;
    gap: 14px;
}

body.device-mobile .hero-welcome-kicker {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

body.device-mobile .level-welcome-title {
    margin: 0 0 6px;
    color: #ffffff !important;
    font-size: clamp(1.28rem, 5vw, 1.55rem) !important;
    font-weight: 820 !important;
    letter-spacing: -0.025em;
    line-height: 1.12;
}

body.device-mobile .level-welcome-text {
    max-width: 30ch;
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 0.82rem !important;
    line-height: 1.5;
}

body.device-mobile .hero-welcome-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

body.device-mobile .hero-welcome-stat {
    width: 100%;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

body.device-mobile .hero-welcome-stat > div {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

body.device-mobile .hero-stat-value {
    color: #ffffff !important;
    font-size: 1.45rem;
    font-weight: 850;
}

body.device-mobile .hero-stat-label {
    color: rgba(255, 255, 255, 0.64) !important;
    font-size: 0.74rem;
}

/* Home stat cards */
body.device-mobile .mobile-stat-grid {
    gap: 10px;
    padding: 0;
    margin: 0 0 12px;
}

body.device-mobile .mobile-stat-card {
    --stat-tone: var(--apk-brand);
    --stat-tone-soft: var(--apk-blue-soft);
    min-height: 126px;
    padding: 14px;
    gap: 7px;
    border: 1px solid rgba(18, 43, 61, 0.06);
    border-radius: var(--apk-radius);
    background: var(--apk-panel);
    box-shadow: var(--apk-shadow-sm);
}

body.device-mobile .mobile-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 14px;
    width: 38px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: var(--stat-tone);
}

body.device-mobile .mobile-stat-card.tone-attendance {
    --stat-tone: var(--apk-accent);
    --stat-tone-soft: var(--apk-accent-soft);
}

body.device-mobile .mobile-stat-card.tone-wage,
body.device-mobile .mobile-stat-card.tone-team {
    --stat-tone: var(--apk-green);
    --stat-tone-soft: var(--apk-green-soft);
}

body.device-mobile .mobile-stat-card.tone-agenda {
    --stat-tone: #3e72a3;
    --stat-tone-soft: var(--apk-blue-soft);
}

body.device-mobile .mobile-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: var(--stat-tone-soft) !important;
    color: var(--stat-tone);
}

body.device-mobile .mobile-stat-icon i {
    font-size: 1.2rem;
}

body.device-mobile .mobile-stat-label {
    margin-top: auto;
    color: var(--apk-muted);
    font-size: 0.73rem;
    font-weight: 650;
}

body.device-mobile .mobile-stat-value {
    color: var(--apk-ink);
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -0.025em;
}

body.device-mobile .mobile-stat-chip {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 750;
    color: var(--stat-tone, #3e72a3);
    background: var(--stat-tone-soft, rgba(59, 130, 246, 0.12));
}

body.device-mobile .mobile-stat-card.is-clickable::after {
    content: "↗";
    position: absolute;
    top: 16px;
    right: 14px;
    color: var(--apk-muted);
    font-size: 0.85rem;
    opacity: 0.7;
}

body.device-mobile .mobile-stat-card:only-child {
    grid-column: 1 / -1;
    min-height: 106px;
}

body.device-mobile .mobile-dashboard-container {
    gap: 12px;
    padding: 0;
}

body.device-mobile .mobile-card,
body.device-mobile .user-dashboard-card {
    border: 1px solid rgba(18, 43, 61, 0.07);
    border-radius: var(--apk-radius);
    background: var(--apk-panel);
    box-shadow: var(--apk-shadow-sm);
}

body.device-mobile .mobile-card {
    padding: 16px;
}

body.device-mobile .mobile-card-header {
    gap: 10px;
    margin-bottom: 14px;
}

body.device-mobile .mobile-card-title {
    color: var(--apk-ink);
    font-weight: 780;
}

body.device-mobile .mobile-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: var(--apk-blue-soft);
    font-size: 1.1rem;
}

/* Shared section framing */
body.device-mobile .bc-section-page {
    padding: 0 0 14px;
}

body.device-mobile .bc-section-page-title {
    margin: 2px 0 14px;
    padding: 0 2px;
    color: var(--apk-ink);
    font-size: 1.35rem;
    font-weight: 820;
    letter-spacing: -0.025em;
}

body.device-mobile .bc-section-page-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-right: 4px;
    border-radius: 13px;
    background: var(--apk-persona-soft);
    color: var(--apk-persona);
}

/* Absen and Cuti segmented control */
body.device-mobile #absen-cuti-switcher {
    position: sticky;
    z-index: 30;
    top: 8px;
    width: 100%;
    margin: 0 0 12px;
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--apk-line);
    border-radius: 18px;
    background: rgba(232, 238, 238, 0.94);
    box-shadow: 0 8px 20px rgba(18, 43, 61, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.device-mobile[data-theme="dark"] #absen-cuti-switcher {
    background: rgba(20, 38, 51, 0.94);
}

/* Short landscape: a sticky switcher slides over the clock and Absen Masuk. */
@media (max-height: 520px) and (orientation: landscape) {
    body.device-mobile #absen-cuti-switcher {
        position: static;
    }
}

body.device-mobile .absen-cuti-tab {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    color: var(--apk-muted);
    font-size: 0.86rem;
    font-weight: 720;
}

body.device-mobile .absen-cuti-tab.active {
    border: 0;
    background: var(--apk-panel);
    color: var(--apk-persona);
    box-shadow: 0 4px 14px rgba(18, 43, 61, 0.1);
}

/* Attendance cockpit */
body.device-mobile #user-attendance-section-wrapper {
    padding-bottom: calc(128px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    scroll-padding-bottom: calc(128px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}

body.device-mobile #user-attendance-section-wrapper .bc-absen-summary {
    scroll-margin-bottom: calc(128px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}

body.device-mobile .bc-absen-main {
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid rgba(18, 43, 61, 0.07);
    border-radius: var(--apk-radius-lg);
    background: var(--apk-panel);
    box-shadow: var(--apk-shadow-sm);
    text-align: left;
}

body.device-mobile .bc-absen-status {
    margin: 0 0 14px;
    padding: 22px 16px 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.15), transparent 74px),
        linear-gradient(145deg, #123e5c 0%, #092d43 100%);
    color: #ffffff;
    text-align: center;
    overflow: hidden;
}

body.device-mobile .bc-absen-date {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

body.device-mobile .bc-absen-clock {
    margin: 5px 0 12px;
    color: #ffffff;
    font-family: ui-monospace, "SFMono-Regular", "Roboto Mono", monospace;
    font-size: clamp(2.35rem, 12vw, 3.35rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1;
}

body.device-mobile .bc-absen-indicator {
    display: inline-flex;
    width: auto;
    min-height: 32px;
    padding: 6px 11px;
    gap: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.76rem;
    font-weight: 700;
}

body.device-mobile .bc-project-select-wrapper {
    margin: 0 2px 12px;
}

body.device-mobile .bc-select-label {
    margin-bottom: 6px;
    color: var(--apk-muted);
    font-size: 0.75rem;
    font-weight: 760;
}

body.device-mobile .bc-select,
body.device-mobile .bc-wfa-activity-form .form-control {
    min-height: 50px;
    border: 1px solid var(--apk-line);
    border-radius: 14px;
    background: var(--apk-panel-soft);
    color: var(--apk-ink);
    box-shadow: none;
}

body.device-mobile .bc-shift-info-banner,
body.device-mobile .bc-face-enroll-reminder,
body.device-mobile .bc-wfa-activity-form {
    margin: 0 2px 12px !important;
    border-radius: 15px !important;
}

body.device-mobile .bc-absen-btn {
    min-height: 48px;
    padding: 12px 16px;
    flex-direction: row;
    gap: 10px;
    border: 0;
    border-radius: 19px;
    box-shadow: none;
}

body.device-mobile .bc-absen-btn-icon {
    font-size: 1.35rem;
}

body.device-mobile .bc-absen-btn-text {
    font-size: 1rem;
    font-weight: 800;
}

body.device-mobile .bc-absen-checkin {
    background: linear-gradient(135deg, #f16b22, #df5200);
    box-shadow: 0 12px 26px rgba(232, 93, 4, 0.24);
}

body.device-mobile .bc-absen-checkout {
    background: linear-gradient(135deg, #143e5a, #082f49);
    box-shadow: 0 12px 26px rgba(8, 47, 73, 0.22);
}

body.device-mobile .bc-leave-quick-actions {
    gap: 10px;
    margin: 0 0 12px;
}

body.device-mobile .bc-leave-quick-btn {
    min-height: 58px;
    border: 1px solid var(--apk-line);
    border-radius: 18px;
    background: var(--apk-panel);
    color: var(--apk-ink);
    box-shadow: var(--apk-shadow-sm);
}

body.device-mobile .bc-leave-quick-btn i {
    color: var(--apk-persona);
}

body.device-mobile .bc-absen-summary,
body.device-mobile .bc-absen-history {
    margin: 0 0 12px;
    padding: 16px;
    border: 1px solid rgba(18, 43, 61, 0.07);
    border-radius: var(--apk-radius);
    background: var(--apk-panel);
    box-shadow: var(--apk-shadow-sm);
}

body.device-mobile .bc-section-title {
    color: var(--apk-ink);
    font-size: 0.98rem;
    font-weight: 790;
}

body.device-mobile .bc-summary-grid {
    gap: 8px;
}

body.device-mobile .bc-summary-item {
    min-height: 72px;
    padding: 10px 8px;
    border: 0;
    border-radius: 16px;
    background: var(--apk-panel-soft);
}

body.device-mobile .bc-summary-value {
    font-size: 1.35rem;
    font-weight: 850;
}

body.device-mobile .bc-summary-label {
    color: var(--apk-muted);
    font-size: 0.68rem;
    font-weight: 650;
}

body.device-mobile .bc-history-item {
    border-color: var(--apk-line);
}

body.device-mobile .bc-refresh-btn {
    border: 1px solid var(--apk-line);
    background: var(--apk-panel-soft);
    color: var(--apk-ink);
}

/* Gaji */
body.device-mobile #user-gaji-section-wrapper .gaji-card-container {
    margin-bottom: 12px;
}

body.device-mobile .mobile-card-wage-running {
    padding: 20px;
    border: 0;
    border-radius: var(--apk-radius-lg);
    background:
        radial-gradient(circle at 92% 12%, rgba(255, 255, 255, 0.14), transparent 86px),
        linear-gradient(145deg, #0e6657 0%, #0b4a46 52%, #10384c 100%);
    color: #ffffff;
    box-shadow: 0 18px 38px rgba(11, 74, 70, 0.22);
}

body.device-mobile .mobile-card-wage-running .mobile-card-title,
body.device-mobile .mobile-card-wage-running .wage-amount-big,
body.device-mobile .mobile-card-wage-running .wage-detail-calc {
    color: #ffffff;
}

body.device-mobile .mobile-card-wage-running .mobile-card-icon {
    background: rgba(255, 255, 255, 0.14);
}

body.device-mobile .mobile-card-wage-running .salary-mask-toggle {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

body.device-mobile .mobile-card-wage-running .wage-amount-big {
    margin: 12px 0 6px;
    font-size: clamp(2rem, 10vw, 2.7rem);
    letter-spacing: -0.045em;
}

body.device-mobile .mobile-card-wage-running .wage-since-label,
body.device-mobile .mobile-card-wage-running .wage-last-pay {
    color: rgba(255, 255, 255, 0.64);
    border-color: rgba(255, 255, 255, 0.14);
}

body.device-mobile .mobile-card-wage-running .wage-day-label {
    color: rgba(255, 255, 255, 0.64);
}

body.device-mobile .mobile-card-payment .bc-pay-row {
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid var(--apk-line);
    border-radius: 16px;
    background: var(--apk-panel-soft);
}

body.device-mobile .gaji-total-paid {
    border-radius: 14px;
    background: var(--apk-green-soft);
    color: var(--apk-green);
}

/* Leave / izin */
body.device-mobile #user-leave-section-wrapper {
    padding-bottom: 18px;
}

body.device-mobile .user-leave-sub-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: start;
    gap: 8px;
    margin: 0 0 12px;
    padding: 2px 0 8px;
    scrollbar-width: none;
}

body.device-mobile .user-leave-sub-nav::-webkit-scrollbar,
body.device-mobile .leave-balance-grid::-webkit-scrollbar {
    display: none;
}

body.device-mobile .user-leave-sub-nav .sub-nav-btn-secondary {
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--apk-line);
    border-radius: 999px;
    background: var(--apk-panel);
    color: var(--apk-muted);
    font-size: 0.78rem;
    font-weight: 720;
}

body.device-mobile .user-leave-sub-nav .sub-nav-btn-secondary.active {
    border-color: var(--apk-persona);
    background: var(--apk-persona-soft);
    color: var(--apk-persona);
    box-shadow: none;
}

body.device-mobile #user-leave-section-wrapper .user-dashboard-card {
    padding: 16px;
}

body.device-mobile #user-leave-section-wrapper .user-card-header {
    align-items: flex-start;
    gap: 10px;
}

body.device-mobile #user-leave-section-wrapper .user-card-header h4 {
    color: var(--apk-ink);
    font-size: 1rem;
    font-weight: 790;
}

body.device-mobile .leave-balance-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(218px, 76vw);
    grid-template-columns: none;
    gap: 10px;
    padding: 2px 2px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

body.device-mobile .leave-balance-card {
    min-height: 148px;
    padding: 16px;
    border: 1px solid var(--apk-line);
    border-radius: 18px;
    background:
        linear-gradient(145deg, var(--apk-panel-soft), var(--apk-panel));
    box-shadow: none;
    scroll-snap-align: start;
    text-align: left;
}

body.device-mobile .leave-balance-type {
    color: var(--apk-muted);
    font-size: 0.75rem;
    font-weight: 750;
}

body.device-mobile .leave-balance-numbers {
    justify-content: flex-start;
    margin: 12px 0;
}

body.device-mobile .leave-balance-remaining {
    color: var(--apk-ink);
    font-size: 2.1rem;
    font-weight: 850;
}

body.device-mobile .leave-balance-bar {
    height: 7px;
    border-radius: 999px;
    background: var(--apk-line);
}

body.device-mobile .leave-balance-bar-fill {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--apk-persona), var(--apk-green));
}

body.device-mobile #user-leave-section-wrapper .toolbar-group {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

body.device-mobile #user-leave-section-wrapper .toolbar-group .btn-primary,
body.device-mobile #user-leave-section-wrapper .toolbar-group .btn-secondary {
    min-height: 46px;
    justify-content: center;
    border-radius: 14px;
}

body.device-mobile .leave-request-card,
body.device-mobile .approval-card {
    border: 1px solid var(--apk-line);
    border-radius: 17px;
    background: var(--apk-panel-soft);
}

/* Mobile leave dialogs become thumb-friendly bottom sheets */
body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal).modal-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 94dvh;
    inset: auto 0 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal).modal-dialog::backdrop {
    background: rgba(4, 18, 28, 0.56);
    backdrop-filter: blur(3px);
}

body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal) .modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none !important;
    max-height: 92dvh;
    padding: 0 18px calc(18px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    overflow-y: auto;
    border: 0;
    border-radius: 28px 28px 0 0;
    background: var(--apk-panel);
    color: var(--apk-ink);
    box-shadow: 0 -20px 50px rgba(4, 18, 28, 0.22);
}

body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal) .modal-header {
    position: sticky;
    z-index: 2;
    top: 0;
    margin: 0 -18px 16px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--apk-line);
    background: var(--apk-panel);
}

body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal) .modal-header::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: var(--apk-line);
    transform: translateX(-50%);
}

body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal) .modal-header h3 {
    margin-top: 7px;
    color: var(--apk-ink);
    font-size: 1.1rem;
}

body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal) .modal-close-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 13px;
    background: var(--apk-panel-soft);
    color: var(--apk-ink);
}

body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal) .form-control {
    min-height: 50px;
    border: 1px solid var(--apk-line);
    border-radius: 14px;
    background: var(--apk-panel-soft);
    color: var(--apk-ink);
}

body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal) form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal) .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    gap: 9px;
    margin: 0 -18px;
    padding: 14px 18px calc(14px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    background: var(--apk-panel);
    border-top: 1px solid var(--apk-line);
}

body.device-mobile :is(#user-leave-modal, #user-izin-modal, #user-reimb-modal) .modal-footer > button {
    min-height: 50px;
    border-radius: 15px;
}

/* Account drawer */
body.device-mobile.mobile-drawer-account-only #app-sidebar {
    left: -100vw;
    width: min(88vw, 340px);
    padding: 0;
    border-right: 0;
    border-radius: 0 28px 28px 0;
    background: var(--apk-panel);
    color: var(--apk-ink);
    box-shadow: none;
    overflow: hidden;
}

body.device-mobile.mobile-drawer-account-only #app-sidebar.active {
    left: 0;
    box-shadow: 18px 0 54px rgba(4, 18, 28, 0.3);
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-header {
    padding: calc(24px + var(--safe-top, env(safe-area-inset-top, 0px))) 20px 22px;
    border: 0;
    background:
        radial-gradient(circle at 92% 0, rgba(232, 93, 4, 0.32), transparent 100px),
        linear-gradient(145deg, #123e5c, #082f49);
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-brand-info {
    min-width: 0;
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-brand-info h2 {
    color: #ffffff;
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-identity-company:not([hidden]) {
    display: block;
    min-width: 0;
    max-width: 100%;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-app-logo {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .version-badge {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.78);
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-user-menu {
    display: grid !important;
    gap: 8px;
    padding: 18px 14px 10px;
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-user-menu-item {
    min-height: 54px;
    margin: 0;
    padding: 0 15px;
    gap: 12px;
    border: 1px solid var(--apk-line);
    border-radius: 16px;
    background: var(--apk-panel-soft);
    color: var(--apk-ink);
    font-size: 0.86rem;
    font-weight: 690;
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-user-menu-item i {
    color: var(--apk-persona);
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-user-menu-danger {
    border-color: rgba(185, 28, 28, 0.12);
    background: rgba(185, 28, 28, 0.06);
    color: #b4232c;
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-footer {
    margin-top: auto;
    padding: 12px 14px calc(16px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    border-top: 1px solid var(--apk-line);
    background: var(--apk-panel);
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-user-info {
    min-height: 58px;
    padding: 9px 10px;
    border-radius: 17px;
    background: var(--apk-panel-soft);
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-user-name {
    color: var(--apk-ink);
}

body.device-mobile .sidebar-overlay.active {
    background: rgba(4, 18, 28, 0.52);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/*
 * APK WC Agenda visual layer.
 * Root cause of the FAIL photo: this file painted leftover desktop chrome
 * (card title, 42px pills, stadium search, FAB at 104px) with higher
 * specificity than the compact agenda-mobile-surface polish. Same surface.
 */
body.device-mobile #tasks-tab {
    padding-top: 2px;
    padding-bottom: calc(56px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}

/* In-page "Agenda" title sits under the sticky POTENSI header. Bottom nav already labels the tab. */
body.device-mobile #tasks-tab .tasks-tab-header,
body.device-mobile #tasks-tab .tasks-stats-bar,
body.device-mobile #tasks-tab .agenda-mobile-summary,
body.device-mobile #tasks-tab .agenda-scope-bar-filters,
body.device-mobile #tasks-tab .tasks-filters-row,
body.device-mobile #tasks-tab .agenda-view-toggle:not(.agenda-scope-toggle),
body.device-mobile #tasks-tab #agenda-kanban-board,
body.device-mobile #tasks-tab #task-list-header,
body.device-mobile #tasks-tab .agenda-mobile-overflow,
body.device-mobile #tasks-tab .tasks-tab-header .btn-primary[data-call="toggleTasksCreateForm"] {
    display: none !important;
}

body.device-mobile #tasks-tab .tasks-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 8px !important;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.device-mobile #tasks-tab .agenda-scope-bar {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.device-mobile #tasks-tab .agenda-scope-toggle {
    display: flex !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
    background: transparent;
}

body.device-mobile #tasks-tab .agenda-scope-toggle::-webkit-scrollbar {
    display: none;
}

body.device-mobile #tasks-tab .agenda-scope-toggle .view-toggle-btn {
    min-height: 48px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #e8eef0 !important;
    color: #5d6f66 !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

body.device-mobile #tasks-tab .agenda-scope-toggle .view-toggle-btn.active {
    background: color-mix(in srgb, var(--apk-persona, #176b87) 16%, #ffffff) !important;
    color: var(--apk-brand, #0d3b66) !important;
}

body.device-mobile #tasks-tab .agenda-mobile-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    margin: 0 0 8px !important;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.device-mobile #tasks-tab .agenda-mobile-search-shell {
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 48px;
    height: 48px;
    padding: 0 12px;
    border: 1px solid var(--apk-line);
    border-radius: 12px !important;
    background: var(--apk-panel);
    box-shadow: none;
}

body.device-mobile #tasks-tab .agenda-mobile-search-shell input,
body.device-mobile #tasks-tab .agenda-mobile-search-shell input::placeholder {
    font-size: 14px !important;
}

body.device-mobile #tasks-tab .tasks-list-view {
    margin-top: 4px;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

body.device-mobile #tasks-tab .agenda-focus-state-empty,
body.device-mobile #tasks-tab .agenda-focus-state-error,
body.device-mobile #tasks-tab .agenda-focus-state-compact {
    flex-direction: row;
    align-items: center;
    min-height: 0;
    margin: 0;
    padding: var(--space-4, 16px);
    gap: 10px;
    border: 1px solid var(--apk-line);
    border-radius: 12px;
    background: var(--apk-panel);
    box-shadow: none;
}

body.device-mobile #tasks-tab .agenda-focus-state-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 1rem;
}

body.device-mobile #tasks-tab .agenda-focus-state-copy h4 {
    font-size: 0.88rem;
    font-weight: 750;
}

body.device-mobile #tasks-tab .agenda-focus-state-copy p {
    margin-top: 2px;
    font-size: 0.75rem;
    line-height: 1.35;
}

/* Living loop 228: labeled next-action stays on the row, no hover required */
body.device-mobile #tasks-tab .agenda-inbox-row {
    min-height: 64px;
    padding: 8px 10px;
}

body.device-mobile #tasks-tab .agenda-inbox-row.has-action {
    grid-template-columns: 36px minmax(0, 1fr) minmax(72px, 96px);
}

body.device-mobile #tasks-tab .agenda-inbox-action-wrap {
    align-self: center;
    width: 84px;
    max-width: 96px;
}

body.device-mobile #tasks-tab .agenda-inbox-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 84px;
    max-width: 96px;
    min-height: 48px;
    padding: 0 8px;
    opacity: 1;
    visibility: visible;
    border: 0;
    border-radius: 10px;
    background: var(--apk-brand, #0d3b66);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

body.device-mobile #tasks-tab .agenda-inbox-topline {
    display: block;
}

body.device-mobile #tasks-tab .agenda-inbox-title {
    max-width: 100%;
}

body.device-mobile #tasks-tab .agenda-inbox-snippet {
    display: none;
}

body.device-mobile #tasks-tab .agenda-inbox-meta {
    flex-wrap: wrap;
    overflow: visible;
}

body.device-mobile #tasks-tab .agenda-inbox-chip {
    flex: 0 0 auto;
    overflow: visible;
    text-overflow: unset;
}

body.device-mobile #tasks-tab .agenda-inbox-chip:last-child {
    flex: 0 0 auto;
}

body.device-mobile #tasks-tab .agenda-inbox-chip.priority-medium,
body.device-mobile #tasks-tab .agenda-inbox-chip.priority-low,
body.device-mobile #tasks-tab .agenda-inbox-chip.agenda-project-tag {
    display: none;
}

/* TIM-NAME 390 / compact — pill name chips on the Tim row (not 48px circles) */
body.device-mobile #tasks-tab .agenda-team-filter-chip,
body.device-mobile.window-compact #tasks-tab .agenda-team-filter-chip {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 48px !important;
    max-width: 168px;
    padding: 0 14px !important;
    overflow: hidden;
    border-radius: 999px !important;
    font-size: 0.82rem !important;
    font-weight: 500;
    line-height: 1.2 !important;
    box-sizing: border-box;
}

body.device-mobile #tasks-tab .agenda-team-filter-chip-label,
body.device-mobile.window-compact #tasks-tab .agenda-team-filter-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
}

body.device-mobile #tasks-tab .agenda-inbox-list {
    padding-bottom: 56px;
}

body.device-mobile #tasks-tab .agenda-fab {
    right: 14px;
    bottom: calc(86px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
    width: auto;
    min-width: 48px;
    height: 48px;
    padding: 0 14px;
    gap: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--apk-accent), #c94b00);
    box-shadow: 0 10px 20px rgba(232, 93, 4, 0.26);
}

body.device-mobile #tasks-tab .agenda-fab-mark {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

body.device-mobile #tasks-tab .agenda-fab-label {
    font-size: 0.82rem;
    font-weight: 720;
    letter-spacing: 0.01em;
}

/* Talent/free-user home */
body.device-mobile .no-company-panel {
    padding: 22px;
    border: 1px solid rgba(18, 43, 61, 0.06);
    border-radius: var(--apk-radius-lg);
    background:
        radial-gradient(circle at 100% 0, rgba(232, 93, 4, 0.1), transparent 160px),
        var(--apk-panel);
    box-shadow: var(--apk-shadow-md);
}

body.device-mobile .no-company-panel h2 {
    color: var(--apk-ink);
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

body.device-mobile .no-company-membership {
    gap: 11px;
    margin: 18px -6px;
    padding: 14px;
    border: 1px solid var(--apk-line);
    border-radius: 22px;
    background: var(--apk-panel-soft);
}

body.device-mobile .membership-section-icon,
body.device-mobile .membership-pending-icon,
body.device-mobile .membership-company-logo {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 15px;
    background: var(--apk-blue-soft);
    color: var(--apk-brand);
}

body.device-mobile .membership-create-company {
    gap: 8px;
}

body.device-mobile .membership-create-cta,
body.device-mobile .membership-create-form .btn-primary {
    min-height: 48px;
}

body.device-mobile .membership-invite-card,
body.device-mobile .membership-pending-card,
body.device-mobile .membership-create-form,
body.device-mobile .membership-join-form {
    padding: 14px;
    border: 1px solid rgba(18, 43, 61, 0.07);
    border-radius: 18px;
    background: var(--apk-panel);
    box-shadow: var(--apk-shadow-sm);
}

body.device-mobile .membership-pending-card {
    grid-template-columns: 46px minmax(0, 1fr);
}

body.device-mobile .membership-state-pill {
    min-height: 26px;
    padding-inline: 9px;
}

body.device-mobile .membership-state-pill--invite {
    background: var(--apk-accent-soft);
    color: var(--apk-accent);
}

body.device-mobile .membership-state-pill--pending {
    background: var(--apk-blue-soft);
    color: var(--apk-brand);
}

body.device-mobile .membership-code-input-wrap input {
    min-height: 52px;
    border-color: var(--apk-line);
    border-radius: 15px;
    background: var(--apk-panel-soft);
    color: var(--apk-ink);
}

body.device-mobile .membership-code-row .btn-primary,
body.device-mobile .membership-card-actions .btn-primary,
body.device-mobile .membership-card-actions .btn-secondary {
    min-height: 52px;
    border-radius: 15px;
}

body.device-mobile .membership-code-row .btn-primary,
body.device-mobile .membership-card-actions .btn-primary {
    border-color: var(--apk-accent);
    background: linear-gradient(135deg, #f16b22, #e65300);
    color: #ffffff;
}

body.device-mobile .membership-card-actions .btn-secondary {
    border-color: var(--apk-line);
    background: var(--apk-panel-soft);
    color: var(--apk-ink);
}

body.device-mobile .membership-rejected-note {
    border-radius: 15px;
}

body.device-mobile .no-company-status {
    border: 0;
    border-radius: 999px;
    background: var(--apk-blue-soft);
    color: var(--apk-brand);
}

body.device-mobile .no-company-check-item {
    border-radius: 14px;
    background: var(--apk-panel-soft);
}

body.device-mobile .no-company-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

body.device-mobile .no-company-actions > button {
    min-height: 52px;
    border-radius: 16px;
}

body.device-mobile .no-company-actions--secondary > .btn-secondary {
    border-color: var(--apk-line);
    background: var(--apk-panel-soft);
    color: var(--apk-ink);
}

body.device-mobile :is(#welcome-new-user-modal, #welcome-returning-modal, #welcome-employee-modal).modal-dialog {
    width: calc(100vw - 20px);
    max-width: 480px;
    max-height: calc(100dvh - 16px);
    margin: auto;
}

body.device-mobile :is(#welcome-new-user-modal, #welcome-returning-modal, #welcome-employee-modal) .modal-body {
    max-height: min(68dvh, 560px);
    overflow: auto;
}

body.device-mobile .welcome-invite-host .membership-invite-card {
    box-shadow: none;
}

/* Floating speed bar on phones; tablet rail remains owned by shell-mobile.css. */
body.device-mobile.window-compact #bottom-nav {
    left: 12px;
    right: 12px;
    bottom: calc(8px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    width: auto;
    min-height: 70px;
    height: 70px;
    padding: 0;
    border: 1px solid rgba(18, 43, 61, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(18, 43, 61, 0.2);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
    transition: transform .18s ease, opacity .18s ease;
}

body.device-mobile.window-compact[data-theme="dark"] #bottom-nav {
    background: rgba(22, 37, 50, 0.94);
    border-color: var(--apk-line);
}

body.device-mobile.window-compact .bottom-nav-container {
    height: 70px;
    padding: 0 8px;
    gap: 3px;
}

body.device-mobile.window-compact .bottom-nav-item {
    min-height: 58px;
    height: 62px;
    max-width: 112px;
    margin: 0;
    padding: 7px 4px 6px;
    gap: 3px;
    border-radius: 18px;
    color: var(--apk-muted);
}

body.device-mobile.window-compact .bottom-nav-item.active {
    background: var(--apk-persona-soft);
    color: var(--apk-persona);
}

body.device-mobile.window-compact .bottom-nav-item .p-icon {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

body.device-mobile.window-compact .bottom-nav-item span:not(.nav-badge) {
    color: currentColor;
    font-size: 0.68rem;
    font-weight: 760;
    letter-spacing: 0;
}

body.device-mobile.window-compact .bottom-nav-item:active {
    transform: scale(0.94);
}

html.keyboard-open body.device-mobile #bottom-nav {
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
}

/*
 * APK field Beranda/Absen/Gaji visual layer.
 * Measured dummy 390 (desktop UA, hover:hover / pointer:fine): this file's
 * body.device-mobile rules painted leftover oversized chrome (hero 20px/194px,
 * clock 78px, stats 126px, Absen clock 46.8px / btn 66px, Absen pad 28px under
 * the 70px nav, in-page Gaji title) with higher specificity than compact
 * user-dashboard polish (hover:none + pointer:coarse). Same screens. No new nav.
 * Desktop doors (switcher/radar/Riwayat) were already display:none — lock them.
 */
body.device-mobile.persona-blue-collar #user-section-switcher,
body.device-mobile.persona-blue-collar #desktop-profile-dashboard,
body.device-mobile.persona-blue-collar #radar-chart-card,
body.device-mobile.persona-blue-collar #desktop-assessor-feedback-card,
body.device-mobile.persona-blue-collar #bc-quick-stats,
body.device-mobile.persona-blue-collar #user-overview-section > .bc-insights-section,
body.device-mobile.persona-blue-collar #user-gaji-section-wrapper .bc-section-page-title {
    display: none !important;
}

body.device-mobile.persona-blue-collar #user-tab .level-welcome {
    margin: 0 0 8px !important;
    padding: 12px 12px 10px !important;
    border-radius: 16px !important;
}

body.device-mobile.persona-blue-collar .hero-welcome-kicker {
    display: none;
}

body.device-mobile.persona-blue-collar .hero-welcome-inner {
    gap: 10px;
}

body.device-mobile.persona-blue-collar .level-welcome-title {
    margin: 0 0 4px;
    font-size: 1.05rem !important;
    line-height: 1.2;
}

body.device-mobile.persona-blue-collar .level-welcome-text {
    max-width: none;
    font-size: 0.74rem !important;
    line-height: 1.35;
}

body.device-mobile.persona-blue-collar .hero-welcome-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 12px;
}

body.device-mobile.persona-blue-collar .hero-welcome-stat {
    margin-top: 8px;
    padding-top: 8px;
}

body.device-mobile.persona-blue-collar .hero-stat-value {
    font-size: 1.15rem;
}

body.device-mobile.persona-blue-collar #mobile-home-clock:not([hidden]) {
    min-height: 56px;
    margin: 0 0 8px !important;
    padding: 10px 12px;
    gap: 10px;
    border-radius: 16px;
}

body.device-mobile.persona-blue-collar .mobile-home-clock-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 12px;
}

body.device-mobile.persona-blue-collar .mobile-home-clock-copy strong {
    font-size: 0.95rem;
}

body.device-mobile.persona-blue-collar .mobile-stat-grid {
    gap: 8px;
    margin: 0;
}

body.device-mobile.persona-blue-collar .mobile-stat-card {
    min-height: 88px;
    padding: 10px;
    gap: 4px;
    border-radius: 14px;
}

body.device-mobile.persona-blue-collar .mobile-stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

body.device-mobile.persona-blue-collar .mobile-stat-value {
    font-size: 1.15rem;
}

body.device-mobile.persona-blue-collar #bc-mobile-dashboard {
    gap: 8px;
    padding-bottom: 8px;
}

body.device-mobile.persona-blue-collar #absen-cuti-switcher {
    top: 4px;
    margin: 0 0 8px;
    padding: 3px;
    border-radius: 14px;
}

body.device-mobile.persona-blue-collar .absen-cuti-tab {
    min-height: 48px;
    border-radius: 11px;
    font-size: 0.8rem;
}

body.device-mobile.persona-blue-collar #user-attendance-section-wrapper {
    padding-bottom: calc(128px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    scroll-padding-bottom: calc(128px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}

body.device-mobile.persona-blue-collar .bc-absen-main {
    padding: 10px;
    border-radius: 18px;
}

body.device-mobile.persona-blue-collar .bc-absen-status {
    margin: 0 0 10px;
    padding: 14px 12px 12px;
    border-radius: 16px;
}

body.device-mobile.persona-blue-collar .bc-absen-clock {
    margin: 4px 0 8px;
    font-size: clamp(1.7rem, 8vw, 2rem);
}

body.device-mobile.persona-blue-collar .bc-absen-btn {
    min-height: 48px;
    padding: 8px 12px;
    border-radius: 14px;
}

body.device-mobile.persona-blue-collar .bc-absen-summary,
body.device-mobile.persona-blue-collar .bc-absen-history {
    padding: 12px;
}

body.device-mobile.persona-blue-collar #user-gaji-section-wrapper .bc-section-page {
    padding-top: 0;
    padding-bottom: calc(86px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}

body.device-mobile.persona-blue-collar .mobile-card-wage-running {
    padding: 14px;
}

body.device-mobile.persona-blue-collar .mobile-card-wage-running .wage-amount-big {
    margin: 8px 0 4px;
    font-size: clamp(1.55rem, 8vw, 2rem);
}

/* Consistent interaction feedback */
body.device-mobile :is(
    .mobile-stat-card.is-clickable,
    .mobile-home-clock,
    .bc-leave-quick-btn,
    .bottom-nav-item,
    .sidebar-user-menu-item
):active {
    transform: scale(0.97);
}

body.device-mobile :is(
    .mobile-stat-card.is-clickable,
    .mobile-home-clock,
    .bc-leave-quick-btn,
    .bottom-nav-item,
    .sidebar-user-menu-item,
    .absen-cuti-tab
):focus-visible {
    outline: 3px solid rgba(232, 93, 4, 0.5);
    outline-offset: 2px;
    box-shadow: none;
}

@media (max-width: 360px) {
    body.device-mobile.window-compact #main-app .app-container {
        padding-inline: 16px !important;
    }

    body.device-mobile.window-compact #bottom-nav {
        left: 8px;
        right: 8px;
    }

    body.device-mobile #user-tab .level-welcome {
        padding: 17px !important;
    }

    body.device-mobile .hero-welcome-avatar {
        width: 46px;
        height: 46px;
        min-width: 46px;
        border-radius: 15px;
    }

    body.device-mobile .mobile-stat-card {
        min-height: 116px;
        padding: 12px;
    }
}

#mobile-approval-door,
#mobile-approval-door[hidden] {
    display: none !important;
}

body.device-mobile #mobile-approval-door:not([hidden]) {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    box-sizing: border-box;
    margin: 0 12px 12px;
    min-height: 56px;
    padding: 12px 14px;
    border: 1px solid var(--apk-line, #dfe7e6);
    border-radius: 16px;
    background: var(--apk-panel, #fff);
    color: var(--apk-ink, #122b3d);
    text-align: left;
    box-shadow: var(--apk-shadow-sm, 0 6px 18px rgba(18, 43, 61, 0.07));
}

body.device-mobile #mobile-approval-door strong {
    font-size: 1rem;
    font-weight: 700;
}

body.device-mobile #mobile-approval-door .ph {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: var(--apk-muted, #65788a);
}

@media (prefers-reduced-motion: no-preference) {
    body.device-mobile .mobile-stat-card,
    body.device-mobile .mobile-card,
    body.device-mobile .bc-absen-main {
        animation: apk-card-enter 280ms ease both;
    }

    body.device-mobile .mobile-stat-card:nth-child(2) {
        animation-delay: 55ms;
    }

    body.device-mobile #app-sidebar,
    body.device-mobile .bottom-nav-item,
    body.device-mobile .mobile-home-clock {
        transition:
            transform 160ms ease,
            background-color 160ms ease,
            box-shadow 160ms ease,
            left 260ms cubic-bezier(0.2, 0.75, 0.25, 1);
    }
}

@keyframes apk-card-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.device-mobile *,
    body.device-mobile *::before,
    body.device-mobile *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Field 390 leftover polish: gate, hide Reimburse, 48px chips, one Keluar */
body.device-mobile #user-attendance-checkin-btn.is-gated,
body.device-mobile .bc-absen-checkin.is-gated {
    opacity: 0.45;
    filter: grayscale(0.15);
    cursor: not-allowed;
    pointer-events: none;
}

body.device-mobile.persona-blue-collar #user-leave-section-wrapper .sub-nav-btn-secondary[data-call-arg="user-reimb-section"] {
    display: none !important;
}

body.device-mobile .sidebar-footer .sidebar-actions [data-action="auth.logout"] {
    display: none !important;
}

body.device-mobile .agenda-scope-toggle .view-toggle-btn,
body.device-mobile .agenda-filter-chip {
    min-height: 48px;
}

body.device-mobile #user-attendance-section-wrapper .bc-attendance-summary,
body.device-mobile #user-attendance-section-wrapper #bc-attendance-history-list,
body.device-mobile #bc-attendance-history-list {
    padding-bottom: 12px;
}

/*
 * L1 Field chrome lock — apk-redesign vs shell-density collision.
 * Dummy 390 (desktop UA, hover:hover / pointer:fine) was painting hamburger 40,
 * Absen 66, and chips 32 because late density icon/btn-sm rules and this file's
 * leftover 66/32 chrome fought the intended 48px field speed targets.
 * Same screens. No new nav. Trust hides above stay.
 */
body.device-mobile #main-app .mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    box-sizing: border-box;
    border: 1px solid var(--apk-line) !important;
    border-radius: 14px !important;
    background: var(--apk-panel) !important;
    box-shadow: var(--apk-shadow-sm);
    font-size: 24px !important;
    line-height: 0;
}

/*
 * Hamburger glyph lock — P0 #291 grew the hit target to 48, but the
 * p-icon mask still painted tiny on Android (mask-size / empty <i>
 * intrinsic size). Keep the 48px target; draw a 24px (~50%) glyph.
 */
body.device-mobile #main-app .mobile-menu-btn .p-icon,
body.device-mobile #main-app .mobile-menu-btn .p-icon-menu {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    margin: 0 !important;
    font-size: 24px !important;
    line-height: 0;
    vertical-align: 0 !important;
    transform: none !important;
    -webkit-mask-size: 24px 24px !important;
    mask-size: 24px 24px !important;
    -webkit-mask-position: center !important;
    mask-position: center !important;
}

/* P0 header tidy: 390 chrome = brand + hamburger. No search/bell/sub-nav. */
body.device-mobile #main-app .sub-nav-container,
body.device-mobile #main-app #user-sub-nav,
body.device-mobile #main-app .header-user,
body.device-mobile #main-app #global-search-btn {
    display: none !important;
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-user-menu-item[data-call="openSkillsExperienceModal"] {
    display: none !important;
}

/* Field 390: installed version in hamburger header + menu footer. */
body.device-mobile.mobile-drawer-account-only #app-sidebar .version-badge {
    display: inline-flex !important;
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .sidebar-footer {
    flex-wrap: wrap;
}

body.device-mobile.mobile-drawer-account-only #app-sidebar .app-version-label {
    display: block;
    flex: 1 0 100%;
    margin-top: 2px;
    color: var(--apk-muted, #6b7c90);
    font-size: 0.75rem;
    font-weight: 650;
    text-align: center;
}

body.device-mobile .bc-absen-btn,
body.device-mobile.persona-blue-collar .bc-absen-btn,
body.device-mobile.persona-white-collar .bc-absen-btn {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 8px 12px !important;
    box-sizing: border-box;
}

body.device-mobile .bc-absen-btn-icon.p-icon {
    width: 20px !important;
    height: 20px !important;
}

body.device-mobile .absen-cuti-tab,
body.device-mobile.persona-blue-collar .absen-cuti-tab,
body.device-mobile .agenda-scope-toggle .view-toggle-btn,
body.device-mobile .agenda-filter-chip,
body.device-mobile #tasks-tab .agenda-scope-toggle .view-toggle-btn,
body.device-mobile #tasks-tab .agenda-inbox-action,
body.device-mobile .user-leave-sub-nav .sub-nav-btn-secondary,
body.device-mobile #tasks-tab .agenda-mobile-search-shell {
    min-height: 48px !important;
}

body.device-mobile #tasks-tab .agenda-mobile-search-shell {
    height: 48px !important;
}

body.device-mobile #tasks-tab .agenda-fab {
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
}

/*
 * D1 Field 390 holes (H1–H6) — existing doors, token align.
 * H2 hide needs #main-app: shell-density `.sidebar-action-btn { display:inline-flex !important }`
 * beats the earlier L1 `.sidebar-actions [data-action=auth.logout]` hide.
 */
body.device-mobile #main-app #btn-ajukan-cuti,
body.device-mobile #main-app #btn-ajukan-izin,
body.device-mobile #user-leave-section-wrapper .toolbar-group .btn-sm {
    min-height: 48px !important;
    height: 48px !important;
    padding: 8px 12px !important;
    box-sizing: border-box;
    font-family: Roboto, sans-serif !important;
}

body.device-mobile #main-app .sidebar-footer .sidebar-actions [data-action="auth.logout"],
body.device-mobile #main-app .sidebar-action-btn[data-action="auth.logout"] {
    display: none !important;
}

body.device-mobile #main-app .sidebar-user-menu-item[data-action="auth.logout"] {
    min-height: 48px;
}

body.device-mobile #user-leave-section-wrapper .user-dashboard-card {
    overflow-x: auto;
    max-width: 100%;
}

body.device-mobile .leave-balance-grid {
    overflow-x: auto !important;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

body.device-mobile .leave-balance-card {
    min-width: min(218px, 82vw);
    scroll-snap-align: start;
}

body.device-mobile .wage-empty,
body.device-mobile #user-leave-history-list .empty-state,
body.device-mobile #user-leave-balance-cards .empty-state,
body.device-mobile #tasks-tab .agenda-focus-state-empty,
body.device-mobile #tasks-tab .agenda-focus-state-error,
body.device-mobile #tasks-tab .agenda-focus-state-compact {
    padding: var(--space-4, 16px) !important;
}

body.device-mobile #user-attendance-checkin-btn.is-gated,
body.device-mobile .bc-absen-checkin.is-gated,
body.device-mobile .bc-absen-btn.is-gated {
    background: var(--bg-muted, var(--bg-surface-3)) !important;
    color: var(--text-secondary) !important;
    opacity: var(--visibility-disabled-opacity, 0.55);
    filter: none;
}

body.device-mobile #main-app .mobile-menu-btn,
body.device-mobile .bc-absen-btn,
body.device-mobile .bc-absen-btn-text,
body.device-mobile .absen-cuti-tab,
body.device-mobile .agenda-fab,
body.device-mobile .agenda-fab-label,
body.device-mobile .user-leave-sub-nav .sub-nav-btn-secondary,
body.device-mobile .bottom-nav-item,
body.device-mobile .agenda-filter-chip,
body.device-mobile .agenda-scope-toggle .view-toggle-btn {
    font-family: Roboto, sans-serif !important;
}

/* TIM-RESET 390 — Reset filter / Bersihkan match 48px chips; no wrap tower */
body.device-mobile #tasks-tab .agenda-active-filters,
body.device-mobile.window-compact #tasks-tab .agenda-active-filters {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

body.device-mobile #tasks-tab .agenda-focus-state-empty,
body.device-mobile.window-compact #tasks-tab .agenda-focus-state-empty,
body.device-mobile #tasks-tab .agenda-focus-state-compact,
body.device-mobile.window-compact #tasks-tab .agenda-focus-state-compact {
    flex-wrap: wrap;
    align-items: center;
}

body.device-mobile #tasks-tab .agenda-focus-state-copy {
    flex: 1 1 0;
    min-width: 0;
}

body.device-mobile #tasks-tab .agenda-focus-state-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
}

body.device-mobile #tasks-tab .agenda-filter-chip,
body.device-mobile.window-compact #tasks-tab .agenda-filter-chip,
body.device-mobile #tasks-tab .agenda-filter-clear-all,
body.device-mobile.window-compact #tasks-tab .agenda-filter-clear-all,
body.device-mobile #tasks-tab .agenda-focus-state-actions .btn-secondary,
body.device-mobile.window-compact #tasks-tab .agenda-focus-state-actions .btn-secondary,
body.device-mobile #tasks-tab .agenda-filter-reset-btn,
body.device-mobile.window-compact #tasks-tab .agenda-filter-reset-btn {
    flex: 0 0 auto !important;
    align-self: center;
    width: auto !important;
    max-width: none !important;
    min-width: 44px !important;
    min-height: 48px !important;
    height: 48px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    box-sizing: border-box;
}

/* Manual "Cek update" — account menu on the APK only. Web stays hidden. */
[data-apk-manual-update] {
    display: none;
}

html.is-native-shell [data-apk-manual-update]:not([hidden]) {
    display: grid;
    gap: 6px;
    width: 100%;
}

html.is-native-shell [data-apk-manual-update] .apk-manual-update-version,
html.is-native-shell [data-apk-manual-update] [data-apk-update-status] {
    margin: 0;
    padding: 0 4px;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.35;
    color: var(--apk-muted, #6b7c90);
}

html.is-native-shell [data-apk-manual-update] [data-apk-update-status][data-state="error"] {
    color: #b4232c;
}

html.is-native-shell [data-apk-manual-update] [data-apk-update-status][data-state="up-to-date"] {
    color: #0f7a4a;
}

html.is-native-shell [data-apk-manual-update] .sidebar-user-menu-item {
    width: 100%;
}

html.is-native-shell [data-apk-manual-update] [data-action="apk.check-update"]:disabled {
    opacity: 0.72;
}

html.is-native-shell [data-apk-manual-update] [data-apk-update-retry]:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 14px;
    background: #0d3b66;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
