/* WWS dashboard visual system. No visibility, permission or workflow rules. */
.wws-ui {
  --wws-primary:#175bc0; --wws-primary-dark:#10489d; --wws-accent:#e98c29;
  --wws-soft:#f0f6ff; --wws-ink:#182b43; --wws-muted:#566981; --wws-line:#dce5f0;
  --wws-heading:#153d70; --wws-focus:#175bc0; --wws-radius:16px;
  box-sizing:border-box; width:100%; max-width:1120px; margin:24px auto;
  color:var(--wws-ink); font-family:Inter,"Segoe UI",Arial,sans-serif; font-size:15px; line-height:1.6;
}
.wws-ui--reviewer {
  --wws-primary:#a64b0b; --wws-primary-dark:#823804; --wws-accent:#ee982f;
  --wws-soft:#fff6eb; --wws-heading:#173e67; --wws-focus:#1d5ead; --wws-line:#eadfce;
}
.wws-ui--editor {
  --wws-primary:#167451; --wws-primary-dark:#0e573d; --wws-accent:#29a479;
  --wws-soft:#eff9f4; --wws-heading:#174c39; --wws-focus:#167451; --wws-line:#d7e8df;
}
.wws-ui *, .wws-ui *::before, .wws-ui *::after { box-sizing:border-box; }
.wws-ui > :is(div,section,form) {
  width:100% !important; max-width:none !important; margin:0 !important;
  padding:28px !important; border:1px solid var(--wws-line) !important;
  border-top:4px solid var(--wws-accent) !important; border-radius:var(--wws-radius) !important;
  background:#fff !important; color:var(--wws-ink) !important;
  box-shadow:0 8px 28px rgba(25,45,64,.065) !important;
  font-family:inherit !important; text-align:left;
}
.wws-ui :is(h1,h2,h3,h4,.section-title,.table-caption) {
  color:var(--wws-heading) !important; font-family:inherit !important; font-weight:700 !important;
  letter-spacing:-.025em; line-height:1.3 !important; text-transform:none !important;
}
.wws-ui :is(h1,h2,.section-title) {
  font-size:24px !important; margin:0 0 24px !important; padding:0 0 16px !important;
  border:0 !important; border-bottom:1px solid var(--wws-line) !important;
}
.wws-ui h3 { font-size:19px !important; margin:24px 0 16px !important; }
.wws-ui h4 { font-size:16px !important; }
.wws-ui :is(p,li,label,td,th,input,select,textarea,button,a) { font-family:inherit !important; }
.wws-ui p { margin:12px 0; }
.wws-ui :is(label,.form-label) { color:var(--wws-ink) !important; font-size:14px !important; font-weight:650 !important; }
.wws-ui :is(input[type="text"],input[type="email"],input[type="url"],input[type="number"],input[type="date"],input[type="password"],select,textarea) {
  max-width:100% !important; min-height:44px; padding:11px 13px !important;
  background:#fff !important; color:var(--wws-ink) !important;
  border:1px solid #bacbd7 !important; border-radius:9px !important;
  box-shadow:none !important; font-size:15px !important; line-height:1.45 !important;
}
.wws-ui textarea { width:100% !important; min-height:128px; resize:vertical; }
.wws-ui input[type="file"] {
  max-width:100% !important; padding:12px !important; border:1px dashed #a8bbc9 !important;
  border-radius:10px !important; background:var(--wws-soft) !important; color:var(--wws-ink) !important;
}
.wws-ui input[type="file"]::file-selector-button {
  border:0; border-radius:7px; padding:8px 12px; margin-right:12px;
  background:var(--wws-primary); color:#fff; font-weight:650; cursor:pointer;
}
.wws-ui input:is([type="checkbox"],[type="radio"]) { accent-color:var(--wws-primary); }
.wws-ui :is(input,select,textarea,button,a):focus-visible {
  outline:3px solid var(--wws-focus) !important; outline-offset:3px !important;
}
.wws-ui :is(button,input[type="submit"],input[type="button"],.submit-button,.action-button,.download-button,.wws-reviewer-button,.wws-author-logout-button) {
  max-width:100%; min-height:44px; padding:11px 20px !important;
  border:1px solid transparent !important; border-radius:9px !important;
  background:var(--wws-primary) !important; color:#fff !important;
  font-size:14px !important; font-weight:700 !important; line-height:1.45 !important;
  text-decoration:none !important; text-transform:none !important; letter-spacing:0 !important;
  box-shadow:0 3px 8px rgba(20,54,64,.1) !important; cursor:pointer;
  transition:background-color .16s ease, box-shadow .16s ease;
}
.wws-ui :is(button,input[type="submit"],input[type="button"],.submit-button,.action-button,.download-button,.wws-reviewer-button,.wws-author-logout-button):hover:not(:disabled) {
  background:var(--wws-primary-dark) !important; box-shadow:0 4px 12px rgba(20,54,64,.16) !important;
  transform:none !important;
}
.wws-ui :is(button,input,select,textarea):disabled {
  opacity:.55 !important; cursor:not-allowed !important; box-shadow:none !important;
}
.wws-ui a:not(.download-button):not(.wws-reviewer-button):not(.wws-author-logout-button) {
  color:var(--wws-primary) !important; text-underline-offset:3px; overflow-wrap:anywhere;
}
.wws-ui :is(.form-section,.controls-container,.wws-reviewer-inline-form) { gap:14px !important; }
.wws-ui :is(.form-section,.controls-container) { flex-wrap:wrap; }
.wws-ui :is(.table-container,.history-table,.ased-history-container,.edd-s9-request-table-wrap) {
  max-width:100%; overflow-x:auto; border-radius:10px;
}
.wws-ui table {
  width:100% !important; margin:20px 0 !important; border-collapse:separate !important;
  border-spacing:0 !important; border:1px solid var(--wws-line) !important; border-radius:10px;
  font-family:inherit !important; font-size:14px !important; background:#fff !important; box-shadow:none !important;
}
.wws-ui :is(th,td) {
  padding:13px 15px !important; text-align:left !important; vertical-align:top !important;
  border:0 !important; border-bottom:1px solid var(--wws-line) !important;
  color:var(--wws-ink) !important; overflow-wrap:anywhere;
}
.wws-ui :is(thead th,th) {
  background:var(--wws-soft) !important; color:var(--wws-heading) !important;
  font-size:12px !important; letter-spacing:.045em; font-weight:750 !important;
}
.wws-ui tbody tr:nth-child(even) td { background:#f8fafb !important; }
.wws-ui tbody tr:nth-child(odd) td { background:#fff !important; }
.wws-ui tbody tr:hover td { background:var(--wws-soft) !important; }
.wws-ui tr:last-child td { border-bottom:0 !important; }
.wws-ui :is(.wws-empty-state,.wws-reviewer-help,.edd-s9-help-text,.file-uploader-role) { color:var(--wws-muted) !important; font-size:14px !important; }
.wws-ui :is(.wws-empty-state,.wws-reviewer-notice,.feedback-message,.wws-author-notice,.wws-editor-dashboard-notice,.wws-asst-editor-dashboard-notice) {
  padding:14px 17px !important; border:1px solid var(--wws-line) !important;
  border-left:4px solid var(--wws-accent) !important; border-radius:10px !important;
  background:var(--wws-soft) !important; box-shadow:none !important; line-height:1.6;
}
.wws-ui :is(.error,.wws-reviewer-notice-error,.wws-author-notice-error) { border-left-color:#b74439 !important; }
.wws-ui .success { border-left-color:#18835e !important; }
.wws-ui .wws-author-logout-row {
  width:100% !important; max-width:100% !important; margin-left:0 !important; margin-right:0 !important;
  padding:20px !important; background:#fff !important;
}
.wws-ui .wws-author-logout-button { width:auto !important; margin:0 !important; }
@media(max-width:700px) {
  .wws-ui { margin:16px auto; }
  .wws-ui > :is(div,section,form) { padding:19px 16px !important; border-radius:12px !important; }
  .wws-ui :is(h1,h2,.section-title) { font-size:21px !important; }
  .wws-ui .wws-reviewer-inline-form { grid-template-columns:1fr !important; }
  .wws-ui :is(input[type="text"],input[type="email"],input[type="url"],select) { width:100% !important; min-width:0 !important; }
  .wws-ui table { display:block; overflow-x:auto; }
  .wws-ui :is(th,td) { padding:11px 12px !important; }
  .wws-ui :is(button,input[type="submit"]) { white-space:normal; }
}
@media(prefers-reduced-motion:reduce) { .wws-ui * { transition:none !important; } }
.wws-ui .wws-account-security { margin:18px 0 0; padding:18px; border:1px solid var(--wws-line); border-radius:12px; background:var(--wws-soft); }
.wws-ui .wws-account-security summary { cursor:pointer; font-weight:700; color:var(--wws-heading); }
.wws-ui .wws-account-security label { display:block; margin:12px 0; }
.wws-ui .wws-account-security input { display:block; width:100%; max-width:440px; }
.wws-ui .wws-account-security pre { white-space:pre-wrap; overflow-wrap:anywhere; padding:14px; background:#fff; }
.wws-ui .wws-invitation-history { margin-top:20px !important; }
.wws-ui .wws-invitation-history details { font-size:13px; }
.wws-ui .wws-invitation-status:not(:empty) { padding:12px 14px; margin:12px 0; border-radius:9px; background:var(--wws-soft); }

/* Invitation history: preserve readable columns inside a local scroll area. */
.wws-ui .wws-invitation-history .table-container{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.wws-ui .wws-invitation-history table{min-width:880px;table-layout:auto}
.wws-ui .wws-invitation-history th,.wws-ui .wws-invitation-history td{word-break:normal;overflow-wrap:break-word}
.wws-ui .wws-invitation-history td:first-child{min-width:180px}
.wws-ui .wws-invitation-history button{min-width:105px}

/* Equal outer widths for every dashboard section, including Logout. */
.wws-ui.wws-ui--author,.wws-ui.wws-ui--reviewer,.wws-ui.wws-ui--editor{width:100%;max-width:960px!important;margin-left:auto!important;margin-right:auto!important}

/* Readable editorial correspondence: white surface, dark text, green accent. */
.wws-ui--editor :is(#eic-editor-dashboard-section5,#editor-dashboard-section5,#asst-editor-dashboard-section5) :is(.wws-message-card,.message-entry,.message-content,.message-dialogue,.wws-message-full-row td){background:#fff!important;color:#1f2933!important;border-color:#b9d8c9!important}
.wws-ui--editor :is(#eic-editor-dashboard-section5,#editor-dashboard-section5,#asst-editor-dashboard-section5) :is(.wws-message-card,.message-entry,.message-content,.message-dialogue) :is(p,div,span,strong,pre){color:#1f2933!important;background-color:transparent!important}
.wws-ui--editor :is(#eic-editor-dashboard-section5,#editor-dashboard-section5,#asst-editor-dashboard-section5) .wws-message-card{border-left:4px solid #167451!important}

.wws-dashboard-feedback{position:fixed;right:20px;bottom:20px;z-index:99999;width:calc(100vw - 40px);max-width:460px;padding:18px 44px 18px 20px;border:1px solid #cbd5e1;border-left:5px solid #175bc0;border-radius:12px;background:#fff;color:#1f2933;box-shadow:0 6px 24px #182b4326;font:15px/1.6 Arial,Helvetica,sans-serif;overflow-wrap:anywhere}
.wws-dashboard-feedback[data-state="success"]{border-left-color:#167451}.wws-dashboard-feedback[data-state="error"]{border-left-color:#b42318}
.wws-feedback-title{display:block;margin-bottom:6px;color:#1f2933!important}.wws-feedback-text{color:#1f2933!important;background:#fff!important}
.wws-feedback-dismiss{position:absolute;right:9px;top:8px;padding:2px 8px;border:0;background:transparent;color:#475569;cursor:pointer;font-size:22px;line-height:1.2}

.wws-dashboard-feedback{box-sizing:border-box;max-height:50vh;overflow-y:auto}

/* Unified file controls for ALL dashboards. Text contrast must not inherit role link colors. */
body .wws-ui a:is(.file-download-link,.download-button,[download],[href*="/wws-private/"],[href*="/wws_submissions/"],[href*="action=download"],[href*="_download_"]),
body .wws-ui :is(#eic-editor-dashboard-section5,#editor-dashboard-section5,#asst-editor-dashboard-section5,#journal-section3-results,#journal_section3_message_display_area,#jass5-reviewer-content-area,.wws-reviewer-card,.journal-section1-container,.journal-section2-container) a:is(.file-download-link,.download-button,[download],[href*="/wws-private/"],[href*="/wws_submissions/"],[href*="action=download"],[href*="_download_"]) {
  display:inline-flex!important;align-items:center;gap:6px;box-sizing:border-box!important;
  max-width:100%!important;width:auto!important;padding:8px 12px!important;margin:3px 4px 3px 0!important;
  background:#175bc0!important;background-image:none!important;color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;
  border:1px solid #175bc0!important;border-radius:8px!important;box-shadow:none!important;
  font:600 14px/1.45 Arial,Helvetica,sans-serif!important;text-decoration:none!important;
  white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;
}
body .wws-ui a:is(.file-download-link,.download-button,[download],[href*="/wws-private/"],[href*="/wws_submissions/"],[href*="action=download"],[href*="_download_"]):is(:link,:visited,:hover,:focus,:focus-visible,:active),
body .wws-ui :is(#eic-editor-dashboard-section5,#editor-dashboard-section5,#asst-editor-dashboard-section5,#journal-section3-results,#journal_section3_message_display_area,#jass5-reviewer-content-area,.wws-reviewer-card,.journal-section1-container,.journal-section2-container) a:is(.file-download-link,.download-button,[download],[href*="/wws-private/"],[href*="/wws_submissions/"],[href*="action=download"],[href*="_download_"]):is(:link,:visited,:hover,:focus,:focus-visible,:active) {
  color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;
}
body .wws-ui a:is(.file-download-link,.download-button,[download],[href*="/wws-private/"],[href*="/wws_submissions/"],[href*="action=download"],[href*="_download_"]):is(:hover,:focus-visible),
body .wws-ui :is(#eic-editor-dashboard-section5,#editor-dashboard-section5,#asst-editor-dashboard-section5,#journal-section3-results,#journal_section3_message_display_area,#jass5-reviewer-content-area,.wws-reviewer-card,.journal-section1-container,.journal-section2-container) a:is(.file-download-link,.download-button,[download],[href*="/wws-private/"],[href*="/wws_submissions/"],[href*="action=download"],[href*="_download_"]):is(:hover,:focus-visible) {
  background:#104991!important;border-color:#104991!important;
}
body .wws-ui a:is(.file-download-link,.download-button,[download],[href*="/wws-private/"],[href*="/wws_submissions/"],[href*="action=download"],[href*="_download_"]):focus-visible,
body .wws-ui :is(#eic-editor-dashboard-section5,#editor-dashboard-section5,#asst-editor-dashboard-section5,#journal-section3-results,#journal_section3_message_display_area,#jass5-reviewer-content-area,.wws-reviewer-card,.journal-section1-container,.journal-section2-container) a:is(.file-download-link,.download-button,[download],[href*="/wws-private/"],[href*="/wws_submissions/"],[href*="action=download"],[href*="_download_"]):focus-visible {
  outline:3px solid #0b376d!important;outline-offset:3px!important;
}
body .wws-ui a:is(.file-download-link,.download-button,[download],[href*="/wws-private/"],[href*="/wws_submissions/"],[href*="action=download"],[href*="_download_"]) :is(span,strong,b,i,svg),
body .wws-ui :is(#eic-editor-dashboard-section5,#editor-dashboard-section5,#asst-editor-dashboard-section5,#journal-section3-results,#journal_section3_message_display_area,#jass5-reviewer-content-area,.wws-reviewer-card,.journal-section1-container,.journal-section2-container) a:is(.file-download-link,.download-button,[download],[href*="/wws-private/"],[href*="/wws_submissions/"],[href*="action=download"],[href*="_download_"]) :is(span,strong,b,i,svg) {
  color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;fill:currentColor!important;background:transparent!important;
}
/* Shared message cards: same spacing and type across author, reviewer and both editorial dashboards. */
body .wws-ui :is(.wws-message-card,.message-entry,.wws-reviewer-message) {
  padding:14px 16px!important;margin:10px 0!important;border:1px solid var(--wws-line,#cbd5e1)!important;
  border-left:4px solid var(--wws-primary,#175bc0)!important;border-radius:9px!important;
  background:#ffffff!important;color:#1f2933!important;box-shadow:none!important;
  font:14px/1.6 Arial,Helvetica,sans-serif!important;overflow-wrap:anywhere!important;
}
body .wws-ui :is(.wws-message-card,.message-entry,.wws-reviewer-message) :is(.wws-message-body,.message-content,p,pre) {
  background:#ffffff!important;color:#1f2933!important;line-height:1.6!important;
}

body .wws-ui :is(.message-dialogue,.wws-reviewer-dialogue,#journal_section3_message_display_area,#journal_section3_message_content,.uploaded-files-section,.uploaded-files-section-reviewer) {
  background:#ffffff!important;color:#1f2933!important;
  border-color:var(--wws-line,#cbd5e1)!important;border-radius:10px!important;
  font:14px/1.6 Arial,Helvetica,sans-serif!important;
}
body .wws-ui .wws-message-card-header {
  display:flex!important;flex-wrap:wrap!important;align-items:baseline!important;
  justify-content:space-between!important;gap:8px 14px!important;margin-bottom:6px!important;
}

/* One message per card; attachments belong to that row only. */
.wws-ui .wws-unified-messages { width:100%; min-width:0; }
.wws-ui .wws-conversation { margin:20px 0; padding:16px; border:1px solid var(--wws-accent,#285c4d); border-radius:12px; background:#fff; }
.wws-ui .wws-conversation h4 { margin:0 0 14px; color:var(--wws-accent,#285c4d); }
.wws-ui .wws-correspondence-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(160px,30%); gap:16px; align-items:start; margin:12px 0; }
.wws-ui .wws-correspondence-row .wws-message-card { margin:0; min-width:0; padding:16px; border:1px solid #d5dee5; border-left:4px solid var(--wws-accent,#285c4d); border-radius:10px; background:#fff!important; color:#1f2933!important; }
.wws-ui .wws-message-card-header { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.wws-ui .wws-message-time { color:#52606d; font-size:13px; }
.wws-ui .wws-message-body { overflow-wrap:anywhere; color:#1f2933!important; }
.wws-ui .wws-message-attachments { min-width:0; }
.wws-ui a.wws-message-file, .wws-ui a.wws-message-file:visited, .wws-ui a.wws-message-file:hover, .wws-ui a.wws-message-file:focus { display:block; width:fit-content; max-width:100%; padding:9px 12px; margin:0 0 8px; border-radius:7px; background:#1465a3!important; color:#fff!important; font-weight:700; overflow-wrap:anywhere; text-decoration:none; }
.wws-ui a.wws-message-file:focus-visible { outline:3px solid #f18b24; outline-offset:3px; }
.wws-ui--author .wws-unified-messages { --wws-accent:#1465a3; }
.wws-ui--reviewer .wws-unified-messages { --wws-accent:#c25808; }
.wws-ui--editor .wws-unified-messages { --wws-accent:#285c4d; }
@media(max-width:600px) { .wws-ui .wws-correspondence-row { grid-template-columns:minmax(0,1fr); gap:8px; } .wws-ui .wws-conversation { padding:12px; } }
body .wws-ui :is(#wws-message-view,.wws-unified-messages) a.wws-message-file:is(:link,:visited,:hover,:focus,:active) { color:#fff!important;-webkit-text-fill-color:#fff!important;background:#175bc0!important; }

.wws-ui .wws-reviewer-correction-toggle {
    display:list-item;
    width:fit-content;
    max-width:100%;
    margin-block:16px;
    padding:11px 20px;
    border-radius:9px;
    background:var(--wws-primary);
    color:#fff;
    font-weight:700;
    cursor:pointer;
}
.wws-ui .wws-reviewer-correction-toggle:hover { background:var(--wws-primary-dark); }
.wws-ui .wws-reviewer-correction-toggle:focus-visible {
    outline:3px solid var(--wws-focus);
    outline-offset:3px;
}

/* One heading hierarchy for every dashboard role and section. */
.wws-ui[data-wws-advisor-kind] :is(h1,h2,h3,h4,h5,h6) {
    font-family:inherit!important;
    font-size:16px!important;
    font-weight:700!important;
    line-height:1.3!important;
    text-align:start!important;
    text-transform:none!important;
    letter-spacing:normal!important;
    color:var(--wws-heading)!important;
    margin:20px 0 10px!important;
    padding:0!important;
    border:0!important;
}
.wws-ui[data-wws-advisor-kind] :is(h1,h2,h3) {
    font-size:18px!important;
}
.wws-ui[data-wws-advisor-kind] :is(h5,h6) {
    font-size:14px!important;
}
.wws-ui[data-wws-advisor-kind] .wws-dashboard-section-heading.wws-dashboard-section-heading {
    display:block;
    position:static;
    width:100%;
    font-size:24px!important;
    margin:0 0 24px!important;
    padding:0 0 16px!important;
    border-bottom:1px solid var(--wws-line)!important;
}
@media(max-width:700px) {
    .wws-ui[data-wws-advisor-kind] .wws-dashboard-section-heading.wws-dashboard-section-heading {
        font-size:21px!important;
        margin-bottom:18px!important;
        padding-bottom:12px!important;
    }
}
