/* ATSRS V247: calm, low-fatigue action language across the whole product. */
:root{
  --atsrs-action-surface:rgba(13,28,43,.72);
  --atsrs-action-surface-hover:rgba(20,40,58,.82);
  --atsrs-action-border:rgba(93,119,143,.42);
  --atsrs-action-border-hover:rgba(134,160,183,.58);
  --atsrs-action-text:#d9e4ec;
  --atsrs-action-muted:#9eb0bf;
  --atsrs-action-accent:#86efac;
  --atsrs-action-danger:#fca5a5;
}

/* Buttons are controls, not coloured banners. */
button,
input[type="button"],
input[type="submit"]{
  background:var(--atsrs-action-surface)!important;
  background-image:none!important;
  border:1px solid var(--atsrs-action-border)!important;
  color:var(--atsrs-action-text)!important;
  box-shadow:none!important;
  text-shadow:none!important;
  transition:background-color .14s ease,border-color .14s ease,box-shadow .14s ease!important;
}
button:hover:not(:disabled),
input[type="button"]:hover:not(:disabled),
input[type="submit"]:hover:not(:disabled){
  background:var(--atsrs-action-surface-hover)!important;
  border-color:var(--atsrs-action-border-hover)!important;
  color:#f4f8fb!important;
  box-shadow:none!important;
  transform:none!important;
}
button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible{
  outline:2px solid rgba(134,239,172,.72)!important;
  outline-offset:2px!important;
  box-shadow:none!important;
}
button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled{
  background:rgba(12,24,37,.48)!important;
  border-color:rgba(76,96,115,.28)!important;
  color:#718394!important;
  opacity:.62!important;
  box-shadow:none!important;
}

/* Destructive actions stay recognisable without becoming solid red blocks. */
button.action,
button.danger,
.top-logout,
#deleteAccountBtn,
#deleteCVBtn,
#revokeShareBtn,
.atsrs-v172-delete{
  background:rgba(239,68,68,.035)!important;
  background-image:none!important;
  border-color:rgba(248,113,113,.42)!important;
  color:var(--atsrs-action-danger)!important;
  box-shadow:none!important;
}
button.action:hover:not(:disabled),
button.danger:hover:not(:disabled),
.top-logout:hover:not(:disabled),
#deleteAccountBtn:hover:not(:disabled),
#deleteCVBtn:hover:not(:disabled),
#revokeShareBtn:hover:not(:disabled),
.atsrs-v172-delete:hover:not(:disabled){
  background:rgba(239,68,68,.075)!important;
  border-color:rgba(252,165,165,.62)!important;
  color:#fecaca!important;
}

/* Positive and selected states use a quiet outline and tint. */
button.testbtn,
button.confirm,
.account-tabs button.active,
.module-tabs button.active,
.mode-choice button.active,
.cert-mode-buttons button.active,
.auth-tabs button.active,
.auth-tab.active{
  background:rgba(34,197,94,.065)!important;
  background-image:none!important;
  border-color:rgba(134,239,172,.48)!important;
  color:#dcfce7!important;
  box-shadow:none!important;
}

/* Navigation selection is a slim marker, never a filled callout. */
.nav button,
.nav button:hover,
.nav button.active{
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
.nav button.active{
  border-color:transparent!important;
  border-left-color:#22c55e!important;
  color:#f8fafc!important;
}
.nav button:hover:not(.active){
  background:rgba(148,163,184,.045)!important;
  border-color:transparent!important;
  color:#f1f5f9!important;
}

/* Action rows should read as compact tools, not three full-width banners. */
#accountSharingTab .share-actions,
.quick-actions,
.document-actions,
.cv-actions,
.atsrs-v172-form-actions,
.shared-document-actions,
.shared-profile-head-actions,
.access-request-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
}
#accountSharingTab .share-actions button,
.quick-actions button,
.document-actions button,
.cv-actions button,
.atsrs-v172-form-actions button,
.shared-document-actions button,
.shared-profile-head-actions button,
.access-request-actions button{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding:8px 12px!important;
  min-height:36px!important;
  border-radius:9px!important;
}
#accountSharingTab .share-actions{
  justify-content:flex-start!important;
  margin-top:12px!important;
}
#accountSharingTab #manageAccessBtn{
  border-color:rgba(134,239,172,.38)!important;
  color:#d9fbe5!important;
}
#accountSharingTab #revokeShareBtn{
  margin-left:auto!important;
}

/* Tabs and two-way choices remain clear without saturated fills. */
.account-tabs button,
.module-tabs button,
.mode-choice button,
.cert-mode-buttons button,
.auth-tabs button,
.auth-tab{
  background:transparent!important;
  background-image:none!important;
  border-color:rgba(93,119,143,.34)!important;
  box-shadow:none!important;
}

/* Calendar is also part of the same visual language. */
.atsrs-date-picker-nav button,
.atsrs-date-picker-days button,
.atsrs-date-picker-actions button{
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
.atsrs-date-picker-days button.selected{
  background:rgba(34,197,94,.08)!important;
  border-color:rgba(134,239,172,.62)!important;
  color:#dcfce7!important;
}

/* Utility and close buttons should visually recede. */
.lang-circle,
.lang-menu button,
.sidebar-toggle,
.file-preview-close,
.share-request-close,
.v76-audit-close,
.v76-copy-btn,
#atsrsTestAutomationBtn,
#atsrsTopbarTroubleBtn,
#atsrsTestAutomationPanel .qa-actions button,
#atsrsTopbarTroublePanel .trouble-actions button{
  background:transparent!important;
  background-image:none!important;
  border-color:rgba(93,119,143,.36)!important;
  color:var(--atsrs-action-muted)!important;
  box-shadow:none!important;
}

@media(max-width:640px){
  #accountSharingTab .share-actions{
    align-items:stretch!important;
  }
  #accountSharingTab .share-actions button{
    width:100%!important;
    justify-content:center!important;
  }
  #accountSharingTab #revokeShareBtn{
    margin-left:0!important;
  }
}
/* V260: neutral, compact Account actions. */
#profilePage .account-tabs button.active{
  background:transparent!important;
  border-color:rgba(134,160,183,.58)!important;
  color:#f4f8fb!important;
}
#profilePage #saveProfileBtn,
#profilePage #saveProfileBtn:hover:not(:disabled){
  width:auto!important;
  min-width:84px!important;
  max-width:none!important;
  min-height:34px!important;
  margin-top:12px!important;
  padding:7px 14px!important;
  background:transparent!important;
  border-color:rgba(93,119,143,.42)!important;
  color:var(--atsrs-action-text)!important;
}
