/* === Global Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

body {
  background-color: white;
}

/* === Links === */
a { color: #063075; }
a:active { color: darkgray; }
a[tabindex]:focus { color: blue; outline: none; }

/* === Headings & Text === */
h1 {
  font-size: 40px;
  font-weight: normal;
  color: #04204e;
  text-align: center;
  margin-top: 40px;
}
p { text-align: center; color: rgb(100, 100, 100); }

/* === Logo === */
#hero-logo {
  width: 100%;
  height: 100px;
  object-fit: contain;
}
/* smaller variant when needed */
#hero-logo.logo-sm { height: 56px; }

/* === Containers === */
.container,
.table-margin {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.container {
  max-width: 500px;
  margin: 50px auto;
  padding: 30px;
}

.table-margin {
  max-width: 95%;
  margin: 40px auto;
  padding: 30px;
  overflow-x: auto;
}

/* Size variants for containers */
.container-lg { max-width: 700px; }
.container-xl { max-width: 900px; }
.container-xxl { max-width: 1000px; }

/* === Table Styles === */
table {
  width: 90%;
  margin: 30px auto;
  border-collapse: collapse;
  font-size: 15px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

th,
td {
  text-align: center;
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 12px;
}

/* Table header default */
th {
  background-color: #063075;
  color: white;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

th:hover { background-color: #04204e; }

/* Highlighted sorted column header */
th.active-sort,
th.sorted-col {
  background-color: #042d4e;
  color: white;
  font-weight: bold;
  transition: background-color 0.2s ease;
  cursor: pointer;
}
th.active-sort.asc::after { content: " ▲"; font-size: 0.8em; }
th.active-sort.desc::after { content: " ▼"; font-size: 0.8em; }

tr:nth-child(even) { background-color: #f4f9ff; }
tr:hover { background-color: #e8f0fe; }

/* Center titles inside table cards */
.table-margin h1 { text-align: center; }

/* === Form and Text Blocks === */
.form p,
#profile-intro p,
#profile-links p {
  text-align: left;
  color: #04204e;
}

#profile-intro p { padding-left: 2%; padding-bottom: 5%; }
#profile-links p { padding-left: 2%; padding-bottom: 1%; }
#logged-out-profile p { padding: 2% 0; font-size: 11.5px; }
.form p { margin: 2% 0 2% 10%; font-size: 13px; }

/* === Form Elements === */
select,
input[type="file"],
input[type="text"],
input[type="password"],
input[type="email"],
.datepicker {
  border: 2px solid lightskyblue;
  border-radius: 6px;
  background-color: #eff6ff;
  width: 100%;
  padding: 10px 20px;
  margin: 8px 0;
  color: #636363;
}

/* File Upload Button */
input[type="file"]::file-selector-button {
  background-color: #063075;
  border: none;
  padding: 10px 25px;
  font-size: 14px;
  color: white;
  border-radius: 18px;
  cursor: pointer;
  transition: background-color 0.4s ease;
}
input[type="file"]::file-selector-button:hover { background-color: lightskyblue; }

/* Field error text */
.field-error { color: #b91c1c; font-size: 12px; }

/* === Buttons === */
button[type="submit"],
.btn.btn-primary,
.btn.btn-success,
.button {
  background-color: #063075;
  border: none;
  padding: 10px 25px;
  font-size: 14px;
  color: white;
  border-radius: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  margin: 1px;
}
button[type="submit"]:hover,
.btn.btn-primary:hover,
.btn.btn-success:hover,
.button:hover {
  background-color: lightskyblue;
  color: white;
}

/* === Multi-Select === */
.multi-select-container {
  padding: 10px 20px;
  margin: 8px 0;
  height: 190px;
  border: 2px solid lightskyblue;
  border-radius: 6px;
  background-color: #eff6ff;
  width: 40%;
}

/* === New: Utilities & small components === */

/* Inline row */
.row-inline { display: flex; align-items: center; gap: 10px; }
.gap-12 { gap: 12px; }

/* Flash messages */
.flash { list-style: none; padding-left: 0; margin-top: 12px; }
.flash li { padding: 8px 12px; border-radius: 8px; margin: 6px 0; }
.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Pills */
.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-block;
  border: 1px solid transparent;
}
.pill-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.pill-muted   { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }

/* Spacing helpers */
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-25 { margin-top: 25px; }
.px-30 { padding-left: 30px; padding-right: 30px; }
.pb-20 { padding-bottom: 20px; }

/* Width helpers */
.w-full { width: 100%; max-width: 100%; }
.w-30 { width: 30%; }

/* Alignment helpers */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-primary { color: #04204e; }
.m-auto { margin: 0 auto; }

/* Simple header wrapper */
.page-header { max-width: 900px; margin: 30px auto; }

/* <details> pretties */
.summary-toggle { cursor: pointer; color: #063075; }
.pre-box {
  white-space: pre-wrap;
  background: #f9fafb;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-top: 8px;
}

/* Toggle bar/buttons (registeredTM & car) */
.toggle-bar {
  max-width: 1200px;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.toggle-btn {
  border: 2px solid #063075;
  background: transparent;
  color: #063075;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}
.toggle-btn.active { background: #063075; color: #fff; }

/* Sections & grids (upload.html) */
.section {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.section--compact { padding: 12px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; }
.full { grid-column: 1 / -1; }

label { font-weight: 600; display: block; margin-bottom: 4px; }

.hint { font-size: 12px; color: #6b7280; }

/* Lists & visibility */
.list-unstyled { list-style: none; padding-left: 0; }
.list-disc { list-style: disc; }
.pl-20 { padding-left: 20px; }
.hidden { display: none; }
