/* ═══════════════════════════════════════════════════════
   Secdrift — Home Page Styles
   ═══════════════════════════════════════════════════════ */

/* ── Page Content ──────────────────────────────────── */
.page-content {
  padding: 32px;
}

/* ── Home Header ───────────────────────────────────── */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.home-header-left { flex: 1; }
.home-header-right { display: flex; gap: 8px; align-items: center; }

.home-greeting {
  font-family: var(--display);
  font-size: 28px;
  color: var(--text);
}

.home-date {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 13px;
  margin-top: 4px;
}

/* ── KPI Cards ─────────────────────────────────────── */
.home-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  font-family: var(--mono);
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

.kpi-delta {
  font-size: 12px;
  margin-top: 4px;
  font-family: var(--mono);
}

.kpi-delta.up {
  color: var(--green);
}

.kpi-delta.down {
  color: var(--red);
}

/* ── Section Title ─────────────────────────────────── */
.section-title {
  font-family: var(--display);
  font-size: 16px;
  color: var(--text-2);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Activity Feed ─────────────────────────────────── */
.home-activity {
  max-width: 700px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.activity-time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  min-width: 50px;
}

.activity-text {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

.activity-amount {
  font-family: var(--mono);
  color: var(--amber);
  font-size: 14px;
}

/* ── Status Badges ─────────────────────────────────── */
.status-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-family: var(--mono);
  white-space: nowrap;
}

.status-badge.pending {
  background: rgba(251, 146, 60, 0.15);
  color: var(--orange);
}

.status-badge.handled {
  background: rgba(74, 222, 128, 0.15);
  color: var(--green);
}

.status-badge.cancelled {
  background: rgba(248, 113, 113, 0.15);
  color: var(--red);
}

/* ── Notification Bell ─────────────────────────────── */
.notif-bell {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.notif-bell:hover {
  background: var(--surface-2);
  color: var(--text);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--mono);
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── AI Briefing Card ─────────────────────────────── */
.briefing-section {
  margin-bottom: 24px;
}

.briefing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 20px;
}

.briefing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.briefing-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--amber);
  letter-spacing: 0.5px;
}

.briefing-actions {
  display: flex;
  gap: 8px;
}

.briefing-btn {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--mono);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.briefing-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.briefing-btn.dismiss {
  color: var(--text-3);
}

.briefing-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

.briefing-body h3.briefing-h2 {
  font-family: var(--display);
  font-size: 16px;
  color: var(--text);
  margin: 16px 0 8px;
}

.briefing-body h4.briefing-h3 {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--amber);
  margin: 12px 0 6px;
  letter-spacing: 0.5px;
}

.briefing-body ul {
  margin: 4px 0 8px 16px;
  padding: 0;
}

.briefing-body li {
  margin: 2px 0;
  font-size: 13px;
  color: var(--text-2);
}

.briefing-body strong {
  color: var(--text);
}

/* ── Alert Bar ────────────────────────────────────── */
.alerts-bar {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.alert-critical {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--red);
}

.alert-warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: var(--orange);
}

.alert-icon {
  font-weight: 700;
  font-size: 14px;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.alert-critical .alert-icon {
  background: var(--red);
  color: #fff;
}

.alert-warning .alert-icon {
  background: var(--orange);
  color: #1a1a1a;
}

.alert-text {
  flex: 1;
  color: var(--text);
}

.alert-dismiss {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

.alert-dismiss:hover {
  color: var(--text);
}

/* ── Notification Panel ───────────────────────────── */
.notif-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-raised);
  border-left: 1px solid var(--border);
  z-index: 3000;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

.notif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--display);
  font-size: 16px;
  color: var(--text);
}

.notif-panel-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
}

.notif-panel-close:hover {
  color: var(--text);
}

.notif-panel-actions {
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
}

.notif-mark-read {
  background: none;
  border: none;
  color: var(--amber);
  font-size: 12px;
  font-family: var(--mono);
  cursor: pointer;
  padding: 4px 0;
}

.notif-mark-read:hover {
  text-decoration: underline;
}

.notif-list {
  padding: 8px 0;
}

.notif-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s;
}

.notif-unread {
  border-left: 3px solid var(--amber);
}

.notif-critical {
  border-left-color: var(--red);
}

.notif-warning {
  border-left-color: var(--orange);
}

.notif-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.notif-item-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

.notif-item-body {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 8px;
}

.notif-item-actions {
  display: flex;
  gap: 8px;
}

.notif-act-btn {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  color: var(--text-3);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--mono);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.notif-act-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.notif-act-btn.acted:hover {
  color: var(--green);
  border-color: var(--green);
}

.notif-act-btn.dismiss:hover {
  color: var(--text-3);
}

/* ── Last Updated ──────────────────────────────────── */
.home-updated {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  margin-top: 24px;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .page-content {
    padding: 20px 16px;
  }

  .home-greeting {
    font-size: 22px;
  }

  .kpi-value {
    font-size: 22px;
  }
}
