/* =========================
   PROFILE DASHBOARD 2026 PRO
   SaaS Glass UI
========================= */

.main-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 25px;
}

/* =========================
   TITLE
========================= */

.section-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 18px;
  color: #e5e7eb;
  letter-spacing: 0.3px;
}

/* =========================
   PAL SELECT
========================= */

#pal{
  width:100%;
  margin-top:10px;
  padding:12px 14px;

  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);

  background:rgba(255,255,255,.05);
  color:#fff;

  font-size:14px;
  font-weight:500;

  outline:none;
  cursor:pointer;

  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background .2s ease;

  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;

  background-image:
    linear-gradient(45deg, transparent 50%, #94a3b8 50%),
    linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size:6px 6px;
  background-repeat:no-repeat;
}

#pal:hover{
  border-color:rgba(56,189,248,.3);
  background:rgba(255,255,255,.07);
}

#pal:focus{
  border-color:#38bdf8;
  box-shadow:0 0 0 3px rgba(56,189,248,.18);
}

#pal option{
  background:#111827;
  color:#fff;
}

#pal::-ms-expand{
  display:none;
}

/* =========================
   GRID
========================= */

.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================
   CARD BASE (GLASS PRO)
========================= */

.profile-card {
  background: rgba(17, 24, 39, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 18px;
  padding: 18px;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);

  transition: 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* glow hover */
.profile-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}

/* subtle glow background */
.profile-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(14,165,233,0.25), transparent 60%);
  filter: blur(20px);
  opacity: 0.5;
}

/* =========================
   CARD TITLE
========================= */

.profile-title {
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 10px;
  letter-spacing: 0.4px;
}

/* =========================
   BIG NUMBERS (KPI STYLE)
========================= */

.big-number {
  font-size: 38px;
  font-weight: 900;
  color: #e5e7eb;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* subtitle */
.sub {
  color: #94a3b8;
  font-size: 13px;
  margin-top: 6px;
}

/* =========================
   USER INFO BLOCK
========================= */

#email,
#gender,
#age,
#weight,
#height {
  font-size: 14px;
  color: #cbd5e1;
  margin: 6px 0;
}

/* =========================
   TOGGLE SWITCH (PRO UI)
========================= */

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-top: 14px;

  padding: 10px;
  border-radius: 12px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);

  cursor: pointer;
  transition: 0.2s ease;
}

.toggle:hover {
  border-color: rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.06);
}

.toggle input {
  transform: scale(1.2);
  accent-color: #0ea5e9;
}


/* =========================
   KPI COLORS
========================= */

#cpm { color: #38bdf8; }
#ppm { color: #22c55e; }
#bmi { color: #facc15; }

/* =========================
   LINKS
========================= */

.link-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: 0.25s ease;
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.25);
}

.profile-grid.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 0.9fr 0.9fr;
  gap: 16px;
  align-items: stretch;
}

/* =========================
   CARD ANIMATION
========================= */

.profile-card {
  animation: fadeUp 0.35s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================
   DASHBOARD GRID (REAL VERSION)
========================= */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* DESKTOP 2x2 LAYOUT */
@media (min-width: 900px) {

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "user edit"
      "weight kpi";
    align-items: stretch;
  }

.user-card,
.edit-card {
  min-height: 430px;
  height: 430px;
}
  .weight-card { 
    grid-area: weight;
    min-height:480px !important;
  }

.kpi-stack {
  grid-area: kpi;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 480px !important;
}

}

/* =========================
   KPI STACK
========================= */

.kpi-stack .profile-card {
  flex: 1;
}

/* =========================
   WEIGHT CARD BOOST
========================= */

.weight-card {
  min-height: 100%;
}

/* =========================
   INPUT UX FIX (weight)
========================= */

#weightLogInput {
  width: 100%;
  padding: 12px 14px;
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: #fff;
  outline: none;
  font-size: 14px;
  transition: 0.2s;
}

#weightLogInput:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.15);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  /* =========================
     RESET GRID COMPLETELY
  ========================= */
  .dashboard-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
  }

  /* =========================
     FORCE ORDER (bez areas)
  ========================= */

  .user-card {
    grid-area: unset !important;
  min-height: 330px;
  height: 330px;
    order: 1;
  }

  .edit-card {
    grid-area: unset !important;
  min-height: 430px;
  height: 430px;
    order: 2;
  }

  /* KPI → TERAZ WYŻEJ (po edit) */
  .kpi-stack {
    grid-area: unset !important;
    order: 3;

    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
    width: 100%;
  }

  .kpi-stack .profile-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #cpm, #ppm, #bmi {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* WEIGHT → NA SAMYM DOLE */
  .weight-card {
    grid-area: unset !important;
    order: 4;
  }

/* ACTIVITY → JESZCZE NIŻEJ */
.activity-card {
  grid-area: unset !important;
  order:5;
}

  /* =========================
     SAFE CARD BEHAVIOR
  ========================= */


  /* =========================
     TYPO ONLY
  ========================= */
  .big-number {
    font-size: 32px;
  }

  .profile-title {
    font-size: 13px;
  }

  #email,
  #gender,
  #age,
  #weight,
  #height {
    font-size: 13px;
  }

  /* =========================
     CHART FIX
  ========================= */
  #weightChart {
    width: 100% !important;
    height: 200px !important;
  }

  /* =========================
     BUTTONS SAFE
  ========================= */
  #addWeightBtn,
  #resetWeightBtn {
    width: 100%;
  }
}