/* ============================================================
   HOK SHARED STYLES  —  hok-styles.css
   Hands of the Kingdom, Inc.
   Load this file on every page BEFORE any page-specific CSS.
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Brand palette */
  --blue:         #1B3A6B;
  --blue-dark:    #0d2244;
  --blue-mid:     #1a3560;
  --silver:       #C8D6E5;
  --silver-dark:  #a0b4c8;

  /* Neutrals */
  --white:        #ffffff;
  --light:        #f4f7fc;
  --border:       #d0dae8;
  --border-light: #eef1f6;
  --text:         #222222;
  --muted:        #666666;

  /* Semantic */
  --green:  #27ae60;
  --red:    #e74c3c;
  --amber:  #f39c12;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(27,58,107,0.07);
  --shadow-md: 0 4px 20px rgba(27,58,107,0.10);
  --shadow-lg: 0 8px 32px rgba(27,58,107,0.14);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Nav */
  --nav-height: 64px;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--light);
  color: var(--text);
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
a { color: inherit; }

/* ── NAV — portal/admin fixed top bar ───────────────────────── */
.hok-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 999;
  background: var(--blue);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.20);
  box-sizing: border-box;
}

.hok-nav-logo {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.hok-nav-logo span { color: var(--silver); }

.hok-nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hok-nav-tab {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.hok-nav-tab:hover           { color: #fff; background: rgba(255,255,255,0.08); }
.hok-nav-tab.active          { background: rgba(255,255,255,0.15); color: #fff; }

.hok-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── NAV — public hamburger style ────────────────────────────── */
.hok-nav-public {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: var(--nav-height);
  box-shadow: 0 2px 12px rgba(0,0,0,0.20);
}

.hok-hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hok-hamburger span {
  display: block;
  width: 26px; height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

.hok-hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hok-hamburger.open span:nth-child(2) { opacity: 0; }
.hok-hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.hok-nav-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  right: 0;
  background: var(--blue-dark);
  width: 240px;
  box-shadow: -4px 8px 24px rgba(0,0,0,0.30);
  border-left: 1px solid rgba(200,214,229,0.10);
  border-bottom: 1px solid rgba(200,214,229,0.10);
  border-radius: 0 0 0 12px;
  z-index: 998;
}

.hok-nav-menu.open { display: block; }

.hok-nav-menu ul { list-style: none; padding: 12px 0; }

.hok-nav-menu ul li a {
  display: block;
  padding: 12px 28px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.hok-nav-menu ul li a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--silver);
}

/* ── MOBILE DRAWER — admin/portal ────────────────────────────── */
.hok-nav-hamburger {
  display: none;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.10);
  border: none;
  border-radius: 6px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.hok-nav-hamburger span {
  display: block;
  width: 16px; height: 1.5px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.2s;
}

.hok-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.hok-drawer-overlay.open { opacity: 1; pointer-events: auto; }

.hok-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 240px;
  height: 100vh;
  background: var(--blue);
  z-index: 1101;
  transition: transform 0.25s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  -webkit-overflow-scrolling: touch;
}

.hok-drawer.open { transform: translateX(0); }

.hok-drawer-hdr {
  padding: 16px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid rgba(255,255,255,0.12);
}

.hok-drawer-title  { color: #fff; font-size: 0.82rem; font-weight: 800; }
.hok-drawer-close  { background: none; border: none; color: rgba(255,255,255,0.60); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; line-height: 1; }

.hok-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.12s;
}

.hok-drawer-item:hover  { background: rgba(255,255,255,0.08); }
.hok-drawer-item.active { background: rgba(255,255,255,0.15); }

.hok-drawer-icon {
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.10);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hok-drawer-item.active .hok-drawer-icon { background: rgba(255,255,255,0.20); }

.hok-drawer-label { font-size: 0.88rem; font-weight: 700; color: rgba(255,255,255,0.70); }
.hok-drawer-item.active .hok-drawer-label { color: #fff; }
.hok-drawer-divider { height: 0.5px; background: rgba(255,255,255,0.12); margin: 8px 16px; }

.hok-drawer-signout {
  padding: 12px 16px 32px;
  border-top: 0.5px solid rgba(255,255,255,0.15);
  margin-top: auto;
}

.hok-drawer-signout button {
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,0.08);
  border: 0.5px solid rgba(255,255,255,0.20);
  border-radius: 7px;
  color: rgba(255,255,255,0.70);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ── FOOTER — full public ────────────────────────────────────── */
.hok-footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.75);
  padding: 60px 24px 30px;
  text-align: center;
}

.hok-footer-logo       { font-size: 1.4rem; font-weight: 900; color: #fff; margin-bottom: 6px; }
.hok-footer-logo span  { color: var(--silver); }
.hok-footer-tagline    { font-size: 0.9rem; color: rgba(255,255,255,0.50); margin-bottom: 28px; }

.hok-footer-badge {
  display: inline-block;
  background: rgba(200,214,229,0.10);
  border: 1px solid rgba(200,214,229,0.30);
  color: var(--silver);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 16px 0;
}

.hok-footer-links {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hok-footer-links a     { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.hok-footer-links a:hover { color: var(--silver); }

.hok-footer-divider { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 24px 0; }
.hok-footer-bottom  { font-size: 0.80rem; color: rgba(255,255,255,0.35); }

/* Compact variant — fixed bottom bar for admin/portal */
.hok-footer-compact {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.60);
  padding: 14px 24px;
  text-align: center;
  font-size: 0.85rem;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}

.hok-footer-compact a { color: rgba(255,255,255,0.65); text-decoration: none; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:disabled { background: #aaa !important; cursor: not-allowed; opacity: 0.7; }

.btn-primary              { background: var(--blue);   color: #fff; padding: 13px 28px; font-size: 0.95rem; }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); }

.btn-silver               { background: var(--silver); color: var(--blue); padding: 14px 32px; font-size: 1rem; }
.btn-silver:hover:not(:disabled)  { background: var(--silver-dark); }

.btn-outline              { background: transparent; color: #fff; padding: 14px 32px; border: 2px solid rgba(255,255,255,0.40); font-size: 1rem; }
.btn-outline:hover:not(:disabled) { border-color: #fff; }

.btn-outline-blue         { background: transparent; color: var(--blue); padding: 12px 28px; border: 2px solid var(--blue); font-size: 0.95rem; }
.btn-outline-blue:hover:not(:disabled) { background: rgba(27,58,107,0.06); }

.btn-sm     { padding: 8px 16px; font-size: 0.85rem; }
.btn-full   { width: 100%; }

.btn-danger             { background: var(--red); color: #fff; padding: 10px 20px; font-size: 0.88rem; }
.btn-danger:hover:not(:disabled) { background: #c0392b; }

/* ── FORM ELEMENTS ───────────────────────────────────────────── */
.form-group  { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.80rem;
  font-weight: 700;
  color: #444;
  margin-bottom: 5px;
}

.form-label .req { color: var(--red); margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.15s;
  background: #fff;
  color: var(--text);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus   { border-color: var(--blue); }

.form-input.error,
.form-select.error,
.form-textarea.error   { border-color: var(--red); }

.form-input[readonly],
.form-input:disabled   { background: #f8fafd; color: var(--muted); cursor: not-allowed; }

.form-textarea         { resize: vertical; min-height: 100px; }
.form-hint             { font-size: 0.73rem; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.form-hint.err         { color: var(--red); }

/* Form grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.fg                  { display: flex; flex-direction: column; gap: 5px; }
.fg.full             { grid-column: 1 / -1; }
.fg label            { font-size: 0.82rem; font-weight: 700; color: var(--blue); }
.fg input,
.fg select,
.fg textarea         { padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.93rem; outline: none; width: 100%; transition: border-color 0.2s; }
.fg input:focus,
.fg select:focus,
.fg textarea:focus   { border-color: var(--blue); }
.fg input.error,
.fg select.error,
.fg textarea.error   { border-color: var(--red); }

/* ── CARDS ───────────────────────────────────────────────────── */
.hok-card            { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.hok-card-hdr        { background: var(--blue); padding: 24px 28px; text-align: center; }
.hok-card-body       { padding: 24px 28px; }

/* ── BADGES ──────────────────────────────────────────────────── */
.badge          { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 10px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.badge-open     { background: rgba(39,174,96,0.10);  color: var(--green); }
.badge-closed   { background: rgba(231,76,60,0.10);  color: var(--red);   }
.badge-assigned { background: rgba(27,58,107,0.10);  color: var(--blue);  }
.badge-pending  { background: rgba(243,156,18,0.10); color: var(--amber); }
.badge-silver   { background: var(--silver);         color: var(--blue);  }

/* ── STATUS MESSAGES ─────────────────────────────────────────── */
.hok-msg         { font-size: 0.85rem; padding: 10px 14px; border-radius: var(--radius-sm); line-height: 1.5; text-align: left; }
.hok-msg.error   { background: rgba(231,76,60,0.08);  color: var(--red);   border: 1px solid rgba(231,76,60,0.20); }
.hok-msg.success { background: rgba(39,174,96,0.08);  color: var(--green); border: 1px solid rgba(39,174,96,0.20); }
.hok-msg.info    { background: rgba(27,58,107,0.07);  color: var(--blue);  border: 1px solid rgba(27,58,107,0.15); }
.hok-msg.warning { background: rgba(243,156,18,0.08); color: #a07000;      border: 1px solid rgba(243,156,18,0.25); }

/* ── SPINNER ─────────────────────────────────────────────────── */
.hok-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: hok-spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes hok-spin { to { transform: rotate(360deg); } }

.hok-loading-wrap  { text-align: center; padding: 20px 0; }
.hok-loading-text  { font-size: 0.88rem; color: var(--muted); margin-top: 14px; }

/* ── ICON RESULT BLOCKS ──────────────────────────────────────── */
.hok-icon-block    { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0; }

.hok-icon-circle   { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.hok-icon-circle.success { background: rgba(39,174,96,0.10); }
.hok-icon-circle.error   { background: rgba(231,76,60,0.10); }

.hok-icon-title         { font-size: 1.05rem; font-weight: 800; color: var(--blue); margin-bottom: 6px; }
.hok-icon-title.error   { color: var(--red); }
.hok-icon-sub           { font-size: 0.85rem; color: var(--muted); line-height: 1.55; margin-bottom: 20px; }

/* ── SECTION / LAYOUT HELPERS ────────────────────────────────── */
.hok-section     { padding: 90px 24px; }
.hok-container   { max-width: 1100px; margin: 0 auto; }

.hok-section-tag {
  display: inline-block;
  background: rgba(27,58,107,0.08);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.hok-section-tag.light { background: rgba(200,214,229,0.20); color: var(--silver); }

.hok-divider { width: 56px; height: 4px; background: var(--silver); border-radius: 2px; margin: 16px 0 36px; }

/* ── UTILITIES ───────────────────────────────────────────────── */
.on-dark     { color: #fff; }
.text-muted  { color: var(--muted); }
.text-blue   { color: var(--blue); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-center { text-align: center; }

/* ── PASSWORD STRENGTH ───────────────────────────────────────── */
.strength-bar  { height: 4px; border-radius: 2px; background: #eee; margin-top: 6px; overflow: hidden; }
.strength-fill { height: 4px; border-radius: 2px; transition: width 0.2s, background 0.2s; width: 0; }

.show-pw { background: none; border: none; color: var(--blue); font-size: 0.75rem; font-weight: 700; cursor: pointer; float: right; margin-top: -22px; padding: 0; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hok-nav-public { padding: 0 16px; }
  .form-grid      { grid-template-columns: 1fr; }
  .fg.full        { grid-column: 1; }
  .hok-section    { padding: 60px 16px; }
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}
