/**
 * MS Tech Solution / Skillstorms ID Maker — global purple & peach theme.
 * Colors only; no layout or workflow changes.
 */
:root {
  --id-dark: #312C51;
  --id-bg: #48426D;
  --id-peach: #F0C38E;
  --id-salmon: #F1AA9B;
  --id-text: #312C51;
  --id-text-muted: #4a4268;
  --id-white: #ffffff;
  --id-topbar-gradient: linear-gradient(120deg, var(--id-dark) 0%, var(--id-bg) 55%, #5a5378 100%);
  --id-shell-gradient:
    radial-gradient(circle at top left, rgba(240, 195, 142, 0.18), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(241, 170, 155, 0.14), transparent 32rem),
    var(--id-bg);
}

/* ── Workspace shell (idmaker/base.html) ── */
body.workspace-bg {
  background: var(--id-shell-gradient);
  color: var(--id-text);
}

body.workspace-bg .workspace-card {
  background: rgba(72, 66, 109, 0.55);
  border: 1px solid rgba(240, 195, 142, 0.35);
  box-shadow: 0 12px 40px rgba(49, 44, 81, 0.18);
  backdrop-filter: blur(16px);
  color: var(--id-text);
}

body.workspace-bg .workspace-card > .mx-auto.rounded-xl.bg-slate-950,
body.workspace-bg .id-navbar {
  background: var(--id-dark) !important;
  color: var(--id-white);
  overflow: visible;
}

body.workspace-bg .workspace-card > .mx-auto.rounded-xl.bg-slate-950 .text-xs.uppercase,
body.workspace-bg .workspace-card > .mx-auto.rounded-xl.bg-slate-950 .text-xs.uppercase span,
body.workspace-bg .workspace-card > .mx-auto.rounded-xl.bg-slate-950 h1,
body.workspace-bg .id-navbar .text-slate-400,
body.workspace-bg .id-navbar .text-white {
  color: var(--id-white) !important;
}

body.workspace-bg .id-navbar .id-back-home {
  color: var(--id-white);
}

body.workspace-bg .id-navbar .id-back-home:hover {
  color: var(--id-peach);
}

body.workspace-bg #profileBtn,
body.workspace-bg .id-profile-btn {
  color: var(--id-dark);
  background: var(--id-peach);
  border-color: rgba(255, 255, 255, 0.2);
}

body.workspace-bg #profileBtn .cls-1,
body.workspace-bg .id-profile-btn .cls-1 {
  fill: var(--id-dark);
}

/* Back-home icon (replaces "Back to Home" text on all workspace navbars) */
.id-back-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.id-back-home svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  transition: transform 0.25s ease;
}
.id-back-home:hover {
  background: rgba(240, 195, 142, 0.28);
  color: var(--id-peach);
  transform: translateX(-1px);
}
.id-back-home:hover svg {
  animation: id-back-nudge 0.55s ease;
}
.id-back-home:active {
  transform: translateX(-2px) scale(0.96);
}
@keyframes id-back-nudge {
  0% { transform: translateX(0); }
  40% { transform: translateX(-4px); }
  70% { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}

/* Profile menu — never inherit navbar white text (white-on-white) */
#profileDropdown {
  background: #fff !important;
  color: #1e293b !important;
  z-index: 80;
}
#profileDropdown a {
  color: #334155 !important;
}
#profileDropdown a:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}
#profileDropdown a[href*="logout"] {
  color: #dc2626 !important;
}
#profileDropdown a[href*="logout"]:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

body.workspace-bg .workspace-card > .mx-auto.h-px {
  background: linear-gradient(to right, transparent, rgba(240, 195, 142, 0.45), transparent);
}

/* Footer — readable on purple / dark page shells */
.site-footer-wrap {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0.5rem 0.75rem 0.85rem;
}

.site-footer {
  margin-top: 0 !important;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(240, 195, 142, 0.4) !important;
  background: rgba(49, 44, 81, 0.72);
  box-shadow: 0 4px 16px rgba(49, 44, 81, 0.2);
  text-align: center;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  font-size: 11px;
  line-height: 1.4;
}

.site-footer-text,
.site-footer .site-footer-text {
  color: rgba(255, 255, 255, 0.92) !important;
}

