/* Navegação por páginas da Master Segurança */
body.master-shell-page .primary,
body.master-shell-page .secondary {
  border-color: #cbd5df;
  color: #273443;
  background: #fff;
}
body.master-shell-page .primary:hover,
body.master-shell-page .secondary:hover,
body.master-shell-page .ghost:hover,
body.master-shell-page .primary:focus-visible,
body.master-shell-page .secondary:focus-visible {
  border-color: #8e9cac;
  color: #172033;
  background: #f1f4f6;
}
.overview-intro { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.master-overview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.master-overview-grid a { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; min-height: 190px; padding: 23px; border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: #fff; box-shadow: var(--shadow); text-decoration: none; }
.master-overview-grid a:hover,.master-overview-grid a:focus-visible { border-color: #aab9c9; background: #f8fafb; outline: 2px solid transparent; transform: translateY(-2px); }
.master-overview-grid .overview-icon { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #d7e0e8; border-radius: 12px; color: #344a5f; background: #f3f6f8; font-size: 1.2rem; }
.master-overview-grid strong { grid-column: 1; font-size: 1.17rem; }
.master-overview-grid b { grid-column: 2; grid-row: 2 / span 2; align-self: center; font-size: 1.55rem; color: #273443; }
.master-overview-grid small { grid-column: 1; color: var(--muted); }
.master-overview-grid .overview-next { grid-column: 1 / -1; margin-top: 8px; color: #344a5f; font-size: .82rem; font-weight: 750; }
body[data-master-view="admin"] #gestaoMaster #postosPanel,
body[data-master-view="admin"] #gestaoMaster #masterClients,
body[data-master-view="admin"] #gestaoMaster #masterGoogleCard,
body[data-master-view="admin"] #gestaoMaster #teamPanel,
body[data-master-view="admin"] #masterReport { display: none !important; }
body[data-master-view="admin"][data-master-page="inicio"] #documentRepository { display: none !important; }
body[data-master-view="admin"][data-master-page="documentos"] #gestaoMaster { display: none !important; }
body[data-master-view="admin"][data-master-page="documentos"] #documentRepository { display: block !important; }

.master-admin-page main { width: min(1160px,calc(100% - 32px)); }
.admin-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 24px; }
.admin-page-head h1 { margin: 0; color: var(--navy); font-size: clamp(1.7rem,3vw,2.5rem); }
.admin-page-head p:last-child { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.admin-page-head .ghost { flex: 0 0 auto; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 16px; }
.admin-toolbar label { display: grid; gap: 5px; color: #46556a; font-size: .78rem; font-weight: 750; }
.admin-toolbar input,.admin-toolbar select,.admin-form input,.admin-form select,.admin-form textarea { min-height: 42px; padding: 9px 11px; border: 1px solid #cbd5df; border-radius: 10px; color: var(--text); background: #fff; }
.admin-toolbar input[type="search"] { min-width: min(310px,100%); }
.admin-toolbar input:focus,.admin-form input:focus,.admin-form select:focus,.admin-form textarea:focus { outline: 2px solid #a8b7c7; outline-offset: 1px; }
.admin-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.admin-card .responsive-table { overflow-x: auto; }
.admin-card table { width: 100%; border-collapse: collapse; }
.admin-card th,.admin-card td { padding: 13px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-card th { color: #536174; font-size: .73rem; letter-spacing: .05em; text-transform: uppercase; }
.admin-card td small { display: block; margin-top: 3px; color: var(--muted); }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-actions button { min-height: 33px; padding: 5px 9px; border: 1px solid #d3dce5; border-radius: 8px; color: #34465a; background: #fff; font-size: .75rem; }
.admin-actions button:hover { background: #f2f5f7; }
.admin-actions button.danger { color: #a63128; }
.admin-empty { padding: 25px 12px; color: var(--muted); text-align: center; }
.admin-status { margin: 0 0 20px; padding: 12px 15px; border: 1px solid #d3dce5; border-radius: 11px; color: #435063; background: #fff; }
.admin-status.error { border-color: #edbeb8; color: #a63128; background: #fff8f7; }
.admin-status.success { border-color: #bddcc8; color: #245c3f; background: #f4fbf6; }
.admin-preview { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 15px; margin: 0 0 16px; border: 1px solid #dbcba9; border-radius: 11px; background: #fffbf1; color: #66532b; }
.admin-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.admin-form label { display: grid; gap: 5px; font-size: .8rem; font-weight: 700; color: #3f4e60; }
.admin-form label.full { grid-column: 1 / -1; }
.admin-form header.full { grid-column: 1 / -1; }
.admin-form-feedback { grid-column: 1 / -1; min-height: 1em; margin: 0; color: #a63128; font-size: .82rem; }
.admin-form select[multiple] { min-height: 110px; }
.admin-form small { color: var(--muted); font-weight: 450; }
.admin-form .location-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; grid-column: 1 / -1; }
.admin-form footer { display: flex; justify-content: flex-end; gap: 10px; grid-column: 1 / -1; margin-top: 8px; }
.report-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.report-tabs button { border: 1px solid #d0d9e2; border-radius: 10px; padding: 10px 14px; background: #fff; color: #425164; font-weight: 700; }
.report-tabs button[aria-selected="true"] { border-color: #738597; background: #edf1f4; color: #172033; }
.report-summary { margin: 0 0 12px; color: #46556a; font-weight: 700; }
.master-history-indicators { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0 17px; }
.master-history-indicators a { min-height: 38px; border: 1px solid #d5ddd7; border-radius: 9px; color: #35423a; background: #fff; text-decoration: none; }
@media(max-width:760px) {
  .master-overview-grid { grid-template-columns: 1fr; }
  .admin-page-head { align-items: stretch; flex-direction: column; }
  .admin-form { grid-template-columns: 1fr; }
  .admin-form label.full { grid-column: 1; }
  .admin-card { padding: 14px; }
}

/* Hierarquia, ritmo e cartões do protótipo, com a paleta neutra da Master. */
body.master-shell-page .master-overview-grid {gap:14px}
body.master-shell-page .master-overview-grid a {min-height:155px;padding:19px 20px;border-color:#dfe5e1;border-radius:15px;box-shadow:0 6px 18px rgba(26,36,31,.045);transition:border-color .18s,box-shadow .18s,transform .18s}
body.master-shell-page .master-overview-grid a:hover,
body.master-shell-page .master-overview-grid a:focus-visible {border-color:#aeb9b1;background:#fff;box-shadow:0 10px 24px rgba(26,36,31,.085);transform:translateY(-2px);outline:none}
.master-overview-grid .overview-icon {width:36px;height:36px;border-color:#e1e6e2;background:#f1f3f2;color:#34413a}
.master-overview-grid strong {font-size:1.1rem;line-height:1.2}
.master-overview-grid b {font-family:"Bricolage Grotesque","Public Sans",sans-serif;font-size:1.65rem;color:#202b25}
.master-overview-grid small {line-height:1.4}
.master-overview-grid .overview-next {margin-top:4px;color:#39453d}
body.master-shell-page .overview-intro {margin-bottom:22px}
body.master-shell-page.master-admin-page main {padding-top:29px;width:min(1180px,calc(100% - 38px))}
.admin-page-head {align-items:center;margin-bottom:22px}
.admin-page-head h1 {font-size:clamp(1.85rem,2.7vw,2.35rem);line-height:1.14}
.admin-page-head p:last-child {max-width:700px;font-size:.91rem}
body.master-shell-page .admin-toolbar {gap:14px;align-items:end;padding:16px 18px;margin-bottom:17px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:var(--shadow)}
.admin-toolbar label {gap:7px;color:#4e5c53;font-size:.76rem}
.admin-toolbar label:has(input[type="search"]) {flex:1 1 300px;max-width:420px}
.admin-toolbar input[type="search"] {min-width:0;width:100%}
.admin-toolbar input,.admin-toolbar select,.admin-form input,.admin-form select,.admin-form textarea {border-color:#d7dfda;border-radius:9px}
.admin-toolbar input:focus,.admin-form input:focus,.admin-form select:focus,.admin-form textarea:focus {outline:2px solid #b5c1b9;border-color:#87978b}
body.master-shell-page .admin-card {padding:17px 20px;border-color:#dfe5e1;border-radius:15px;box-shadow:var(--shadow)}
.admin-card th {font-size:.7rem;color:#5d6b61}
.admin-card tbody tr:hover {background:#f7f9f7}
.admin-card tbody tr:last-child td {border-bottom:0}
.admin-actions {gap:7px}
.admin-actions button {border-color:#d6ddd8;border-radius:8px}
body.master-shell-page .admin-preview {border-color:#d8ddd8;background:#f8faf8;color:#4d5a51}
body.master-shell-page .admin-preview a{color:#35423a;text-decoration:underline;text-underline-offset:3px}
body.master-shell-page .admin-status {border-color:#dfe5e1;border-radius:11px}
body.master-shell-page dialog {border:1px solid #dfe5e1;border-radius:18px}
body.master-shell-page .admin-form {gap:15px 16px}
body.master-shell-page .admin-form label {gap:7px;color:#344239}
body.master-shell-page .admin-form header {padding-bottom:15px;border-bottom:1px solid #e5e9e6}
body.master-shell-page .admin-form footer {padding-top:14px;border-top:1px solid #e5e9e6}
body.master-shell-page .report-tabs {gap:9px;margin:17px 0}
body.master-shell-page .report-tabs button {background:#fff;color:#35423a;border-color:#d5ddd7;border-radius:9px;box-shadow:none}
body.master-shell-page .report-tabs button[aria-selected="true"] {background:#e9eeea;color:#1d2921;border-color:#a7b4a9}
body.master-shell-page .report-summary {margin:0 0 14px}
@media(max-width:760px){
  body.master-shell-page.master-admin-page main{width:calc(100% - 26px);padding-top:21px}
  body.master-shell-page .master-overview-grid a{min-height:137px}
  body.master-shell-page .admin-toolbar{padding:14px}
  .admin-toolbar label{flex:1 1 155px}
  .admin-toolbar input[type="search"]{min-width:0;width:100%}
  body.master-shell-page .admin-card{padding:10px}
}


.implantation-permissions{border:1px solid #dce1e8;border-radius:12px;padding:16px;display:grid;gap:12px}.implantation-permissions label{display:flex;align-items:flex-start;gap:10px}.implantation-permissions input[type=checkbox]{width:18px;min-height:18px;flex:0 0 18px;margin:2px 0}.implantation-permissions small{color:#667085}

.admin-form .implantation-permissions.full{grid-column:1/-1;min-width:0}.implantation-permissions input[type=checkbox]{accent-color:#273141}
