:root {
    --des-accent: #612feb;
    --des-surface: rgba(255, 255, 255, .97);
    --des-text: #10233f;
    --des-muted: #687a94;
    --des-line: rgba(148, 163, 184, .28);
    --des-hover: rgba(255, 255, 255, .18);
    --des-selected: rgba(97, 47, 235, .2);
    --des-shadow: 0 18px 48px rgba(15, 23, 42, .24);
}

.DeskTopMode {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: #13223d;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover !important;
    isolation: isolate;
}

.DeskTopMode::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(4, 10, 24, .13), rgba(4, 10, 24, .02) 48%, rgba(4, 10, 24, .18));
}
.DeskTopMode[data-wallpaper-fit="contain"] { background-size: contain !important; }
.DeskTopMode[data-wallpaper-fit="center"] { background-size: auto !important; }

.DeskTopMode.is-syncing::after {
    content: "";
    position: absolute;
    z-index: 2147482000;
    top: 0;
    left: 0;
    width: 36%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #8b5cf6, #22d3ee, transparent);
    animation: iakka-sync 1s ease-in-out infinite;
}

@keyframes iakka-sync {
    from { transform: translateX(-110%); }
    to { transform: translateX(310%); }
}

.appsHome {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    user-select: none;
}

.iakka-scope-switch {
    position: fixed;
    z-index: 9;
    right: max(11px, env(safe-area-inset-right));
    bottom: max(11px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 12px;
    color: #23314a;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 16px 38px rgba(2, 6, 23, .28), inset 0 1px 0 rgba(255, 255, 255, .72);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    opacity: .7;
    transition: opacity .18s ease, box-shadow .18s ease;
}

.iakka-scope-switch:hover,
.iakka-scope-switch:focus-within { opacity: 1; }

.iakka-scope-switch button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 64px;
    min-height: 27px;
    padding: 0 9px;
    border: 0;
    border-radius: 9px;
    color: #64748b;
    background: transparent;
    font: inherit;
    font-size: 9px;
    font-weight: 750;
    cursor: pointer;
    transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.iakka-scope-switch button:hover:not(:disabled) { color: #312e81; background: rgba(99, 102, 241, .09); }
.iakka-scope-switch button:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; }
.iakka-scope-switch button.active[data-des-scope="personal"] {
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    box-shadow: 0 5px 13px rgba(91, 33, 182, .3);
}
.iakka-scope-switch button.active[data-des-scope="company"] {
    color: #fff;
    background: linear-gradient(135deg, #0f9f83, #087c69);
    box-shadow: 0 5px 13px rgba(8, 124, 105, .3);
}
.iakka-scope-switch button:disabled { opacity: .42; cursor: not-allowed; }
.DeskTopMode.is-scope-switching .iakka-scope-switch { pointer-events: none; opacity: .78; }

.appBox {
    appearance: none;
    position: absolute;
    width: 84px;
    min-height: 94px;
    margin: 0;
    padding: 7px 5px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: inherit;
    background: transparent;
    cursor: default;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    touch-action: none;
    transition: background-color .14s ease, border-color .14s ease, transform .14s ease, opacity .14s ease;
}

.appBox:hover,
.appBox:focus-visible {
    outline: none;
    background: var(--des-hover);
    border-color: rgba(255, 255, 255, .32);
}

.appBox.selected {
    background: var(--des-selected);
    border-color: rgba(196, 181, 253, .8);
    box-shadow: inset 0 0 0 1px rgba(97, 47, 235, .22);
}

.appBox.dragging { z-index: 8; opacity: .72; transform: none; cursor:grabbing; transition:none; }

.appiiicon {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

.appiiicon img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 5px 8px rgba(2, 6, 23, .3));
}

.iakka-shortcut-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 14px;
    color: #fff;
    background: var(--iakka-shortcut-avatar-color, #722ed1);
    box-shadow: 0 7px 15px rgba(15, 23, 42, .34);
    font-size: 24px;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
}

.iakka-shortcut-icon::before {
    display: block;
    margin: 0;
    line-height: 1;
    transform: translateY(0);
}

/*
 * Font Awesome is loaded after the desktop stylesheet and gives icon nodes a
 * block display. Keep the reusable desktop tile as the final layout owner so
 * every module shortcut remains centered, regardless of the icon family.
 */
#DeskTopMode > #iakkaDesktopIcons.appsHome > .appBox .iakka-shortcut-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-sizing: border-box;
}

