/* /user/assets/user.css */

/* Page shell */
.userPage{
  padding: 52px 0 70px;
  background: var(--soft);
  min-height: calc(100vh - 120px);
}

.userWrap{
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.userCard{
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding: 18px;
}

/* Existing typography helpers */
.userTitle{ margin:0 0 6px; font-size:22px; }
.userSub{
  margin:0 0 14px;
  color:var(--muted);
  font-size:13.5px;
  line-height:1.6;
}

.userForm{ display:grid; gap:12px; }

.userField label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}
.userField input{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  font: inherit;
  outline:none;
}

.userRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

.userMsg{ margin:0; font-size:13px; color:var(--muted); }
.userMsg--ok{ color:#1f7a3d; }
.userMsg--err{ color:#b42318; }

.kbd{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(250,247,242,0.7);
}

/* ---------------------------
   Dashboard (Option A)
---------------------------- */

/* Top shell card */
.dashShell{
  padding: 18px;
  background:
    radial-gradient(900px 340px at 15% 0%, rgba(176,138,86,0.14), transparent 60%),
    radial-gradient(760px 320px at 95% 10%, rgba(123,45,59,0.10), transparent 62%),
    #fff;
}

.dashHeader{
  display:flex;
  gap: 14px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}

.dashHeader__left{ min-width: 240px; }

.dashHeader__right{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}

.dashTitle{
  margin:0;
  font-size: 26px;
  letter-spacing: -0.2px;
  font-family: "Playfair Display", serif;
}

.dashSub{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.dashMeta{ margin-top: 10px; }

/* Stats row */
.dashStats{
  margin-top: 14px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.statCard{
  border:1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow2);
  padding: 14px 14px;
}

.statCard--wide{
  background:
    radial-gradient(520px 220px at 15% 20%, rgba(176,138,86,0.12), transparent 65%),
    radial-gradient(520px 220px at 92% 10%, rgba(123,45,59,0.10), transparent 68%),
    rgba(255,255,255,0.92);
}

.statLabel{
  margin:0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.statValue{
  margin: 8px 0 4px;
  font-size: 28px;
  font-weight: 700;
  color: rgba(20,19,22,0.92);
  letter-spacing: -0.2px;
}

.statValue--sm{
  font-size: 18px;
  font-weight: 700;
}

.statHint{
  margin:0;
  font-size: 12.5px;
  color: rgba(20,19,22,0.72);
}

/* Controls row under header */
.dashControls{
  margin-top: 12px;
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
}

/* Segmented tabs */
.segTabs{
  display:inline-flex;
  gap: 6px;
  align-items:center;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.85);
}

.segTab{
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 12.5px;
  color: rgba(20,19,22,0.86);
  transition: transform 120ms ease, background 120ms ease, opacity 120ms ease;
}
.segTab:hover{ opacity: .92; transform: translateY(-1px); }

.segTab.isActive{
  background: rgba(20,19,22,0.92);
  color: #fff;
  border-color: rgba(20,19,22,0.12);
}

/* Grid layout for panels (2 columns desktop) */
.dashGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Panel headings */
.dashPanel{ padding: 18px; }

.panelHead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap:wrap;
}

.panelHead--withControls{
  align-items: center;
}

.panelTitle{
  margin:0;
  font-size: 18px;
  font-family: "Playfair Display", serif;
}

.panelSub{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Table styling */
.tableWrap{
  border:1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow2);
  background:#fff;
}

table{ width:100%; border-collapse:collapse; }

th, td{
  text-align:left;
  padding:12px 12px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}

th{
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:0.35px;
  background: rgba(250,247,242,0.65);
}

td{
  font-size:13.5px;
  color:rgba(20,19,22,0.9);
  background:#fff;
}

.tdMuted{
  color:var(--muted);
  font-size:12.5px;
}

.rowNote{ max-width: 52ch; white-space:pre-wrap; }

/* ---------------------------
   Calendar (Apple-ish)
---------------------------- */

.calControls{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap:wrap;
}

.btnIcon{
  padding: 10px 12px;
  border-radius: 999px;
}

.calMonthPill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  font-weight: 700;
  font-size: 12.5px;
  color: rgba(20,19,22,0.86);
}

.calLayout{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap: 14px;
  align-items:start;
}

.calCard{
  border:1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(250,247,242,0.60), rgba(255,255,255,0.95));
  box-shadow: var(--shadow2);
  overflow:hidden;
}

.calGrid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

.calDow{
  padding: 10px 10px;
  font-size: 11px;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  color: rgba(20,19,22,0.55);
  background: rgba(255,255,255,0.6);
  border-bottom: 1px solid var(--line);
}

