/* ==========================================================================
   THMS User Manual — Neo-Tactile Soft UI Theme
   Warm · Clean · Comfortable · Calming for all users
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

/* --- Soft Warm Palette --- */
:root {
  --primary: #6B8F71;
  --primary-hover: #5A7A60;
  --primary-light: #E8F0E9;
  --accent: #A67C5B;
  --accent-light: #F5EDE6;
  --success: #7BA882;
  --warning: #C4A35A;
  --warning-light: #FDF8EE;
  --danger: #C07070;
  --danger-light: #FDF0F0;

  --bg: #F5F2EE;
  --bg-warm: #FAF8F5;
  --card-bg: #FFFFFF;
  --sidebar-bg: #FAFAF8;

  --text: #3D3D3D;
  --text-soft: #5C5C5C;
  --text-muted: #8C8C8C;
  --text-heading: #4A5548;

  --border: #E8E4DF;
  --border-soft: #F0ECE8;

  --shadow-subtle: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-soft: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-gentle: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-elevated: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-inner: inset 0 2px 4px rgba(0,0,0,0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --sidebar-width: 280px;
}

/* --- Base --- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* --- Steps (Soft numbered circles) --- */
.steps-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
}

.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding: 14px 0 14px 54px;
  margin-bottom: 6px;
  font-size: 16px;
  color: var(--text-soft);
}

.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 12px;
  width: 34px;
  height: 34px;
  background: linear-gradient(145deg, var(--primary-light), #D4E4D6);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  box-shadow: var(--shadow-soft), inset 0 -1px 2px rgba(0,0,0,0.04);
}

/* --- Screenshot Placeholder (Inner shadow style) --- */
.screenshot-placeholder {
  background: var(--bg-warm);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 44px 20px;
  text-align: center;
  color: var(--text-muted);
  margin: 22px 0;
  font-size: 14px;
  box-shadow: var(--shadow-inner);
}

.screenshot-placeholder i {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}

.screenshot-placeholder img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.figure-caption {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

/* --- Tables (Warm soft rows) --- */
.manual-section table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  font-size: 17px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--border-soft);
}

.manual-section table th {
  background: linear-gradient(145deg, var(--primary), var(--primary-hover));
  color: #FFFFFF;
  padding: 14px 20px;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.manual-section table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-soft);
}

.manual-section table tr:last-child td {
  border-bottom: none;
}

.manual-section table tr:nth-child(even) {
  background-color: var(--bg-warm);
}

.manual-section table tr:hover td {
  background-color: var(--primary-light);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  line-height: 1.9;
  color: var(--text);
  background-color: #FAF8F5;
  background-image: url('../../../assets/Landing/img/news/leaft-bg.png');
  background-repeat: repeat;
  background-size: 500px;
  background-attachment: fixed;
  background-blend-mode: multiply;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--text-heading);
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

h1 { font-size: 36px; }
h2 { font-size: 30px; padding-bottom: 10px; border-bottom: 2px solid var(--border-soft); }
h3 { font-size: 24px; color: var(--accent); }
h4 { font-size: 20px; }

p { margin-bottom: 1.2em; color: var(--text-soft); }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }

/* --- Layout --- */
.manual-wrapper { display: flex; min-height: 100vh; }

/* --- Sidebar --- */
.manual-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px 0;
  z-index: 100;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-subtle);
}

.sidebar-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 6px;
}

.sidebar-header h5 {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0;
}

.btn-back-holiday {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #FFFFFF;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-subtle);
}

.btn-back-holiday:hover {
  background: var(--primary-hover);
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-soft);
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-right: 8px;
  transition: all 0.2s ease;
}

.sidebar-nav li a:hover {
  background-color: var(--primary-light);
  border-left-color: var(--primary);
  text-decoration: none;
  color: var(--primary);
}

.sidebar-nav li a.active {
  background-color: var(--primary-light);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-inner);
}

.sidebar-nav li a i {
  font-size: 15px;
  width: 20px;
  text-align: center;
  color: var(--primary);
  opacity: 0.8;
}

/* --- Main Content --- */
.manual-content {
  margin-left: var(--sidebar-width);
  padding: 40px 60px;
  max-width: 1100px;
  width: calc(100% - var(--sidebar-width));
}

