/* ── FacSuite — Shared Styles ── */
:root {
  /* Amazon Robotics palette */
  --tk-black: #000000;
  --tk-orange: #FF7900;
  --tk-light-blue: #41C4E1;
  --tk-dark-blue: #214E8E;
  --tk-purple: #6E298D;
  --tk-gray: #BBBCBC;
  --tk-squid-ink: #232F3E;
  --tk-prime-blue: #1A98FF;
  --tk-white: #FFFFFF;

  /* Domain theme colors */
  --domain-quizsuite: #FF7900;
  --domain-msr: #214E8E;
  --domain-refreshers: #2EA043;
  --domain-training-delivery: #6E298D;
  --domain-rostersuite: #41C4E1;

  /* Layout */
  --header-height: 56px;
  --sidebar-width: 0px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Amazon Ember', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #191E2A;
  color: #FFFFFF;
  min-height: 100vh;
}

/* ── Header ── */
.tk-header {
  background: var(--tk-squid-ink);
  color: var(--tk-white);
  border-bottom: 3px solid var(--header-accent, var(--tk-orange));
  height: var(--header-height);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tk-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
  font-size: 1.3rem;
  font-weight: 600;
}

.tk-brand-prefix {
  color: var(--tk-white);
  font-weight: 700;
  text-decoration: none;
  opacity: 0.92;
}

.tk-brand-prefix:hover {
  text-decoration: underline;
}

.tk-brand-suite {
  color: var(--tk-white);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.4px;
  background: linear-gradient(135deg, var(--header-accent-strong, rgba(255,121,0,0.28)), var(--header-accent-soft, rgba(255,121,0,0.14)));
  border: 1px solid var(--header-accent-soft, rgba(255,121,0,0.14));
  border-radius: 999px;
  padding: 4px 12px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

.tk-header-nav {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tk-header-nav-link {
  color: #DEE7F5;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}

.tk-header-nav-link:hover {
  color: var(--tk-white);
  background: rgba(255,255,255,0.08);
}

.tk-header-nav-link.active {
  color: var(--header-accent-contrast, var(--tk-white));
  background: var(--header-accent, var(--tk-orange));
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.tk-header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tk-user-info {
  font-size: 13px;
  color: #D8E0ED;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tk-user-info strong {
  color: var(--tk-white);
}

.tk-role-badge,
.tk-role-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tk-role-badge {
  background: var(--header-accent, var(--tk-orange));
  color: var(--header-accent-contrast, #191E2A);
}

.tk-role-button {
  background: var(--header-accent, var(--tk-orange));
  color: var(--header-accent-contrast, #191E2A);
  border: none;
  cursor: pointer;
}

.tk-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.tk-btn-primary {
  background: var(--tk-orange);
  color: var(--tk-white);
}

.tk-btn-primary:hover { background: #e06d00; }

.tk-btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--tk-white);
  border: 1px solid rgba(255,255,255,0.24);
}

.tk-btn-ghost:hover {
  color: var(--tk-white);
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.08);
}

/* ── Main Content ── */
.tk-main {
  margin-top: var(--header-height);
  padding: 32px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Login Page ── */
.tk-login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  padding: 32px;
}

.tk-login-card {
  background: var(--tk-squid-ink);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

.tk-login-card h2 {
  text-align: center;
  margin-bottom: 8px;
  color: var(--tk-orange);
}

.tk-login-card .subtitle {
  text-align: center;
  color: #aaa;
  margin-bottom: 24px;
  font-size: 14px;
}

.tk-form-group {
  margin-bottom: 16px;
}

.tk-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #ccc;
}

.tk-form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  font-size: 14px;
  background: #191E2A;
  color: #fff;
  transition: border-color 0.2s;
}

.tk-form-group input:focus {
  outline: none;
  border-color: var(--tk-orange);
  box-shadow: 0 0 0 3px rgba(255,121,0,0.15);
}

.tk-login-btn {
  width: 100%;
  padding: 12px;
  background: var(--tk-orange);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.tk-login-btn:hover { background: #e06d00; }

.tk-error {
  background: #fee;
  color: #c00;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* ── Dashboard Tool Cards ── */
.tk-welcome {
  margin-bottom: 32px;
}

.tk-welcome h1 {
  font-size: 28px;
  color: var(--tk-white);
  margin-bottom: 4px;
}

.tk-welcome p {
  color: #aaa;
  font-size: 15px;
}

.tk-tools-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.tk-tool-card {
  background: var(--tk-squid-ink);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 32px 24px;
  width: 220px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--tk-white);
  text-align: center;
  display: block;
}

.tk-tool-card:hover {
  border-color: var(--card-color, var(--tk-orange));
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.tk-tool-card .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.tk-tool-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--tk-white);
}

.tk-tool-card p {
  font-size: 0.85rem;
  color: #999;
  line-height: 1.4;
}

.tk-tool-card .role-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--tk-orange);
  color: var(--tk-squid-ink);
}

/* ── Placeholder Pages ── */
.tk-placeholder {
  text-align: center;
  padding: 80px 32px;
}

.tk-placeholder .icon { font-size: 64px; margin-bottom: 16px; }
.tk-placeholder h2 { color: var(--tk-orange); margin-bottom: 8px; }
.tk-placeholder p { color: #aaa; }

@media (max-width: 960px) {
  .tk-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tk-header-auth {
    justify-self: end;
  }
}

@media (max-width: 720px) {
  .tk-header {
    gap: 10px;
    padding: 0 16px;
  }

  .tk-brand {
    font-size: 1.05rem;
  }

  .tk-user-info {
    display: none;
  }

  .tk-header-nav-link {
    padding: 6px 10px;
    font-size: 12px;
  }

  .tk-btn {
    padding: 7px 12px;
    font-size: 13px;
  }
}