#DeskTopMode > #iakkaDesktopIcons.appsHome > .appBox .iakka-shortcut-icon::before {
    display: block;
    width: 1em;
    margin: 0;
    line-height: 1;
    text-align: center;
}

.apptext {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    width: 100%;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.22;
    text-align: center;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 8px rgba(0, 0, 0, .38);
}

.DeskTopMode[data-icon-size="small"] .appBox { width: 68px; min-height: 78px; }
.DeskTopMode[data-icon-size="small"] .appiiicon img { width: 40px; height: 40px; }
.DeskTopMode[data-icon-size="small"] .iakka-shortcut-icon { width: 40px; height: 40px; border-radius: 11px; font-size: 19px; }
.DeskTopMode[data-icon-size="small"] .apptext { font-size: 10px; }
.DeskTopMode[data-icon-size="large"] .appBox { width: 104px; min-height: 112px; }
.DeskTopMode[data-icon-size="large"] .appiiicon img { width: 68px; height: 68px; }
.DeskTopMode[data-icon-size="large"] .iakka-shortcut-icon { width: 68px; height: 68px; border-radius: 17px; font-size: 31px; }
.DeskTopMode[data-icon-size="large"] .apptext { font-size: 13px; }

.contentBodyApps {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
}

.contentBodyApps > * { pointer-events: auto; }

.iakka-context-menu {
    position: fixed;
    z-index: 2147483000;
    width: min(198px, calc(100vw - 16px));
    overflow: visible;
    padding: 4px;
    border: 1px solid var(--des-line);
    border-radius: 9px;
    background: var(--des-surface);
    color: var(--des-text);
    box-shadow: var(--des-shadow);
    backdrop-filter: blur(22px);
    max-height: calc(100dvh - 16px);
}

.iakka-context-menu[hidden] { display: none !important; }

.iakka-context-menu button {
    appearance: none;
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 29px;
    padding: 4px 7px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 11.5px;
    text-align: left;
    cursor: pointer;
}

