/*
   SidePot — index.css (Home)
*/

/* Reset-ish */
* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  background: #f6f7fb;
  color: #0f172a;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: #2563eb; text-decoration: none; }
a:hover{ text-decoration: underline; }
menu, ul, ol{ list-style: none; padding: 0; margin: 0; }
hr{ border: 0; height: 1px; background: #e5e7eb; }

/* Page layout */
header, main, footer{
  width: min(1100px, 92vw);
  margin-inline: auto;
}
header{ 
    padding: 28px 0 14px; 
    display: flex;
    align-items: center;
    gap: 16px;
}

main{ padding: 16px 0 32px; display: grid; gap: 18px; }
footer{ padding: 28px 0; color: #64748b; }

/* Titles */
h1{
  margin: 0 0 12px;
  font-size: clamp(28px, 2.6vw + 12px, 42px);
  letter-spacing: .3px;
}
h1 sup{ font-size: .55em; position: relative; top: -.25em; opacity: .7; }

header h1{ margin: 0; }

/* Nav */
header nav{
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(2, 6, 23, .06);
}
nav menu{
  display: flex;
  gap: 6px;
  padding: 6px;
  flex-wrap: wrap;
}

nav li{
  flex: 0 0 auto;
}

nav li a{
  width: 124.17px;
  height: 45.59px;
  padding: 0;
  display: flex;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: wrap;
  overflow: hidden;
  gap: 24px;
  text-overflow: ellipsis;
  color: #000000;
  transition: transform .12s ease, background-color .12s ease, color .12s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

nav li a:hover,
nav li a:focus-visible{
  background: #eef2ff;
  color: #000000;
  transform: translateY(-1px);
  outline: none;
}

/* Highlight current page: index.html */
nav a[href$="dashboard.html"]{
  background: #2563eb;
  color: #ffffff;
}

/* Overview cards*/
#platform-overview,
[id="Platform Overview"]{
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-card {
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 18px 22px;
  font-size: 1rem;
  font-weight: 500;
  color: #e2e8f0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Hover effect for interactivity */
.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.35); /* blue glow */
  border-color: #2563eb;
}
/* Two-up grid (keeps your earlier spec) */
main{
  display: grid;
  gap: 16px 18px;
  grid-template-columns: repeat(2, minmax(420px, 1fr));
  align-items: start;
}
main > h2{ grid-column: 1 / -1; }

.dash-item{ margin: 0; }

/* Card head row */
.dash-card{
  width: 100%;
  min-height: 64px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #1f2937;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);

  /* icon | label | menu | caret */
  display: grid;
  grid-template-columns: 36px 1fr auto 20px;
  align-items: center;
  column-gap: 12px;

  font-weight: 600;
  position: relative; /* anchor dropdown */
  cursor: pointer;
}
.dash-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(59,130,246,.35);
  border-color: #2563eb;
}

.dash-card .icon{
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(96,165,250,.12);
  color: #60a5fa;
}
.dash-card .label{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-card .chev{ justify-self: end; opacity: .9; transition: transform .2s ease; }
.dash-card[aria-expanded="true"] .chev{ transform: rotate(180deg); }

/* Kebab trigger inside card */
.menu-trigger{
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px; line-height: 1;
  display: grid; place-items: center;
}
.menu-trigger:hover,
.menu-trigger:focus-visible{
  background: #111827;
  border-color: #1f2937;
  outline: none;
}

/* Dropdown popover (dark) */
.dropdown{
  position: absolute;
  top: calc(100% + 8px);
  right: 12px;
  min-width: 200px;
  background: #0d1426;
  color: #e2e8f0;
  border: 1px solid #1e293b;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.38);
  padding: 6px;
  z-index: 50;

  opacity: 0; transform: translateY(-6px) scale(.98);
  transition: opacity .16s ease, transform .2s ease;
}
.dropdown.open{ opacity: 1; transform: translateY(0) scale(1); }
.dropdown hr{ border: 0; height: 1px; background: #1f2937; margin: 6px 0; }

.dropdown > button{
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.dropdown > button:hover,
.dropdown > button:focus-visible{
  background: #111827;
  outline: none;
}

/* Slide-down panel (keep your earlier styles + align under label) */
.dash-panel{
  margin-top: 8px;
  border-radius: 12px;
  background: #0d1426;
  border: 1px solid #1e293b;
  box-shadow: 0 8px 24px rgba(0,0,0,.32);
  padding: 16px 18px;
  padding-left: calc(18px + 36px + 12px);
}
.inset{ display: grid; grid-template-columns: repeat(2, minmax(220px,1fr)); gap: 10px; }
.pill, .field > input, .field > select{
  background: #0f172a; border: 1px solid #1f2937; border-radius: 10px; color: #e2e8f0;
}
.pill{ display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.field{ display: grid; gap: 6px; font-size: .95rem; }
.field > input, .field > select{ padding: 10px 12px; }
.actions{ margin-top: 12px; display: flex; gap: 10px; }
.actions .secondary{ background:#101826; color:#93c5fd; border-color:#1f2937; }

/* Welcome block (second h1 inside main) */
main > h1{
  margin-top: 6px;
  margin-bottom: 8px;
}

/* Auth form */
form{
  width: 100%;
  max-width: 520px;
  display: grid;
  gap: 12px;
}
form > div{
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe0e6;
  border-radius: 10px;
  transition: box-shadow .15s ease;
  box-shadow: 0 6px 22px rgba(2, 6, 23, .05);
}

form > div:focus-within {
  box-shadow: 0 0 0 2px #2563eb66;
}
form input::placeholder {
  color: #64748b;
}
button + button {
  margin-top: 10px;
}

form > div span{
  width: 44px;
  min-width: 44px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #475569;
  border-right: 1px solid #eef0f4;

}
form input{
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 14px;
  width: 100%;
  font-size: 1rem;
  color: #0f172a;
}
form input::placeholder{ color: #94a3b8; }

/* Buttons */
button{
  appearance: none;
  border: 1px solid transparent;
  background: #2563eb;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
  box-shadow: 0 6px 20px rgba(37, 99, 235, .25);
}
button:hover{ transform: translateY(-1px); }
button:active{ transform: translateY(0); }

/* Make the second button outline style */
button + button{
  background: #ffffff;
  color: #2563eb;
  border-color: #c7d2fe;
  box-shadow: 0 6px 18px rgba(2, 6, 23, .05);
}
button + button:hover{ background: #f5f8ff; }

/* Footer */
footer img{
  margin: 10px 0 8px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 28px rgba(2, 6, 23, .06);
}
.text-reset{ color: inherit; }
footer a{ color: #2563eb; }

/* Accessibility focus */
:focus-visible{
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Small screens */
@media (max-width: 720px){
  #platform-overview,
  [id="Platform Overview"]{
    grid-template-columns: 1fr;
  }
  nav li a{ padding: 9px 12px; }
}

/* Dark mode */
@media (prefers-color-scheme: dark){
  body{ background: #0b1220; color: #e2e8f0; }
  nav, .card, form > div, footer img{
    background: #0f172a;
    border-color: #1f2937;
    box-shadow: 0 8px 28px rgba(0,0,0,.35);
  }
  hr{ background: #1f2937; }
  a, footer a{ color: #60a5fa; }
  form > div span{ border-right-color: #111827; color: #94a3b8; }
  form input{ color: #e2e8f0; }
  form input::placeholder{ color: #64748b; }
  button{
    background: #3b82f6;
    box-shadow: 0 6px 20px rgba(59, 130, 246, .28);
  }
  button + button{
    background: #101826;
    color: #93c5fd;
    border-color: #1f2937;
  }
}