/* New, component-scoped styles (no legacy table layout) */

body.ui-page-login {
  background: #f2f6fb;
  margin: 0;
}

.ui-header {
  background: #ffffff;
  border-bottom: 2px solid #b4331f;
}
.ui-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ui-logo {
  display: block;
}
.ui-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0a2239;
}
.ui-user__label {
  color: #32485c;
}
.ui-user__name {
  font-weight: 700;
}
.ui-user__logout {
  color: #1d5ea8;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
}
.ui-user__logout:hover {
  background: #eef4fb;
}

.ui-main {
  padding: 32px 12px;
}
.ui-card {
  background: #fff;
  border: 1px solid #e3eaf2;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(10, 34, 57, 0.08);
  padding: 26px;
}
.ui-card--center {
  max-width: 1200px;
  margin: 0 auto;
}
.ui-card--narrow {
  max-width: 420px;
}

.ui-projects {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .ui-projects {
    grid-template-columns: repeat(12, 1fr);
  }
}
@media (min-width: 900px) {
  .ui-projects > .ui-card {
    grid-column: span 12;
  }
}
@media (min-width: 1200px) {
  .ui-projects > .ui-card {
    grid-column: span 6;
  }
}
/* Ensure single child (tables) span full width */
.ui-projects {
  display: block;
}
.ui-projects > * {
  width: 100%;
}
.ui-year-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ui-year-title {
  font-size: 18px;
  font-weight: 700;
  color: #0a2239;
  margin: 0;
}
.ui-chips {
  display: flex;
  gap: 8px;
}
.ui-chip {
  background: #eef4fb;
  color: #1d5ea8;
  border: 1px solid #d7e7ff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.ui-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 8px 24px;
  margin-bottom: 12px;
}
.ui-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.ui-stat .label {
  color: #32485c;
}
.ui-stat .value {
  color: #0a2239;
  font-weight: 600;
}
.ui-summary {
  display: flex;
  gap: 8px;
  margin: 8px 0 16px;
  flex-wrap: wrap;
}
.ui-summary .ui-chip {
  background: #fff;
  border: 1px solid #e3eaf2;
}

.ui-card table {
  width: 100% !important;
  border-collapse: collapse;
}
.ui-card + .ui-card {
  margin-top: 16px;
}

/* Divider between header and data */
.ui-divider {
  height: 1px;
  background: #e3eaf2;
  margin: 12px 0 16px;
}

/* Make legacy project subtemplate tables expand to full width */
.ui-main table[width="706"],
.ui-main table[width="726"],
.ui-main table[width="746"],
.ui-main table[width="100%"] {
  width: 100% !important;
}
.ui-main td[width] {
  width: auto !important;
}
.ui-card td,
.ui-card th {
  padding: 8px 10px;
}
.ui-card tr.project td {
  background: #f9fbfe;
}
.ui-card tr.project:hover td {
  background: #edf4ff;
}
.ui-card tr.linebottom td {
  border-bottom: 1px solid #e5edf7;
}
.ui-card tr.linetop td {
  border-top: 1px solid #e5edf7;
}
/* Modern data table styling */
.ui-data {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #e3eaf2;
  border-radius: 12px;
  overflow: hidden;
  table-layout: auto;
}
.ui-data thead th {
  background: #f6f9fc;
  color: #0a2239;
  text-align: left;
  padding: 10px 12px;
  font-weight: 700;
  border-bottom: 1px solid #e3eaf2;
}
.ui-data tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f6;
}
.ui-data tfoot td {
  padding: 12px;
  font-weight: 700;
  background: #f6f9fc;
}
.ui-data tr:hover td {
  background: #f9fbfe;
}
.u-col-title {
  width: auto;
}
.u-col-action {
  width: 120px;
  text-align: center;
}
.u-col-money {
  width: 180px;
  text-align: right;
}
/* prevent breaking of currency values */
.ui-data td[align="right"],
.ui-data th[align="right"] {
  white-space: nowrap;
}
/* Emphasize section headers inside legacy tables */
.ui-card tr.linebottom td:first-child b,
.ui-card tr.linetop td:first-child b {
  display: inline-block;
  background: #eef4fb;
  color: #0a2239;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
}
/* Improve readability of links in project lists */
.ui-card a {
  color: #1d5ea8;
  text-decoration: none;
  font-weight: 600;
}
.ui-card a:hover {
  text-decoration: underline;
}
/* Right-align numbers consistently */
.ui-card td[align="right"],
.ui-card th[align="right"] {
  text-align: right;
  white-space: nowrap;
}
/* Modernize legacy input buttons inside cards */
.ui-card input[type="button"],
.ui-card input[type="submit"] {
  background: #1d5ea8;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
  cursor: pointer;
}
.ui-card input[type="button"]:hover,
.ui-card input[type="submit"]:hover {
  background: #184f8d;
}