.iakka-context-menu button > i:not(.iakka-menu-arrow) { width: 17px; color: #64748b; text-align: center; }
.iakka-menu-icon { flex:0 0 18px; width:18px; height:18px; object-fit:contain; filter:drop-shadow(0 2px 2px rgba(15,23,42,.12)); }
.iakka-context-menu button > span { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.iakka-context-menu button kbd { flex:0 0 auto; padding:0; border:0; color:#94a3b8; background:transparent; font:500 8.5px/1.2 inherit; box-shadow:none; }
.iakka-context-menu button:hover:not(:disabled),
.iakka-context-menu button:focus-visible { outline: 0; background: rgba(97, 47, 235, .1); }
.iakka-context-menu button:disabled { opacity: .42; cursor: not-allowed; }
.iakka-context-menu button.danger,
.iakka-context-menu button.danger i { color: #dc2626; }
.iakka-context-menu hr { height: 1px; margin: 3px; border: 0; background: var(--des-line); }

.iakka-submenu-wrap { position:relative; }
.iakka-menu-arrow { flex:0 0 12px; width:12px; color:#94a3b8; font-size:9px; text-align:right; transition:transform .14s ease; }
.iakka-submenu {
    position:absolute;
    z-index:1;
    display:none;
    top:-6px;
    left:calc(100% + 5px);
    width:190px;
    padding:4px;
    border:1px solid var(--des-line);
    border-radius:11px;
    color:var(--des-text);
    background:var(--des-surface);
    box-shadow:var(--des-shadow);
    backdrop-filter:blur(22px);
}
.iakka-context-menu.open-left .iakka-submenu { right:calc(100% + 5px); left:auto; }
.iakka-submenu-wrap:hover > .iakka-submenu,
.iakka-submenu-wrap:focus-within > .iakka-submenu,
.iakka-submenu-wrap.open > .iakka-submenu { display:block; }
.iakka-submenu-wrap.open > button .iakka-menu-arrow { transform:rotate(90deg); }

.iakka-context-menu [data-action="download"] > i { color:#0ea5e9; }
.iakka-context-menu [data-action="share"] > i { color:#7c3aed; }
.iakka-context-menu [data-action="rename"] > i { color:#d97706; }
.iakka-context-menu [data-action="details"] > i { color:#2563eb; }

.iakka-menu-group {
    margin: 5px 0;
    padding: 5px;
    border-radius: 9px;
    background: rgba(148, 163, 184, .09);
}

.iakka-menu-group small {
    display: block;
    padding: 2px 8px 5px;
    color: var(--des-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.iakka-dialog-layer {
    position: fixed;
    inset: 0;
    z-index: 2147483100;
}

.iakka-dialog-layer[hidden] { display: none !important; }

.iakka-dialog-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(7px);
}

.iakka-dialog {
    width: min(440px, 100%);
    padding: 24px;
    border: 1px solid var(--des-line);
    border-radius: 18px;
    color: var(--des-text);
    background: var(--des-surface);
    box-shadow: var(--des-shadow);
}

.iakka-dialog h3 { margin: 0 0 7px; font-size: 20px; }
.iakka-dialog p { margin: 0 0 17px; color: var(--des-muted); font-size: 13px; line-height: 1.5; }
.iakka-dialog input {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #d8dfeb;
    border-radius: 10px;
    outline: none;
    color: var(--des-text);
    background: rgba(241, 245, 249, .8);
}
.iakka-dialog input:focus { border-color: var(--des-accent); box-shadow: 0 0 0 3px rgba(97, 47, 235, .13); }
.iakka-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.iakka-dialog-actions button { min-height: 40px; padding: 0 16px; border: 1px solid #d8dfeb; border-radius: 10px; cursor: pointer; }
.iakka-dialog-actions .secondary { background: #fff; color: var(--des-text); }
.iakka-dialog-actions .primary { border-color: var(--des-accent); color: #fff; background: var(--des-accent); box-shadow: 0 8px 18px rgba(97, 47, 235, .24); }
.iakka-dialog-actions .danger { border-color: #dc2626; color: #fff; background: #dc2626; }

/* Desktop settings workspace */
.iakka-settings-layer,
.iakka-lock-layer { position: fixed; inset: 0; z-index: 2147483200; }
.iakka-settings-layer[hidden],
.iakka-lock-layer[hidden] { display: none !important; }
.iakka-settings-overlay {
    position: absolute; inset: 0; display: grid; place-items: center; padding: 18px;
    background: rgba(15, 23, 42, .48); backdrop-filter: blur(8px);
}
.iakka-settings-panel {
    width: min(820px, 96vw); height: min(590px, 88vh); min-height: 430px;
    display: grid; grid-template-rows: 50px minmax(0,1fr); overflow: hidden;
    border: 1px solid var(--des-line); border-radius: 16px;
    color: var(--des-text); background: var(--des-surface); box-shadow: 0 28px 90px rgba(15,23,42,.35);
}
.iakka-settings-head {
    display: flex; align-items: center; gap: 10px; padding: 0 14px;
    border-bottom: 1px solid var(--des-line);
}
.iakka-settings-head > span:first-child {
    width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center;
    color: #fff; background: linear-gradient(135deg,var(--des-accent),#8b5cf6);
}
.iakka-settings-head strong { display: block; font-size: 13px; }
.iakka-settings-head small { display: block; color: var(--des-muted); font-size: 9.5px; }
.iakka-settings-close {
    width: 30px; height: 30px; margin-left: auto; border: 0; border-radius: 8px;
    color: var(--des-muted); background: transparent; cursor: pointer;
}
.iakka-settings-close:hover { color: #dc2626; background: rgba(220,38,38,.1); }
.iakka-settings-layout { min-height: 0; display: grid; grid-template-columns: 168px minmax(0,1fr); }
.iakka-settings-tabs { padding: 10px 7px; border-right: 1px solid var(--des-line); background: rgba(148,163,184,.07); }
.iakka-settings-tab {
    width: 100%; min-height: 34px; padding: 6px 9px; border: 0; border-radius: 8px;
    display: flex; align-items: center; gap: 8px; color: var(--des-muted); background: transparent;
    font: 600 11px/1.2 inherit; text-align: left; cursor: pointer;
}
.iakka-settings-tab i { width: 16px; color: #7c3aed; text-align: center; }
.iakka-settings-tab:hover { color: var(--des-text); background: rgba(97,47,235,.07); }
.iakka-settings-tab.active { color: var(--des-accent); background: rgba(97,47,235,.12); }
.iakka-settings-content { min-width: 0; overflow: auto; padding: 18px; }
.iakka-settings-title { margin: 0; font-size: 18px; }
.iakka-settings-lead { margin: 4px 0 15px; color: var(--des-muted); font-size: 11px; }
.iakka-setting-card {
    margin-bottom: 11px; padding: 12px; border: 1px solid var(--des-line);
    border-radius: 11px; background: rgba(148,163,184,.055);
}
.iakka-setting-row { display: flex; align-items: center; gap: 10px; }
.iakka-setting-row + .iakka-setting-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--des-line); }
.iakka-setting-copy { min-width: 0; flex: 1; }
.iakka-setting-copy b { display: block; font-size: 11.5px; }
.iakka-setting-copy small { display: block; margin-top: 2px; color: var(--des-muted); font-size: 9.5px; line-height: 1.35; }
.iakka-user-avatar {
    width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: grid; place-items: center;
    color: #fff; background: linear-gradient(135deg,#4f46e5,#7c3aed); font-size: 12px; font-weight: 800;
}
.iakka-setting-button,
.iakka-wallpaper-upload-label {
    min-height: 31px; padding: 0 11px; border: 1px solid var(--des-line); border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    color: var(--des-text); background: var(--des-surface); font: 600 10.5px/1 inherit; cursor: pointer;
}
.iakka-setting-button:hover,
.iakka-wallpaper-upload-label:hover { color: var(--des-accent); border-color: rgba(97,47,235,.45); }
.iakka-setting-button.primary { color: #fff; border-color: var(--des-accent); background: var(--des-accent); }
.iakka-setting-controls { display: inline-flex; align-items: center; gap: 6px; }
.iakka-setting-button.danger { color: #dc2626; border-color: rgba(220,38,38,.24); }
.iakka-setting-button.danger:hover { color: #fff; border-color: #dc2626; background: #dc2626; }
.iakka-setting-select {
    min-width: 170px; height: 32px; padding: 0 9px; border: 1px solid var(--des-line); border-radius: 8px;
    color: var(--des-text); background: var(--des-surface); font-size: 10.5px; outline: none;
}
.iakka-pin-editor { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--des-line); }
.iakka-pin-editor[hidden] { display: none !important; }
.iakka-pin-editor-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.iakka-pin-editor input {
    width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--des-line); border-radius: 8px;
    color: var(--des-text); background: var(--des-surface); outline: none; text-align: center; letter-spacing: .18em; font-size: 11px;
}
.iakka-pin-editor input:focus { border-color: var(--des-accent); box-shadow: 0 0 0 3px rgba(97,47,235,.12); }
.iakka-pin-editor-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 8px; }
.iakka-pin-editor-error { min-height: 14px; margin-top: 4px; color: #dc2626; font-size: 9.5px; }
.iakka-pin-editor .iakka-setting-button { min-width: 88px; }
.iakka-wallpaper-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 7px; }
.iakka-wallpaper-section-head b { font-size: 11px; }
.iakka-wallpaper-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(112px,1fr)); gap: 8px; }
.iakka-wallpaper-tile {
    position: relative; aspect-ratio: 16/10; padding: 0; overflow: hidden;
    border: 2px solid transparent; border-radius: 9px; background: #dbe4f0; cursor: pointer;
}
.iakka-wallpaper-tile img { width: 100%; height: 100%; display: block; object-fit: cover; }
.iakka-wallpaper-tile:hover { border-color: rgba(97,47,235,.5); transform: translateY(-1px); }
.iakka-wallpaper-tile.active { border-color: var(--des-accent); box-shadow: 0 0 0 2px rgba(97,47,235,.14); }
.iakka-wallpaper-tile.active::after {
    content: "✓"; position: absolute; right: 5px; top: 5px; width: 18px; height: 18px;
    display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--des-accent); font-size: 10px;
}
.iakka-wallpaper-empty { padding: 12px; border: 1px dashed var(--des-line); border-radius: 9px; color: var(--des-muted); font-size: 10px; text-align: center; }

/* Non-destructive current-window PIN lock. */
.iakka-lock-layer { z-index: 2147483640; }
.iakka-lock-overlay {
    position: absolute; inset: 0; display: grid; place-items: center; padding: 18px;
    color: #fff; background: rgba(5,10,22,.78); backdrop-filter: blur(22px) saturate(.8);
}
.iakka-lock-card { width: min(350px,94vw); padding: 24px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(15,23,42,.86); box-shadow: 0 28px 90px rgba(0,0,0,.48); text-align: center; }
.iakka-lock-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg,#612feb,#8b5cf6); font-size: 20px; }
.iakka-lock-card h2 { margin: 0; font-size: 19px; }
.iakka-lock-card p { margin: 6px 0 15px; color: #b7c1d2; font-size: 10.5px; line-height: 1.45; }
.iakka-lock-card input { width: 100%; height: 40px; margin: 4px 0; padding: 0 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: #fff; background: rgba(15,23,42,.72); text-align: center; letter-spacing: .25em; outline: none; }
.iakka-lock-card input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.iakka-lock-error { min-height: 15px; margin-top: 4px; color: #fca5a5; font-size: 9.5px; }
.iakka-lock-actions { display: flex; gap: 7px; margin-top: 9px; }
.iakka-lock-actions button { flex: 1; min-height: 36px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; color: #fff; background: rgba(255,255,255,.07); cursor: pointer; font-size: 11px; }
.iakka-lock-actions button.primary { border-color: #6d4aff; background: #6d4aff; }
.iakka-lock-clock { margin-bottom: 14px; font-size: 30px; font-weight: 300; letter-spacing: -.03em; }
.iakka-lock-logout { margin-top: 13px; padding: 5px 8px; border: 0; color: #cbd5e1; background: transparent; cursor: pointer; font: 600 10px/1.2 inherit; text-decoration: underline; text-underline-offset: 3px; }
.iakka-lock-logout:hover { color: #fff; }

body.dark-mode,
[data-bs-theme="dark"] {
    --des-surface: rgba(20, 27, 43, .97);
    --des-text: #eef2ff;
    --des-muted: #a8b4c9;
    --des-line: rgba(148, 163, 184, .2);
}

body.dark-mode .iakka-dialog input,
[data-bs-theme="dark"] .iakka-dialog input { color: #eef2ff; background: rgba(15, 23, 42, .76); border-color: #344158; }
body.dark-mode .iakka-dialog-actions .secondary,
[data-bs-theme="dark"] .iakka-dialog-actions .secondary { color: #eef2ff; background: #1f2937; border-color: #344158; }
body.dark-mode .iakka-scope-switch,
[data-bs-theme="dark"] .iakka-scope-switch {
    color: #eef2ff;
    border-color: rgba(148, 163, 184, .28);
    background: rgba(15, 23, 42, .88);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .06);
}
body.dark-mode .iakka-scope-switch button,
[data-bs-theme="dark"] .iakka-scope-switch button { color: #a8b4c9; }

/*
 * Desktop canvas contract. These selectors are intentionally scoped to
 * #DeskTopMode because the legacy app.css still contains generic .appsHome
 * and .appBox declarations used by older pages and is loaded afterwards.
 */
#DeskTopMode.DeskTopMode {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#DeskTopMode > #iakkaDesktopIcons.appsHome {
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#DeskTopMode > #iakkaDesktopIcons.appsHome > .appBox {
    position: absolute !important;
    display: flex !important;
    width: 84px;
    height: auto !important;
    min-height: 94px;
    margin: 0 !important;
    padding: 7px 5px;
    box-sizing: border-box;
}

#DeskTopMode > #iakkaDesktopIcons.appsHome > .appBox > .appiiicon {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    line-height: normal;
}

#DeskTopMode > #iakkaDesktopIcons.appsHome > .appBox > .appiiicon > img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

#DeskTopMode > #iakkaDesktopIcons.appsHome > .appBox .apptext {
    width: 100%;
    margin-top: 0;
    color: #fff;
    font-size: 12px;
    line-height: 1.22;
}

#DeskTopMode[data-icon-size="small"] > #iakkaDesktopIcons.appsHome > .appBox { width: 68px; min-height: 78px; }
#DeskTopMode[data-icon-size="large"] > #iakkaDesktopIcons.appsHome > .appBox { width: 104px; min-height: 112px; }
#DeskTopMode[data-icon-size="small"] > #iakkaDesktopIcons.appsHome > .appBox > .appiiicon > img { width: 40px; height: 40px; }
#DeskTopMode[data-icon-size="large"] > #iakkaDesktopIcons.appsHome > .appBox > .appiiicon > img { width: 68px; height: 68px; }
#DeskTopMode[data-icon-size="small"] > #iakkaDesktopIcons.appsHome > .appBox .apptext { font-size: 10px; }
#DeskTopMode[data-icon-size="large"] > #iakkaDesktopIcons.appsHome > .appBox .apptext { font-size: 13px; }

#DeskTopMode > #contentBodyApps.contentBodyApps {
    position: absolute !important;
    inset: 0 !important;
    z-index: 20 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0 0 var(--iakka-rail-w, 70px) !important;
    padding: 0 !important;
}

body[data-sb="hidden"] #DeskTopMode > #contentBodyApps.contentBodyApps {
    margin-left: 0 !important;
}

#contextMenu.iakka-context-menu {
    isolation: isolate;
    box-sizing: border-box;
}

@media (max-width: 720px) {
    #DeskTopMode.DeskTopMode { overflow: auto; background-attachment: scroll; }
    #DeskTopMode > #iakkaDesktopIcons.appsHome {
        position: relative !important;
        inset: auto !important;
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
        align-content: start;
        gap: 12px 7px;
        min-height: 100%;
        width: 100% !important;
        height: auto !important;
        padding: max(18px, env(safe-area-inset-top)) 12px calc(28px + env(safe-area-inset-bottom)) !important;
        overflow: visible !important;
    }
    #DeskTopMode > #iakkaDesktopIcons.appsHome > .appBox,
    #DeskTopMode[data-icon-size="small"] > #iakkaDesktopIcons.appsHome > .appBox,
    #DeskTopMode[data-icon-size="large"] > #iakkaDesktopIcons.appsHome > .appBox {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 92px;
        touch-action: manipulation;
    }
    #DeskTopMode > #iakkaDesktopIcons.appsHome > .appBox > .appiiicon > img,
    #DeskTopMode[data-icon-size="small"] > #iakkaDesktopIcons.appsHome > .appBox > .appiiicon > img,
    #DeskTopMode[data-icon-size="large"] > #iakkaDesktopIcons.appsHome > .appBox > .appiiicon > img { width:50px; height:50px; }
    #DeskTopMode > #iakkaDesktopIcons.appsHome > .appBox .apptext,
    #DeskTopMode[data-icon-size="small"] > #iakkaDesktopIcons.appsHome > .appBox .apptext,
    #DeskTopMode[data-icon-size="large"] > #iakkaDesktopIcons.appsHome > .appBox .apptext { font-size:11px; }
    #DeskTopMode > #contentBodyApps.contentBodyApps { margin-left: 0 !important; }
    .appiiicon img,
    .DeskTopMode[data-icon-size="small"] .appiiicon img,
    .DeskTopMode[data-icon-size="large"] .appiiicon img { width: 50px; height: 50px; }
    .iakka-shortcut-icon,
    .DeskTopMode[data-icon-size="small"] .iakka-shortcut-icon,
    .DeskTopMode[data-icon-size="large"] .iakka-shortcut-icon { width: 50px; height: 50px; border-radius: 13px; font-size: 23px; }
    .apptext,
    .DeskTopMode[data-icon-size="small"] .apptext,
    .DeskTopMode[data-icon-size="large"] .apptext { font-size: 11px; }
    .iakka-context-menu { width:min(270px,calc(100vw - 20px)); max-height:calc(100vh - 20px); overflow:auto; }
    .iakka-submenu { position:static; width:auto; margin:2px 0 3px 25px; padding:3px; border:0; border-left:1px solid var(--des-line); border-radius:0; box-shadow:none; background:transparent; backdrop-filter:none; }
    .iakka-dialog { padding: 20px; border-radius: 15px; }
    .iakka-settings-overlay { padding: 0; }
    .iakka-settings-panel { width: 100vw; height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
    .iakka-settings-layout { grid-template-columns: 66px minmax(0,1fr); }
    .iakka-settings-tab { justify-content: center; min-height: 42px; padding: 6px; }
    .iakka-settings-tab span { display: none; }
    .iakka-settings-tab i { font-size: 15px; }
    .iakka-settings-content { padding: 13px; }
    .iakka-setting-row { align-items: flex-start; flex-wrap: wrap; }
    .iakka-setting-select { width: 100%; min-width: 0; }
    .iakka-wallpaper-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .iakka-scope-switch {
        right: max(8px, env(safe-area-inset-right));
        bottom: max(9px, env(safe-area-inset-bottom));
        max-width: calc(100vw - 20px);
        padding: 2px;
        border-radius: 11px;
    }
    .iakka-scope-switch button { min-width: 55px; min-height: 26px; padding: 0 7px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    .appBox { transition: none; }
    .DeskTopMode.is-syncing::after { animation-duration: 2.4s; }
}

.page-content { padding: calc(-24px + 1.5rem) calc(1.5rem / 2) 0 calc(1.5rem / 2); }
.paddingInsidePanel { padding: 0 !important; }
.jsPanel-content { padding: 0 !important; }

.panelMainMenu {
    position: absolute;
    z-index: 10000;
    left: 130px;
    width: 70%;
    height: 22px;
    overflow-x: auto;
    white-space: nowrap;
    background: none;
}
.panelChildMenu { display: inline-block; box-sizing: border-box; height: 20px; margin-left: .5px; padding: 0 10px; }
.panelChildMenu img { width: 17px; margin: 1px 0 0 -9px; border-radius: 5px; }
.textHeder { padding: 5px; font-size: x-small; cursor: pointer; }
.iconHeder { float: right; margin: 1px -8px 0 7px; padding: 0; border-radius: 5px; font-size: 18px; cursor: pointer; }
.iconHeder:hover { background: #5654572e; }
.active22 { background: #fff; }
.chatOpenner { position: fixed; z-index: 1001; right: 0; width: 20px; height: 50px; margin-top: 200px; border-radius: 100% 0 0 100% / 48% 49% 51% 52%; background: #390039; cursor: pointer; }

/* ============================================================
   ERP dialog-header standard - ONE height for every modal head.
   Owner's rule: every modal header across the ERP follows the
   same height. Bootstrap modals, sessionE and any custom dialog
   read this variable; change it here, it changes everywhere.
   (galaxy.css declares the same variable for the galaxy page,
   which intentionally loads no shared stylesheets.)
   ============================================================ */
:root { --sarus-modal-head-h: 46px; }
.modal-header {
    min-height: var(--sarus-modal-head-h);
    padding: 8px 16px;
    align-items: center;
}
.modal-header .modal-title { font-size: 15px; line-height: 1.25; }

/* [Codex 2026-09-06] Keep tenant identity readable over any wallpaper and outside the shortcut hit areas. */
#iakkaDesktopIcons > .iakka-company-badge {
    box-sizing: border-box;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: min(520px, calc(100% - 190px));
    padding: 5px 12px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 7px;
    background: rgba(20,28,46,.68);
    backdrop-filter: blur(10px);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    font: 600 12px/18px system-ui, sans-serif;
    pointer-events: none;
    z-index: 1;
}
.iakka-company-badge > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iakka-company-badge > i { flex: none; font-size: 11px; opacity: .8; }
@media (max-width: 720px) {
    /* The mobile desktop uses a grid; reserve a row so the badge cannot cover shortcuts. */
    #iakkaDesktopIcons > .iakka-company-badge {
        position: relative; top: auto; left: auto; transform: none;
        grid-column: 1 / -1; justify-self: center;
        max-width: 100%; padding: 4px 8px; font-size: 11px;
    }
}
