:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --border: #d8e1ee;
  --border-soft: #e7edf5;
  --section-head: #f4f8fe;
  --primary: #1554c0;
  --primary-soft: #eaf2ff;
  --primary-text: #ffffff;
  --danger: #b3261e;
  --shadow: 0 6px 18px rgba(25, 45, 80, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

.panel-shell,
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card { padding: 18px; }

.panel-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 10px;
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text);
}

.title-icon {
  font-size: 30px;
  color: var(--primary);
}

.top-links,
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.page-header { margin-bottom: 14px; }

.text-link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #cfe0f9;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.text-link-button:hover { background: var(--primary-soft); text-decoration: none; }
.logout-link { color: var(--primary); }
.subtle-link { color: #5c7397; }

.panel-content { padding: 0 18px 18px; }

.key-badge,
.key-info {
  display: inline-block;
  margin: 4px 0 16px;
  padding: 8px 12px;
  border: 1px solid #cfe0f9;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
}

.section-card {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 3px 10px rgba(30, 55, 95, 0.04);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 18px;
  background: var(--section-head);
  border-bottom: 1px solid var(--border-soft);
  color: var(--primary);
}

.section-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.section-body {
  padding: 18px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 74px;
  padding: 14px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
}

.field-icon {
  flex: 0 0 auto;
  min-width: 24px;
  margin-top: 2px;
  color: var(--primary);
  font-size: 23px;
  text-align: center;
}

.field-content {
  flex: 1 1 auto;
  min-width: 0;
}

.field-content label,
.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #1f2937;
}

.field-content input,
.field input,
.field textarea,
.field-content textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 11px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}

.field-card input,
.field-card textarea {
  border-color: transparent;
  padding: 3px 0 0;
  border-radius: 0;
  font-size: 15px;
  background: transparent;
}

.field-card input:focus,
.field-card textarea:focus {
  outline: none;
}

.field-card:focus-within {
  border-color: #9ebff4;
  box-shadow: 0 0 0 3px rgba(21, 84, 192, 0.10);
}

.readonly-field input[readonly] {
  color: #1f2937;
  cursor: default;
}

.full-field { min-height: 50px; }

.sr-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.action-row { margin: 10px 0 18px; }

.action-button {
  border: none;
  border-radius: 7px;
  padding: 11px 18px;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(21, 84, 192, 0.18);
}

.action-button:disabled { opacity: .6; cursor: not-allowed; }
.secondary-action { background: #364b66; }
.success-action { background: #219653; box-shadow: 0 2px 8px rgba(33, 150, 83, 0.18); }

.message {
  min-height: 20px;
  margin: 10px 18px;
  color: var(--muted);
  white-space: pre-wrap;
}

.card .message { margin: 12px 0 0; }

.inline-message {
  min-height: 20px;
  font-size: 14px;
  white-space: pre-wrap;
}
.inline-message.info { color: var(--text); }
.inline-message.error { color: var(--danger); }

.hidden { display: none !important; }
.sr-only-message { display: none; }

/* Login form compatibility */
.field { margin-bottom: 12px; }
.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 48px; }
.icon-button {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.eye-toggle { color: #111827; }
.eye-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50% / 60%;
}
.eye-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.eye-toggle.is-hidden .eye-icon::after {
  content: "";
  position: absolute;
  left: -5px;
  top: 5px;
  width: 34px;
  height: 3px;
  background: #d93025;
  border-radius: 2px;
  transform: rotate(-32deg);
  transform-origin: center;
}

@media (max-width: 560px) {
  .page { padding: 10px; }
  .panel-topbar { align-items: flex-start; }
  .title { font-size: 23px; }
  .grid-two { grid-template-columns: 1fr; }
  .section-body { padding: 14px; }
  .field-card { min-height: 68px; }
  .subtle-link { display: none; }
}


/* 20260428-100 refinements: requested icon style and editable input borders */
.line-icon[class*="icon-"],
.nav-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-color: var(--primary);
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  color: transparent;
  font-size: 0;
}
.title-icon { width: 32px; height: 32px; }
.nav-icon { width: 18px; height: 18px; }
.field-icon.line-icon { width: 26px; height: 26px; min-width: 26px; margin-top: 3px; }

.icon-person {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.8-4.2 5-6 8-6s6.2 1.8 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.8-4.2 5-6 8-6s6.2 1.8 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.icon-location {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-7.1 7-13A7 7 0 0 0 5 9c0 5.9 7 13 7 13z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-7.1 7-13A7 7 0 0 0 5 9c0 5.9 7 13 7 13z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.icon-home {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11.5 12 4l9 7.5'/%3E%3Cpath d='M5.5 10.5V20h13v-9.5'/%3E%3Cpath d='M9.5 20v-6h5v6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11.5 12 4l9 7.5'/%3E%3Cpath d='M5.5 10.5V20h13v-9.5'/%3E%3Cpath d='M9.5 20v-6h5v6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.icon-logout {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E") center / contain no-repeat;
}
.icon-shield {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.icon-crown {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 5 5 4-8 4 8 5-5-2 13H5L3 7z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 5 5 4-8 4 8 5-5-2 13H5L3 7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.image-field-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  margin-top: 1px;
  object-fit: contain;
  filter: saturate(1.15);
}
.death-icon { width: 30px; height: 30px; min-width: 30px; }

/* Value display fields stay clean; editable fields get a clear inner textbox border. */
.field-card input,
.field-card textarea {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 10px;
  background: #ffffff;
}
.readonly-field input[readonly] {
  border-color: transparent;
  padding: 3px 0 0;
  background: transparent;
  box-shadow: none;
}
.readonly-field:focus-within {
  border-color: var(--border);
  box-shadow: none;
}
.field-card textarea { min-height: 160px; resize: vertical; }
.text-link-button {
  border-color: #cfe0f9;
  background: #fff;
  color: var(--primary);
}
.text-link-button:hover { background: var(--primary-soft); }

.key-search-card { max-width: 260px; }
.compact-action-row { margin-bottom: 0; }
.search-section { margin-bottom: 14px; }
