﻿.ant-card-body {
    padding: 15px;
}

.ant-table tfoot > tr > td, .ant-table tfoot > tr > th, .ant-table-tbody > tr > td, .ant-table-thead > tr > th {
    padding: 8px 4px;
}

@media (max-width: 992px) {
    .ant-pro-page-container-children-content {
        margin: 0;
    }
}

.ant-page-header-heading-extra > * {
    margin-left: 0;
}

/* ---- 화면 밀도: 페이지 타이틀을 한 줄로, 여백 축소 ---- */

/* 제목 줄: 제목 + 오른쪽 버튼을 한 줄에. 경로(breadcrumb)는 쓰지 않는다 */
.ant-pro-page-container .ant-breadcrumb,
.ant-page-header .ant-breadcrumb {
    display: none !important;
}

/* 제목 줄은 옅은 파란 띠. 위쪽 바(흰색)·제목(파란 띠)·본문(회색 바탕 위 흰 카드)이 서로 다른 층으로 보이게.
   높이는 사이드바의 사용자 정보 띠(theme.css, 64px)와 같아서 두 띠가 한 줄로 이어 보인다. 설명이 길어 두 줄이 되면 제목 띠만 늘어난다 */
.ant-pro-page-container-warp {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: 64px;
    background: #e8f1fc !important;
    border-bottom: 1px solid #d3e3f8;
}

.ant-pro-page-container-warp > * {
    flex: 1;
    min-width: 0;
}

.ant-page-header {
    background: transparent !important;
    padding: 5px 16px !important;
}

.ant-page-header-heading {
    margin: 0 !important;
    align-items: center;
}

.ant-page-header-heading-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 28px !important;
}

/* 제목 아래 안내문은 작고 옅게 */
.ant-page-header-content {
    padding-top: 0 !important;
    line-height: 1.3;
    font-size: 12px;
    color: #667085;
}

.ant-pro-page-container-warp {
    padding-bottom: 0 !important;
}

/* 본문 바깥 여백과 카드 안쪽 여백 */
.ant-pro-page-container-children-content {
    margin: 12px 16px 16px !important;
}

.ant-card-body {
    padding: 14px 16px !important;
}

.ant-card-head {
    min-height: 40px !important;
    padding: 0 10px !important;
}

.ant-card-head-title {
    padding: 8px 0 !important;
    font-size: 14px !important;
}

/* 메뉴 항목 높이 */
.ant-menu-item,
.ant-menu-submenu-title {
    height: 32px !important;
    line-height: 32px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 좌우 여백을 줄여 글자 폭을 더 쓴다. 접은 상태(아이콘만)는 라이브러리 기본값을 그대로 둔다 */
.ant-menu-inline:not(.ant-menu-inline-collapsed) > .ant-menu-submenu > .ant-menu-submenu-title {
    padding-left: 12px !important;
    padding-right: 26px !important;
}

.ant-menu-inline:not(.ant-menu-inline-collapsed) > .ant-menu-submenu > .ant-menu-submenu-title .ant-menu-submenu-arrow {
    right: 8px !important; /* 글자와 펼침 화살표가 붙지 않게 */
}

.ant-menu-inline:not(.ant-menu-inline-collapsed) .ant-menu-sub .ant-menu-item {
    padding-left: 30px !important; /* 묶음 아래 항목의 들여쓰기 (라이브러리가 인라인으로 48px 를 줌) */
    padding-right: 8px !important;
}

.ant-menu-inline:not(.ant-menu-inline-collapsed) .ant-menu-item .anticon,
.ant-menu-inline:not(.ant-menu-inline-collapsed) .ant-menu-submenu-title .anticon {
    margin-right: 8px !important;
}

/* 쓰지 않는 기본 푸터 */
.ant-pro-global-footer {
    display: none !important;
}

/* 표 */
.ant-table tfoot > tr > td, .ant-table tfoot > tr > th, .ant-table-tbody > tr > td, .ant-table-thead > tr > th {
    padding: 5px 6px;
}

/* ---- 좌측 메뉴: 아이콘, 사용자 카드, 선택 표시 ---- */

/* 로고 줄 */
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1890ff, #36cfc9);
    color: #fff;
    font-size: 14px;
}

