﻿/* Badge positioning follows the icon, independent of role-specific menu widths. */
@media(min-width:701px) {
  #view-planning .planning-workspace-body { grid-template-rows:auto minmax(0,1fr); }
  #view-planning .planning-selection-panel {
    contain:size;
    min-height:0;
    max-height:none;
    align-self:stretch;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  #view-planning .planning-selection-panel > :not(#planningSelectionList) { flex:0 0 auto; }
  #view-planning #planningSelectionList { flex:1;min-height:0;max-height:none;overflow-y:auto; }
}
#mobileActionBackdrop { display:none; }
.module-header h2.ui-icon-page-title { display:flex;align-items:center;gap:12px; }
.ui-icon-page-title > .ui-page-title-icon { width:28px;height:28px;flex:none; }
.ui-icon-page-title > span { min-width:0; }
#view-form #formShubeAdi { display:flex;align-items:center;gap:12px; }
#view-form #formShubeAdi::before {
  content:"";
  display:block;
  width:28px;
  height:28px;
  flex:none;
  background-color:currentColor;
  -webkit-mask:url('data:image/svg+xml,%3Csvg%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22currentColor%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpath%20d%3D%22M11.35%2022H6a2%202%200%200%201-2-2V4a2%202%200%200%201%202-2h8a2.4%202.4%200%200%201%201.706.706l3.588%203.588A2.4%202.4%200%200%201%2020%208v5.35%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22M14%202v5a1%201%200%200%200%201%201h5%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22M14%2019h6%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22M17%2016v6%22%20%2F%3E%0A%3C%2Fsvg%3E%0A') center/contain no-repeat;
  mask:url('data:image/svg+xml,%3Csvg%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22currentColor%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpath%20d%3D%22M11.35%2022H6a2%202%200%200%201-2-2V4a2%202%200%200%201%202-2h8a2.4%202.4%200%200%201%201.706.706l3.588%203.588A2.4%202.4%200%200%201%2020%208v5.35%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22M14%202v5a1%201%200%200%200%201%201h5%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22M14%2019h6%22%20%2F%3E%0A%20%20%3Cpath%20d%3D%22M17%2016v6%22%20%2F%3E%0A%3C%2Fsvg%3E%0A') center/contain no-repeat;
}
@media(max-width:700px) {
  .module-header h2.ui-icon-page-title { gap:8px; }
  .ui-icon-page-title > .ui-page-title-icon { width:24px;height:24px; }
  #view-form #formShubeAdi { gap:8px; }
  #view-form #formShubeAdi::before { width:24px;height:24px; }
}
#planningWorkspaceAdd { display:inline-flex;align-items:center;justify-content:center;gap:8px; }
#planningWorkspaceAdd .planning-add-icon { width:16px;height:16px;flex:none;filter:brightness(0) invert(1); }
.planning-modal-card .planning-modal-heading { display:flex;align-items:center;gap:8px; }
.planning-modal-heading > img { width:20px;height:20px;flex:none; }
.planning-modal-card .planning-modal-actions { display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap; }
.planning-modal-actions > span { flex:1; }
.planning-modal-card .planning-modal-actions button:not(.planning-modal-delete) {
  flex:0 0 auto;
  width:128px;
  max-width:calc((100% - 8px)/2);
  min-width:0;
  min-height:39px;
  padding:0 10px;
  box-sizing:border-box;
}
@media(max-width:700px) {
  .planning-modal-actions .planning-modal-delete { flex-basis:100%; }
}
.performance-dialog header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.performance-dialog h2 { font-size:var(--ui-page-title-size); }
.performance-dialog p { font-size:var(--ui-body-size); line-height:1.7; }
.performance-dialog .performance-note { font-size:var(--ui-help-size); color:#728390; }
.performance-dialog textarea { display:block; box-sizing:border-box; width:100%; min-width:0; height:210px; padding:10px; font:var(--ui-compact-control-size)/1.6 var(--sans); border:1px solid #d5e0e8; border-radius:10px; resize:vertical; }
.performance-dialog footer { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.performance-dialog [hidden] { display:none!important; }
/* Mobil arama ve mevcut alt barlar ekranın kullanılabilir genişliğine oturur. */
@media(max-width:700px) {
  body.nd-view-home.new-design-ui.nd-authenticated #topbarRow .nd-topbar-search {
    grid-column:1/-1!important;grid-row:2;justify-self:stretch;
    width:auto!important;min-width:0!important;max-width:none!important;
    box-sizing:border-box;margin:0;
  }
  body.nd-view-home #topbarRow .nd-topbar-search input { flex:1;min-width:0;width:0; }
  body.new-design-ui.nd-authenticated.nd-view-home #newDesignRail,
  body.nd-view-report #view-report .report-action-dock,
  body.nd-view-report #view-report #adminWithdrawalActionDock,
  body.nd-view-form #footerActions {
    left:0!important;right:0!important;bottom:0!important;
    width:100%!important;max-width:none!important;margin:0!important;transform:none!important;
    border-radius:22px 22px 0 0!important;
    padding-bottom:max(18px,env(safe-area-inset-bottom,0px))!important;
    background:#f7fafc!important;box-sizing:border-box!important;
    border-bottom:0!important;border-left:0!important;border-right:0!important;
  }
  body.nd-view-home #view-home { padding-bottom:110px!important; }
  body.nd-view-report #view-report,body.nd-view-form #view-form { padding-bottom:130px!important; }
}
body.new-design-ui .nd-rail .nd-nav-button::before{content:none!important;display:none!important}
body.new-design-ui .nd-rail .nd-nav-button .nd-nav-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:none;overflow:visible;margin:0;padding:0;line-height:1;isolation:isolate;color:#7d8a92}
body.new-design-ui .nd-rail .nd-nav-button .nd-nav-icon>img{display:block;width:20px;height:20px;max-width:20px;max-height:20px;object-fit:contain;filter:brightness(0) saturate(100%) invert(53%) sepia(9%) saturate(482%) hue-rotate(157deg) brightness(92%) contrast(87%);opacity:1}
body.new-design-ui .nd-rail .nd-nav-button .nd-nav-icon>svg{width:20px;height:20px;max-width:20px;max-height:20px;color:inherit;stroke:currentColor}
body.new-design-ui .nd-rail .nd-nav-button .nd-nav-mask>img{display:none!important}
body.new-design-ui .nd-rail .nd-nav-button .nd-nav-mask::before{content:"";position:absolute;inset:0;background:currentColor;-webkit-mask:var(--nd-nav-image) center/20px 20px no-repeat;mask:var(--nd-nav-image) center/20px 20px no-repeat}
body.new-design-ui .nd-rail .nd-nav-button .nd-nav-icon>.nd-nav-count{top:-8px;right:-10px;z-index:4;min-width:18px;height:18px;font-size:8px;line-height:1}
@media(hover:hover){body.new-design-ui .nd-rail .nd-nav-button:hover .nd-nav-icon{color:#000}}
body.new-design-ui .nd-rail .nd-nav-button:focus-visible .nd-nav-icon,body.new-design-ui .nd-rail .nd-nav-button.active .nd-nav-icon{color:#000}
/* Whole person rows are direct links to a targeted account card. */
.online-presence-person{width:100%;background:transparent;border:0;border-bottom:1px solid #e1e8ed;text-align:left;color:inherit;font:inherit;cursor:pointer}
.online-presence-person:hover{background:#eef4f7}
.online-presence-person>.online-presence-dot,.online-presence-popover h3>.online-presence-dot{box-shadow:0 0 0 4px #e6f3ed;margin:0 4px}
.online-presence-popover h3{display:flex;align-items:center;gap:7px}
.online-presence-person b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.online-presence-status{flex:none;padding:4px 8px;border-radius:7px;background:#e7f4ee;color:#328662;font-size:11px;line-height:1.4}
.online-presence-person-copy{min-width:0;flex:1}
.online-presence-person-copy>span{display:block;color:#8196a3;font-size:10px;line-height:1.6;margin-top:5px;overflow-wrap:anywhere}
#view-settings .settings-user-row,#settingsUsersCard{scroll-margin:20px}
/* Programmatic navigation keeps focus without decorating the account card. */
#view-settings .settings-user-target:focus{outline:none}
/* Identity is exactly two single-line rows; full values open in a separate dialog. */
body.new-design-ui.nd-authenticated #topbarUserWrap{transform:none!important}
body.new-design-ui.nd-authenticated #topbarUserWrap #mobileAccountPopover{width:350px!important;max-width:calc(100vw - 28px)!important;grid-template-columns:minmax(0,1fr)!important;padding:10px!important;gap:6px!important;text-align:left}
body.new-design-ui.nd-authenticated #mobileAccountPopover>.account-identity-summary{display:block!important;min-width:0!important;padding:12px!important;background:#eaf0f4;border-radius:11px}
body.new-design-ui.nd-authenticated #mobileAccountPopover .account-identity-line{display:flex!important;align-items:center;gap:7px;min-width:0;white-space:nowrap}
body.new-design-ui.nd-authenticated #mobileAccountPopover :is(#topbarAccountName,#topbarUser){display:block!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;text-align:left;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;cursor:pointer}
body.new-design-ui.nd-authenticated #mobileAccountPopover #topbarAccountName{flex:1;font:600 13px/1.6 var(--sans)!important;color:#284357!important}
body.new-design-ui.nd-authenticated #mobileAccountPopover :is(.account-identity-separator,#topbarRole){display:block!important;flex:none;white-space:nowrap!important;overflow:visible!important;font:400 12px/1.6 var(--sans)!important;color:#718591!important;margin:0!important}
body.new-design-ui.nd-authenticated #mobileAccountPopover #topbarUser{width:100%!important;margin-top:4px!important;font:400 12px/1.6 var(--sans)!important;color:#718591!important}
#accountIdentityDialog p{overflow-wrap:anywhere;font-size:14px;line-height:1.6;color:#526d7e}
@media(max-width:700px){
 body.new-design-ui.nd-authenticated #topbarRow :is(#notificationButton,#settingsOpenButton,#topbarUserWrap,#topbarLogoutButton,#onlinePresenceButton){box-sizing:border-box!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;max-height:36px!important;flex:0 0 36px!important;padding:0!important;border-radius:11px!important}
 body.new-design-ui.nd-authenticated.has-online-presence>#topbarRow{grid-template-columns:minmax(62px,1fr) repeat(5,36px)!important}
 body.new-design-ui.nd-authenticated #topbarRow :is(#notificationButton,#settingsOpenButton,#topbarUserWrap,#topbarLogoutButton)>img,body.new-design-ui.nd-authenticated #onlinePresenceButton>img{width:18px!important;height:18px!important}
 body.new-design-ui.nd-authenticated #topbarRow #topbarUserWrap{position:static!important}
 body.new-design-ui.nd-authenticated #topbarRow #mobileAccountPopover{position:absolute!important;left:auto!important;right:0!important;top:calc(100% + 8px)!important;min-width:0!important;width:min(350px,100%)!important;max-width:100%!important}
 body.new-design-ui.nd-authenticated #topbarRow #mobileAccountPopover #topbarUser{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
}
/* Keep the same header actions on narrow phones, with one smaller size step. */
@media(max-width:400px){
 body.new-design-ui.nd-authenticated #topbarRow{--compact-topbar-size:32px;column-gap:6px!important}
 body.new-design-ui.nd-authenticated #topbarRow .topbar-actions{gap:5px!important;flex-shrink:0}
 body.new-design-ui.nd-authenticated #topbarRow :is(#notificationButton,#settingsOpenButton,#topbarUserWrap,#topbarLogoutButton,#onlinePresenceButton){width:var(--compact-topbar-size)!important;min-width:var(--compact-topbar-size)!important;max-width:var(--compact-topbar-size)!important;height:var(--compact-topbar-size)!important;min-height:var(--compact-topbar-size)!important;max-height:var(--compact-topbar-size)!important;flex:0 0 var(--compact-topbar-size)!important;border-radius:10px!important}
 body.new-design-ui.nd-authenticated #topbarRow :is(#notificationButton,#settingsOpenButton,#topbarUserWrap,#topbarLogoutButton,#onlinePresenceButton)>img{width:16px!important;height:16px!important}
 body.new-design-ui.nd-authenticated #topbarRow .nd-topbar-brand{min-width:0!important}
 body.new-design-ui.nd-authenticated #topbarRow #topbarLogo{max-width:100%!important;height:auto!important;max-height:23px;object-fit:contain}
 body.nd-view-home.new-design-ui.nd-authenticated>#topbarRow{grid-template-columns:minmax(0,1fr) repeat(3,var(--compact-topbar-size))!important}
 body.nd-view-home.new-design-ui.nd-authenticated.nd-can-settings>#topbarRow{grid-template-columns:minmax(0,1fr) repeat(4,var(--compact-topbar-size))!important}
 body.new-design-ui.nd-authenticated.has-online-presence>#topbarRow{grid-template-columns:minmax(0,1fr) repeat(5,var(--compact-topbar-size))!important}
}
@media(max-width:350px){
 body.new-design-ui.nd-authenticated #topbarRow{--compact-topbar-size:30px;column-gap:5px!important}
 body.new-design-ui.nd-authenticated #topbarRow .topbar-actions{gap:4px!important}
 body.new-design-ui.nd-authenticated #topbarRow :is(#notificationButton,#settingsOpenButton,#topbarUserWrap,#topbarLogoutButton,#onlinePresenceButton)>img{width:15px!important;height:15px!important}
}

/* Denetim listeleri aynı aralık ve mobil bilgi düzenini kullanır. */
#view-home :is(#auditList,#returnedAuditList,#pendingApprovalList,#qualityWaitList) {
  display:grid;
  gap:10px;
}
#view-home #qualityWaitList { padding-top:12px; }
#view-home .month-group { gap:10px; }
#view-home .audit-date-report { display:flex;flex-wrap:wrap;align-items:center;gap:7px 14px;min-width:0; }
#view-home .audit-updated>span+span::before { content:' · '; }
@media(min-width:701px) {
  #view-home .audit-card .info { display:grid;grid-template-columns:minmax(0,1fr);gap:8px; }
  #view-home .audit-card .audit-title-row { display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0; }
  #view-home .audit-card .info b { min-width:0;overflow-wrap:anywhere; }
  #view-home .audit-card .audit-result { max-width:100%;white-space:normal; }
  #view-home .audit-card .audit-details { display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px; }
  #view-home .audit-card .audit-auditor { min-width:0;overflow-wrap:anywhere; }
  #view-home .audit-card .audit-updated { margin-top:0;overflow-wrap:anywhere; }
  #view-home .audit-card :is(.audit-lock-note,.audit-ready-note) { grid-column:1/-1; }
}

/* Rapor kartlarında ortak başlık / metin / yardımcı bilgi ölçeği. */
body #view-report .report-head {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 36px;
  gap:12px;
  align-items:center;
}
body #view-report .report-head>.report-head-info { grid-column:1;grid-row:1;min-width:0; }
body #view-report .report-head>.ui-back-button { grid-column:2;grid-row:1;justify-self:end;align-self:center!important;margin:0!important; }
#view-report .report-head-title { display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px; }
#view-report .report-head-title h2 { margin:0;min-width:0;overflow-wrap:anywhere; }
#view-report .report-head-title #reportMeta { margin:0;min-width:0;overflow-wrap:anywhere; }
#view-report .report-head-title .report-status-badge { flex:none;margin:0; }
@media(max-width:700px) {
  #view-report .report-head-title { display:grid;grid-template-columns:minmax(0,max-content) auto;justify-content:start;gap:5px 10px; }
  #view-report .report-head-title h2 { grid-column:1;grid-row:1; }
  #view-report .report-head-title .report-status-badge { grid-column:2;grid-row:1;align-self:center;justify-self:center;display:flex;align-items:center;justify-content:center; }
  #view-report .report-head-title #reportMeta { grid-column:1/-1;grid-row:2; }
}
#view-report {
  --report-heading-size:17px;
  --report-copy-size:13px;
  --report-meta-size:11px;
}
#view-report :is(.report-card-heading h3,.report-result-card h3,.report-approval-title-row h3,.report-action-status-row h3,.history-card h3) {
  font-family:var(--sans);
  font-size:var(--report-heading-size);
  line-height:1.4;
}
#view-report :is(.report-result-card p,.report-approval-copy p,.report-action-status-card p) {
  font-size:var(--report-copy-size);
  line-height:1.55;
}
#view-report .revision-add-button {
  display:inline-flex;
  gap:6px;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:8px 12px;
  box-sizing:border-box;
  border-radius:11px;
  font:600 var(--report-copy-size)/1.4 var(--sans);
}
#view-report #revisionPhotoStatus {
  font:500 var(--report-meta-size)/1.5 var(--sans);
}
#view-report .report-admin-review-note {
  font:500 var(--report-copy-size)/1.55 var(--sans);
}
#view-report .history-item b { font-size:var(--report-copy-size);line-height:1.5; }
#view-report .history-item span { font-size:var(--report-meta-size);line-height:1.5; }
#view-report .report-card-kicker { font-size:10px;line-height:1.5; }
#view-report .approval-status { font-size:10px;line-height:1.4; }

/* Ortak sonuç/durum başlığı; açıklamalar kartın sol kenarından okunur. */
#view-report :is(.report-result-card,.report-approval-state,.report-action-status-card) {
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  align-items:start;
  gap:8px 12px;
}
#view-report :is(.report-result-card>div:not(.report-result-icon),.report-approval-copy,.report-approval-title-row,.report-action-status-state,.report-action-status-copy,.report-action-status-row) { display:contents; }
#view-report :is(.report-result-icon,.report-approval-icon,.report-action-status-icon) { grid-column:1;grid-row:1/span 2;align-self:start; }
#view-report :is(.report-result-card,.report-approval-state,.report-action-status-card) .report-card-kicker { grid-column:2;grid-row:1;align-self:center;min-width:0; }
#view-report :is(.report-result-card,.report-approval-state,.report-action-status-card) h3 { grid-column:2/-1;grid-row:2;margin:0;min-width:0; }
#view-report :is(.report-result-card,.report-approval-state,.report-action-status-card) p { grid-column:1/-1;grid-row:3;margin:4px 0 0; }
#view-report :is(.report-result-badge,.approval-status,.report-action-status-card .action-status) {
  grid-column:3;
  grid-row:1;
  justify-self:end;
  align-self:start;
  max-width:160px;
  margin:0;
  padding:5px 8px;
  box-sizing:border-box;
  white-space:normal;
  font:700 10px/1.4 var(--sans);
}
#view-report .report-result-badge { border-radius:999px; }
#view-report .report-result-badge.is-success { background:#e0f3e9;color:#247449; }
#view-report .report-result-badge.is-danger { background:#fde6e1;color:#b43f32; }
#view-report .report-result-badge.is-neutral { background:#edf1f5;color:#637286; }
#view-report #currentRevisionPhotos { grid-column:1/-1;grid-row:4; }
#view-report #currentRevisionPhotos:empty { display:none; }