.site-footer-divider {
  color: rgba(240, 195, 142, 0.55) !important;
}

.site-footer a,
.site-footer .site-footer-link {
  color: var(--id-peach) !important;
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer .site-footer-link:hover {
  color: #fff !important;
  text-decoration: underline;
}

/* Dark / purple page backgrounds */
body.workspace-bg .site-footer,
body.id-home-body .site-footer,
body.id-hero-body .site-footer,
body.id-themed-shell .site-footer {
  border-color: rgba(240, 195, 142, 0.4) !important;
  background: rgba(49, 44, 81, 0.72);
}

body.workspace-bg .site-footer-text,
body.id-home-body .site-footer-text,
body.id-hero-body .site-footer-text,
body.id-themed-shell .site-footer-text,
body.workspace-bg .site-footer .site-footer-text,
body.id-home-body .site-footer .site-footer-text,
body.id-hero-body .site-footer .site-footer-text {
  color: rgba(255, 255, 255, 0.92) !important;
}

body.workspace-bg .site-footer a,
body.id-home-body .site-footer a,
body.id-hero-body .site-footer a,
body.id-themed-shell .site-footer a {
  color: var(--id-peach) !important;
}

body.workspace-bg .site-footer a:hover,
body.id-home-body .site-footer a:hover,
body.id-hero-body .site-footer a:hover,
body.id-themed-shell .site-footer a:hover {
  color: #fff !important;
}

body.workspace-bg .site-footer-divider,
body.id-home-body .site-footer-divider,
body.id-hero-body .site-footer-divider,
body.id-themed-shell .site-footer-divider {
  color: rgba(240, 195, 142, 0.55) !important;
}

/* Auth pages — footer below login card */
body.id-auth-body .site-footer {
  background: rgba(49, 44, 81, 0.85);
}

/* Admin / light shell */
body.ap-themed .site-footer {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(240, 195, 142, 0.45) !important;
  box-shadow: 0 2px 10px rgba(49, 44, 81, 0.06);
}

body.ap-themed .site-footer-text,
body.ap-themed .site-footer .site-footer-text {
  color: var(--id-text) !important;
}

body.ap-themed .site-footer-divider {
  color: rgba(72, 66, 109, 0.35) !important;
}

body.ap-themed .site-footer a,
body.ap-themed .site-footer .site-footer-link {
  color: var(--id-dark) !important;
}

body.ap-themed .site-footer a:hover,
body.ap-themed .site-footer .site-footer-link:hover {
  color: var(--id-bg) !important;
}

/* ── Hero workflow shell (idmaker/hero.html, bulk hero) ── */
body.id-hero-body {
  background: var(--id-shell-gradient);
  color: var(--id-text);
}

.id-hero-shell {
  background: rgba(72, 66, 109, 0.45) !important;
  border: 1px solid rgba(240, 195, 142, 0.3);
  box-shadow: 0 12px 40px rgba(49, 44, 81, 0.2) !important;
}

.id-hero-navbar {
  background: var(--id-topbar-gradient) !important;
  color: var(--id-white);
}

.id-hero-navbar .id-back-home,
.id-hero-navbar .text-white {
  color: var(--id-white);
}

.id-hero-navbar .id-hero-project-name {
  color: var(--id-peach);
}

.id-hero-divider {
  border-color: rgba(240, 195, 142, 0.45) !important;
}

.id-hero-steps {
  border-color: rgba(240, 195, 142, 0.4) !important;
  background: linear-gradient(to bottom, rgba(72, 66, 109, 0.85), rgba(49, 44, 81, 0.75)) !important;
  color: var(--id-white);
}

.id-hero-steps .text-white,
.id-hero-steps a {
  color: var(--id-white);
}

.id-hero-steps button.text-white,
.id-hero-mobile-toggle {
  background: var(--id-peach) !important;
  color: var(--id-dark) !important;
}

/* ── Home / project list ── */
body.id-home-body .app-shell {
  background: var(--id-shell-gradient);
}

body.id-home-body .home-shell {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(240, 195, 142, 0.35);
  box-shadow: 0 12px 40px rgba(49, 44, 81, 0.15);
}

body.id-home-body .home-topbar,
body.id-home-body .project-modal-topbar {
  background: var(--id-topbar-gradient);
}

body.id-home-body .section-chip {
  background: linear-gradient(135deg, rgba(240, 195, 142, 0.25), rgba(241, 170, 155, 0.18));
  border-color: rgba(240, 195, 142, 0.45);
  color: var(--id-dark);
}

body.id-home-body .table-head {
  background: var(--id-topbar-gradient);
}

body.id-home-body .btn-create {
  background: linear-gradient(135deg, var(--id-peach), var(--id-salmon));
  color: var(--id-dark);
  box-shadow: 0 4px 14px rgba(49, 44, 81, 0.2);
}

body.id-home-body .btn-create:hover {
  background: linear-gradient(135deg, #f5d4a8, var(--id-salmon));
}

body.id-home-body .profile-btn {
  background: var(--id-peach);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--id-dark);
}

body.id-home-body .profile-btn:hover {
  background: var(--id-salmon);
  border-color: var(--id-salmon);
}

body.id-home-body .btn-open {
  background: var(--id-dark);
  color: var(--id-white);
}

body.id-home-body .btn-open:hover {
  background: #3d365f;
}

body.id-home-body .project-row:nth-child(5n+1) { border-left-color: var(--id-peach); }
body.id-home-body .project-row:nth-child(5n+2) { border-left-color: var(--id-salmon); }
body.id-home-body .project-row:nth-child(5n+3) { border-left-color: var(--id-bg); }
body.id-home-body .project-row:nth-child(5n+4) { border-left-color: #c4a574; }
body.id-home-body .project-row:nth-child(5n+5) { border-left-color: #7a7399; }

body.id-home-body .avatar {
  background: linear-gradient(135deg, var(--id-dark), var(--id-bg));
}

body.id-home-body .project-row:nth-child(5n+2) .avatar { background: linear-gradient(135deg, var(--id-bg), #5a5378); }
body.id-home-body .project-row:nth-child(5n+3) .avatar { background: linear-gradient(135deg, var(--id-peach), var(--id-salmon)); }
body.id-home-body .project-row:nth-child(5n+4) .avatar { background: linear-gradient(135deg, #c4a574, var(--id-peach)); }
body.id-home-body .project-row:nth-child(5n+5) .avatar { background: linear-gradient(135deg, var(--id-salmon), #e08a78); }

body.id-home-body .project-field-input:focus {
  border-color: var(--id-peach);
  box-shadow: 0 0 0 3px rgba(240, 195, 142, 0.35);
}

body.id-home-body .project-modal-accent {
  background: linear-gradient(90deg, var(--id-peach), var(--id-salmon), var(--id-dark));
}

/* (footer styles consolidated above) */

/* ── Admin panel ── */
body.ap-themed {
  --ap-brand: var(--id-dark);
  --ap-sidebar: var(--id-dark);
  --ap-sidebar-hover: #3d365f;
}

body.ap-themed .ap-shell {
  background:
    radial-gradient(circle at 0% 0%, rgba(240, 195, 142, 0.12), transparent 28rem),
    radial-gradient(circle at 100% 100%, rgba(241, 170, 155, 0.1), transparent 24rem),
    #ede8f3;
}

body.ap-themed .ap-sidebar {
  background: var(--id-topbar-gradient);
}

body.ap-themed .ap-nav-link.active {
  background: linear-gradient(135deg, rgba(240, 195, 142, 0.35), rgba(241, 170, 155, 0.22));
}

body.ap-themed .ap-btn-primary,
body.ap-themed .btn-primary {
  background: linear-gradient(135deg, var(--id-dark), var(--id-bg)) !important;
  border-color: var(--id-dark) !important;
  color: var(--id-white) !important;
}

body.ap-themed .ap-btn-primary:hover,
body.ap-themed .btn-primary:hover {
  background: linear-gradient(135deg, #3d365f, #5a5378) !important;
}

/* ── Auth / password reset pages ── */
body.id-auth-body {
  background: var(--id-shell-gradient) !important;
  color: var(--id-text);
}

body.id-auth-body .id-auth-card {
  border: 1px solid rgba(240, 195, 142, 0.35);
}

body.id-auth-body .btn-primary,
body.id-auth-body button[type="submit"] {
  background: var(--id-dark) !important;
  border-color: var(--id-dark) !important;
  color: var(--id-white) !important;
}

body.id-auth-body .btn-primary:hover,
body.id-auth-body button[type="submit"]:hover {
  background: var(--id-bg) !important;
}

body.id-auth-body input:focus,
body.id-auth-body .password-field-wrap input:focus {
  box-shadow: 0 0 0 2px rgba(240, 195, 142, 0.65) !important;
  border-color: var(--id-peach) !important;
}

/* ── Shared utility classes ── */
.id-topbar {
  background: var(--id-topbar-gradient);
  color: var(--id-white);
}

.id-topbar h1,
.id-topbar h2,
.id-topbar p,
.id-topbar span {
  color: var(--id-white);
}

.id-topbar a {
  color: var(--id-peach);
}

.id-topbar a:hover {
  color: var(--id-salmon);
}

.id-btn-primary {
  background: var(--id-dark);
  color: var(--id-white);
}

.id-btn-primary:hover {
  background: var(--id-bg);
}

.id-btn-accent {
  background: var(--id-peach);
  color: var(--id-dark);
}

.id-btn-accent:hover {
  background: var(--id-salmon);
}

.id-text-muted {
  color: var(--id-text-muted);
}

.id-card-shell {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(240, 195, 142, 0.45);
  color: var(--id-text);
}

/* Legacy blue → theme (scoped to main content, not Bootstrap defaults) */
.id-card-shell .text-sky-700,
.id-card-shell a.text-sky-700 {
  color: var(--id-dark) !important;
}

.id-card-shell .bg-\[\#008DD2\],
.id-card-shell .bg-blue-500,
.id-topbar .bg-blue-500 {
  background-color: var(--id-dark) !important;
}

.id-card-shell .text-\[\#008DD2\],
.id-card-shell .text-blue-500 {
  color: var(--id-dark) !important;
}

.id-card-shell .border-\[\#008DD2\],
.id-card-shell .border-blue-500 {
  border-color: var(--id-peach) !important;
}

/* Form display compact chrome (optional body class) */
body.form-display-compact .app-page {
  padding: 0.25rem 0.375rem 0.5rem;
}

body.form-display-compact .workspace-card {
  padding: 0.25rem !important;
}

body.form-display-compact .workspace-card > .mx-auto.rounded-xl.bg-slate-950 > div,
body.form-display-compact .id-navbar > div {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.45rem;
}

body.form-display-compact .id-navbar .id-back-home {
  width: 1.75rem;
  height: 1.75rem;
}
body.form-display-compact .id-navbar .id-back-home svg {
  width: 0.95rem;
  height: 0.95rem;
}

body.form-display-compact .workspace-card > .mx-auto.rounded-xl.bg-slate-950 .text-xs.uppercase {
  font-size: 0;
  line-height: 0;
  position: static;
  transform: none;
}

body.form-display-compact .workspace-card > .mx-auto.rounded-xl.bg-slate-950 .text-xs.uppercase span {
  margin-top: 0;
  font-size: 0.8rem;
  line-height: 1.2;
  max-width: 42vw;
}

body.form-display-compact .workspace-card > .mx-auto.h-px {
  display: none;
}

body.form-display-compact .workspace-card > div > .mt-3 {
  margin-top: 0.2rem !important;
}

body.form-display-compact #profileBtn {
  height: 1.75rem;
  width: 1.75rem;
}

body.form-display-compact #profileBtn svg {
  height: 1.125rem;
  width: 1.125rem;
}

@media (min-width: 640px) {
  body.form-display-compact .app-page {
    padding: 0.5rem 1rem;
  }

  body.form-display-compact .workspace-card {
    padding: 0.5rem !important;
  }

  body.form-display-compact .workspace-card > .mx-auto.rounded-xl.bg-slate-950 > div,
  body.form-display-compact .id-navbar > div {
    padding: 0.4rem 0.75rem;
  }

  body.form-display-compact .workspace-card > .mx-auto.rounded-xl.bg-slate-950 .text-xs.uppercase span {
    font-size: 1rem;
    max-width: 220px;
  }
}
