:root {
  --bg-page: #f5f6f8;
  --bg-panel: #ffffff;
  --bg-input: #ffffff;
  --border: #cccccc;
  --border-hover: #555555;
  --border-focus: #314165;
  --text-main: #555555;
  --text-muted: #777777;
  --accent: #314165; /* Slate Blue */
  --accent-strong: #555555; /* Dark Gray */
  --danger: #d9534f;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 10px 20px -5px rgba(0,0,0,0.05);
  --radius: 5px;
  --radius-sm: 4px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-page);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Top Bar */
.header-top-bar {
  background-color: #22252a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 0;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.top-bar-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-socials {
  display: flex;
  gap: 14px;
}

.top-bar-socials a {
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.top-bar-socials a:hover {
  opacity: 1;
}

.top-bar-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.top-bar-contact a {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.top-bar-contact a:hover {
  opacity: 0.8;
}

.contact-divider {
  opacity: 0.3;
}

/* Top Black Header */
.site-header {
  background-color: #000000;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.logo-wrapper img {
  height: 44px;
  width: auto;
  display: block;
}

.header-search-dummy {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  width: 420px;
  max-width: 100%;
  border: 1px solid #ffffff;
}

.header-cart-dummy a {
  color: #ffffff;
  text-decoration: none;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

.header-cart-dummy a:hover {
  opacity: 0.8;
}

.header-search-dummy input {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px;
  color: #666;
  width: 100%;
  min-height: auto;
  box-shadow: none;
}

.search-btn-dummy {
  background: #f7f7f7;
  border: none;
  border-left: 1px solid #ddd;
  padding: 8px 12px;
  cursor: not-allowed;
  color: #333;
}

.header-nav {
  background-color: #000000;
  border-top: 1px solid #222;
  width: 100%;
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
}

.header-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.header-nav li a {
  display: block;
  padding: 12px 18px;
  color: #ffffff;
  text-decoration: none;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

.header-nav li a:hover {
  color: #314165;
}

/* Page Title Banner */
.page-title-banner {
  background-color: #ffffff;
  border-bottom: 1px solid #eaeaea;
  padding: 40px 16px;
  text-align: center;
}

.banner-container {
  max-width: 1140px;
  margin: 0 auto;
}

.page-title-banner h1 {
  font-family: 'Open Sans', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #333333;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.page-title-banner p {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  color: #777777;
  margin: 10px 0 0;
}

/* Form Shell and Panel */
.public-form-shell {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 16px;
  flex-grow: 1;
}

.public-form-panel {
  background-color: var(--bg-panel);
  border: 1px solid #eaeaea;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.public-form-head {
  padding: 24px 32px;
  border-bottom: 1px solid #eaeaea;
  background-color: #fcfcfc;
}

.public-form-head h2 {
  font-family: 'Open Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #333333;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.public-form-head p {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
  line-height: 1.5;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 32px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field-full {
  grid-column: 1 / -1;
}

.field span {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #333333;
}

.required-note {
  color: #a94442;
  font-size: 11px;
  font-style: italic;
  font-weight: normal;
  margin-left: 4px;
}

/* Form Controls */
input,
select,
textarea {
  font-family: 'Nunito Sans', sans-serif;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  color: #333333;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background-color: var(--bg-input);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  min-height: 100px;
  padding: 10px 12px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #bbbbbb;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(49, 65, 101, 0.15);
}

/* Checkboxes */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--bg-input);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  user-select: none;
}

.checkbox-option:hover {
  border-color: var(--border-hover);
}

.checkbox-option input {
  width: 16px;
  height: 16px;
  min-height: auto;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-option span {
  font-family: Verdana, Geneva, sans-serif;
  color: var(--text-main);
  font-size: 12px;
  font-weight: normal;
}

.checkbox-option.is-checked {
  border-color: var(--accent);
  background-color: rgba(49, 65, 101, 0.05);
}

/* Custom File Upload Area */
.file-upload-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease;
}

.file-upload-card:hover {
  border-color: var(--accent);
}

.file-upload-card.is-dragover {
  border-color: var(--accent);
  background: rgba(49, 65, 101, 0.05);
}

.file-upload-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.file-upload-text {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  color: #333333;
  font-size: 13px;
}

.file-upload-subtext {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.file-selected-name {
  margin-top: 8px;
  font-size: 12px;
  color: #314165;
  font-weight: 700;
  background: rgba(49, 65, 101, 0.08);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid rgba(49, 65, 101, 0.15);
}

.is-hidden {
  display: none !important;
}

/* Buttons */
.public-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 32px;
  border-radius: var(--radius-sm);
  border: none;
  color: #ffffff;
  background-color: var(--accent-strong); /* #555555 */
  font-family: Verdana, Geneva, sans-serif;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: var(--border-focus); /* #314165 */
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.submit-frame {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* Footer Section */
.site-footer {
  margin-top: auto;
  border-top: 1px solid #eaeaea;
}

.footer-institutional {
  background-color: #314165;
  color: #ffffff;
  padding: 40px 16px;
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.footer-column h3 {
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 15px;
  color: #ffffff;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.footer-column p {
  font-size: 12px;
  line-height: 1.6;
  color: #d1d5db;
  margin: 0;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  font-size: 12px;
  margin-bottom: 8px;
  color: #d1d5db;
}

.footer-column a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: #ffffff;
}

.footer-copyright {
  background-color: #ffffff;
  color: #666666;
  padding: 20px 16px;
  border-top: 1px solid #eaeaea;
}

.copyright-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.copyright-text {
  font-size: 11px;
  margin: 0;
}

.seals-dummy {
  display: flex;
  gap: 15px;
  font-size: 11px;
  font-weight: bold;
  color: #555555;
}

/* Success Modal */
.public-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.public-modal-backdrop[hidden] {
  display: none;
}

.public-modal-shell {
  position: relative;
  width: min(100%, 460px);
  padding: 30px;
  border-radius: var(--radius);
  background-color: #ffffff;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.public-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  color: var(--text-muted);
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

.public-modal-icon {
  margin: 0 auto 15px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.public-modal-shell h2 {
  font-family: 'Open Sans', sans-serif;
  margin: 0 0 8px;
  font-size: 18px;
  color: #333333;
}

.public-modal-shell p {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.public-modal-shell .btn {
  width: 100%;
}

/* Responsiveness */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .header-search-dummy {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .copyright-flex {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}