/* --- Cover Section --- */
.cover-section {
  text-align: center;
  padding: 70px 40px;
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--text);
  border-radius: var(--radius-xl);
  margin-bottom: 50px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-gentle);
  position: relative;
  backdrop-filter: blur(4px);
}

.cover-section h1 {
  font-size: 38px;
  color: var(--text-heading);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.cover-section h2 {
  font-size: 24px;
  color: var(--accent);
  border: none;
  padding: 0;
  font-weight: 500;
}

.cover-section .cover-version {
  margin-top: 36px;
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Cover Search Bar --- */
.cover-search {
  max-width: 480px;
  margin: 30px auto 0;
  position: relative;
}

.cover-search .search-input-wrapper input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cover-search .search-input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(107, 143, 113, 0.15), var(--shadow-soft);
}

.cover-search .search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.cover-search .search-input-wrapper > i.bi-search {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 17px;
  pointer-events: none;
}

.cover-search .search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.cover-search .search-clear:hover {
  color: var(--danger);
}

.cover-search .search-results {
  margin-top: 8px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  text-align: left;
}

.cover-section .cover-org {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* --- Section Cards (Raised Card style) --- */
.manual-section {
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-gentle);
  border: 1px solid var(--border-soft);
  transition: box-shadow 0.2s ease;
  backdrop-filter: blur(4px);
}

.manual-section:hover {
  box-shadow: var(--shadow-elevated);
}

/* --- Callout Boxes --- */
.callout {
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 22px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 16px;
  box-shadow: var(--shadow-subtle);
}

.callout i { font-size: 20px; margin-top: 2px; }

.callout-info {
  background-color: var(--primary-light);
  border: 1px solid #D1E3D4;
}
.callout-info i { color: var(--primary); }

.callout-warning {
  background-color: var(--warning-light);
  border: 1px solid #F0E4C8;
}
.callout-warning i { color: var(--warning); }

.callout-tip {
  background-color: var(--accent-light);
  border: 1px solid #E8DAC8;
}
.callout-tip i { color: var(--accent); }

.callout-danger {
  background-color: var(--danger-light);
  border: 1px solid #EACACA;
}
.callout-danger i { color: var(--danger); }

/* --- Mobile Toggle (Soft pill button) --- */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  background: var(--card-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-gentle);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mobile-toggle:hover {
  box-shadow: var(--shadow-elevated);
  transform: translateY(-1px);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(61, 61, 61, 0.2);
  backdrop-filter: blur(2px);
  z-index: 90;
}

/* --- Back to Top (Elevated float) --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--card-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-elevated);
  transition: all 0.2s ease;
  z-index: 50;
}

.back-to-top:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
  display: flex;
}

/* --- Search Box (Soft tactile input) --- */
.sidebar-search {
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper > i.bi-search {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 11px 36px 11px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  background: var(--card-bg);
  color: var(--text);
  box-shadow: var(--shadow-inner);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 143, 113, 0.12), var(--shadow-inner);
}

.search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.search-clear:hover {
  color: var(--danger);
}

/* --- Steps (Numbered circles) --- */
.steps-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
}

.steps-list[start] {
  counter-reset: step-counter calc(attr(start type(<integer>), 1) - 1);
}

.steps-list[start="2"] { counter-reset: step-counter 1; }
.steps-list[start="3"] { counter-reset: step-counter 2; }
.steps-list[start="4"] { counter-reset: step-counter 3; }
.steps-list[start="5"] { counter-reset: step-counter 4; }
.steps-list[start="6"] { counter-reset: step-counter 5; }
.steps-list[start="7"] { counter-reset: step-counter 6; }
.steps-list[start="8"] { counter-reset: step-counter 7; }
.steps-list[start="9"] { counter-reset: step-counter 8; }
.steps-list[start="10"] { counter-reset: step-counter 9; }
.steps-list[start="11"] { counter-reset: step-counter 10; }
.steps-list[start="12"] { counter-reset: step-counter 11; }

.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding: 16px 0 16px 58px;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--text-soft);
}

