/* Empever Platform 2.0 — unified workspace shell */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Sora:wght@600;700&display=swap');

:root {
  --ep-shell-font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --ep-shell-display: 'Sora', var(--ep-shell-font);
  --ep-primary: #0c5a8c;
  --ep-teal: #0f766e;
  --ep-purple: #6d28d9;
  --ep-indigo: #4f46e5;
  --ep-ai: #7c3aed;
  --ep-dark: #0c2844;
  --ep-canvas: #e8f0f7;
  --ep-surface: #ffffff;
  --ep-border: #d3dee9;
  --ep-sidebar-w: 15rem;
}

.ep-shell {
  font-family: var(--ep-shell-font);
  color: #0c1929;
  background: var(--ep-canvas);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ep-shell__top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: var(--ep-dark);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.ep-shell__logo {
  font-family: var(--ep-shell-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.ep-shell__top nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  flex: 1;
}

.ep-shell__top a.ep-shell__nav-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

.ep-shell__top a.ep-shell__nav-link:hover,
.ep-shell__top a.ep-shell__nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.ep-shell__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.ep-shell__cmd {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.ep-shell__cmd kbd {
  opacity: 0.85;
  font-family: inherit;
}

.ep-shell__body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.ep-shell__sidebar {
  width: var(--ep-sidebar-w);
  flex-shrink: 0;
  background: var(--ep-surface);
  border-right: 1px solid var(--ep-border);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ep-shell__sidebar h2 {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0 0.5rem;
  margin: 0.75rem 0 0.35rem;
}

.ep-shell__side-link {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334e68;
  border-left: 3px solid transparent;
}

.ep-shell__side-link:hover {
  background: #f0f5fa;
}

.ep-shell__side-link[aria-current="page"] {
  background: rgba(12, 90, 140, 0.08);
  color: var(--ep-primary);
  border-left-color: var(--ep-primary);
}

.ep-shell__side-link--hr[aria-current="page"] { border-left-color: var(--ep-primary); }
.ep-shell__side-link--marketing[aria-current="page"] { border-left-color: var(--ep-teal); }
.ep-shell__side-link--jobs[aria-current="page"] { border-left-color: var(--ep-indigo); }
.ep-shell__side-link--technical[aria-current="page"] { border-left-color: var(--ep-purple); }

.ep-shell__main {
  flex: 1;
  min-width: 0;
  padding: 1.25rem 1.5rem 2rem;
  overflow: auto;
}

.ep-shell__hero {
  margin-bottom: 1.25rem;
}

.ep-shell__hero h1 {
  font-family: var(--ep-shell-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--ep-dark);
}

.ep-shell__hero p {
  margin: 0;
  color: #627d98;
  font-size: 0.95rem;
  max-width: 40rem;
}

.ep-shell__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ep-shell__card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: 14px;
  padding: 1.15rem 1.1rem;
  box-shadow: 0 1px 2px rgba(6, 52, 79, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ep-shell__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(6, 52, 79, 0.1);
}

.ep-shell__card-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.ep-shell__card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.ep-shell__card p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: #627d98;
  line-height: 1.5;
}

.ep-shell__card a.ep-shell__btn {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  background: var(--ep-primary);
  color: #fff;
}

.ep-shell__digest {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(12, 90, 140, 0.08));
  border: 1px solid var(--ep-border);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
}

.ep-shell__digest h2 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ep-shell__digest ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  color: #334e68;
  line-height: 1.6;
}

/* Command palette */
.ep-palette {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 1rem;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
}

.ep-palette--open {
  display: flex;
}

.ep-palette__panel {
  width: min(32rem, 100%);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.ep-palette__input {
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.15rem;
  font-size: 1rem;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #f1f5f9;
  outline: none;
}

.ep-palette__list {
  max-height: 18rem;
  overflow: auto;
  padding: 0.5rem;
}

.ep-palette__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.875rem;
  cursor: pointer;
}

.ep-palette__item:hover,
.ep-palette__item[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.1);
}

.ep-palette__item small {
  display: block;
  color: #94a3b8;
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

/* Compact platform bar (embedded in sub-apps) */
.ep-platform-bar {
  font-family: var(--ep-shell-font);
  font-size: 0.75rem;
  background: var(--ep-dark);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.35rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ep-platform-bar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
}

.ep-platform-bar__logout {
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  border: none;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  margin-left: auto;
}

.ep-platform-bar__logout:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.ep-platform-bar a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.ep-platform-bar a:hover,
.ep-platform-bar a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.ep-platform-bar__brand {
  font-weight: 800;
  color: #fff;
  margin-right: 0.25rem;
}

/* Embedded in workspace host — hide in-app duplicate platform bar */
html.empever-embed .ep-platform-bar,
html.empever-embed nav[aria-label="Empever platform"] {
  display: none !important;
}

/* Host shell: top nav + full-height app iframe */
.ep-shell--host {
  height: 100vh;
  overflow: hidden;
}

.ep-shell--host .empever-client-modal {
  z-index: 200000;
}

.ep-shell--host .ep-shell__top {
  position: relative;
  z-index: 10;
}

/* Client picker modal — workspace does not load styles.css; define tokens here */
.ep-shell--host {
  --ep-modal-bg: #ffffff;
  --ep-modal-text: #0c1929;
  --ep-modal-muted: #627d98;
  --ep-modal-border: #d3dee9;
}

.ep-shell--host .empever-client-modal__backdrop {
  background: rgba(15, 23, 42, 0.72);
}

.ep-shell--host .empever-client-modal__card {
  background: var(--ep-modal-bg);
  border: 1px solid var(--ep-modal-border);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
  padding: 1.75rem 1.5rem 1.5rem;
}

.ep-shell--host .empever-client-modal__card h2 {
  color: var(--ep-modal-text);
}

.ep-shell--host .empever-client-modal__card .sub {
  color: var(--ep-modal-muted);
}

.ep-shell--host .empever-client-card {
  background: #f8fafc;
  border: 1px solid var(--ep-modal-border);
  color: var(--ep-modal-text);
}

.ep-shell--host .empever-client-card:hover {
  background: #eef4fa;
  border-color: #0c5a8c;
}

.ep-shell--host .empever-client-card__desc {
  color: var(--ep-modal-muted);
}

.ep-shell__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0b1120;
}

.ep-shell__frame {
  flex: 1;
  width: 100%;
  border: 0;
  display: none;
  background: #0b1120;
}

.ep-shell__home {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.25rem 1.5rem 2rem;
  background: var(--ep-canvas);
}

.ep-shell--app-open .ep-shell__home {
  display: none;
}

.ep-shell--app-open .ep-shell__frame {
  display: block;
}

.ep-shell__top button.ep-shell__nav-link {
  font: inherit;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: none;
  background: transparent;
}

.ep-shell__top button.ep-shell__nav-link:hover,
.ep-shell__top button.ep-shell__nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

body.ep-shell--host {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.ep-shell--host #empever-app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.empever-gate-active #empever-app {
  display: none !important;
}

@media (max-width: 768px) {
  .ep-shell__body {
    flex-direction: column;
  }
  .ep-shell__sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--ep-border);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.5rem;
  }
  .ep-shell__sidebar h2 {
    width: 100%;
  }
}
