/* ---------- 내 계좌 섹션 공통 ---------- */
.acc-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-gray);
}

/* ---------- 사이드바 ---------- */
.acc-sidebar {
  display: flex;
  flex-direction: column;
  width: 200px;
  flex-shrink: 0;
  background: #fafbfc;
  border-right: 1px solid var(--border-light);
  padding: 14px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.acc-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 16px;
}

.acc-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #191f28;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.acc-logo-texts {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.acc-logo-title {
  font-size: 14px;
  color: var(--text);
}

.acc-logo-title strong {
  font-weight: 800;
}

.acc-logo-sub {
  font-size: 11px;
  color: var(--muted);
}

.acc-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acc-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-sub);
}

.acc-menu-item:hover {
  background: var(--border-light);
}

.acc-menu-active,
.acc-menu-active:hover {
  background: #3182f6;
  color: #fff;
  font-weight: 600;
}

.acc-side-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acc-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 12px;
}

.acc-profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8e3f8;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.acc-profile-texts {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.acc-profile-name {
  font-size: 13px;
  font-weight: 700;
}

.acc-profile-broker {
  font-size: 11px;
  color: var(--muted);
}

.acc-sub-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-sub);
  text-align: left;
}

.acc-sub-item:hover {
  background: var(--border-light);
}

/* ---------- 사이드바 접기 ---------- */
.acc-collapsed {
  width: 60px;
}

.acc-collapsed .acc-logo-texts,
.acc-collapsed .acc-menu-item span,
.acc-collapsed .acc-profile-texts,
.acc-collapsed .acc-sub-item span {
  display: none;
}

.acc-collapsed .acc-menu-item,
.acc-collapsed .acc-sub-item,
.acc-collapsed .acc-logo,
.acc-collapsed .acc-profile {
  justify-content: center;
}

/* ---------- 메인 영역 ---------- */
.acc-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.acc-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}

.acc-header-title {
  font-size: 17px;
  font-weight: 700;
}

.acc-content {
  flex: 1;
  padding: 20px 24px 60px;
}

/* ---------- 카드 ---------- */
.acc-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.acc-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.acc-title-icon {
  display: flex;
  align-items: center;
  gap: 7px;
}

.acc-card-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: -6px;
  margin-bottom: 4px;
}

.acc-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}

.acc-up {
  color: var(--up) !important;
}

.acc-down {
  color: var(--down) !important;
}

.acc-muted {
  color: var(--muted);
}

/* ---------- 총 자산 평가 ---------- */
.acc-asset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.acc-asset-value {
  font-size: 19px;
  font-weight: 800;
}

.acc-asset-sub {
  margin-top: 3px;
  font-size: 11.5px;
}

/* ---------- 요약 카드 3개 ---------- */
.acc-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.acc-stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}

.acc-stat-value {
  font-size: 19px;
  font-weight: 800;
}

.acc-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
}

.acc-stat-icon-box {
  background: #eef4ff;
  color: #3182f6;
}

.acc-stat-icon-in {
  background: #fdedef;
  color: var(--up);
}

.acc-stat-icon-out {
  background: #eaf2fd;
  color: var(--down);
}

/* ---------- 내 정보 ---------- */
.acc-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.acc-info-value {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 테이블 ---------- */
.acc-table-card {
  padding: 8px 20px 12px;
}

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

.acc-table th {
  padding: 12px 10px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.acc-table th.acc-th-left {
  text-align: left;
}

.acc-table td {
  padding: 14px 10px;
  font-size: 13.5px;
  text-align: right;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.acc-table tbody tr:last-child td {
  border-bottom: none;
}

.acc-table td.acc-td-left {
  text-align: left;
}

.acc-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.acc-stock-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.acc-stock-name {
  font-weight: 600;
}

.acc-tag-in {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--up);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.acc-tag-out {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--down);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

/* ---------- 옮기기 버튼 ---------- */
.acc-center {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.acc-outline-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1.5px solid var(--green);
  border-radius: 8px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 600;
  background: #fff;
}

.acc-outline-btn:hover {
  background: #f0fdf7;
}

/* ---------- 내 계좌로 옮기기 ---------- */
.acc-transfer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.acc-holding-box {
  background: var(--bg-gray);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-sub);
  margin: 14px 0 18px;
}

.acc-holding-box strong {
  color: var(--text);
}

.acc-empty {
  padding: 48px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 폼 ---------- */
.acc-field {
  margin-bottom: 16px;
}

.acc-field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.acc-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
}

.acc-input::placeholder {
  color: var(--muted);
}

.acc-input:focus {
  border-color: #3182f6;
}

.acc-input:disabled {
  background: var(--bg-gray);
  color: var(--muted);
  cursor: not-allowed;
}

select.acc-input {
  appearance: auto;
  cursor: pointer;
}

select.acc-input:disabled,
select.acc-input:has(option[value=""]:checked) {
  color: var(--muted);
}

.acc-field-help {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.acc-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 46px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-top: 6px;
}

.acc-submit-btn:hover {
  background: var(--green-dark);
}

.acc-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- 내 정보 수정 ---------- */
.acc-settings-card {
  max-width: none;
}

.acc-settings-form {
  max-width: 400px;
}

.acc-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 8px 0 18px;
}

.acc-section-subtitle {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 14px;
}

.acc-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fdedef;
  color: var(--up);
  font-size: 12.5px;
}

.acc-save-ok {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e9f9f1;
  color: var(--green-dark);
  font-size: 12.5px;
}

/* ---------- 출고 신청 목록 ---------- */
.acc-transfer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acc-transfer-item {
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  padding: 14px 16px;
}

.acc-transfer-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.acc-transfer-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #4e5968;
}

.acc-transfer-memo {
  margin-top: 8px;
  font-size: 12px;
  color: #8b95a1;
}

.acc-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.acc-status-pending {
  background: #fff7e6;
  color: #d48806;
}

.acc-status-approved {
  background: #e8f7ee;
  color: #0ca678;
}

.acc-status-rejected {
  background: #fdecec;
  color: #f04452;
}

/* ---------- 모바일 반응형 ---------- */
@media (max-width: 768px) {
  .acc-shell {
    flex-direction: column;
  }

  /* 사이드바 → 상단 가로 메뉴 */
  .acc-sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .acc-logo {
    padding: 2px 4px 10px;
  }

  .acc-menu {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .acc-menu-item {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 12.5px;
    flex-shrink: 0;
  }

  .acc-side-bottom {
    margin-top: 8px;
    padding-top: 8px;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .acc-profile {
    padding: 0 8px 0 0;
    flex-shrink: 0;
  }

  .acc-sub-item {
    width: auto;
    white-space: nowrap;
    padding: 6px 10px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .acc-collapse-toggle {
    display: none;
  }

  /* 메인 영역 */
  .acc-header {
    padding: 12px 16px;
  }

  .acc-content {
    padding: 16px 14px 48px;
  }

  .acc-card {
    padding: 16px;
  }

  /* 그리드 단일/2열로 */
  .acc-asset-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .acc-stat-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .acc-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .acc-transfer-grid {
    grid-template-columns: 1fr;
  }

  /* 테이블 가로 스크롤 */
  .acc-table-card {
    padding: 4px 12px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .acc-table {
    min-width: 560px;
  }

  .acc-table th,
  .acc-table td {
    padding: 10px 8px;
    font-size: 12.5px;
  }

  .acc-settings-form {
    max-width: none;
  }
}
