/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}

/* Base typography */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 10pt;
}

/* NEA-inspired global theme overrides */
:root {
  --nea-navy: #00124c;
  --nea-navy-dark: #011d52;
  --nea-blue: #007cb5;
  --nea-cyan: #28bbff;
  --nea-red: #c81b2d;
  --nea-red-dark: #9f1126;
  --nea-paper: #f4f7fb;
  --nea-paper-alt: #eaf1f8;
  --nea-surface: #ffffff;
  --nea-line: #c8d7ea;
  --nea-text: #0f2745;
  --nea-muted: #3a495e;
  --line: var(--nea-line);
}

body {
  font-family: "proxima-nova", "Avenir Next", "Segoe UI", Tahoma, sans-serif;
  font-size: 11pt;
  line-height: 1.5;
  color: var(--nea-text);
  background-image: linear-gradient(134deg,rgba(206,225,228,0.66) 15%,rgba(225,237,238,0.66) 40%,rgba(206,225,228,0.66) 93%)
}

/* Global layout and header */
.layout {
  width: 100vw;
  min-height: 100vh;
  background: transparent;
  display: flex;
  flex-wrap: wrap;
}

.content {
  width: calc(100vw - 20vw - 2rem);
  margin: 0 1rem 0 calc(20vw + 1rem);
  padding-top: 1rem;
  justify-content: center;
}

.content .header {
  z-index: 1;
  position: relative;
  top: auto;
  left: auto;
  height: auto;
  min-height: 24px;
  flex-direction: row;
}

div:has(> .head-logout) {
  width: 100%;
  justify-content: flex-end;
  height: 45px;
  display: flex;
}

.header {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  width: 20vw;
  height: 100vh;
  padding: 0.85rem 1rem 0.75rem;
  z-index: 25;
  background-color: var(--nea-navy);
}

.head-logout {
  display: flex;
  flex-wrap: wrap;
  width: auto;
  justify-content: flex-start;
  gap: 0.45rem;
  position: fixed;
  left: 1rem;
  bottom: 0.85rem;
  z-index: 6004;
}

.header > div:has(> .head-logout) {
  margin-top: 0;
  justify-content: flex-start;
  height: 0;
  padding: 0;
}

.g4admin-link {
  z-index: 11;
  position: fixed;
  top: 92% !important;
  left: 94% !important;
  width: 6%;
}

.g4admin-link a,
.head-logout a {
  display: block;
  padding: 0.5em;
  height: 35px;
  margin-left: 5px;
  border: 1px solid var(--nea-line);
  border-radius: 0.5rem;
  background: #f6fbff;
  color: var(--nea-navy);
  box-shadow: 0 4px 14px rgba(0, 26, 113, 0.12);
  font-weight: bold;
  text-decoration: none;
  font-size: 0.9rem;
}

.head-logout a {
  height: auto;
  margin-left: 0;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(200, 215, 234, 0.35);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(234, 245, 255, 0.88);
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 600;
}

.g4admin-link a:hover,
.head-logout a:hover {
  background: #eaf6ff;
}

.head-logout a:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.smaller {
  font-size: 0.7rem;
  vertical-align: top;
}

/* Search and navigation */
.quick-search {
  width: 56%;
  position: relative;
  display: flex;
  justify-content: end;
  margin-left: auto;
  height: 42px;
  background: transparent;
}

.quick-search input {
  width: min(30vw, 540px);
  height: 42px;
  border: 1px solid var(--nea-line);
  border-right: 0;
  border-radius: 0.6rem 0 0 0.6rem;
  background: #ffffff;
  color: var(--nea-text);
}

.quick-search input:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

.quick-search input:focus-visible {
  outline: none;
  outline-offset: 2px;
}

/* remove yellow autofill background in WebKit for this input */
.quick-search input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px #fff inset;
  box-shadow: 0 0 0px 1000px #fff inset;
  -webkit-text-fill-color: inherit;
}

.quick-search button,
button {
  height: 42px;
  border: 1px solid var(--nea-red-dark);
  border-radius: 0 0.6rem 0.6rem 0;
  background: linear-gradient(180deg, var(--nea-red) 0%, var(--nea-red-dark) 100%);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.quick-search button:hover,
button:hover {
  filter: brightness(1.04);
}

input:focus,
textarea:focus,
select:focus,
.quick-search input:focus {
  outline: none;
  border-color: var(--nea-blue);
  box-shadow: 0 0 0 3px #28bbff40;
}

nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  list-style: none;
  align-items: stretch;
  margin-top: 1.55rem;
  gap: 0;
  padding: 0.25rem 0;
  background: transparent;
  box-shadow: none;
}