.ui-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 600;
  color: #0a2239;
}
.ui-intro {
  margin-bottom: 10px;
  color: #3a4a5a;
}
.ui-error {
  background: #ffeff0;
  border: 1px solid #f3c2c6;
  color: #a0222b;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.ui-success {
  background: #e8f5e9;
  border: 1px solid #81c784;
  color: #2e7d32;
  padding: 32px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  text-align: center;
}

.ui-success h2 {
  color: #1b5e20;
  font-size: 24px;
  margin: 0 0 16px 0;
  font-weight: 700;
}

.ui-success p {
  color: #2e7d32;
  font-size: 16px;
  margin: 0 0 24px 0;
  line-height: 1.6;
}

.ui-success .ui-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.ui-form {
  display: grid;
  gap: 12px;
}
.ui-field {
  display: grid;
  gap: 6px;
}
.ui-label {
  font-weight: 600;
  color: #0a2239;
}
.ui-input {
  padding: 10px 12px;
  border: 1px solid #c9d6e2;
  border-radius: 10px;
  font-size: 15px;
}
.ui-input:focus {
  outline: none;
  border-color: #1d5ea8;
  box-shadow: 0 0 0 3px rgba(29, 94, 168, 0.15);
}
.ui-input-group {
  display: flex;
  align-items: stretch;
}
.ui-input-group__prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #f0f4f8;
  border: 1px solid #c9d6e2;
  border-right: 0;
  border-radius: 10px 0 0 10px;
  font-size: 15px;
  color: #0a2239;
}
.ui-input-group .ui-input {
  border-radius: 0 10px 10px 0;
  flex: 1;
  min-width: 0;
}
.ui-help {
  font-size: 13px;
  color: #5a6a7a;
}
.ui-help--error {
  color: #c0392b;
}
.ui-input--error {
  border-color: #c0392b;
}
.ui-input--error:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}
.ui-conditions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ui-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  line-height: 1.4;
}
.ui-checkbox input[type="checkbox"] {
  margin: 3px 0 0 0;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.ui-checkbox span {
  flex: 1;
}
.ui-actions {
  margin-top: 8px;
}
.ui-button {
  appearance: none;
  border: 0;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.ui-button--primary {
  background: #1d5ea8 !important;
  color: #fff !important;
}
.ui-button--primary:hover {
  background: #184f8d !important;
  color: #fff !important;
}
.ui-button--secondary {
  background: #ffffff !important;
  color: #1d5ea8 !important;
  border: 2px solid #1d5ea8 !important;
}
.ui-button--secondary:hover {
  background: #f0f4f8 !important;
  color: #184f8d !important;
  border-color: #184f8d !important;
}
.ui-select {
  position: relative;
}
.ui-select__field {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 36px 10px 12px;
  border: 1px solid #c9d6e2;
  border-radius: 10px;
  font-size: 15px;
  background: #fff
    url('data:image/svg+xml;utf8,<svg fill="%231d5ea8" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>')
    no-repeat right 10px center / 16px 16px;
}
.ui-select__field:focus {
  outline: none;
  border-color: #1d5ea8;
  box-shadow: 0 0 0 3px rgba(29, 94, 168, 0.15);
}
.ui-links {
  margin-top: 16px;
  color: #3a4a5a;
  text-align: center;
}
.ui-links a {
  color: #1d5ea8;
  text-decoration: none;
  font-weight: 600;
}
.ui-links a:hover {
  text-decoration: underline;
}
.ui-links .sep {
  margin: 0 8px;
  color: #8ca0b3;
}

/* Generated form styling (ModernGBLib::generateForm) */
.faw-form {
  background: #fff;
  border: 1px solid #e3eaf2;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(10, 34, 57, 0.06);
}
.faw-form .form-field {
  margin-bottom: 14px;
}
.faw-form label {
  display: block;
  font-weight: 600;
  color: #0a2239;
  margin-bottom: 6px;
}
.faw-form input[type="text"],
.faw-form input[type="password"],
.faw-form input[type="file"],
.faw-form textarea,
.faw-form select {
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #c9d6e2;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
}

.faw-form input[type="file"] {
  border: 2px dashed #c9d6e2 !important;
  background: #fafafa !important;
  cursor: pointer !important;
  padding: 10px 12px !important;
  width: 100% !important;
  max-width: 520px !important;
  box-sizing: border-box !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}

.faw-form input[type="file"]:hover {
  border-color: #1d5ea8 !important;
  background: #f8f9ff !important;
}

.faw-form input[type="file"]:focus {
  outline: none !important;
  border-color: #1d5ea8 !important;
  box-shadow: 0 0 0 3px rgba(29, 94, 168, 0.15) !important;
}

/* Legacy form file inputs */
input[name^="ele"][type="file"] {
  border: 2px dashed #c9d6e2 !important;
  background: #fafafa !important;
  cursor: pointer !important;
  padding: 10px 12px !important;
  width: 100% !important;
  max-width: 520px !important;
  box-sizing: border-box !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}

input[name^="ele"][type="file"]:hover {
  border-color: #1d5ea8 !important;
  background: #f8f9ff !important;
}

input[name^="ele"][type="file"]:focus {
  outline: none !important;
  border-color: #1d5ea8 !important;
  box-shadow: 0 0 0 3px rgba(29, 94, 168, 0.15) !important;
}
.faw-form input:focus,
.faw-form textarea:focus,
.faw-form select:focus {
  outline: none;
  border-color: #1d5ea8;
  box-shadow: 0 0 0 3px rgba(29, 94, 168, 0.15);
}
.faw-form fieldset {
  border: 1px solid #e3eaf2;
  border-radius: 10px;
  padding: 10px 12px;
}
.faw-form legend {
  font-weight: 700;
  color: #0a2239;
}
.faw-form .form-actions {
  margin-top: 16px;
}
.faw-form .btn {
  padding: 10px 20px;
  background: #1d5ea8;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}
.faw-form .btn:hover {
  background: #184f8d;
}

.ui-footer {
  margin-top: 40px;
  border-top: 1px solid #e3eaf2;
  background: #ffffff;
}
.ui-footer__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px;
  color: #737986;
}
/* Modern top nav */
.ui-nav {
  background: #ffffff;
  border-bottom: 1px solid #e3eaf2;
}
.ui-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.ui-nav__list {
  list-style: none;
  margin: 0;
  padding: 0 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.ui-nav__item {
}
.ui-nav__link {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 8px;
  color: #0a2239;
  text-decoration: none;
  font-weight: 600;
}
.ui-nav__link:visited {
  color: #0a2239;
}
.ui-nav__link:active {
  color: #184f8d;
}
.ui-nav__link:hover {
  background: #eef4fb;
  color: #184f8d;
}

/* Modern dropdown for ui-nav */
.ui-has-sub {
  position: relative;
}
.ui-subnav {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  max-width: 320px;
  width: auto;
  background: #fff;
  border: 1px solid #e3eaf2;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(10, 34, 57, 0.12);
  display: none;
  z-index: 1000;
}
.ui-subnav__item {
}
.ui-subnav__link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: #0a2239;
  text-decoration: none;
  font-weight: 600;
}
.ui-subnav__link:visited {
  color: #0a2239;
}
.ui-subnav__link:hover {
  background: #f6f9fc;
}
.ui-has-sub:hover > .ui-subnav,
.ui-has-sub:focus-within > .ui-subnav {
  display: block;
}
/* ensure submenu overlays content, not push */
.ui-nav {
  position: relative;
  z-index: 100;
}
/* Modern enhancements while preserving legacy layout and colors */

/* Base typography */
html,
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.4;
  color: #0a2239; /* dark blue-ish for good contrast */
  background: #f2f6fb; /* soft light background */
}

/* Headings */
h1,
h2,
h3 {
  font-weight: 600;
  color: #0a2239;
  margin: 0.2em 0 0.6em;
}

/* Buttons */
input[type="button"],
input[type="submit"],
button,
.btn {
  background: #1d5ea8; /* existing blue tone */
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 160ms ease-in-out, transform 60ms ease-in-out;
}
input[type="button"]:hover,
input[type="submit"]:hover,
button:hover,
.btn:hover {
  background: #184f8d; /* darker on hover */
}
input[type="button"]:active,
input[type="submit"]:active,
button:active,
.btn:active {
  transform: translateY(1px);
}

/* Inputs */
input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #c9d6e2;
  border-radius: 6px;
  background: #fff;
}
textarea {
  min-height: 90px;
}

