/* ==========================================================================
   PORTAL DE SISTEMAS MV - FHCR  •  Modelo 2: foto + lista
   ========================================================================== */

:root {
  --blue: #1f3f9a;
  --blue-soft: #eef1f8;
  --hover-bg: #f6f8fd;
  --line: #e5e7eb;
  --text: #1c2430;
  --muted: #9ca3af;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 100vh;
}

/* ---------- Foto ---------- */
.photo { position: relative; overflow: hidden; background: #2b3442; }
.photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 30% 30%;
}
.photo-text {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 26px 36px 30px;
  background: rgba(16, 28, 60, .82);
  color: #fff;
}
.photo-text h2 { font-size: 1.9rem; line-height: 1.15; font-weight: 700; }
.photo-text p { margin-top: 6px; opacity: .85; }

/* ---------- Painel ---------- */
.panel { padding: 44px 56px; display: flex; flex-direction: column; max-width: 760px; width: 100%; }

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; font-weight: 600; }
.brand img { width: 44px; height: 44px; object-fit: contain; }

/* ---------- Header Row & Botão de Atalho ---------- */
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.header-row h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 2px; }
.header-sub { font-size: .82rem; color: var(--muted); }

.btn-shortcut {
  display: inline-flex; align-items: center; gap: 8px;
  background: #ffffff; color: var(--blue); border: 1.5px solid var(--blue);
  border-radius: 8px; padding: 8px 14px; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
  box-shadow: 0 1px 3px rgba(31, 63, 154, .08);
}
.btn-shortcut svg { width: 16px; height: 16px; }
.btn-shortcut:hover {
  background: var(--blue); color: #ffffff;
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(31, 63, 154, .25);
}
.btn-shortcut:active { transform: translateY(0); }

.item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 600;
  transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.item:hover {
  background: var(--blue); border-color: var(--blue); color: #fff;
  transform: translateX(6px);
  box-shadow: 0 8px 20px rgba(31, 63, 154, .28);
}
.item:hover .item-icon { background: #fff; color: var(--blue); }
.item:hover .item-code { color: rgba(255, 255, 255, .75); }
.item:hover .item-arrow { color: #fff; transform: translateX(4px); }
.item:active { transform: translateX(6px) scale(.99); }
.item:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.item-icon {
  transition: background .15s, color .15s;
  width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0;
  background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center;
}
.item-icon svg { width: 22px; height: 22px; }

.item-content {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}

.item-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.item-name {
  font-size: .95rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.item-code {
  font-size: .7rem; font-weight: 600; color: var(--muted);
  background: #f1f3f7; padding: 2px 7px; border-radius: 5px;
  letter-spacing: .02em; flex-shrink: 0;
  transition: background .15s, color .15s;
}

.item-role {
  font-size: .78rem; color: #4b5563;
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.item-role .role-label { color: #9ca3af; font-weight: 500; }
.item-role strong { font-weight: 600; color: #1f2937; }

/* Destaque sutil para Somente TI e Gestores */
.role-ti strong { color: #b45309; }
.role-gestor strong { color: #047857; }

.item:hover .item-name { color: #fff; }
.item:hover .item-code { background: rgba(255, 255, 255, .22); color: #fff; }
.item:hover .item-role { color: rgba(255, 255, 255, .9); }
.item:hover .item-role .role-label { color: rgba(255, 255, 255, .7); }
.item:hover .item-role strong { color: #fff; }
.item:hover .role-ti strong { color: #fef08a; }
.item:hover .role-gestor strong { color: #a7f3d0; }

.item-arrow { color: var(--blue); font-size: 1.3rem; line-height: 1; transition: transform .15s, color .15s; }

.foot { margin-top: auto; padding-top: 24px; font-size: .8rem; color: var(--muted); }

/* ---------- Modal de Instruções do Atalho ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .65);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: modalFadeIn .18s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(.98); }
  to { opacity: 1; transform: scale(1); }
}

.modal-card {
  background: #ffffff; border-radius: 16px;
  max-width: 440px; width: 100%;
  padding: 30px 24px; position: relative;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .22);
  text-align: center;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 1.6rem; line-height: 1;
  color: #9ca3af; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.modal-close:hover { color: #111827; background: #f3f4f6; }

.modal-icon {
  width: 50px; height: 50px; background: #ecfdf5; color: #059669;
  border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px;
}
.modal-icon svg { width: 26px; height: 26px; }

.modal-card h3 { font-size: 1.2rem; font-weight: 700; color: #111827; margin-bottom: 6px; }
.modal-desc { font-size: .86rem; color: #6b7280; margin-bottom: 18px; }

.modal-steps {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px 16px; text-align: left; display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 18px;
}
.step-item { display: flex; align-items: flex-start; gap: 10px; font-size: .84rem; color: #334155; line-height: 1.4; }
.step-num {
  width: 20px; height: 20px; background: var(--blue); color: #fff;
  border-radius: 50%; display: grid; place-items: center;
  font-size: .7rem; font-weight: 700; flex-shrink: 0;
}

.modal-auto { border-top: 1px solid #f1f5f9; padding-top: 14px; }
.modal-auto p { font-size: .8rem; color: #64748b; margin-bottom: 10px; }
.btn-bat {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #0f172a; color: #ffffff; border: none; border-radius: 8px;
  padding: 10px 14px; font-size: .84rem; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.btn-bat:hover { background: #334155; }

/* ---------- Celular / tela estreita ---------- */
@media (max-width: 820px) {
  body { display: block; }
  .photo { height: 200px; }
  .photo img { object-position: 30% 22%; }
  .photo-text { padding: 14px 20px 16px; }
  .photo-text h2 { font-size: 1.35rem; }
  .panel { padding: 24px 16px 28px; }
  .brand { margin-bottom: 20px; }
  .header-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .btn-shortcut { width: 100%; justify-content: center; }
  .item { padding: 12px 14px; gap: 12px; }
}