.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 14px;
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, var(--primary), var(--primary-hover));
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 2px 6px rgba(107, 143, 113, 0.3);
}

/* --- Screenshot Placeholder --- */
.screenshot-placeholder {
  background: var(--bg-warm);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 44px 20px;
  text-align: center;
  color: var(--text-muted);
  margin: 22px 0;
  font-size: 14px;
  box-shadow: var(--shadow-inner);
}

.screenshot-placeholder i {
  font-size: 34px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}

.screenshot-placeholder img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.figure-caption {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

/* --- Tables --- */
.manual-section table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  font-size: 17px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.manual-section table th {
  background: linear-gradient(145deg, var(--primary), var(--primary-hover));
  color: #FFFFFF;
  padding: 14px 20px;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.manual-section table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-soft);
}

.manual-section table tr:last-child td {
  border-bottom: none;
}

.manual-section table tr:nth-child(even) {
  background-color: var(--bg-warm);
}

.manual-section table tr:hover td {
  background-color: var(--primary-light);
}

/* --- Search Results Dropdown --- */
.search-results {
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
}

.search-results .search-result-item {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-results .search-result-item:last-child {
  border-bottom: none;
}

.search-results .search-result-item:hover {
  background-color: var(--primary-light);
}

.search-results .search-result-item .result-section {
  font-weight: 600;
  color: var(--primary);
  font-size: 12px;
  display: block;
  margin-bottom: 2px;
}

.search-results .search-result-item .result-text {
  font-size: 12px;
  color: var(--text-muted);
}

.search-results .search-result-item .result-text mark {
  background-color: #FDF3D4;
  color: var(--text);
  padding: 1px 3px;
  border-radius: 3px;
}

.search-results .search-no-results {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* --- Search Highlight in Content --- */
.search-highlight {
  background-color: #FDF3D4;
  padding: 3px 5px;
  border-radius: 4px;
  outline: 2px solid var(--warning);
  transition: outline-color 0.3s ease;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .manual-sidebar {
    transform: translateX(-100%);
  }

  .manual-sidebar.open {
    transform: translateX(0);
  }

  .manual-content {
    margin-left: 0;
    padding: 28px 20px;
    padding-top: 70px;
  }

  .mobile-toggle {
    display: block;
  }

  .mobile-overlay.active {
    display: block;
  }

  .cover-section {
    padding: 48px 24px;
  }

  .cover-section h1 {
    font-size: 28px;
  }

  .cover-section h2 {
    font-size: 18px;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 16px;
  }

  h2 { font-size: 24px; }
  h3 { font-size: 19px; }

  .manual-section {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }

  .steps-list li {
    padding-left: 46px;
    font-size: 15px;
  }

  .callout {
    padding: 14px 16px;
    font-size: 14px;
  }
}

/* --- Print Styles --- */
@media print {
  .manual-sidebar,
  .mobile-toggle,
  .back-to-top,
  .mobile-overlay,
  .sidebar-search {
    display: none !important;
  }

  .manual-content {
    margin-left: 0;
    padding: 0;
    max-width: 100%;
  }

  .manual-section {
    box-shadow: none;
    border: none;
    page-break-inside: avoid;
    margin-bottom: 20px;
    padding: 20px 0;
    transform: none;
  }

  .manual-section:hover {
    box-shadow: none;
    transform: none;
  }

  .cover-section {
    background: none !important;
    border: 2px solid var(--border);
    page-break-after: always;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    background: #FFFFFF;
    color: #000000;
  }

  h2 {
    font-size: 16pt;
    color: #333333;
  }

  .callout {
    border: 1px solid #CCC;
    box-shadow: none;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }

  .sidebar-nav a::after {
    content: none;
  }
}

/* --- Mobile Toggle --- */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 200;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(61, 61, 61, 0.3);
  backdrop-filter: blur(2px);
  z-index: 90;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--card-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gentle);
  transition: all 0.2s ease;
  z-index: 50;
}

.back-to-top:hover {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-elevated);
}

.back-to-top.visible {
  display: flex;
}

/* --- Search Box --- */
.sidebar-search {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
}

/* --- Search Keywords --- */
.search-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.search-keyword {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid #D1E3D4;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.search-keyword:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: var(--shadow-soft);
}