/* Content card */
.minheight,
.maintable_content {
  background: #ffffff;
}

/* Keep legacy full-width layout */
#main {
}

.maintable_back {
  padding: 12px;
  background: none !important; /* remove legacy background image line that stops mid-page */
}

/* Top area */
.topheading,
.titel h2 {
  color: #0a2239;
}

/* Replace legacy header strip with clean gradient */
td.titel {
  background-image: none !important;
  background: linear-gradient(180deg, #eef3f9 0%, #dde6f2 100%);
  border: 1px solid #c7d3e3;
  border-radius: 10px;
}
.titel h2 {
  font-size: 18px;
  padding: 8px 12px; /* ensure text sits nicely inside the grey area */
  margin: 0;
}

/* Title bar refinement */
.titel {
  background: linear-gradient(#f2f5f9, #d9e2ee);
  border-bottom: 1px solid #c7d3e3;
  padding: 6px 12px;
}
.

/* Navigation strip */
.nav,
.sitenav,
.sitenav2 {
  font-size: 14px;
}

.loginbalk .loginbalk_padding {
  padding: 8px 10px;
}

/* Tables (project lists, forms) */
table {
  border-collapse: collapse;
}
td,
th {
  padding: 6px 8px;
}

.project-table th {
  background: #e8f0fa;
  color: #0a2239;
}
.project-table tr.project:nth-child(even) td {
  background: #f8fbff;
}

/* Login form modern look without touching markup */
form[name="login"] table {
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  padding: 22px 18px;
  box-shadow: 0 10px 24px rgba(13, 42, 88, 0.08);
}
form[name="login"] td[align="right"] {
  padding: 8px 10px;
}
input.zoeken {
  width: 320px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #c9d6e2;
  border-radius: 8px;
  background: #fff;
}
input.zoekbutton {
  background: #1d5ea8;
  color: #fff;
  border: none;
  padding: 11px 18px;
  border-radius: 22px; /* pill button */
  cursor: pointer;
  transition: background 160ms ease-in-out, transform 60ms ease-in-out;
}
input.zoekbutton:hover {
  background: #184f8d;
}
input.zoekbutton:active {
  transform: translateY(1px);
}

/* DD menu light tweaks only (avoid structural changes) */
.ddmenu .ddmenuitem {
  padding: 2px 8px;
}
.ddmenu .ddmenuitem a {
  font-weight: 500;
  text-decoration: none;
  color: #0a2239;
}
.ddmenu .ddmenuitem:hover a {
  color: #184f8d;
}

/* Responsive tweaks */
@media (max-width: 820px) {
  .maintable_back table[width="100%"],
  .maintable_content table[width="726"],
  .maintable_content table[width="746"] {
    width: 100% !important;
  }

  .loginbalk {
    text-align: right;
  }
}

/* Footer */
.maintable_footer {
  padding: 8px 0;
}

/* File upload styling */
.ui-field input[type="file"],
input[type="file"] {
  width: 100%;
  padding: 8px 12px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  background: #fafafa;
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
  cursor: pointer;
}

.ui-field input[type="file"]:hover,
input[type="file"]:hover {
  border-color: #1d5ea8;
  background: #f8f9ff;
}

.ui-field input[type="file"]:focus,
input[type="file"]:focus {
  outline: none;
  border-color: #1d5ea8;
  box-shadow: 0 0 0 3px rgba(29, 94, 168, 0.1);
}

/* Toestemming info styling */
.ui-info {
  background: #f8f9ff;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.ui-info h3 {
  color: #1d5ea8;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.ui-info p {
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.ui-info p:last-child {
  margin-bottom: 0;
}

/* File list styling */
.ui-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ui-file-list li {
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 14px;
}
.ui-file-list a {
  color: #1d5ea8;
}

/* Project description styling */
.project-description,
.declaration-description {
  line-height: 1.6;
  color: #3a4a5a;
  margin-bottom: 16px;
}
.amount-info {
  padding: 12px 16px;
  background: #e8f4e8;
  border-radius: 8px;
  color: #2a5a2a;
  margin-bottom: 16px;
}

.ui-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ui-badge--success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #81c784;
}

/* Form data styling */
.ui-form-data {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
}

.ui-form-data h4 {
  color: #1d5ea8;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.ui-form-field {
  display: flex;
  margin-bottom: 8px;
  padding: 4px 0;
}

.ui-form-label {
  font-weight: 600;
  color: #333;
  min-width: 200px;
  flex-shrink: 0;
}

.ui-form-value {
  color: #666;
  flex: 1;
  word-break: break-word;
}
