/* === AcmeCorp HR Portal — Fake Corporate App === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #e8ecf0;
  color: #333;
  min-height: 100vh;
}

/* --- Fake Browser Chrome --- */
.browser-chrome {
  background: #2d2d2d;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.browser-tabs {
  display: flex;
  padding: 8px 12px 0;
  gap: 2px;
}

.browser-tab {
  background: #3d3d3d;
  color: #ccc;
  padding: 8px 20px;
  border-radius: 8px 8px 0 0;
  font-size: 0.8rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-tab.active {
  background: #f5f5f5;
  color: #333;
}

.browser-address-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f5f5f5;
}

.address-bar-btns {
  display: flex;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28c840; }

.address-bar-url {
  flex: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: #333;
  font-family: -apple-system, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-warning {
  color: #d32f2f;
  font-weight: 600;
}

.address-bar-lock {
  background: #d32f2f;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Portal App --- */
.portal-app {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  min-height: calc(100vh - 80px);
  box-shadow: 0 0 40px rgba(0,0,0,0.1);
}

/* Top Nav */
.portal-topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #1a365d;
  color: white;
}

.topnav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon { font-size: 1.3rem; }
.brand-sub {
  font-weight: 400;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-left: 4px;
}

.topnav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #4a90d9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.user-name {
  font-size: 0.9rem;
}

/* Layout */
.portal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 140px);
}

/* Sidebar */
.portal-sidebar {
  background: #f8f9fa;
  border-right: 1px solid #e2e8f0;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: #4a5568;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: #edf2f7;
  color: #2d3748;
}

.nav-link.active {
  background: #ebf4ff;
  color: #1a365d;
  border-left-color: #3182ce;
  font-weight: 600;
}

.nav-icon { font-size: 1.1rem; }

.nav-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 12px 16px;
}

.nav-admin {
  color: #e53e3e !important;
  font-weight: 600 !important;
}

.nav-admin:hover {
  background: #fff5f5 !important;
}

/* Main Content */
.portal-main {
  padding: 28px 32px;
  background: #fff;
}

.page { display: none; }
.page.active { display: block; }

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 4px;
}

.page-subtitle {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* Widgets */
.widget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.widget {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
}

.widget-full {
  grid-column: 1 / -1;
}

.widget h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2d3748;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
  margin-bottom: 14px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid #f7fafc;
}

.info-label { color: #718096; }

/* Announcements */
.announcement {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f7fafc;
}

.announcement:last-child { border-bottom: none; }

.announcement-date {
  font-size: 0.75rem;
  color: #a0aec0;
  white-space: nowrap;
  padding-top: 2px;
}

.announcement strong {
  font-size: 0.85rem;
  color: #2d3748;
}

.announcement p {
  font-size: 0.8rem;
  color: #718096;
  margin-top: 2px;
  line-height: 1.4;
}

/* Sticky Notes */
.sticky-note {
  background: #fff9c4;
  padding: 14px;
  border-radius: 4px;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive;
  font-size: 0.85rem;
  color: #5d4037;
  transform: rotate(-0.5deg);
  box-shadow: 2px 3px 8px rgba(0,0,0,0.1);
  border: 1px solid #f0e68c;
  line-height: 1.6;
}

.sticky-note p { margin-bottom: 2px; }

/* Task Items */
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.85rem;
  color: #4a5568;
  border-bottom: 1px solid #f7fafc;
}

.task-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f7fafc;
  color: #4a5568;
  font-weight: 600;
  font-size: 0.8rem;
  border-bottom: 2px solid #e2e8f0;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  color: #2d3748;
}

.data-table tr:hover td {
  background: #f7fafc;
}

.table-link {
  color: #3182ce;
  text-decoration: none;
  font-weight: 500;
}

.table-link:hover { text-decoration: underline; }
.table-link.danger { color: #e53e3e; }

/* Forms */
.form-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}

.form-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2d3748;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #718096;
  margin-bottom: 4px;
}

.form-field input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #2d3748;
  background: #fff;
}

.form-field input:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-field input[readonly] {
  background: #f7fafc;
}

.sensitive-field {
  color: #e53e3e !important;
  font-weight: 500;
}

.password-exposed {
  color: #e53e3e !important;
  font-weight: 600;
  font-size: 0.95rem !important;
  background: #fff5f5 !important;
}

