@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  color-scheme: light;
  font-family: 'Inter', sans-serif;
  color: #242735;
  background: #6458ca;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(128deg, #0c0f1f 5%,#555e57, #9dd4ab 48%, #012506 100%);
}

button, input { font: inherit; }

.page-shell {
  min-height: 100vh;
  display: grid;
  place-content: center;
  padding: 48px 24px 28px;
}

.panel {
  width: min(860px, 90vw);
  min-height: 470px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 44px;
  padding: 64px 74px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 16px;
  box-shadow: 0 24px 75px rgba(37, 24, 91, .22);
}

.panel.manage-mode {
  width: min(1080px, 94vw);
  min-height: min(520px, calc(100vh - 72px));
  max-height: calc(100vh - 40px);
  display: block;
  padding: 38px 46px;
  overflow-y: auto;
}

.panel.manage-mode .illustration { display: none; }
.panel.manage-mode .content { max-width: none; }
.panel.manage-mode + .page-note { display: none; }

.illustration {
  width: 260px;
  height: 260px;
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: #f7f8fa;
}

.user-card { width: 145px; filter: drop-shadow(0 9px 7px rgba(38,51,65,.13)); z-index: 1; }
.user-card svg { display: block; width: 100%; overflow: visible; }
.orbit { position: absolute; border: 1px solid #e8ebf1; border-radius: 50%; }
.orbit-one { inset: 18px; }
.orbit-two { inset: 38px; border-style: dashed; }
.orbit-three { width: 10px; height: 10px; top: 21px; left: 21px; border: 2px solid #83c5cb; }
.dot { width: 8px; height: 8px; position: absolute; border: 2px solid #71bec6; border-radius: 50%; background: white; }
.dot-a { right: 11px; bottom: 59px; }
.dot-b { top: 39px; right: 49px; width: 6px; height: 6px; border-color: #d8dfe7; }
.spark { position: absolute; color: #88bd78; font-size: 18px; line-height: 1; }
.spark-a { right: -3px; top: 72px; transform: rotate(90deg); }
.spark-b { left: -4px; bottom: 43px; }

.content { width: 100%; }
.start-view, .register-view { width: 100%; }
.eyebrow { margin: 0 0 9px; color: #7c78a2; font-size: 15px; font-weight: 700; letter-spacing: .14em; }
h1 { margin: 0; font-family: 'Inter', sans-serif; font-size: 40px; line-height: 1.2; font-weight: 800; letter-spacing: -.04em; }
.intro { margin: 10px 0 27px; color: #828594; font-size: 15px; font-weight: 500; }
.actions { display: grid; gap: 12px; }
.button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible { outline: 3px solid rgba(92, 98, 207, .28); outline-offset: 3px; }
.button-primary { color: #fff; background: linear-gradient(100deg, #70b759, #62ad50); box-shadow: 0 7px 16px rgba(97, 171, 79, .2);}
.button-primary:hover { background: linear-gradient(100deg, #65ad4f, #579f46); }
.button-secondary { color: #555b6a; background: #eef0f4; }
.button-secondary:hover { background: #bfc1c9; }

.register-view h1 { margin-bottom: 19px; }
.management-view h1 { margin: 0; }
.management-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid #eceef1;
}
.management-header .intro { margin: 7px 0 0; }
.management-back { width: auto; min-width: 154px; padding: 0 20px; white-space: nowrap; }
.management-back span { margin-right: 5px; font-size: 17px; vertical-align: -1px; }
.user-search { max-width: 760px; margin: 28px auto 0; }
.search-label { display: block; margin: 0 0 9px 4px; color: #626675; font-size: 14px; font-weight: 700; }
.search-control {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 6px 7px 6px 17px;
  border: 1px solid #e5e8ec;
  border-radius: 12px;
  background: #f7f8fa;
  box-shadow: 0 5px 18px rgba(32, 44, 38, .045);
}
.search-icon { display: grid; place-items: center; flex: 0 0 21px; color: #818797; }
.search-icon svg { width: 21px; height: 21px; }
.search-control input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 5px;
  border: 0;
  outline: 0;
  color: #343744;
  background: transparent;
  font-size: 15px;
}
.search-control input::placeholder { color: #a0a4af; }
.search-control input:focus-visible { outline: none; }
.search-button { width: auto; min-width: 126px; min-height: 44px; padding: 0 22px; }
.search-empty {
  display: grid;
  justify-items: center;
  margin: 30px auto 0;
  padding: 32px 18px 24px;
  color: #838897;
  text-align: center;
}
.search-empty-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-bottom: 11px;
  border-radius: 50%;
  color: #6f8c75;
  background: #edf3ee;
  font-size: 31px;
  line-height: 1;
}
.search-empty h2 { margin: 0; color: #343744; font-size: 18px; font-weight: 800; }
.search-empty p { margin: 6px 0 0; font-size: 13px; }
.search-message { max-width: 760px; margin: 8px auto 0; color: #737987; text-align: center; }
.search-message.error { color: #b54252; }
.search-message.success { color: #438c36; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 155px; color: #737987; font-size: 14px; }
.loading-spinner { width: 22px; height: 22px; border: 2px solid #dce8db; border-top-color: #65ad4f; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.results-caption { display: flex; justify-content: space-between; gap: 12px; margin: 26px 2px 10px; color: #8a8f9b; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.results-caption span + span { font-size: 11px; font-weight: 600; letter-spacing: 0; }
.user-list { display: grid; gap: 11px; }
.user-card-row { display: grid; grid-template-columns: minmax(210px, 1.3fr) minmax(120px, .7fr) minmax(160px, .85fr) auto; align-items: center; gap: 17px; padding: 17px 18px; border: 1px solid #e9ecef; border-radius: 14px; background: linear-gradient(120deg, #fff 65%, #f8fbf8); box-shadow: 0 7px 20px rgba(36, 48, 40, .045); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.user-card-row:hover { border-color: #d8e6d6; box-shadow: 0 11px 27px rgba(36, 48, 40, .075); transform: translateY(-1px); }
.user-row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-avatar { display: grid; flex: 0 0 43px; width: 43px; height: 43px; place-items: center; border: 1px solid #dcebdd; border-radius: 13px; color: #51884a; background: linear-gradient(145deg, #edf6ed, #e4f0e4); font-size: 17px; font-weight: 800; }
.user-identity { display: grid; min-width: 0; gap: 3px; }
.user-identity strong { overflow: hidden; color: #303440; font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.user-identity span { overflow: hidden; color: #828795; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-row-phone { display: grid; gap: 3px; color: #454a57; font-size: 13px; font-weight: 700; white-space: nowrap; }
.mobile-label { display: none; color: #969aa5; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.user-row-dates { display: grid; gap: 4px; color: #8a8f9b; font-size: 10px; white-space: nowrap; }
.user-row-actions { display: flex; align-items: center; gap: 7px; }
.row-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 35px; padding: 0 11px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #5b606c; font-size: 12px; font-weight: 800; cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.row-action span { font-size: 15px; }
.edit-action:hover, .edit-action[aria-expanded="true"] { border-color: #dcebd9; color: #4e9146; background: #eff7ed; }
.delete-action { color: #a46064; }
.delete-action:hover { border-color: #f2dada; color: #b13f49; background: #fff1f1; }
.inline-editor { grid-column: 1 / -1; margin: 2px -2px -2px; padding: 20px; border: 1px solid #e2ebe0; border-radius: 12px; background: linear-gradient(135deg, #f7faf6, #fff); animation: editor-enter .2s ease both; }
.inline-editor[hidden] { display: none; }
@keyframes editor-enter { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.editor-kicker { color: #7b9a76; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.editor-heading h3 { margin: 3px 0 0; color: #343744; font-size: 16px; font-weight: 800; }
.editor-lock { padding: 6px 9px; border-radius: 99px; color: #737987; background: #eef1ef; font-size: 10px; font-weight: 700; white-space: nowrap; }
.editor-fields { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 12px; }
.editor-fields .field { gap: 6px; }
.editor-fields .field > span { color: #626675; font-size: 12px; font-weight: 700; }
.editor-fields input { height: 42px; background: #fff; }
.edit-message { min-height: 16px; margin: 9px 0 0; color: #438c36; font-size: 12px; }
.edit-message.error { color: #b54252; }
.editor-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 5px; }
.editor-actions .button { width: auto; min-width: 112px; min-height: 40px; padding: 0 17px; font-size: 12px; }
.button-danger { color: #fff; background: linear-gradient(100deg, #c65057, #b83d48); box-shadow: 0 7px 16px rgba(184, 61, 72, .18); }
.button-danger:hover { background: linear-gradient(100deg, #b9434a, #a8323d); }
.confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; overflow: visible; border: 0; border-radius: 20px; color: #343744; background: #fff; box-shadow: 0 25px 90px rgba(23, 29, 26, .25); }
.confirm-dialog::backdrop { background: rgba(20, 25, 23, .48); backdrop-filter: blur(4px); }
.confirm-content { padding: 32px; text-align: center; }
.confirm-icon { display: grid; width: 52px; height: 52px; place-items: center; margin: 0 auto 17px; border: 1px solid #f1d8d6; border-radius: 17px; color: #b84a50; background: #fff1ef; font-size: 25px; font-weight: 800; }
.confirm-content .eyebrow { margin-bottom: 5px; color: #a77e7e; font-size: 10px; }
.confirm-content h2 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.03em; }
.confirm-copy { margin: 10px 0 5px; color: #737987; font-size: 14px; line-height: 1.6; }
.confirm-user { margin: 0; color: #343744; font-size: 14px; font-weight: 800; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 25px; }
.confirm-actions .button { min-height: 43px; font-size: 12px; }
.form-grid { display: grid; gap: 11px; }
.field { display: grid; gap: 5px; }
.field label { color: #626675; font-size: 15px; font-weight: 600; }
.field input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e8e9ee;
  border-radius: 8px;
  color: #343744;
  background: #f6f7f9;
  font-size: 13px;
}
.field-message { display: none; margin: 3px 3px 0; color: #b54252; font-size: 12px; }
.field-message.visible { display: block; }
.field input::placeholder { color: #a3a6b0; }
.form-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 19px; }
.form-actions .button { min-height: 43px; font-size: 14px; }
.button:disabled { cursor: wait; opacity: .7; transform: none; }
.form-message { min-height: 18px; margin: 12px 2px 0; font-size: 12px; }
.form-message.success { color: #438c36; }
.form-message.error { color: #b54252; }
.page-note { margin: 18px 0 0; color: rgba(255,255,255,.78); text-align: center; font-size: 16px; letter-spacing: .02em; }

.auth-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 180px; color: #737987; font-size: 14px; }
.login-view { width: 100%; max-width: 370px; justify-self: center; }
.login-view h1 { font-size: 38px; }
.login-view .intro { margin: 8px 0 22px; line-height: 1.55; }
.login-fields { display: grid; gap: 13px; }
.login-fields .field { gap: 6px; }
.login-fields .field > span { color: #626675; font-size: 13px; font-weight: 700; }
.login-fields input { height: 46px; border-radius: 11px; background: #f7f8fa; }
.login-fields input:focus { border-color: #9dc995; background: #fff; }
.login-fields input[name="codigo_totp"] { letter-spacing: .28em; font-weight: 800; }
.login-submit { margin-top: 19px; min-height: 48px; }
.login-message { min-height: 18px; margin: 10px 2px 0; line-height: 1.45; }
.login-security-note { display: flex; align-items: center; gap: 8px; margin: 13px 2px 0; color: #858a96; font-size: 11px; }
.login-security-note span { color: #6fac62; font-size: 16px; }
.home-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 23px; }
.home-heading .intro { margin: 8px 0 0; }
.logout-button { flex: 0 0 auto; min-height: 37px; padding: 0 13px; border: 1px solid #e8eaed; border-radius: 999px; color: #666b77; background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.logout-button:hover { color: #a3444a; border-color: #eed8d9; background: #fff7f7; }
.logout-button span { margin-left: 3px; }
.button:disabled { cursor: not-allowed; opacity: .62; }

@media (max-width: 700px) {
  .page-shell { padding: 28px 18px; }
  .panel { width: min(470px, 100%); min-height: 0; grid-template-columns: 1fr; gap: 26px; padding: 35px 30px 38px; }
  .panel.manage-mode { width: min(600px, 100%); min-height: min(510px, calc(100vh - 56px)); max-height: calc(100vh - 28px); padding: 27px 22px; }
  .illustration { width: 175px; height: 175px; }
  .user-card { width: 112px; }
  .content { max-width: 360px; justify-self: center; }
  .login-view { max-width: 390px; }
  .login-view h1 { font-size: 31px; }
  .home-heading { gap: 8px; }
  .logout-button { min-height: 34px; padding-inline: 10px; }
  .panel.manage-mode .content { max-width: none; }
  h1 { font-size: 26px; }
  .intro { margin-bottom: 21px; }
  .register-view h1 { margin-bottom: 16px; }
  .form-grid { gap: 9px; }
  .management-header { align-items: flex-start; flex-direction: column; gap: 16px; padding-bottom: 20px; }
  .management-back { min-height: 40px; }
  .user-search { margin-top: 21px; }
  .search-control { gap: 7px; padding-left: 12px; }
  .search-control input { font-size: 13px; }
  .search-button { min-width: auto; min-height: 40px; padding-inline: 13px; font-size: 12px; }
  .search-empty { margin-top: 18px; padding-top: 27px; }
  .user-card-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
  .user-row-main { grid-column: 1; }
  .user-row-actions { grid-column: 2; grid-row: 1; gap: 0; }
  .user-row-phone { grid-column: 1; grid-row: 2; padding-left: 55px; font-size: 12px; }
  .mobile-label { display: block; }
  .user-row-dates { grid-column: 1 / -1; padding: 10px 0 0 55px; border-top: 1px solid #eff1f2; font-size: 9px; }
  .row-action { min-height: 33px; padding: 0 8px; font-size: 0; }
  .row-action span { font-size: 17px; }
  .editor-fields { grid-template-columns: 1fr; gap: 9px; }
  .inline-editor { padding: 16px; }
}

@media (max-width: 380px) {
  .panel { padding-inline: 23px; }
  .form-actions { grid-template-columns: 1fr; }
  .confirm-content { padding: 26px 21px; }
  .confirm-actions { grid-template-columns: 1fr; }
}

/* Coop dashboard and staged sign-in */
.panel.manage-mode { width: min(1120px, calc(100vw - 56px)); min-height: min(760px, calc(100vh - 64px)); max-height: calc(100vh - 40px); grid-template-columns: 1fr; padding: 38px 44px; }
.panel.manage-mode .illustration { display: none; }
.panel.manage-mode .content { width: 100%; max-width: none; }
.login-view { max-width: 390px; margin-inline: auto; }
.text-back { margin: 0 0 22px; padding: 0; border: 0; color: #6f8c75; background: transparent; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.login-view input[name="codigo_totp"] { letter-spacing: .28em; font-size: 20px; font-weight: 800; text-align: center; }
.setup-notice { margin: 22px 0; padding: 19px 20px; border: 1px solid #ebdfbd; border-radius: 14px; color: #715d31; background: #fffaf0; font-size: 13px; line-height: 1.6; }
.setup-notice strong { color: #5b4921; }
.setup-notice p { margin: 8px 0 0; }
.coop-view { max-width: 100%; }
.coop-view .management-header { align-items: center; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid #edf0ed; }
.coop-view .management-header h1 { margin-bottom: 0; }
.coop-view .management-header .intro { margin-top: 5px; }
.coop-grid { display: grid; grid-template-columns: minmax(275px, .78fr) minmax(0, 1.65fr); align-items: start; gap: 20px; }
.coop-card { min-width: 0; padding: 23px; border: 1px solid #e9ede8; border-radius: 18px; background: linear-gradient(145deg, #fff 60%, #f9fbf8); box-shadow: 0 10px 30px rgba(39, 52, 43, .055); }
.coop-card-heading { display: flex; align-items: center; gap: 12px; }
.coop-card-heading .eyebrow { margin: 0 0 3px; color: #849783; font-size: 9px; }
.coop-card-heading h2 { margin: 0; color: #343744; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.coop-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border: 1px solid #dcebd9; border-radius: 13px; color: #548e4d; background: #eff7ed; font-size: 23px; font-weight: 500; }
.coop-description { margin: 13px 0 19px; color: #7d8290; font-size: 12px; line-height: 1.55; }
.coop-form { display: grid; gap: 12px; }
.coop-form .field, .master-toolbar .field, .create-master-form .field { gap: 6px; }
.coop-form .field > span, .master-toolbar .field > span, .create-master-form .field > span, .master-editor .field > span { color: #626675; font-size: 11px; font-weight: 800; }
.coop-form input, .master-toolbar input, .create-master-form input, .create-master-form select, .master-editor input, .master-editor select { width: 100%; min-width: 0; height: 41px; padding: 0 12px; border: 1px solid #e5e9e5; border-radius: 10px; outline: none; color: #343744; background: #fafbfa; font: inherit; font-size: 12px; }
.coop-form input:focus, .master-toolbar input:focus, .create-master-form input:focus, .create-master-form select:focus, .master-editor input:focus, .master-editor select:focus { border-color: #9dc995; background: #fff; box-shadow: 0 0 0 3px rgba(101, 173, 79, .1); }
.coop-form .button { margin-top: 3px; }
.coop-form .form-message, .create-master-form .form-message, .master-editor .form-message { min-height: 16px; margin: 0; line-height: 1.45; }
.master-card { padding-bottom: 17px; }
.master-card .coop-card-heading { position: relative; }
.icon-refresh { display: grid; width: 35px; height: 35px; place-items: center; margin-left: auto; border: 1px solid #e7ebe7; border-radius: 10px; color: #64865e; background: #fff; font-size: 21px; cursor: pointer; }
.icon-refresh:hover { border-color: #cfe2ca; background: #f3f8f1; }
.master-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-bottom: 13px; }
.master-toolbar .button { min-height: 41px; padding-inline: 13px; font-size: 11px; white-space: nowrap; }
.create-master-form { display: grid; grid-template-columns: minmax(125px, .8fr) minmax(140px, 1fr) auto; align-items: end; gap: 9px; margin: 0 0 13px; padding: 14px; border: 1px solid #e4ece1; border-radius: 13px; background: #f8fbf7; }
.create-master-form[hidden] { display: none; }
.create-master-form .form-message { grid-column: 1 / -1; }
.create-master-form .button { min-height: 41px; padding-inline: 14px; font-size: 11px; white-space: nowrap; }
.masters-list { display: grid; gap: 10px; max-height: 430px; overflow: auto; padding: 2px 3px 3px 0; }
.master-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 11px 14px; padding: 14px; border: 1px solid #e9ece9; border-radius: 14px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.master-row:hover { border-color: #d6e5d3; box-shadow: 0 6px 16px rgba(46, 63, 48, .045); }
.master-row-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.master-avatar { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: #56884e; background: #edf5eb; font-size: 14px; font-weight: 800; }
.master-identity { display: grid; min-width: 0; gap: 3px; }
.master-identity strong, .master-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.master-identity strong { color: #343744; font-size: 12px; font-weight: 800; }
.master-identity span { color: #858a96; font-size: 11px; }
.status-pill { align-self: center; margin-left: auto; padding: 5px 8px; border-radius: 999px; color: #866e3d; background: #fff6df; font-size: 9px; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.status-pill.is-active { color: #438341; background: #edf7eb; }
.master-meta { display: flex; flex-wrap: wrap; gap: 8px 17px; grid-column: 1; padding-left: 48px; color: #515662; font-size: 10px; }
.master-meta span { display: grid; gap: 3px; }
.master-meta b { color: #a0a4ad; font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.master-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; grid-column: 2; grid-row: 1 / span 2; }
.master-row-actions .row-action { min-height: 32px; padding-inline: 9px; font-size: 10px; }
.master-row-actions .invite-action { border-color: #e5eee2; color: #4f8747; background: #f4f9f2; }
.master-row-actions .invite-action:hover { border-color: #cfe2ca; background: #eaf4e7; }
.master-row-actions .invite-action:disabled { cursor: wait; opacity: .58; }
.master-editor { display: grid; grid-template-columns: 1fr 1.2fr .8fr; align-items: end; gap: 10px; grid-column: 1 / -1; padding: 13px; border: 1px solid #e5ede2; border-radius: 12px; background: #f8fbf7; }
.master-editor[hidden] { display: none; }
.master-editor input:disabled { color: #989da5; background: #f0f1f1; cursor: not-allowed; }
.master-editor .form-message { grid-column: 1 / -1; }
.master-editor .editor-actions { display: flex; justify-content: flex-end; gap: 8px; grid-column: 1 / -1; margin: 0; }
.master-editor .editor-actions .button { width: auto; min-height: 37px; padding-inline: 13px; font-size: 10px; }
.empty-masters { display: grid; justify-items: center; padding: 25px 12px; border: 1px dashed #e1e8df; border-radius: 14px; color: #828795; text-align: center; }
.empty-masters > span { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 8px; border-radius: 50%; color: #72926b; background: #eff5ed; font-size: 21px; }
.empty-masters strong { color: #4b505c; font-size: 12px; }
.empty-masters p { margin: 5px 0 0; font-size: 10px; }
.pending-note { display: flex; align-items: flex-start; gap: 8px; margin: 17px 2px 0; color: #777d88; font-size: 11px; line-height: 1.5; }
.pending-note > span { color: #8c9f73; font-size: 15px; }
.pending-note strong { color: #575d66; }

@media (max-width: 900px) {
  .panel.manage-mode { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 28px); padding: 27px 24px; }
  .coop-grid { grid-template-columns: 1fr; }
  .create-sector-card { order: 0; }
  .master-card { order: 1; }
  .masters-list { max-height: 380px; }
}
@media (max-width: 560px) {
  .panel.manage-mode { width: calc(100vw - 20px); padding: 22px 16px; }
  .coop-view .management-header { align-items: flex-start; }
  .coop-view .management-header h1 { font-size: 25px; }
  .coop-card { padding: 17px; }
  .master-toolbar { grid-template-columns: 1fr; }
  .master-toolbar .button { width: 100%; }
  .create-master-form { grid-template-columns: 1fr; }
  .create-master-form .form-message { grid-column: 1; }
  .master-row { grid-template-columns: 1fr; }
  .master-row-actions { grid-column: 1; grid-row: auto; justify-content: flex-end; }
  .master-meta { grid-column: 1; padding-left: 48px; }
  .master-editor { grid-template-columns: 1fr; }
  .master-editor .form-message, .master-editor .editor-actions { grid-column: 1; }
  .status-pill { font-size: 8px; }
}

/* Painel da empresa contratante: Master e Gerente */
.sector-view { max-width: 100%; }
.sector-view .management-header { align-items: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #edf0ed; }
.sector-view .management-header h1 { margin-bottom: 0; }
.sector-view .management-header .intro { margin-top: 5px; }
.sector-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 19px; padding: 5px; border: 1px solid #ecefec; border-radius: 13px; background: #f7f9f6; }
.sector-nav-button { min-height: 39px; padding: 0 15px; border: 0; border-radius: 9px; color: #727887; background: transparent; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; transition: color .18s, background .18s, box-shadow .18s; }
.sector-nav-button:hover { color: #4f8248; background: #fff; }
.sector-nav-button.is-selected { color: #3f7940; background: #fff; box-shadow: 0 2px 8px rgba(35, 51, 38, .08); }
.sector-page[hidden] { display: none; }
.sector-card { padding: 24px; border: 1px solid #e9ede8; border-radius: 18px; background: linear-gradient(145deg, #fff 60%, #f9fbf8); box-shadow: 0 10px 30px rgba(39, 52, 43, .055); }
.sector-heading { display: flex; align-items: center; gap: 12px; }
.sector-heading .eyebrow { margin: 0 0 3px; color: #849783; font-size: 9px; }
.sector-heading h2 { margin: 0; color: #343744; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.sector-heading .icon-refresh { margin-left: auto; }
.sector-form { display: grid; gap: 16px; }
.sector-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sector-form .field, .sector-search .field, .manager-create-form .field, .sector-record-editor .field { display: grid; min-width: 0; gap: 6px; }
.sector-form .field > span, .sector-search .field > span, .manager-create-form .field > span, .sector-record-editor .field > span { color: #626675; font-size: 11px; font-weight: 800; }
.sector-form input, .sector-search input, .manager-create-form input, .sector-record-editor input { width: 100%; min-width: 0; height: 43px; padding: 0 12px; border: 1px solid #e5e9e5; border-radius: 10px; outline: none; color: #343744; background: #fafbfa; font: inherit; font-size: 12px; }
.sector-form input:focus, .sector-search input:focus, .manager-create-form input:focus, .sector-record-editor input:focus { border-color: #9dc995; background: #fff; box-shadow: 0 0 0 3px rgba(101, 173, 79, .1); }
.sector-form small { color: #8b9099; font-size: 9px; }
.sector-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 3px; }
.sector-form-actions .form-message { min-height: 16px; margin: 0; }
.sector-form-actions .button, .manager-create-form .button, .sector-search .button { width: auto; min-width: 150px; min-height: 42px; padding-inline: 18px; font-size: 11px; }
.sector-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin: 18px 0 5px; }
.sector-search .button { min-width: 120px; }
.manager-create-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin: 16px 0 8px; padding: 15px; border: 1px solid #e4ece1; border-radius: 13px; background: #f8fbf7; }
.manager-create-form .button { min-width: 140px; }
.sector-view .form-message { min-height: 16px; margin: 9px 0; font-size: 11px; line-height: 1.45; }
.sector-view .form-message.error { color: #bd4c57; }
.sector-view .form-message.success { color: #4c8d43; }
.sector-list { display: grid; gap: 10px; max-height: min(470px, 52vh); overflow: auto; margin-top: 9px; padding: 2px 3px 3px 0; }
.sector-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; padding: 15px; border: 1px solid #e9ece9; border-radius: 14px; background: #fff; }
.sector-record-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.record-avatar { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: #56884e; background: #edf5eb; font-size: 14px; font-weight: 800; }
.record-identity { display: grid; min-width: 0; gap: 3px; }
.record-identity strong, .record-identity span, .record-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-identity strong { color: #343744; font-size: 12px; font-weight: 800; }
.record-identity span, .record-identity small { color: #858a96; font-size: 10px; }
.sector-record-dates { display: flex; flex-wrap: wrap; gap: 5px 15px; grid-column: 1; padding-left: 48px; color: #898e98; font-size: 9px; }
.sector-record-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; grid-column: 2; grid-row: 1 / span 2; }
.sector-record-actions .row-action { min-height: 32px; padding-inline: 9px; font-size: 10px; }
.sector-record-actions .invite-action { border-color: #e5eee2; color: #4f8747; background: #f4f9f2; }
.sector-record-editor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; grid-column: 1 / -1; padding: 14px; border: 1px solid #e5ede2; border-radius: 12px; background: #f8fbf7; }
.sector-record-editor[hidden] { display: none; }
.sector-record-editor .form-message, .sector-record-editor .editor-actions { grid-column: 1 / -1; }
.sector-record-editor .editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sector-record-editor .editor-actions .button { width: auto; min-height: 37px; padding-inline: 14px; font-size: 10px; }
.sector-record-editor input:disabled { color: #999ea5; background: #f0f1f1; }
.sector-record-actions .button:disabled { opacity: .65; cursor: wait; }
@media (max-width: 700px) {
  .sector-view .management-header { align-items: flex-start; }
  .sector-form-grid { grid-template-columns: 1fr; gap: 11px; }
  .sector-form-actions { align-items: stretch; flex-direction: column; }
  .sector-form-actions .button { width: 100%; }
  .sector-record { grid-template-columns: 1fr; }
  .sector-record-actions { grid-column: 1; grid-row: auto; }
  .sector-record-dates { grid-column: 1; padding-left: 48px; }
  .sector-record-editor { grid-template-columns: 1fr; }
  .sector-record-editor .form-message, .sector-record-editor .editor-actions { grid-column: 1; }
}
@media (max-width: 480px) {
  .sector-card { padding: 17px; }
  .sector-nav { display: grid; grid-template-columns: 1fr; }
  .sector-nav-button { text-align: left; }
  .sector-search, .manager-create-form { grid-template-columns: 1fr; }
  .sector-search .button, .manager-create-form .button { width: 100%; }
  .sector-record-actions { justify-content: stretch; }
  .sector-record-actions .row-action { flex: 1; }
}

/* Invitation activation page */
.activation-shell { padding-block: 30px; }
.activation-panel { display: block; width: min(560px, calc(100vw - 32px)); min-height: 0; padding: 44px; }
.activation-content { width: 100%; }
.activation-view { width: 100%; max-width: 390px; margin: 0 auto; }
.activation-view h1 { font-size: 31px; }
.activation-view .intro { line-height: 1.6; }
.activation-mark { display: grid; width: 46px; height: 46px; place-items: center; margin-bottom: 19px; border: 1px solid #dcebd9; border-radius: 15px; color: #568e4f; background: #eff7ed; font-size: 23px; font-weight: 800; }
.activation-form { display: grid; gap: 13px; }
.activation-form .field { gap: 6px; }
.activation-form .field > span { color: #626675; font-size: 12px; font-weight: 800; }
.activation-form input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid #e5e9e5; border-radius: 10px; outline: none; color: #343744; background: #fafbfa; font: inherit; font-size: 13px; }
.activation-form input:focus { border-color: #9dc995; background: #fff; box-shadow: 0 0 0 3px rgba(101, 173, 79, .1); }
.activation-form input[name="codigo_totp"] { letter-spacing: .32em; font-size: 20px; font-weight: 800; text-align: center; }
.activation-form .button { margin-top: 3px; }
.activation-form .form-message { min-height: 17px; margin: 0; line-height: 1.5; }
.activation-hint { margin: 14px 2px 0; color: #898e99; font-size: 10px; line-height: 1.55; }
.qr-frame { display: grid; width: 204px; height: 204px; place-items: center; margin: 0 auto 16px; border: 1px solid #ecefec; border-radius: 17px; background: #fff; box-shadow: 0 8px 26px rgba(34, 46, 36, .06); }
.qr-frame img { display: block; width: 180px; height: 180px; }
.manual-key { margin: 0 auto 16px; color: #68705f; text-align: center; font-size: 11px; }
.manual-key summary { cursor: pointer; }
.manual-key code { display: block; margin-top: 8px; padding: 10px; overflow-wrap: anywhere; border-radius: 8px; color: #454b55; background: #f3f5f2; font-size: 11px; letter-spacing: .08em; }
.activation-link { display: flex; align-items: center; justify-content: center; margin-top: 22px; text-decoration: none; }
.activation-view .intro a { color: #4e9146; }
.activation-view .button { text-decoration: none; }
.activation-view .form-message.error { color: #b54252; }
.activation-view .form-message.success { color: #438c36; }
.activation-view .form-message { font-size: 12px; }
.activation-view .button:disabled { cursor: wait; opacity: .68; }
.activation-view .activation-link { min-height: 45px; }
.activation-view .eyebrow { font-size: 10px; }
.activation-view .setup-notice { margin-top: 18px; }
@media (max-width: 560px) {
  .activation-panel { padding: 31px 23px; }
  .activation-view h1 { font-size: 27px; }
  .qr-frame { width: 188px; height: 188px; }
  .qr-frame img { width: 164px; height: 164px; }
}

/* Block USB sign-in refresh: split welcome panel and animated workspace transition */
:root {
  --brand-navy: #17243d;
  --brand-blue: #328ee8;
  --brand-red: #9d0505;
  --ink: #222b3a;
  --muted: #778294;
  --line: #e4e9ef;
}
body {
  background: #eef3f8;
  background-image: radial-gradient(ellipse at 12% 15%, rgba(77,155,235,.12), transparent 36%), radial-gradient(ellipse at 88% 85%, rgba(23,36,61,.08), transparent 34%);
}
.page-shell { min-height: 100svh; padding: 34px; }
.page-note { margin-top: 17px; color: #8a95a5; font-size: 12px; letter-spacing: .04em; }
.panel.auth-panel {
  width: min(1160px, 94vw); min-height: min(700px, calc(100svh - 105px));
  grid-template-columns: minmax(0,.42fr) minmax(0,.58fr); align-items: stretch; gap: 0; padding: 0; overflow: hidden;
  border: 1px solid rgba(255,255,255,.9); border-radius: 26px; background: #fff;
  box-shadow: 0 28px 90px rgba(28,47,75,.13), 0 4px 14px rgba(28,47,75,.05);
  transition: width .72s cubic-bezier(.2,.8,.2,1), min-height .72s cubic-bezier(.2,.8,.2,1), max-height .72s ease, grid-template-columns .72s cubic-bezier(.2,.8,.2,1), border-radius .5s ease, box-shadow .5s ease;
}
.welcome-panel {
  position: relative; display: flex; min-width: 0; flex-direction: column; padding: 32px 38px 26px; overflow: hidden;
  color: #fff; background: linear-gradient(150deg,#20253b,#171d31 72%); isolation: isolate;
  transition: opacity .46s ease, transform .62s cubic-bezier(.2,.8,.2,1), padding .62s ease, min-height .62s ease, height .62s ease;
}
.welcome-panel::before,.welcome-panel::after { position: absolute; z-index: -1; border: 1px solid rgba(112,169,231,.1); border-radius: 50%; content: ''; }
.welcome-panel::before { width: 410px; height: 410px; top: -210px; right: -170px; }
.welcome-panel::after { width: 290px; height: 290px; bottom: -205px; left: -150px; }
.welcome-carousel { position: relative; display: grid; flex: 1; min-height: 0; margin-top: 17px; }
.welcome-slide { display: none; min-width: 0; grid-template-rows: minmax(215px,1fr) auto; align-content: center; animation: welcome-slide-in .5s ease both; }
.welcome-slide.is-active { display: grid; }
@keyframes welcome-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hero-art { position: relative; display: grid; min-height: 235px; place-items: center; overflow: hidden; }
.art-orbit,.team-orbit,.records-glow { position: absolute; width: 220px; height: 220px; border: 1px solid rgba(123,177,235,.17); border-radius: 50%; }
.art-orbit.orbit-small { width: 174px; height: 174px; border-style: dashed; }
.art-window { position: relative; width: 206px; height: 166px; padding: 13px; border: 1px solid rgba(255,255,255,.32); border-radius: 17px; background: linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.055)); box-shadow: 0 25px 55px rgba(0,0,0,.2); backdrop-filter: blur(9px); transform: rotate(-5deg); }
.art-window-bar { display: flex; gap: 5px; padding: 1px 0 9px; border-bottom: 1px solid rgba(255,255,255,.14); }
.art-window-bar i { width: 5px; height: 5px; border-radius: 50%; background: #91a3bb; }
.art-window-bar i:first-child { background: #f07677; }.art-window-bar i:nth-child(2) { background: #e8bd65; }.art-window-bar i:nth-child(3) { background: #6bc695; }
.art-shield { display: grid; width: 78px; height: 82px; place-items: center; margin: 14px auto 0; border: 1px solid rgba(93,164,238,.34); border-radius: 20px; background: rgba(50,142,232,.14); }
.art-shield svg { width: 44px; fill: none; stroke: #82c0ff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 5; }
.art-shield svg path:first-child { fill: rgba(50,142,232,.18); stroke-width: 3; }
.welcome-copy { position: relative; max-width: 370px; padding: 0 3px 10px; }
.welcome-kicker { margin: 0 0 10px; color: #72b6f7; font-size: 9px; font-weight: 900; letter-spacing: .19em; }
.welcome-copy h2 { margin: 0; color: #fff; font-size: clamp(29px,3vw,39px); font-weight: 800; letter-spacing: -.045em; line-height: 1.08; }
.welcome-copy > p:last-child { max-width: 340px; margin: 13px 0 0; color: #aeb8c9; font-size: 12px; line-height: 1.7; }
.carousel-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.carousel-dots { display: flex; gap: 6px; }
.carousel-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50px; background: #526078; cursor: pointer; transition: width .25s ease,background .25s ease; }
.carousel-dot.is-active { width: 22px; background: #69b2f7; }

.art-team,.art-records { perspective: 700px; }
.team-card { position: absolute; display: flex; align-items: center; gap: 12px; width: 235px; padding: 15px; border: 1px solid rgba(255,255,255,.2); border-radius: 15px; background: linear-gradient(140deg,rgba(255,255,255,.15),rgba(255,255,255,.07)); box-shadow: 0 20px 40px rgba(0,0,0,.18); }
.team-card-back { top: 43px; left: calc(50% - 102px); height: 75px; opacity: .5; transform: rotate(-10deg) translate(-15px,-7px); }
.team-card-back b,.team-card-back i { height: 5px; border-radius: 9px; background: #7887a0; }.team-card-back b { width: 30px; height: 30px; border-radius: 10px; }.team-card-back i { width: 90px; margin-left: -20px; transform: translateY(19px); }.team-card-back i:last-child { width: 62px; margin-left: -90px; transform: translateY(30px); }
.team-card-front { top: 104px; left: calc(50% - 117px); z-index: 1; }
.team-avatar { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: #e9f4ff; background: rgba(50,142,232,.35); font-size: 15px; font-weight: 900; }
.team-card-front div { display: grid; gap: 4px; }.team-card-front b { color: #f5f7fb; font-size: 10px; }.team-card-front i { color: #aeb8c9; font-size: 8px; font-style: normal; }.team-card-front em { display: grid; width: 21px; height: 21px; place-items: center; margin-left: auto; border-radius: 50%; color: #96e0bd; background: rgba(86,192,143,.14); font-size: 12px; font-style: normal; }
.records-glow { box-shadow: 0 0 0 27px rgba(255,255,255,.018),0 0 0 55px rgba(255,255,255,.012); }
.record-card { position: relative; width: 244px; padding: 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 16px; background: linear-gradient(145deg,rgba(255,255,255,.18),rgba(255,255,255,.07)); box-shadow: 0 25px 55px rgba(0,0,0,.22); transform: rotate(4deg); }
.record-head { display: flex; justify-content: space-between; padding: 2px 2px 11px; color: #b9c9de; font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.record-row { display: flex; align-items: center; gap: 9px; padding: 9px 6px; border-top: 1px solid rgba(255,255,255,.1); }
.record-avatar { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: #fff; font-size: 10px; font-style: normal; font-weight: 900; }
.avatar-red { background: #a34d62; }.avatar-blue { background: #347bb3; }.avatar-green { background: #428c7d; }
.record-row span { display: grid; gap: 3px; }.record-row b { color: #f2f6fb; font-size: 9px; }.record-row small { color: #a9b7ca; font-size: 7px; }.record-row em { margin-left: auto; color: #a3e4c2; font-size: 12px; font-style: normal; }

.auth-content { display: flex; min-width: 0; align-items: center; justify-content: center; padding: 62px clamp(36px,7vw,92px); }
.auth-loading { min-height: 220px; color: var(--muted); }
.login-view { width: 100%; max-width: 405px; margin: 0 auto; }
.brand-logo { display: block; width: 170px; height: auto; margin: 0 0 31px -13px; }
.auth-overline { margin: 0 0 9px; color: var(--brand-blue); font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.login-view h1 { color: var(--ink); font-size: clamp(30px,3.1vw,38px); line-height: 1.12; letter-spacing: -.045em; }
.login-view .intro { margin: 12px 0 28px; color: #7d8797; font-size: 13px; line-height: 1.65; }
.login-fields { gap: 17px; }.login-fields .field { gap: 7px; }
.login-fields .field > span,.otp-label { color: #354155; font-size: 11px; font-weight: 800; }
.login-fields input { height: 49px; padding-inline: 15px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fafbfd; font-size: 12px; transition: border-color .18s ease,box-shadow .18s ease,background .18s ease; }
.login-fields input::placeholder { color: #abb3bf; }
.login-fields input:focus { border-color: #8fc3f3; background: #fff; box-shadow: 0 0 0 4px rgba(50,142,232,.1); }
.login-submit { display: flex; align-items: center; justify-content: center; position: relative; min-height: 49px; margin-top: 23px; padding: 0 48px; border-radius: 11px; color: #fff; background: linear-gradient(100deg,#338fe8,#287fd4); box-shadow: 0 9px 20px rgba(50,142,232,.2); font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.login-submit:hover { background: linear-gradient(100deg,#277fd5,#216fbf); box-shadow: 0 12px 24px rgba(50,142,232,.27); }
.button-arrow { position: absolute; right: 18px; font-size: 17px; font-weight: 500; transition: transform .2s ease; }.login-submit:hover .button-arrow { transform: translateX(3px); }
.login-message { min-height: 18px; margin: 11px 0 0; color: #b54252; font-size: 11px; }
.login-security-note { display: flex; align-items: flex-start; gap: 10px; margin: 21px 0 0; color: #4f5d70; font-size: 10px; font-weight: 800; line-height: 1.55; }
.login-security-note small { color: #929cab; font-size: 9px; font-weight: 500; }
.security-icon { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: #3484ce; background: #edf6ff; font-size: 12px; }
.text-back { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 23px; color: #64758a; font-size: 11px; }.text-back:hover { color: var(--brand-blue); }.text-back span { font-size: 17px; }
.otp-label { display: block; margin: 0 0 9px; }
.otp-entry { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; }
.otp-digit { width: 100%; min-width: 0; height: 56px; border: 1px solid #dfe6ee; border-radius: 12px; outline: none; color: #23344b; background: #f7f9fc; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 22px; font-weight: 800; text-align: center; transition: border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease; }
.otp-digit:focus { border-color: #75b5f1; background: #fff; box-shadow: 0 0 0 4px rgba(50,142,232,.11); transform: translateY(-1px); }
.otp-help { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; color: #939cab; font-size: 9px; }.otp-help span { color: #438fd4; font-size: 13px; }
.setup-notice { border-color: #dceaf7; color: #64758a; background: #f4f9fe; }.setup-notice strong { color: #344a63; }

.panel.manage-mode {
  display: grid; width: min(1420px,calc(100vw - 40px)); min-height: min(820px,calc(100svh - 40px)); max-height: calc(100svh - 40px);
  grid-template-columns: minmax(0,0fr) minmax(0,1fr); align-items: start; gap: 0; padding: 32px; overflow-x: hidden; overflow-y: auto;
  border-radius: 22px; box-shadow: 0 24px 75px rgba(28,47,75,.12);
}
.panel.manage-mode .welcome-panel { min-width: 0; height: 0; min-height: 0; padding: 0; opacity: 0; overflow: hidden; transform: translateX(-35px); pointer-events: none; }
.panel.manage-mode .auth-content { width: 100%; max-width: none; grid-column: 2; padding: 8px; }
.panel.manage-mode + .page-note { display: none; }
.panel.manage-mode .content { max-width: none; }
.panel.manage-mode .management-header h1,.panel.manage-mode .coop-card-heading h2 { letter-spacing: -.025em; }
.panel.manage-mode .button-primary { background: linear-gradient(100deg,#4a9a61,#39874f); box-shadow: 0 7px 16px rgba(57,135,79,.17); }
.panel.manage-mode .button-primary:hover { background: linear-gradient(100deg,#3f8b56,#317744); }

@media (max-width: 900px) {
  .page-shell { padding: 24px; }
  .panel.auth-panel { width: min(980px,96vw); min-height: min(660px,calc(100svh - 72px)); grid-template-columns: minmax(0,.4fr) minmax(0,.6fr); }
  .welcome-panel { padding-inline: 28px; }.auth-content { padding-inline: clamp(28px,5vw,55px); }
  .panel.manage-mode { width: calc(100vw - 32px); padding: 26px; }
}
@media (max-width: 680px) {
  .page-shell { display: grid; align-content: start; padding: 14px; }
  .panel.auth-panel { width: min(520px,100%); min-height: 0; grid-template-columns: minmax(0,1fr); border-radius: 21px; }
  .welcome-panel { min-height: 268px; padding: 20px 23px 16px; }
  .welcome-carousel { margin-top: 4px; }
  .welcome-slide { grid-template-columns: minmax(110px,.8fr) minmax(0,1.2fr); grid-template-rows: 1fr; align-items: center; gap: 12px; }
  .hero-art { min-height: 150px; transform: scale(.82); }
  .art-window { width: 158px; height: 138px; }.art-shield { width: 65px; height: 69px; margin-top: 10px; }
  .art-orbit.orbit-large { width: 180px; height: 180px; }.art-orbit.orbit-small { width: 145px; height: 145px; }
  .team-card { transform: scale(.8); }.team-card-front { transform: scale(.8); }.team-card-back { transform: rotate(-10deg) translate(-15px,-7px) scale(.8); }
  .record-card { transform: rotate(4deg) scale(.82); }
  .welcome-copy { padding: 0; }.welcome-copy h2 { font-size: clamp(22px,6vw,29px); }.welcome-kicker { font-size: 7px; }
  .welcome-copy > p:last-child { margin-top: 8px; font-size: 9px; line-height: 1.5; }
  .carousel-footer { padding-top: 10px; }
  .auth-content { padding: 31px clamp(22px,8vw,48px) 36px; }
  .brand-logo { width: 142px; margin: 0 0 24px -11px; }.login-view h1 { font-size: 31px; }
  .login-view .intro { margin: 9px 0 20px; }.login-fields { gap: 12px; }.login-fields input { height: 46px; }.login-submit { margin-top: 18px; }
  .panel.manage-mode { width: calc(100vw - 16px); min-height: calc(100svh - 16px); max-height: calc(100svh - 16px); grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,0fr) minmax(0,1fr); padding: 19px 15px; border-radius: 17px; }
  .panel.manage-mode .welcome-panel { grid-column: 1; grid-row: 1; }.panel.manage-mode .auth-content { grid-column: 1; grid-row: 2; padding: 0; }
  .panel.manage-mode .management-header { align-items: flex-start; }
  .otp-entry { gap: 6px; }.otp-digit { height: 49px; border-radius: 10px; font-size: 20px; }
}
@media (max-width: 390px) {
  .page-shell { padding: 8px; }.welcome-panel { min-height: 246px; padding-inline: 17px; }
  .welcome-slide { grid-template-columns: 105px minmax(0,1fr); gap: 7px; }
  .hero-art { transform: scale(.7); }.welcome-copy h2 { font-size: 22px; }.welcome-copy > p:last-child { font-size: 8px; }
  .auth-content { padding-inline: 20px; }
  .panel.manage-mode { width: calc(100vw - 8px); min-height: calc(100svh - 8px); max-height: calc(100svh - 8px); padding: 14px 11px; }
  .otp-entry { gap: 5px; }.otp-digit { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Master/Gerente: fit the panel to the active tab instead of leaving empty height. */
.panel.manage-mode.sector-mode {
  height: fit-content;
  min-height: 0;
  max-height: calc(100svh - 40px);
  overflow-y: auto;
}
@media (max-width: 680px) {
  .panel.manage-mode.sector-mode {
    min-height: 0;
    max-height: calc(100svh - 20px);
  }
}
