/* ============================================================
   Celee Family Office — Shared Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=DM+Serif+Display:ital@0;1&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --navy:        #0D2140;
  --navy-mid:    #163461;
  --blue:        #1B4F8A;
  --blue-light:  #2E6DBD;
  --gold:        #C49A3C;
  --gold-light:  #E8C56A;
  --white:       #FFFFFF;
  --off-white:   #F7F8FA;
  --border:      #E2E6EC;
  --text:        #1A2640;
  --text-muted:  #6B7A99;
  --danger:      #C0392B;
  --success:     #1A7A4A;
  --shadow-sm:   0 1px 3px rgba(13,33,64,.08);
  --shadow-md:   0 4px 16px rgba(13,33,64,.12);
  --shadow-lg:   0 12px 40px rgba(13,33,64,.18);
  --radius:      10px;
  --radius-sm:   6px;
  --transition:  all .2s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-light); }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.header-logo-mark {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-logo-mark svg { width: 22px; height: 22px; }

.header-brand-text { line-height: 1.2; }

.header-brand-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  color: var(--white);
  letter-spacing: .01em;
  display: block;
}

.header-brand-sub {
  font-size: .7rem;
  color: var(--gold-light);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-nav a {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,.1);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-user {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  font-weight: 400;
}

.header-user span {
  color: var(--gold-light);
  font-weight: 500;
}

.btn-logout {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  background: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}

.btn-logout:hover {
  color: var(--white);
  border-color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
}

/* ---------- Page Layout ---------- */
.page-main {
  flex: 1;
  padding: 2.5rem 2rem;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.page-main.wide {
  max-width: 100%;
  padding: 0;
}

/* ---------- Page Header ---------- */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.page-header-eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .4rem;
}

.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.75rem;
  color: var(--navy);
  font-weight: 400;
  letter-spacing: -.01em;
}

.page-header p {
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: .35rem;
  font-weight: 400;
}

/* ---------- Dashboard Cards (Hub) ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.dash-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%);
  opacity: 0;
  transition: var(--transition);
}

.dash-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--blue-light);
}

.dash-card:hover::before { opacity: 1; }

.dash-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #EEF4FB 0%, #DCE9F7 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-card-icon svg { width: 24px; height: 24px; color: var(--blue); }

.dash-card-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--navy);
  font-weight: 400;
  line-height: 1.3;
}

.dash-card-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.dash-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  font-size: .78rem;
}

.dash-card-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.dash-card-status.live { color: var(--success); }
.dash-card-status.placeholder { color: var(--text-muted); }

.dash-card-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.dash-card-arrow {
  color: var(--blue);
  font-size: 1.1rem;
  transition: var(--transition);
}

.dash-card:hover .dash-card-arrow { transform: translateX(4px); }

/* Coming soon card variant */
.dash-card.coming-soon {
  opacity: .65;
  pointer-events: none;
}

/* ---------- Alerts ---------- */
.alert {
  padding: .9rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.alert-danger {
  background: #FDECEA;
  border: 1px solid #F5C6C2;
  color: var(--danger);
}

.alert-success {
  background: #EBF7F1;
  border: 1px solid #B8E0CC;
  color: var(--success);
}

.alert-info {
  background: #EEF4FB;
  border: 1px solid #C5D9EF;
  color: var(--blue);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.site-footer p {
  font-size: .75rem;
  color: rgba(255,255,255,.35);
  font-weight: 400;
}

/* ---------- Login Page ---------- */
.login-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(27,79,138,.4) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(196,154,60,.15) 0%, transparent 50%);
  pointer-events: none;
}

.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 3rem 2.75rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.login-header { text-align: center; margin-bottom: 2rem; }

.login-logo-mark {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 20px rgba(13,33,64,.3);
}

.login-logo-mark svg { width: 32px; height: 32px; }

.login-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--navy);
  font-weight: 400;
  margin-bottom: .3rem;
}

.login-header p {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 400;
}

.form-group { margin-bottom: 1.1rem; }

.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .45rem;
  letter-spacing: .02em;
}

.form-control {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,79,138,.12);
}

.btn-primary {
  width: 100%;
  padding: .8rem 1.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: .5rem;
  letter-spacing: .01em;
}

.btn-primary:hover {
  opacity: .92;
  box-shadow: 0 4px 16px rgba(27,79,138,.35);
  transform: translateY(-1px);
}

.login-footer {
  text-align: center;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.login-footer p {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- Placeholder / Coming Soon ---------- */
.placeholder-card {
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  max-width: 420px;
  margin: 3rem auto;
}

.placeholder-card h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: var(--navy);
  margin: 1rem 0 .5rem;
  font-weight: 400;
}

.placeholder-card p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.placeholder-icon {
  width: 64px;
  height: 64px;
  background: #EEF4FB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* ---------- Dashboard iframe wrapper ---------- */
.dashboard-frame-wrapper {
  width: 100%;
  height: calc(100vh - 68px);
  border: none;
}

.dashboard-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--blue); }
.breadcrumb-sep { color: var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .site-header { padding: 0 1rem; }
  .header-nav { display: none; }
  .page-main { padding: 1.5rem 1rem; }
  .hub-grid { grid-template-columns: 1fr; }
  .login-card { padding: 2rem 1.5rem; }
}

/* ── Logo image overrides ───────────────────────────────────── */
.header-logo-mark {
  background: rgba(255,255,255,0.08);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-mark {
  background: transparent;
  box-shadow: none;
  width: calc(100% + 5.5rem);
  margin-left: -2.75rem;
  margin-right: -2.75rem;
  margin-top: -1rem;
  margin-bottom: 0.75rem;
}

.login-logo-mark img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
