/* Extracted from user's inline styles for RouteWatch */
:root {
  --primary: #0051a8;
  --primary-light: #e8f0fa;
  --accent: #ffb700;
  --danger: #e74c3c;
  --success: #27ae60;
  --border-radius: 8px;
  --shadow: 0 2px 24px 0 rgba(0,32,72,0.09);
  --grey-bg: #f8fafd;
  --grey-border: #e2e6ea;
  --grey-text: #6c7a91;
  --font-main: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--grey-bg);
  font-family: var(--font-main);
  color: #222;
  font-size: 16px;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
header {
  background: linear-gradient(90deg, var(--primary) 60%, #003366 100%);
  color: white;
  padding: 2rem 0 1.2rem 0;
  box-shadow: var(--shadow);
  text-align: center;
  letter-spacing: 0.02em;
}
header .logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 0.2rem;
}
header img {
  height: 48px;
  width: auto;
  vertical-align: middle;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  background: white;
}
header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  letter-spacing: 0.03em;
}
header p {
  font-size: 1.05rem;
  color: #e8f0fa;
  margin: 0.2rem 0 0 0;
  font-weight: 400;
  letter-spacing: 0.01em;
}
/* user row in header */
.user-row{display:flex;justify-content:center;gap:0.7rem;margin-top:0.6rem;align-items:center}
.user-name{color:#e8f0fa;font-weight:500}
.btn-ghost{background:transparent;border:1px solid rgba(255,255,255,0.12);color:#e8f0fa;padding:6px 10px;border-radius:8px;text-decoration:none}
.btn-ghost:hover{opacity:0.95}
main {
  /* Wider main content area for desktop while remaining responsive */
  max-width: 740px; /* increased from 740px */
  width: calc(100% - 4rem); /* keep side padding on very small screens */
  margin: 2.5rem auto 1.5rem auto;
  padding: 2rem 2rem 1.5rem 2rem;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  min-height: 350px;
}
.form-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}
.search-label {
  font-weight: 500;
  margin-bottom: 0.2rem;
  color: var(--primary);
}
.search-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: relative;
}
.headcode-label {
  font-weight: 500;
  margin-bottom: 0.2rem;
  color: var(--primary);
}
.headcode-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: relative;
}
.date-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.4rem;
  margin-bottom: 0.2rem;
}
.date-label {
  font-weight: 500;
  color: var(--primary);
  font-size: 1.02em;
  min-width: 75px;
}
input[type="text"] {
  flex: 1;
  padding: 0.75rem 1.1rem;
  border: 1.5px solid var(--grey-border);
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  transition: border 0.2s;
  background: var(--grey-bg);
  outline: none;
  color: #2a3343;
}
input[type="text"]:focus {
  border: 1.5px solid var(--primary);
  background: #f6fbff;
}
input[type="date"] {
  padding: 0.75rem 1.1rem;
  border: 1.5px solid var(--grey-border);
  border-radius: var(--border-radius);
  font-size: 1.10rem;
  transition: border 0.2s;
  background: var(--grey-bg);
  outline: none;
  color: #2a3343;
  min-width: 165px;
  max-width: 190px;
}
input[type="date"]:focus {
  border: 1.5px solid var(--primary);
  background: #f6fbff;
}
button {
  padding: 0.7rem 1.7rem;
  border-radius: var(--border-radius);
  border: none;
  font-size: 1.08rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,81,168,0.07);
  transition: background 0.18s;
  outline: none;
}
button:disabled {
  background: #b6c6dc;
  color: #f4f4f4;
  cursor: not-allowed;
}
button:hover:not(:disabled) {
  background: #003366;
}
#suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 102%;
  z-index: 10;
  background: #fff;
  border: 1.5px solid var(--grey-border);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 16px rgba(0,32,72,0.11);
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: 0.15rem 0 0.15rem 0;
  list-style: none;
  font-size: 1.03rem;
}
#suggestions li {
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  transition: background 0.16s;
  border-bottom: 1px solid #f2f3f7;
  color: #253052;
}
#suggestions li:last-child {
  border-bottom: none;
}
#suggestions li:hover, #suggestions li.active {
  background: var(--primary-light);
  color: var(--primary);
}
#data {
  margin-top: 2.1rem;
  min-height: 60px;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,32,72,0.07);
}
th, td {
  padding: 0.85rem 0.7rem;
  text-align: left;
  border-bottom: 1.5px solid var(--grey-border);
  font-size: 1.01rem;
}
th {
  background: var(--primary-light);
  font-weight: 600;
  color: var(--primary);
  border-bottom: 2.2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1;
}
tr:last-child td {
  border-bottom: none;
}
tr {
  transition: background 0.12s;
}
tr:hover td {
  background: #f8fafd;
}
.status-chip {
  display: inline-block;
  padding: 0.18em 0.9em;
  border-radius: 13px;
  font-size: 0.99em;
  background: #f5f7fa;
  color: var(--grey-text);
  font-weight: 500;
}
.status-chip.sso-yes {
  background: var(--success);
  color: #fff;
}
.status-chip.sso-no {
  background: var(--danger);
  color: #fff;
}
.action-btn {
  padding: 0.44em 1.2em;
  border-radius: 7px;
  font-weight: 500;
  font-size: 0.97em;
  border: none;
  outline: none;
  cursor: pointer;
  transition: background 0.15s;
  color: #fff;
  margin: 0 0.08em;
}
.action-btn.add {
  background: var(--success);
}
.action-btn.add:hover:not(:disabled) {
  background: #219150;
}
.action-btn.remove {
  background: var(--danger);
}
.action-btn.remove:hover:not(:disabled) {
  background: #c0392b;
}
.action-btn:disabled {
  background: #e5e9f0;
  color: #a0a6b2;
  cursor: not-allowed;
}
.error-message, .empty-message {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--danger);
  font-weight: 500;
  background: #fff3f3;
  border: 1.5px solid #f6d4d4;
  border-radius: var(--border-radius);
  padding: 1.1rem;
  margin: 1rem 0 0 0;
  font-size: 1.08rem;
}
.empty-message {
  color: var(--primary);
  background: #f5fbff;
  border: 1.5px solid #c8e4fb;
}
@media (max-width: 540px) {
  main {
    padding: 1.1rem 0.6rem 1rem 0.6rem;
  }
  header img { height: 36px; }
  header h1 { font-size: 1.25rem; }
  th, td { font-size: 0.98rem; padding: 0.5rem 0.3rem; }
  .date-label { min-width: 0; font-size: 0.98em; }
}