.calDay{
  position:relative;
  border: 0;
  background: rgba(255,255,255,0.86);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 10px 12px;
  min-height: 54px;
  cursor:pointer;
  text-align:left;
  transition: background 120ms ease, transform 120ms ease;
}

.calDay:nth-child(7n + 7){
  border-right: 0;
}

.calDay:hover{
  background: rgba(250,247,242,0.82);
}

.calDay:active{
  transform: scale(0.99);
}

.calDay.isDim{
  background: rgba(255,255,255,0.55);
  color: rgba(20,19,22,0.55);
}

.calDay.isToday .calNum{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(20,19,22,0.92);
  color:#fff;
  font-weight: 800;
}

.calNum{
  display:block;
  font-weight: 700;
  font-size: 13px;
  color: rgba(20,19,22,0.9);
}

.calDots{
  display:flex;
  align-items:center;
  gap: 4px;
  margin-top: 8px;
}

.calDot{
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(123,45,59,0.85);
  opacity: 0.9;
}

.calMore{
  font-size: 11px;
  color: rgba(20,19,22,0.7);
  font-weight: 700;
  margin-left: 2px;
}

.calSide{
  border:1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow2);
  padding: 12px;
}

.calSideTitle{
  margin: 2px 0 10px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  color: rgba(20,19,22,0.7);
}

.calGroup{
  padding: 10px 8px;
  border-radius: 14px;
}

.calGroup + .calGroup{
  border-top: 1px solid var(--line);
}

.calGroup__title{
  margin:0 0 8px;
  font-weight: 800;
  font-size: 12.5px;
  color: rgba(20,19,22,0.82);
}

.calGroup__items{
  display:grid;
  gap: 8px;
}

.calItem{
  width:100%;
  border: 1px solid rgba(20,19,22,0.10);
  background: rgba(250,247,242,0.55);
  border-radius: 14px;
  padding: 10px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  cursor:pointer;
  transition: transform 120ms ease, background 120ms ease;
  text-align:left;
}

.calItem:hover{
  background: rgba(250,247,242,0.75);
  transform: translateY(-1px);
}

.calItem__title{
  margin:0;
  font-weight: 800;
  font-size: 13px;
  color: rgba(20,19,22,0.9);
}

.calItem__sub{
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(20,19,22,0.66);
  max-width: 44ch;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.calItem__time{
  margin:0;
  font-size: 12px;
  color: rgba(20,19,22,0.72);
  font-weight: 700;
  white-space:nowrap;
}

.calHint{
  margin: 10px 0 0;
  font-size: 12.5px;
  color: rgba(20,19,22,0.62);
}

/* highlight animation when jumping */
.isFlash{
  animation: flashGlow 1.2s ease;
}
@keyframes flashGlow{
  0%{ box-shadow: 0 0 0 rgba(0,0,0,0); background: rgba(250,247,242,0.55); }
  20%{ box-shadow: 0 0 0 4px rgba(123,45,59,0.14); background: rgba(250,247,242,0.90); }
  100%{ box-shadow: 0 0 0 rgba(0,0,0,0); background: rgba(250,247,242,0.55); }
}

/* ---------------------------
   Admin Calendar Delete Button
---------------------------- */

.detailActions{
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* Scoped so it won’t affect other buttons site-wide */
.detailActions .btnDanger{
  -webkit-appearance: none;
  appearance: none;
  outline: none;

  border: 1px solid rgba(123,45,59,0.35);
  background: rgba(123,45,59,0.08);
  color: rgba(123,45,59,0.92);

  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 800;
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;

  box-shadow: var(--shadow2);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

.detailActions .btnDanger:hover{
  background: rgba(123,45,59,0.12);
  border-color: rgba(123,45,59,0.6);
  transform: translateY(-1px);
}

.detailActions .btnDanger:active{
  transform: translateY(0);
}

.detailActions .btnDanger:focus{
  outline: none;
}

.detailActions .btnDanger:focus-visible{
  outline: 3px solid rgba(123,45,59,0.18);
  outline-offset: 3px;
}

/* Responsive */
@media (max-width: 980px){
  .dashStats{ grid-template-columns: 1fr; }
  .dashGrid{ grid-template-columns: 1fr; }
  .calLayout{ grid-template-columns: 1fr; }
}

@media (max-width: 820px){
  #panelPending th:nth-child(3),
  #panelPending td:nth-child(3),
  #panelAppts th:nth-child(3),
  #panelAppts td:nth-child(3){
    display:none;
  }
}

@media (max-width: 560px){
  .userCard{ padding: 16px; }
  .dashTitle{ font-size: 24px; }
  th, td{ padding: 11px 10px; }
}