/* Seçilen B düzeni: sıkı başlık, ayırıcı çizgi ve bağımsız işlem alanı. */
#view-report :is(.report-result-card,.report-approval-state,.report-action-status-card) {
  grid-template-columns:42px minmax(0,1fr);
  row-gap:2px;
}
#view-report #reportResultBadge,
#view-report #approvalCard .approval-status,
#view-report .report-action-status-card .action-status { display:none!important; }
#view-report :is(.report-result-card,.report-approval-state,.report-action-status-card) .report-card-kicker { align-self:end;margin:0; }
#view-report :is(.report-result-card,.report-approval-state,.report-action-status-card) h3 { align-self:start; }
#view-report :is(.report-result-card,.report-approval-state,.report-action-status-card) p {
  border-top:1px solid var(--nd-line);
  margin:10px 0 0;
  padding-top:12px;
}
#view-report .report-review-form { border-top:1px solid var(--nd-line);margin-top:12px;padding-top:12px; }
#view-report .report-review-form .report-admin-review-note { margin-top:0; }

@media(max-width:700px) {
  #view-home .audit-card {
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) 54px;
    align-items:start;
    column-gap:12px;
    row-gap:8px;
    padding:14px;
    min-height:0;
  }
  #view-home .audit-card :is(.info,.audit-card-side) { display:contents; }
  #view-home .audit-card .audit-details { display:flex;grid-column:1/-1;grid-row:2;align-items:center;flex-wrap:wrap;gap:7px 12px; }
  #view-home .audit-card .audit-title-row { grid-column:1;grid-row:1;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:0;min-width:0; }
  #view-home .audit-card .info b { flex:0 1 auto;min-width:0;font-size:14px;line-height:1.4;overflow-wrap:anywhere; }
  #view-home .audit-card .audit-result {
    max-width:100%;
    box-sizing:border-box;
    white-space:normal;
    font-size:8px;
    line-height:1.45;
    letter-spacing:.025em;
  }
  #view-home .audit-card .score-chip {
    grid-column:2;
    grid-row:1;
    justify-self:end;
    min-width:54px;
    max-width:54px;
    margin:0;
    padding:8px 6px;
    box-sizing:border-box;
    font-size:11px;
    line-height:1.4;
  }
  #view-home .audit-card .audit-date-report {
    display:contents;
    margin:0;
  }
  #view-home .audit-card .audit-detail { font-size:11px;line-height:1.45;overflow-wrap:anywhere; }
  #view-home .audit-card .audit-updated {
    grid-column:1/-1;
    grid-row:3;
    margin:0;
    font-size:10px;
    line-height:1.5;
    overflow-wrap:anywhere;
  }
  #view-home .audit-updated>span { display:block; }
  #view-home .audit-updated>span+span { margin-top:3px; }
  #view-home .audit-updated>span+span::before { content:none; }
  #view-home .audit-card:has(.audit-delete-btn) .audit-updated { padding-right:30px;min-height:24px; }
  #view-home .audit-card .audit-delete-btn { position:absolute;right:12px;bottom:12px;width:26px;height:26px; }
  #view-home .audit-card :is(.audit-lock-note,.audit-ready-note) { grid-column:1/-1; }

  /* On admin's ten-item menu, equal cells keep icon centers equally spaced. */
  body.admin-view.nd-view-home .nd-rail {
    display:grid;
    grid-template-columns:repeat(10,minmax(0,1fr));
    align-items:center;
    justify-content:stretch;
    gap:0;
    padding:8px 5px;
    box-sizing:border-box;
  }
  body.admin-view.nd-view-home .nd-rail .nd-nav-button {
    display:grid;
    width:100%!important;
    min-width:0;
    height:50px!important;
    margin:0;
    padding:2px 0;
    justify-items:center;
    align-content:center;
    grid-template-rows:22px 10px;
    gap:4px;
  }
  body.admin-view.nd-view-home .nd-rail .nd-nav-icon { justify-self:center;width:20px;height:22px; }
  body.admin-view.nd-view-home .nd-rail .nd-nav-button>span:not(.nd-nav-count) {
    width:100%;
    font-size:clamp(6px,1.6vw,7px);
    line-height:10px;
    text-align:center;
  }
  body.admin-view.nd-view-home .nd-rail .nd-nav-icon>.nd-nav-count {
    top:-5px;
    right:-7px;
    min-width:14px;
    height:14px;
    padding:0 3px;
    font-size:7px;
  }

  #view-report { --report-heading-size:15px;--report-copy-size:12px;--report-meta-size:10px; }
  #view-report .report-card-kicker { font-size:9px; }
  #view-report .approval-status { font-size:9px; }
  #view-report :is(.report-result-badge,.approval-status,.report-action-status-card .action-status) { max-width:130px;font-size:9px; }
  #view-report .revision-attachment-editor { gap:8px; }
  #view-report .report-dock-button { font-size:clamp(7px,2vw,8px);line-height:1.25; }
}