.field-note {
  font-size: 0.8rem;
  color: #a0aec0;
  margin-bottom: 12px;
}

/* Buttons */
.portal-btn {
  display: inline-block;
  padding: 8px 20px;
  background: #3182ce;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.portal-btn:hover { background: #2b6cb0; }
.portal-btn.secondary {
  background: #edf2f7;
  color: #4a5568;
}
.portal-btn.secondary:hover { background: #e2e8f0; }
.portal-btn.danger {
  background: #e53e3e;
}
.portal-btn.danger:hover { background: #c53030; }

/* Search */
.search-bar {
  margin-bottom: 16px;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #f7fafc;
}

.search-bar input:focus {
  outline: none;
  border-color: #3182ce;
  background: #fff;
}

/* Benefits */
.benefit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.9rem;
}

.benefit-name { color: #2d3748; font-weight: 500; }
.benefit-cost { color: #718096; font-weight: 600; }

/* Documents */
.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #edf2f7;
}

.doc-item:last-child { border-bottom: none; }
.doc-icon { font-size: 1.5rem; }
.doc-meta { font-size: 0.8rem; color: #a0aec0; margin-top: 2px; }

.shared-creds {
  margin-top: 8px;
  padding: 10px 14px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #c53030;
  font-family: monospace;
  line-height: 1.6;
}

/* Admin */
.admin-warning {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: #c53030;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.status-active {
  background: #c6f6d5;
  color: #276749;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* === Floating Hints Widget (Power2HR — visually distinct from the portal) === */
.hints-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #401E82 0%, #9C4EDC 100%);
  color: white;
  border: none;
  border-radius: 999px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(64, 30, 130, 0.45), 0 0 0 1px rgba(255,255,255,0.05);
  z-index: 1000;
  transition: transform 0.15s, box-shadow 0.15s;
}

.hints-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(156, 78, 220, 0.55);
}

.hints-toggle-icon { font-size: 1.1rem; }

.hints-toggle-count {
  background: rgba(0,0,0,0.35);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  min-width: 22px;
  text-align: center;
}

.hints-panel {
  position: fixed;
  bottom: 88px;
  right: 24px;
  width: 380px;
  max-height: 70vh;
  background: #14091f;
  color: #f3eaff;
  border: 1px solid rgba(156, 78, 220, 0.4);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  font-family: 'Inter', -apple-system, sans-serif;
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}

.hints-panel.open { display: flex; }

.hints-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 18px;
  background: linear-gradient(135deg, #401E82 0%, #6C35AD 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.hints-panel-title {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.hints-panel-sub {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 2px;
}

.hints-close {
  background: rgba(0,0,0,0.25);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.hints-close:hover { background: rgba(0,0,0,0.45); }

.hints-list {
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hint-card {
  background: rgba(156, 78, 220, 0.06);
  border: 1px solid rgba(156, 78, 220, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
}

.hint-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.hint-cost-badge {
  color: #FB3D24;
  font-size: 0.72rem;
  font-weight: 700;
}

.hint-revealed {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  padding: 8px 10px;
  border-left: 3px solid #9C4EDC;
  font-size: 0.78rem;
  margin-bottom: 6px;
  line-height: 1.4;
  border-radius: 4px;
}

.hint-num {
  color: #9C4EDC;
  font-weight: 700;
  white-space: nowrap;
}

.hint-reveal-btn {
  display: block;
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, #4C18B0 0%, #9C4EDC 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}

.hint-reveal-btn:hover { filter: brightness(1.1); }
.hint-reveal-btn:disabled {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4);
  cursor: not-allowed;
}

.hints-panel-footer {
  padding: 10px 16px;
  background: rgba(0,0,0,0.25);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  border-top: 1px solid rgba(255,255,255,0.05);
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
  .portal-layout { grid-template-columns: 1fr; }
  .portal-sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .nav-link {
    padding: 8px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .nav-link.active { border-left-color: transparent; border-bottom-color: #3182ce; }
  .nav-divider { display: none; }
  .portal-main { padding: 20px 16px; }
  .widget-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .browser-address-bar { font-size: 0.75rem; }
  .hints-panel { width: calc(100vw - 32px); right: 16px; bottom: 80px; }
  .hints-toggle { right: 16px; bottom: 16px; }
}