/* 사용자 카드 (메뉴 위) */
/* 사이드바 폭을 가득 채우는 띠 (좌우 여백 없이). 메뉴 라이브러리의 감싸는 영역이 주는 좌우 여백도 없앤다 */
.ant-pro-sider-extra {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.sidebar-profile {
    margin: 0 0 4px;
    padding: 8px 12px 10px;
    border-radius: 0;
    background: rgba(255, 255, 255, .06);
    border-top: 1px solid rgba(255, 255, 255, .08);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-profile-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-avatar {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1890ff;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-profile-text {
    min-width: 0;
}

.sidebar-profile-name {
    color: #fff;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-role {
    margin-right: 6px;
    padding: 0 6px;
    border-radius: 8px;
    background: rgba(24, 144, 255, .3);
    color: #bae7ff;
    font-size: 12px;
    font-weight: 500;
    vertical-align: 1px;
}

.sidebar-profile-sub {
    margin-top: 4px;
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 메뉴 항목 */
.ant-pro-sider-menu .anticon {
    font-size: 16px;
}

.ant-menu-dark.ant-menu-inline .ant-menu-sub {
    background: rgba(0, 0, 0, .2);
}

.ant-menu-dark .ant-menu-item-selected {
    background: rgba(24, 144, 255, .22) !important;
    box-shadow: inset 3px 0 0 #1890ff;
    color: #fff;
}

.ant-menu-dark .ant-menu-item:hover:not(.ant-menu-item-selected) {
    background: rgba(255, 255, 255, .06);
}

/* 접었을 때는 아이콘과 아바타만 */
.ant-layout-sider-collapsed .sidebar-profile {
    margin: 0 0 8px;
    padding: 10px 0;
    background: transparent;
    border: 0;
}

.ant-layout-sider-collapsed .sidebar-profile-sub,
.ant-layout-sider-collapsed .sidebar-profile-text {
    display: none;
}

.ant-layout-sider-collapsed .sidebar-profile-row {
    justify-content: center;
}

/* ---- 설정 홈 카드 ---- */
.setup-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 12px;
}

.setup-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
    color: inherit;
    transition: box-shadow .15s, border-color .15s;
}

.setup-card:hover {
    border-color: #91d5ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, .15);
    text-decoration: none;
    color: inherit;
}

.setup-card-icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e6f7ff;
    color: #1890ff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.setup-card-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.setup-card-desc {
    color: #777;
    font-size: 13px;
    line-height: 1.6;
}

/* ---- 폼·그리드 여백 축소 (고객 상세, 랜딩 편집 등) ---- */

/* 본문 여백이 10px 이므로 부트스트랩 행의 음수 여백과 열 안쪽 여백도 4px 로 맞춘다 (15px 로 두면 화면이 가로로 넘친다) */
.ant-pro-page-container .row {
    margin-left: -4px;
    margin-right: -4px;
}

.ant-pro-page-container .row > [class*="col"] {
    padding-left: 4px;
    padding-right: 4px;
}

.ant-pro-page-container .mt-3,
.ant-pro-page-container .my-3 {
    margin-top: 8px !important;
}

/* 입력 항목 사이 간격과 라벨 간격 */
.form-group {
    margin-bottom: 8px;
}

.form-group > label {
    margin-bottom: 3px;
}

/* 열 너비가 고정된 표가 화면보다 넓으면 페이지가 아니라 표가 가로로 스크롤되게 */
.ant-pro-page-container .ant-table-content {
    overflow-x: auto;
}

/* 입력 항목이 한 줄에 하나씩 길게 늘어서는 폼(랜딩 편집)은 화면이 넓으면 여러 칸으로. 업로더·파일 관리자는 한 줄을 다 쓴다 */
.vertical-form .ant-card-body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr));
    column-gap: 16px;
    align-items: start;
}

.vertical-form .ant-card-body > .form-group:has(.e-uploader, .e-filemanager) {
    grid-column: 1 / -1;
}

