/* Alec office — visual layer (hero, stats, workspace; matches dashboard + Dani polish) */

/* Page background when Alec office is the active route (visibility: views.css). */
#viewAlecOffice.alec-office-v2.active {
  background: linear-gradient(180deg, #eef4f8 0%, #e8eef4 120px, #eef2f6 100%);
}

.alec-office-shell.office-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* Hero band */
.alec-office-hero {
  position: relative;
  flex-shrink: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: linear-gradient(125deg, #e0e7ff 0%, #ecfdf5 40%, var(--white) 82%);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.alec-office-hero-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #4f46e5, var(--teal));
}

.alec-office-hero-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px 18px 22px;
}

#viewAlecOffice .office-agent-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#viewAlecOffice .office-agent-title {
  font-size: 13px;
  color: #64748b;
}

#viewAlecOffice .office-agent-status {
  font-size: 12px;
  color: var(--teal-dark);
}

#viewAlecOffice .office-header-actions {
  gap: 10px;
}

#viewAlecOffice .office-action-btn {
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(30, 41, 59, 0.1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#viewAlecOffice .office-action-btn:hover {
  background: var(--white);
  border-color: var(--teal);
  color: var(--teal-dark);
}

.alec-hero-btn-primary {
  background: var(--teal) !important;
  color: var(--white) !important;
  border-color: var(--teal) !important;
}

.alec-hero-btn-primary:hover {
  background: var(--teal-dark) !important;
  color: var(--white) !important;
}

.alec-hero-btn-gmail {
  color: #c0392b !important;
  border-color: rgba(192, 57, 43, 0.35) !important;
}

/* Stat strip */
.alec-office-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px 20px 18px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(30, 41, 59, 0.06);
}

.alec-stat-card {
  display: block;
  width: 100%;
  font: inherit;
  cursor: pointer;
  background: linear-gradient(180deg, var(--white) 0%, #f8fafc 100%);
  border: 1px solid rgba(30, 41, 59, 0.08);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.alec-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.alec-stat-inbox { border-top: 3px solid #f97316; }
.alec-stat-outgoing { border-top: 3px solid var(--teal); }
.alec-stat-autofiled { border-top: 3px solid #059669; }

.alec-stat-card.alec-stat-hot {
  background: linear-gradient(180deg, #f0fdfa 0%, var(--white) 100%);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.1);
}

.alec-stat-inbox.alec-stat-hot {
  background: linear-gradient(180deg, #fff7ed 0%, var(--white) 100%);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.12);
}

.alec-stat-outgoing.alec-stat-hot {
  background: linear-gradient(180deg, #ecfeff 0%, var(--white) 100%);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.14);
}

.alec-stat-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 4px;
}

.alec-stat-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.35;
  padding: 0 4px;
}

/* Workspace */
.alec-office-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #eef2f6;
}

.alec-office-workspace .alec-office-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 10px;
  padding: 16px 20px 12px;
  margin: 0;
  border: none;
  background: transparent;
}

.alec-office-workspace .alec-office-tab {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #d0d7e2;
  background: var(--white);
  color: var(--navy);
  border-bottom: 1px solid #d0d7e2;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  gap: 8px;
  line-height: 1.25;
  white-space: nowrap;
}

#viewAlecOffice .alec-tab-badge {
  flex-shrink: 0;
  margin-left: 2px;
  line-height: 1.2;
  vertical-align: middle;
}

.alec-office-workspace .alec-office-tab:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.alec-office-workspace .alec-office-tab.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.alec-office-workspace .alec-office-tab.active .alec-tab-badge {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.alec-office-body {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 14px;
  padding: 14px 20px 20px;
  overflow: hidden;
  background: transparent;
}

.alec-office-inbox-shell,
.alec-office-detail-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(30, 41, 59, 0.08);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.alec-office-inbox-shell {
  width: 320px;
  flex-shrink: 0;
}

.alec-office-detail-shell {
  flex: 1;
  min-width: 0;
}

.alec-office-inbox-shell .alec-office-inbox-pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  width: 100%;
  border: none;
  border-radius: 14px;
  background: var(--white);
}

.alec-office-detail-shell .alec-office-detail-pane {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--white) 0%, #f8fafc 100%);
  border-radius: 14px;
}

/* Inbox list polish */
.alec-office-inbox-shell .alec-inbox-pane {
  background: transparent;
}

.alec-office-inbox-shell .alec-scenario-filter {
  padding: 12px 14px;
  gap: 8px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(30, 41, 59, 0.06);
}

.alec-office-inbox-shell .alec-scenario-btn {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 8px;
}

.alec-office-inbox-shell .alec-inbox-sync-row {
  padding: 10px 14px;
  background: #f0fdfa;
  border-bottom: 1px solid rgba(8, 145, 178, 0.12);
}

.alec-office-inbox-shell .alec-inbox-sync-btn {
  background: var(--white);
  box-shadow: 0 1px 3px rgba(8, 145, 178, 0.15);
}

.alec-office-inbox-shell .alec-inbox-filtered-link {
  padding: 8px 14px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 600;
}

.alec-office-inbox-shell .alec-pending-row {
  margin: 4px 10px;
  border: 1px solid rgba(30, 41, 59, 0.06);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.alec-office-inbox-shell .alec-pending-row.selected {
  background: linear-gradient(90deg, #f0fdfa 0%, var(--white) 100%);
  border-color: rgba(8, 145, 178, 0.25);
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.12);
}

.alec-office-inbox-shell .alec-outgoing-row {
  margin: 4px 10px;
  border: 1px solid rgba(30, 41, 59, 0.06);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.alec-office-inbox-shell .alec-outgoing-row.alec-source-trac {
  border-left: 3px solid #3b82f6;
}

.alec-office-inbox-shell .alec-outgoing-row.alec-source-dani {
  border-left: 3px solid #8b5cf6;
}

.alec-office-inbox-shell .alec-inbox-pane-title {
  padding: 12px 14px 8px;
  font-size: 12px;
  color: #64748b;
}

.alec-office-detail-shell .alec-detail-empty {
  color: #94a3b8;
  font-size: 15px;
  padding: 48px 24px;
}

@media (max-width: 768px) {
  .alec-office-stats {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }

  .alec-office-body {
    flex-direction: column;
    padding: 12px 14px 16px;
    gap: 10px;
  }

  .alec-office-inbox-shell {
    width: 100%;
    max-height: 300px;
  }

  .alec-office-hero-body {
    padding: 14px 16px 14px 18px;
  }

  #viewAlecOffice .office-header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
