/* styles.css — replacement (drop in for the previous file) */

/* --- Base / reset --- */
*,
*::before,
*::after { box-sizing: border-box; }
html,body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #0f1720;
  background: linear-gradient(180deg, #f6f8fb 0%, #eef3f7 100%);
  line-height: 1.45;
  font-size: 16px;
}

/* --- Header --- */

.app-header {
  display:flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-logo {
  height: 196px;       /* professional header size */
  width: auto;
  max-width: 280px;
  display: block;
}


  @media (max-width: 640px) {
  .app-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-logo {
    height: 42px;
  }

  .brand-text h1 {
    font-size: 1rem;
  }

  .brand-text p {
    font-size: 0.7rem;
  }
}


.app-header .brand {
  display: flex;
  flex-direction: column;   /* stack logo + text */
  align-items: center;      /* horizontal centering */
  justify-content: center;  /* vertical centering */
}


.app-header .brand h1 {
  margin: 0;
  align-items: center;
  text-align: center;
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.app-header .brand p {
  margin: 0;
  text-align: center;
  font-size: 1.78rem;
  color: rgba(255,255,255,0.86);
  opacity: 0.9;
}

/* --- App shell layout --- */
.app-shell {
  display: flex;
  min-height: calc(100vh - 88px);
  gap: 1.25rem;
  padding: 1.25rem;
}

/* --- Sidebar as button list --- */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: 0 8px 20px rgba(23,34,56,0.06);
  border: 1px solid rgba(16,24,40,0.04);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Search / top area if added later */
.sidebar .sidebar-top {
  padding: 0 0.25rem;
}

/* Make list items into full-width buttons */
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0.2rem;
  display: grid;
  gap: 0.45rem;
}

.sidebar li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  user-select: none;
  color: #0b1220;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(248,251,255,0.55));
  box-shadow: inset 0 -1px 0 rgba(16,24,40,0.02);
}

/* subtle icon placeholder on left (keeps spacing consistent) */
.sidebar li::before {
  content: "";
  display:inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(180deg,#e6eefc,#d6e7fb);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  margin-left: -0.25rem;
  opacity: 0.95;
}

/* hover and focus states */
.sidebar li:hover,
.sidebar li:focus {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(9,30,66,0.08);
  background: linear-gradient(180deg,#ffffff,#f3f7ff);
  outline: none;
}

/* active / selected look */
.sidebar li.active {
  background: linear-gradient(90deg,#0b1220,#0f1b2c);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(11,18,32,0.18);
  border: 1px solid rgba(255,255,255,0.06);
}
.sidebar li.active::before {
  background: linear-gradient(180deg,#ffd680,#ffb347);
  box-shadow: 0 2px 8px rgba(255,160,38,0.16);
}

/* make keyboard focus visible */
.sidebar li:focus-visible {
  box-shadow: 0 0 0 4px rgba(16,24,40,0.06);
  border-color: rgba(16,24,40,0.06);
}

/* --- Main content area --- */
main#content {
  flex: 1;
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Section header */
.section-header {
  margin-bottom: 0.3rem;
  padding: 0.35rem 0.5rem;
}
.section-header h2 {
  margin: 0 0 0.15rem;
  font-size: 1.15rem;
  color: #07102a;
  font-weight: 700;
}
.section-header p {
  margin: 0;
  color: #4b5866;
  font-size: 0.92rem;
}

/* --- Grid and cards --- */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1.25rem;
  align-items: start;
}

/* single column on small screens */
@media (max-width: 980px) {
  .app-shell { flex-direction: column; padding: 1rem; }
  .sidebar { width: 100%; display: flex; overflow-x: auto; gap: 0.5rem; padding: 0.6rem; border-radius: 10px; }
  .sidebar ul { display: flex; gap: 0.6rem; }
  .sidebar li { white-space: nowrap; min-width: 210px; justify-content: center; }
  .section-grid { grid-template-columns: 1fr; }
}

/* card look */
.card {
  background: linear-gradient(180deg,#ffffff,#fbfdff);
  border-radius: 12px;
  padding: 1.05rem;
  box-shadow: 0 10px 30px rgba(16,24,40,0.06);
  border: 1px solid rgba(16,24,40,0.04);
}
.card h3 { margin: 0 0 0.6rem; font-size: 1rem; color: #0b1220; }
.card p, .card ul { margin: 0; color: #374151; font-size: 0.95rem; }
.card ul { padding-left: 1.05rem; margin-top: 0.45rem; }

/* form rows */
.form-row {
  display: flex;
  gap: 0.8rem;
  margin: 0.65rem 0;
  flex-wrap: wrap;
}
.form-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
  color: #24303a;
  min-width: 160px;
  flex: 1;
}
.form-row input[type="number"],
.form-row select {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(16,24,40,0.06);
  background: linear-gradient(180deg,#fff,#fbfdff);
  box-shadow: inset 0 -1px 0 rgba(16,24,40,0.02);
  font-size: 0.95rem;
  outline: none;
  transition: box-shadow .12s ease, border-color .12s ease;
}
.form-row input:focus,
.form-row select:focus {
  border-color: rgba(16,115,255,0.9);
  box-shadow: 0 6px 18px rgba(16,115,255,0.07);
}

/* calc button style */
button.calc-btn {
  display: inline-block;
  margin-top: 0.35rem;
  background: linear-gradient(180deg,#0b1220,#163049);
  color: #fff;
  border: none;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(11,18,32,0.18);
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
button.calc-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(11,18,32,0.22); }
button.calc-btn:active { transform: translateY(0); opacity: 0.95; }
button.calc-btn:focus-visible { outline: none; box-shadow: 0 0 0 6px rgba(2,132,199,0.12); }

/* results */
.result {
  margin-top: 0.6rem;
  padding: 0.55rem;
  border-radius: 8px;
  font-weight: 700;
  color: #062034;
  background: linear-gradient(180deg,#f1fbff,#eef8ff);
  border: 1px solid rgba(3,102,214,0.06);
  display: inline-block;
}

/* table wrapper */
.table-wrapper {
  max-height: 340px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid rgba(16,24,40,0.04);
  background: #fff;
  box-shadow: 0 6px 20px rgba(16,24,40,0.03);
  margin-top: 0.6rem;
}
.table-wrapper table { width: 100%; border-collapse: collapse; font-size: 0.88rem; color: #073045; }
.table-wrapper th,
.table-wrapper td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid rgba(16,24,40,0.04);
  text-align: center;
}
.table-wrapper th {
  position: sticky; top: 0;
  background: linear-gradient(180deg,#fbfdff,#f1f6fa);
  font-weight: 700;
  color: #0b1220;
  z-index: 2;
}

/* footer */
.app-footer {
  padding: 0.8rem 1.25rem;
  font-size: 0.8rem;
  color: #475569;
  text-align: center;
}

/* small helpers */
.small-muted { font-size: 0.85rem; color: #6b7280; }
.kv { display:flex; gap:0.5rem; align-items:center; }

/* accessible reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; transform: none !important; }
}