/* 카드 본문의 clearfix 가상 요소가 격자 칸 하나를 차지하지 않게 */
.vertical-form .ant-card-body::before,
.vertical-form .ant-card-body::after {
    display: none;
}

/* ---- 설정 > 가입 관리 ---- */
.signup-badge {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #f5222d;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

/* 가입 신청 상태: 상자 없이 상태 점·글자색으로 보이고, 아래 구분선으로 안내 문구와 나눈다 */
.signup-switch {
    padding: 2px 0 14px;
    border-bottom: 1px solid #edf0f4;
}

.signup-switch.is-open .signup-switch-state {
    color: #389e0d;
}

.signup-switch-state {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.signup-switch-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #bfbfbf;
}

.is-open .signup-switch-dot {
    background: #52c41a;
}

.signup-switch-desc {
    margin-top: 4px;
    color: #666;
    font-size: 13px;
}

.signup-help {
    margin: 0;
    padding-left: 18px;
    color: #666;
    font-size: 13px;
    line-height: 1.8;
}

/* 초대 링크 만들기 줄: 상자 없이, 아래 구분선으로 목록과 나눈다 */
.signup-create {
    padding: 2px 0 12px;
    border-bottom: 1px solid #edf0f4;
}

.signup-newlink {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #ffe58f;
    border-radius: 4px;
    background: #fffbe6;
}

.signup-approve {
    padding: 10px 12px;
    border: 1px solid #91d5ff;
    border-radius: 4px;
    background: #e6f7ff;
}

.signup-same {
    display: inline-block;
    margin: 1px 4px 1px 0;
    padding: 0 6px;
    border-radius: 3px;
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #ad6800;
    font-size: 12px;
}

.signup-newlink .btn { white-space: nowrap; }

/* 사이드바 위쪽(로고 줄)과 메뉴 위아래 여백 */
/* 로고 줄은 위쪽 바(HeaderHeight 40)와 같은 높이: 아래 사용자 정보 띠가 제목 띠와 같은 높이에서 시작한다 */
.ant-pro-sider-logo {
    height: 40px !important;
    padding: 0 12px !important;
}

.ant-pro-sider-menu.ant-menu-inline {
    padding-top: 0;
}

/* ---- 위쪽 바: 카테고리 이름과 같은 카테고리의 화면들 ---- */
.header-nav {
    display: flex;
    align-items: stretch;
    height: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
}

.header-nav::-webkit-scrollbar {
    display: none;
}

/* 탭이 넘친 쪽 끝을 흐리게 (wwwroot/js/header-nav.js 가 has-more-left/right 를 붙인다) */
.header-nav {
    position: relative; /* 탭의 offsetLeft 를 nav 기준으로 */
}

.header-nav.has-more-right {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}

.header-nav.has-more-left {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 32px);
    mask-image: linear-gradient(to right, transparent, #000 32px);
}

.header-nav.has-more-left.has-more-right {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}

.header-nav-cat {
    display: flex;
    align-items: center;
    margin-right: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #262626;
}

.header-nav-tab {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #595959;
    font-size: 13px;
    border-bottom: 2px solid transparent;
}

.header-nav-tab:hover {
    color: #1890ff;
    text-decoration: none;
}

.header-nav-tab.is-active {
    color: #1890ff;
    font-weight: 600;
    border-bottom-color: #1890ff;
}

/* 위쪽 바에서 이름·탭이 남는 폭 안에서만 자리를 차지하고 넘치면 가로로 스크롤 (좁은 화면에서 페이지가 넘치지 않게) */
.ant-pro-global-header > *:has(> .header-nav) {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}

/* 1280px 보다 좁으면 접속 IP 글자를 감추고(사용자 메뉴 안에는 늘 보인다) 탭 사이를 좁혀 탭 자리를 넓힌다.
   설정처럼 탭이 10개인 묶음이 1024px 에서 60px 넘게 넘쳐 끝의 탭(접속기록)이 보이지 않았다 */
@media (max-width: 1279px) {
    .ant-pro-global-header .header-ip {
        display: none;
    }

    .header-nav-cat {
        margin-right: 4px;
    }

    .header-nav-tab {
        padding: 0 7px;
    }
}
