/* Platform Service Sidebar & Workspace Styles (Blue Theme based on ax_service) */
:root {
  --pf-navy: #15294d;
  --pf-blue: #2e6fd6;
  --pf-blue-soft: #e8f0fc;
  --pf-bg: #f6f5fb;
  --pf-card: #ffffff;
  --pf-line: #e1e7f0;
  --pf-text: #1a2233;
  --pf-muted: #6b7790;
}

.pf-wrapper {
  font-family: "Pretendard", sans-serif;
  color: var(--pf-text);
  font-size: 17px;
  line-height: 1.5;
  padding: 0 0 72px;
  background: var(--pf-bg);
  min-height: 80vh;
}

.pf-workspace {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 26px;
  max-width: 1400px;
  margin: 40px auto 0;
  padding: 0 36px;
}

.pf-sidebar {
  align-self: start;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid rgba(46, 111, 214, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(46, 111, 214, 0.10);
}

.pf-sidebar__header {
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--pf-line);
}

.pf-sidebar__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--pf-blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.pf-sidebar__header h2 {
  margin: 0;
  color: var(--pf-navy);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.pf-sidebar__header p {
  margin: 7px 0 0;
  color: var(--pf-muted);
  font-size: 15px;
  line-height: 1.45;
}

.pf-stepper {
  padding: 10px 12px 14px;
}

.pf-sidebar .st {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 11px;
  width: 100%;
  margin: 0;
  padding: 10px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--pf-muted);
  font: inherit;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease;
  cursor: pointer;
  text-decoration: none;
}

.pf-sidebar .st:hover {
  background: #f0f4fa;
  color: var(--pf-navy);
}

.pf-sidebar .st .dot {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  box-sizing: border-box;
  border: 1px solid #d0deef;
  border-radius: 50%;
  background: #fff;
  color: #8693a7;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.18s ease;
}

.pf-sidebar .st .lbl {
  align-self: center;
  color: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.pf-sidebar .st .nav-caption {
  grid-column: 2;
  margin-top: 2px;
  color: #9aa6b6;
  font-size: 13px;
  line-height: 1.25;
}

.pf-sidebar .st.active {
  background: linear-gradient(90deg, #e8f0fc 0%, #f4f8fd 100%);
  color: var(--pf-navy);
}

.pf-sidebar .st.active::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--pf-blue);
}

.pf-sidebar .st.active .dot {
  border-color: var(--pf-blue);
  background: var(--pf-blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(46, 111, 214, 0.14);
}

.pf-sidebar .st.active .lbl {
  font-weight: 700;
}

.pf-workbench {
  min-width: 0;
}

.pf-content-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 4px 16px;
}

