@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap');
:root {
  --bg:        #f5f5f3;
  --bg-soft:   #ffffff;
  --bg-card:   #ffffff;
  --text:      #1d1d1b;
  --text-muted:#878787;
  --border:    #ececea;
  --border-strong:#d8d8d4;
  --accent:    #e64b38;
  --accent-hover: #d23a26;
  --accent-soft:  #fde7e3;
  --tl-green:  #2f8a4f;
  --tl-yellow: #ad7a10;
  --tl-red:    #b3271b;
  --shadow-sm: 0 1px 2px rgba(29,29,27,0.04), 0 1px 3px rgba(29,29,27,0.06);
  --shadow-md: 0 12px 32px rgba(29,29,27,0.10);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }

.portal { display: flex; flex-direction: column; height: 100vh; }
.portal-bar {
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px; height: 56px;
  background: var(--bg-soft); border-bottom: 1px solid var(--border);
  flex: 0 0 auto; box-shadow: var(--shadow-sm);
}
.portal-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: 0.04em; }
.portal-brand img { height: 26px; }
.portal-tabs { display: flex; gap: 4px; flex: 1; margin-left: 14px; }
.portal-tabs a {
  color: var(--text-muted); padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.portal-tabs a:hover { color: var(--text); background: var(--bg); }
.portal-tabs a.active { background: var(--accent); color: #fff; font-weight: 700; }
button.ghost {
  background: transparent; border: 1px solid var(--border-strong); color: var(--text);
  padding: 6px 14px; border-radius: 8px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
button.ghost:hover { border-color: var(--accent); color: var(--accent); }

#content { flex: 1; overflow: auto; position: relative; background: var(--bg); }
#app-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.hidden { display: none !important; }

.home { padding: 48px 32px; max-width: 1200px; margin: 0 auto; }
.home h2 { font-size: 28px; margin: 0 0 6px; color: var(--text); }
.home .muted { color: var(--text-muted); margin: 0 0 28px; }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  display: block;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 26px 24px;
  color: var(--text); transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.card-icon { font-size: 30px; margin-bottom: 10px; }
.card h3 { margin: 0 0 6px; font-size: 18px; color: var(--text); }
.card p  { margin: 0 0 18px; color: var(--text-muted); font-size: 14px; }
.card-cta { color: var(--accent); font-weight: 700; font-size: 14px; }
.card-cta .arrow { display: inline-block; transition: transform .15s ease; }
.card:hover .card-cta .arrow { transform: translateX(4px); }

.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 18% -10%, rgba(230, 75, 56, 0.12), transparent 60%),
    radial-gradient(800px 400px at 100% 110%, rgba(230, 75, 56, 0.06), transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 36px 32px 28px;
  box-shadow: var(--shadow-md);
}
.login-header { text-align: center; margin-bottom: 24px; }
.login-header .ecs-mark { height: 64px; margin-bottom: 12px; }
.login-card h1 { font-size: 22px; margin: 0; letter-spacing: -0.01em; font-weight: 700; color: var(--text); }
.login-subtitle { margin: 4px 0 0; text-align: center; color: var(--text-muted); font-size: 13px; }
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); margin-bottom: 6px;
}
.field input {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
  background: var(--bg-soft); border: 1px solid var(--border-strong); border-radius: 10px;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn-primary {
  width: 100%; margin-top: 6px; padding: 12px 16px;
  font-size: 15px; font-weight: 700; font-family: inherit;
  background: var(--accent); border: none; border-radius: 10px; color: #fff; cursor: pointer;
  transition: background .15s ease;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary[disabled] { opacity: 0.6; cursor: not-allowed; }
.msg { color: var(--accent); margin: 14px 0 0; min-height: 18px; text-align: center; font-size: 13px; }
.msg.err { color: var(--tl-red); }
.login-footer { margin-top: 22px; text-align: center; font-size: 11px; color: var(--text-muted); }