/* Presence adds a fifth action: keep it in the explicit grid, including compact sizes. */
/* Müdür onayı bekleyen raporun üçlü barı, değerlendirme barının ölçeğini kullanır. */
@media(max-width:700px) {
  #view-report #adminWithdrawalActionDock .report-dock-button {
    font-size:6px;line-height:1.25;min-height:58px;
  }
}
@media(max-width:700px) {
  body.nd-view-home.new-design-ui.nd-authenticated.has-online-presence>#topbarRow {
    grid-template-columns:minmax(0,1fr) repeat(5,var(--compact-topbar-size,36px))!important;
  }
}

/* Rapor fotoğrafları PDF sayfasındaki konumlarını ekran boyutuyla korur. */
.audit-photo-preview,.action-evidence-preview { display:block;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:zoom-in;border-radius:inherit; }
.audit-photo-preview:focus-visible,.action-evidence-preview:focus-visible { outline:2px solid #3977ae;outline-offset:2px; }
.pdf-preview-sheet { position:relative; flex:none; width:100%; max-width:900px; background:#fff; }
.pdf-preview-sheet .pdf-preview-page { position:absolute; inset:0; width:100%; height:100%; }
.pdf-preview-photo-button { position:absolute; padding:0; border:0; border-radius:8px; background:transparent; cursor:zoom-in; }
.pdf-preview-photo-button:hover { outline:2px solid #315e9d; outline-offset:2px; }
.pdf-preview-photo-button:focus-visible { outline:3px solid #315e9d; outline-offset:2px; }
.report-photo-lightbox { font-family:var(--sans); }
.report-photo-host {
  position:fixed; inset:auto; margin:0; padding:0; border:0; border-radius:0;
  top:var(--app-visible-top,0px); left:var(--app-visible-left,0px);
  width:var(--app-visible-width,100vw); height:var(--app-visible-height,100dvh);
  max-width:none; max-height:none; box-sizing:border-box; overflow:hidden; background:#000;
  --photo-safe-top:env(safe-area-inset-top,0px); --photo-safe-bottom:env(safe-area-inset-bottom,0px);
  --photo-safe-left:env(safe-area-inset-left,0px); --photo-safe-right:env(safe-area-inset-right,0px);
}
.report-photo-host::backdrop { background:#000; }
.report-photo-host .report-photo-lightbox { position:absolute; inset:0; width:100%; height:100%; }
html.report-photo-open,html.report-photo-open body { overflow:hidden!important; overscroll-behavior:none; }
.report-photo-lightbox .pswp__top-bar { padding-top:env(safe-area-inset-top,0px); }
.report-photo-lightbox .pswp__button:focus-visible { outline:2px solid #fff; outline-offset:-5px; }
.report-photo-lightbox .pswp__button--edit { display:flex;align-items:center;justify-content:center;gap:7px;width:auto;min-width:88px;padding:0 12px;color:#fff;font-family:inherit;font-size:var(--ui-compact-control-size); }
.report-photo-lightbox .pswp__button--edit[hidden] { display:none; }
.report-photo-lightbox .pswp__button--edit svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
#view-report .report-action-dock.draft-edit-only.returned-preview-edit.without-edit { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
@media(max-width:700px) {
  /* Explicit visible-viewport top avoids WebKit drifting fixed-bottom layers. */
  body.new-design-ui.nd-authenticated.nd-view-home #newDesignRail {
    position:fixed!important;
    top:calc(var(--app-visible-top,0px) + var(--app-visible-height,100dvh) - var(--ui-floating-bar-gap,8px))!important;
    bottom:auto!important; transform:translate3d(0,-100%,0)!important;
    left:max(14px,env(safe-area-inset-left,0px))!important;
    right:max(14px,env(safe-area-inset-right,0px))!important;
    width:auto!important;
    height:72px!important;
    padding:8px 5px!important;
    gap:0!important;
    border:1px solid #fff!important;
    border-radius:24px!important;
    background:#f8fafb!important;
    box-shadow:0 5px 18px #3449561a!important;
    overflow:visible!important;
  }
  body.nd-view-home #newDesignRail .nd-nav-button {
    flex:1 1 0!important;
    width:auto!important;
    min-width:0!important;
  }
  /* The floating menu's safe-area gap stays opaque while content scrolls. */
  body.new-design-ui.nd-authenticated.nd-view-home::after {
    content:"";
    position:fixed;
    left:0;
    width:100%;
    top:calc(var(--app-visible-top,0px) + var(--app-visible-height,100dvh) - var(--ui-floating-bar-gap,8px) - 88px);
    height:calc(var(--ui-floating-bar-gap,8px) + 88px);
    z-index:899;
    pointer-events:none;
    background:linear-gradient(to bottom,rgba(238,242,244,0),#eef2f4 16px);
  }
  body.new-design-ui.nd-authenticated.nd-view-home {
    padding-bottom:100px!important;
  }

  /* Match the home dock surface while retaining each screen's own actions. */
  body.nd-view-form #footerActions,
  body.nd-view-report #view-report #reportActionDock,
  body.nd-view-report #view-report .report-action-dock,
  body.nd-view-report #view-report #adminWithdrawalActionDock,
  body.nd-view-settings #view-questionnaire.active .qm-save-bar {
    position:fixed!important;
    top:calc(var(--app-visible-top,0px) + var(--app-visible-height,100dvh) - var(--ui-floating-bar-gap,8px))!important;
    bottom:auto!important;
    left:max(14px,env(safe-area-inset-left,0px))!important;
    right:max(14px,env(safe-area-inset-right,0px))!important;
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    transform:translate3d(0,-100%,0)!important;
    box-sizing:border-box!important;
    padding:8px 5px!important;
    border:1px solid #fff!important;
    border-radius:24px!important;
    background:#f8fafb!important;
    box-shadow:0 5px 18px #3449561a!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }
  body.has-mobile-action-dock > #mobileActionBackdrop {
    display:block;
    position:fixed;
    top:calc(var(--app-visible-top,0px) + var(--app-visible-height,100dvh) - var(--app-action-dock-height,72px) - var(--ui-floating-bar-gap,8px) - 16px);
    left:0;
    width:100%;
    height:calc(var(--app-action-dock-height,72px) + var(--ui-floating-bar-gap,8px) + 16px);
    z-index:39;
    pointer-events:none;
    background:linear-gradient(to bottom,rgba(238,242,244,0),#eef2f4 16px);
  }
  body.has-mobile-action-dock :is(#view-form,#view-report,#view-questionnaire).active {
    padding-bottom:calc(var(--app-action-dock-height,72px) + var(--ui-floating-bar-gap,8px) + 24px)!important;
  }
  #view-questionnaire .qm-save-bar { flex-wrap:wrap; }
  #view-questionnaire .qm-save-bar>p { width:100%;margin:0 5px; }
  #view-questionnaire .qm-save-actions { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%; }
  #view-questionnaire .qm-save-actions .btn { min-width:0;white-space:normal; }
}