.pf-content-head__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--pf-blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.pf-content-head h2 {
  margin: 0;
  color: var(--pf-navy);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.pf-container {
  min-width: 0;
  padding: 30px;
  border: 1px solid rgba(46, 111, 214, 0.12);
  border-radius: 16px;
  background: var(--pf-card);
  box-shadow: 0 10px 30px rgba(46, 111, 214, 0.06);
}

/* ===== Tablet (769px - 960px): Horizontal Compact Navigation ===== */
@media (max-width: 960px) {
  .pf-workspace {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
    padding: 0 24px;
  }
  
  .pf-sidebar {
    position: static;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    max-height: 60px;
    overflow: visible;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(46, 111, 214, 0.08);
  }
  
  .pf-sidebar__header {
    flex-shrink: 0;
    padding: 0;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .pf-sidebar__eyebrow {
    font-size: 11px;
    margin-bottom: 0;
  }
  
  .pf-sidebar__header h2 {
    font-size: 18px;
    white-space: nowrap;
    margin: 0;
  }
  
  .pf-sidebar__header p {
    display: none;
  }
  
  .pf-stepper {
    flex: 1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
  }
  
  .pf-stepper::-webkit-scrollbar {
    display: none;
  }
  
  .pf-sidebar .st {
    position: relative;
    flex-shrink: 0;
    width: auto;
    min-width: 110px;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 8px;
    border-radius: 8px;
  }
  
  .pf-sidebar .st .dot {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  
  .pf-sidebar .st .lbl {
    font-size: 14px;
    white-space: nowrap;
  }
  
  .pf-sidebar .st .nav-caption {
    display: none;
  }
  
  .pf-sidebar .st.active::before {
    top: 8px;
    bottom: 8px;
    width: 3px;
  }
  
  .pf-workbench {
    margin-top: 0;
  }
  
  .pf-container {
    padding: 28px 24px;
  }
}

/* ===== Mobile Large (481px - 768px): Icon + Compact Label ===== */
@media (max-width: 768px) {
  .pf-workspace {
    margin-top: 16px;
    padding: 0 16px;
    gap: 16px;
  }
  
  .pf-sidebar {
    padding: 10px 12px;
    max-height: 52px;
    gap: 12px;
    border-radius: 10px;
  }
  
  .pf-sidebar__header {
    gap: 6px;
  }
  
  .pf-sidebar__eyebrow {
    display: none;
  }
  
  .pf-sidebar__header h2 {
    font-size: 16px;
  }
  
  .pf-stepper {
    gap: 6px;
  }
  
  .pf-sidebar .st {
    min-width: 90px;
    padding: 6px 10px;
    column-gap: 6px;
    grid-template-columns: 22px minmax(0, 1fr);
    border-radius: 8px;
  }
  
  .pf-sidebar .st .dot {
    width: 22px;
    height: 22px;
    font-size: 12px;
    border-width: 1px;
  }
  
  .pf-sidebar .st .lbl {
    font-size: 13px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .pf-sidebar .st.active::before {
    top: 6px;
    bottom: 6px;
    width: 2px;
  }
  
  .pf-sidebar .st.active .dot {
    box-shadow: 0 0 0 3px rgba(46, 111, 214, 0.14);
  }
  
  .pf-content-head {
    padding: 0 0 12px;
    gap: 12px;
  }
  
  .pf-content-head h2 {
    font-size: 22px;
  }
  
  .pf-content-head__eyebrow {
    font-size: 12px;
  }
  
  .pf-container {
    padding: 24px 16px;
    border-radius: 14px;
  }
}

/* ===== Mobile Small (~480px): Icon Only Mode ===== */
@media (max-width: 480px) {
  .pf-workspace {
    margin-top: 12px;
    gap: 12px;
  }
  
  .pf-sidebar {
    padding: 6px 8px;
    max-height: 48px;
    gap: 0;
    border-radius: 10px;
  }
  
  .pf-sidebar__header {
    display: none;
  }
  
  .pf-stepper {
    width: 100%;
    gap: 4px;
    padding: 0;
    scroll-snap-type: x mandatory;
  }
  
  .pf-sidebar .st {
    min-width: 48px;
    width: 48px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-template-columns: none;
    column-gap: 0;
    border-radius: 8px;
    scroll-snap-align: start;
  }
  
  .pf-sidebar .st .dot {
    width: 28px;
    height: 28px;
    font-size: 14px;
    margin: 0;
    border-width: 1.5px;
  }
  
  .pf-sidebar .st .lbl {
    display: none;
  }
  
  .pf-sidebar .st:hover {
    background: #f0f4fa;
  }
  
  .pf-sidebar .st.active {
    background: var(--pf-blue);
  }
  
  .pf-sidebar .st.active::before {
    display: none;
  }
  
  .pf-sidebar .st.active .dot {
    background: white;
    color: var(--pf-blue);
    border-color: white;
    box-shadow: none;
  }
  
  .pf-sidebar .st.active:hover .dot {
    background: white;
    color: var(--pf-blue);
  }
  
  .pf-content-head {
    padding: 0 0 10px;
  }
  
  .pf-content-head h2 {
    font-size: 20px;
  }
  
  .pf-content-head__eyebrow {
    font-size: 11px;
    margin-bottom: 3px;
  }
  
  .pf-container {
    padding: 20px 12px;
    border-radius: 12px;
  }
}

/* ===== Scroll Indicator Hint ===== */
@media (max-width: 960px) {
  .pf-sidebar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95));
    pointer-events: none;
    border-radius: 0 12px 12px 0;
  }
  
  .pf-sidebar:has(.pf-stepper:not(:hover))::after {
    opacity: 1;
    transition: opacity 0.3s ease;
  }
  
  .pf-sidebar:has(.pf-stepper:hover)::after {
    opacity: 0;
  }
}

@media (max-width: 480px) {
  .pf-sidebar::after {
    width: 24px;
    border-radius: 0 10px 10px 0;
  }
}

/* ===== Smooth Scrolling Enhancement ===== */
@media (max-width: 960px) {
  .pf-stepper {
    scroll-padding: 0 8px;
  }
  
  .pf-sidebar .st {
    scroll-margin: 0 8px;
  }
}

/* ===== Accessibility: Focus States ===== */
@media (max-width: 960px) {
  .pf-sidebar .st:focus {
    outline: 2px solid var(--pf-blue);
    outline-offset: 2px;
    z-index: 1;
  }
  
  .pf-sidebar .st:focus:not(:focus-visible) {
    outline: none;
  }
}

/* ===== Reduce Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .pf-stepper {
    scroll-behavior: auto;
  }
  
  .pf-sidebar .st {
    transition: none;
  }
  
  .pf-sidebar .st .dot {
    transition: none;
  }
}