.cover-keywords {
  justify-content: center;
  margin-top: 12px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper > i.bi-search {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 10px 36px 10px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-inner);
}

.search-input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 143, 113, 0.15);
}

.search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
}

.search-clear:hover { color: var(--danger); }

/* --- Search Results --- */
.search-results {
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-gentle);
}

.search-results .search-result-item {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-results .search-result-item:last-child { border-bottom: none; }
.search-results .search-result-item:hover { background-color: var(--primary-light); }

.search-results .search-result-item .result-section {
  font-weight: 600;
  color: var(--primary);
  font-size: 12px;
  display: block;
  margin-bottom: 2px;
}

.search-results .search-result-item .result-text {
  font-size: 12px;
  color: var(--text-muted);
}

.search-results .search-result-item .result-text mark {
  background-color: #FEF3C7;
  color: var(--text);
  padding: 0 2px;
  border-radius: 2px;
}

.search-results .search-no-results {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.search-highlight {
  background-color: #FEF3C7;
  padding: 2px 4px;
  border-radius: 4px;
  outline: 2px solid var(--warning);
  transition: outline 0.3s ease;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .manual-sidebar {
    transform: translateX(-100%);
  }

  .manual-sidebar.open {
    transform: translateX(0);
  }

  .manual-content {
    margin-left: 0;
    padding: 28px 18px;
    padding-top: 68px;
  }

  .mobile-toggle {
    display: block;
  }

  .mobile-overlay.active {
    display: block;
  }

  .cover-section {
    padding: 44px 20px;
  }

  .cover-section h1 { font-size: 28px; }
  .cover-section h2 { font-size: 20px; }
}

@media (max-width: 576px) {
  body { font-size: 16px; }
  h2 { font-size: 24px; }
  h3 { font-size: 19px; }

  .manual-section {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }

  .steps-list li {
    padding-left: 46px;
    font-size: 16px;
  }

  .steps-list li::before {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
}

/* --- Print Styles --- */
@media print {
  .manual-sidebar,
  .mobile-toggle,
  .back-to-top,
  .mobile-overlay,
  .sidebar-search {
    display: none !important;
  }

  .manual-content {
    margin-left: 0;
    padding: 0;
    max-width: 100%;
  }

  .manual-section {
    box-shadow: none;
    border: none;
    page-break-inside: avoid;
    margin-bottom: 16px;
    padding: 16px 0;
  }

  .cover-section {
    background: none !important;
    background-image: none !important;
    border: 2px solid var(--text-heading);
    page-break-after: always;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
    background-image: none !important;
    background-color: #fff !important;
  }

  h2 { font-size: 16pt; }

  .callout { border: 1px solid #ccc; box-shadow: none; }

  table { box-shadow: none; }
}

/* --- Registration Blocks --- */
.registration-block {
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin: 24px 0;
}

.registration-block h4 {
  margin-top: 0;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.registration-retiree {
  background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
  border-left: 5px solid var(--primary);
}

.registration-retiree h4 {
  color: var(--primary);
}

.registration-subsidiary {
  background: linear-gradient(135deg, #FFF3E0, #FFF8E1);
  border-left: 5px solid var(--accent);
}

.registration-subsidiary h4 {
  color: var(--accent);
}

/* --- Image Lightbox --- */
.screenshot-placeholder img {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.screenshot-placeholder img:hover {
  opacity: 0.85;
}

.image-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  cursor: zoom-out;
}

.image-lightbox.active {
  display: flex;
}

.image-lightbox .lightbox-img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  animation: lightboxFadeIn 0.25s ease;
}

.image-lightbox .lightbox-caption {
  color: #FFFFFF;
  font-size: 14px;
  margin-top: 16px;
  text-align: center;
  opacity: 0.8;
}

.image-lightbox .lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.image-lightbox .lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes lightboxFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Section decorative icons --- */
.manual-section h2 + img {
  float: right;
  margin-top: -40px;
}

@media (max-width: 576px) {
  .manual-section h2 + img {
    display: none;
  }
}

@media print {
  .manual-section h2 + img {
    display: none;
  }
}