nav > div {
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  font-family: "proxima-nova", "Avenir Next", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #28bbff;
}

nav > div:first-child {
  border-top: 0;
}

nav > div a,
nav > div.inactive-nav,
nav > div.inactive-nav a {
  width: 100%;
  display: block;
  color: #ffffff;
}

nav > div:has(> a[href]) a,
nav > div.inactive-nav a {
  color: #28bbff;
}

nav > div.inactive-nav,
nav > div:not(:has(a)) {
  padding: 0.7rem 0.95rem;
  line-height: 1.45;
}

nav > div:has(> a[href]):hover {
  background: rgba(255, 255, 255, 0.06);
}

nav > div:has(> a:not([href])),
nav > div:not(:has(a)) {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 2px 0 0 var(--nea-red);
  color: #28bbff;
}

nav > div:has(> a:not([href])) a,
nav > div:not(:has(a)) a {
  color: #28bbff;
}

nav > div a {
  padding: 0.7rem 0.95rem;
  line-height: 1.45;
  text-decoration: none;
}

nav > div a:hover {
  color: #28bbff;
}

.footer {
  overflow: hidden;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 2mm 4mm 0 4mm;
  font-size: 8pt;
  border-top: 4px solid var(--nea-red);
  background: linear-gradient(180deg, #011d52 0%, #001246 100%);
  color: #ebf2ff;
}

.toaster-layer {
  z-index: 20;
  position: fixed;
  top: 144px;
  bottom: 0;
  right: 0;
  pointer-events: none;
}
.header div {
  width: auto;
}
/* Logo */
.logo {
  width: 260px;
  display: block;
  margin: 0 auto;
  z-index: 11;
}

.logo img {
  display: block;
  margin: 0 auto;
}

.quick-search input {
  width: 20vw;
  height: 34px;
  padding: 14px 10px;
  border-radius: 0.25rem;
  font-size: 1.1rem;
  border: 1px solid #ccc;
  margin-right: 0 !important;

}

.quick-search input:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

.quick-search input:focus-visible {
  outline: none;
  outline-offset: 2px;
}

/* remove yellow autofill background in WebKit for this input */
.quick-search input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px #fff inset;
  box-shadow: 0 0 0px 1000px #fff inset;
  -webkit-text-fill-color: inherit;
}

/* overlay placeholder 
.quick-search::before {
  content: "Search all collections...";
  position: absolute;
  left: 14px;
  top: 45%;
  transform: translateY(-50%);
  color: #b0a5bb;
  pointer-events: none;
  transition: opacity .12s ease;
  font-size: 1.1rem;
}


.quick-search:focus-within::before {
  opacity: 0;
}
*/

.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: 33px;
  border-radius: 0.25rem;
  padding: 0 20px;
  background: #7A4E4E;
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  border: 1px solid #5B3737;
  margin-left: 10px;
}

.quick-search button:disabled {
  background: #ccc;
  border: 1px solid #bbb;
}

/* Sidebar / Content */
.sidebar {
  overflow: hidden;
  margin-left: 1mm;
  user-select: none;
}

/* Picker */
.picker {
  scrollbar-width: none;
  font-size: 9pt;
  width: 100%;
  border: 0;
  margin: 0;
}

.picker option {
  padding-left: 1em;
}

.picker-title {
  font-weight: bold;
  margin-top: 1em;
  margin-bottom: 0.5mm;
}

/* Tags */
.archived-tag {
  margin-right: 0.5rem;
  padding: 0 0.25rem;
  font-weight: bold;
  font-size: 0.6rem;
  line-height: 1rem;
  color: rgb(127 29 29);
  background-color: rgb(229 231 235);
  border-radius: 0.25rem;
  border: 1px solid rgb(127 29 29);
}

.toasts {
  display: flex;
  flex-direction: column;
  margin: 1mm;
}

.toast {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  margin-bottom: 1mm;
  text-align: right;
  font-size: 10pt;
  border-radius: 0.25rem;
  width: 20rem;
}

.toast-info {
  color: #fff;
  background-color: #635d93;
}

.toast-warning {
  color: #000;
  background-color: yellow;
}

.toast-error {
  color: #fff;
  background-color: red;
}

/* Animations */
.fade-in {
  animation: fadeIn linear .5s;
}

.fade-out {
  animation: fadeOut linear .5s;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    max-height: 0;
  }
  100% {
    opacity: 1;
    max-height: 100px;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    max-height: 100px;
  }
  100% {
    opacity: 0;
    max-height: 0;
  }
}

/* Contracts Submission Page */

#contract-submissions-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
  color: #3f355b;
}

.contracts-submissions-hero {
  margin-bottom: 1.5rem;
  padding: 1.75rem 2rem;
  border-left: 8px solid #616600;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #f5f7ea 0%, #ffffff 72%);
  box-shadow: 0 10px 28px rgba(61, 48, 92, 0.08);
}

.contracts-submissions-eyebrow {
  margin-bottom: 0.5rem;
  color: #616600;
  font-family: 'Kanit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contracts-submissions-hero h1 {
  margin-bottom: 0.5rem;
  color: #5B3737;
  font-family: 'Kanit', sans-serif;
  font-size: 2rem;
  line-height: 1.1;
}

.contracts-submissions-intro {
  max-width: 52rem;
  color: #5d5678;
  font-size: 1rem;
  line-height: 1.6;
}

.contracts-submissions-panel {
  padding: 1.75rem 2rem 2rem;
  border: 1px solid #d9dee4;
  border-radius: 0.75rem;
  background-color: #fff;
  box-shadow: 0 16px 40px rgba(61, 48, 92, 0.08);
}

.contracts-submissions-panel-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e9ef;
}

.contracts-submissions-panel-header h2 {
  margin-bottom: 0.35rem;
  color: #5B3737;
  font-family: 'Kanit', sans-serif;
  font-size: 1.25rem;
}

.contracts-submissions-panel-header p {
  color: #756f89;
  line-height: 1.5;
}

.contracts-submissions-form {
  width: 100%;
}

#contract-submissions-page g4-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  align-items: start;
  padding: 0;
}

#contract-submissions-page g4-input,
#contract-submissions-page g4-select {
  display: block;
  width: 100%;
}

#contract-submissions-page g4-file,
#contract-submissions-page g4-update,
#contract-submissions-page .g4-form-controls {
  grid-column: 1 / -1;
}

#contract-submissions-page input,
#contract-submissions-page textarea,
#contract-submissions-page select {
  width: 100%;
  margin: 0;
  padding: 0.72rem 0.9rem;
  border: 1px solid #d6cde2;
  border-radius: 0.55rem;
  background-color: #fff;
  font-size: 0.98rem;
  color: #3f355b;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#contract-submissions-page input:focus,
#contract-submissions-page textarea:focus,
#contract-submissions-page select:focus {
  outline: none;
  border-color: #5B3737;
  box-shadow: 0 0 0 3px rgba(0, 49, 106, 0.12);
}

#contract-submissions-page .g4-form-controls {
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

#contract-submissions-page button {
  min-width: 10rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid #5B3737;
  border-radius: 0.5rem;
  background: #5B3737;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
}

#contract-submissions-page button:hover {
  background: #5b4f8f;
  border-color: #5b4f8f;
}

@media (max-width: 800px) {
  #contract-submissions-page {
    padding-top: 1rem;
  }

  .contracts-submissions-hero,
  .contracts-submissions-panel {
    padding: 1.25rem;
  }

  #contract-submissions-page g4-form {
    grid-template-columns: 1fr;
  }

  #contract-submissions-page button {
    width: 100%;
    min-width: 0;
  }
}

@media only screen and (max-width: 900px) {
  .header {
    position: static;
    min-height: 0;
    height: auto;
    overflow-y: visible;
  }

  .content {
    width: calc(100vw - 2rem);
    margin: 0 1rem;
  }

  .logo,
  .head-logout,
  .quick-search {
    width: 100%;
  }

  .head-logout {
    margin-top: 0.4rem;
    justify-content: flex-start;
    width: auto;
  }

  .header > div:has(> .head-logout) {
    margin-top: 0;
    padding: 0;
    height: 0;
  }

  .quick-search {
    margin-top: 0.6rem;
    justify-content: flex-start;
  }

  .quick-search input {
    width: calc(100% - 118px);
  }




  nav > div {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }
}
