/* 공통 style.css 이후에 로드됨 */

.chmod-card { padding: 18px; }

.cc-type {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cc-type-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 900;
    cursor: pointer;
}

.cc-type-btn.active {
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
    background: #eef2ff;
}

.cc-input-row {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
}

.cc-label {
    display: block;
    font-weight: 900;
    font-size: 14px;
    margin-bottom: 8px;
    color: #111827;
}

.cc-text {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 12px;
    font-size: 15px;
    outline: none;
    background: #fff;
    color: #111827;
    caret-color: #111827;
}

.cc-text:focus {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.65);
}

.cc-apply {
    border: none;
    background: #111827;
    color: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 900;
    cursor: pointer;
    height: 46px;
}

.cc-apply:hover { opacity: .92; }

.cc-examples {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
}

.cc-ex-label {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.cc-chip {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    font-size: 13px;
    color: #111827;
}

.cc-chip:hover { background: #f9fafb; }

/* 출력 3칸 */
.cc-out-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin: 14px 0 18px;
}

.cc-out {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
}

.cc-out-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.cc-out-title {
    font-weight: 900;
    color: #111827;
}

.cc-out-val {
    font-size: 18px;
    font-weight: 1000;
    color: #111827;
    line-height: 1.2;
    word-break: break-word;
}

.cc-out-sub {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.cc-copy {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 900;
    color: #111827;
}

.cc-copy:hover { background: #f9fafb; }

/* 섹션 헤더 */
.cc-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 0 10px;
}

.cc-h2 {
    font-size: 18px;
    font-weight: 1000;
    margin: 0;
    color: #111827;
}

.cc-legend {
    font-size: 13px;
    color: #6b7280;
    font-weight: 800;
}

/* 권한 토글 3개 컬럼 */
.cc-perm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cc-box {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
}

.cc-box-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.cc-box-title {
    font-size: 18px;
    font-weight: 1000;
    color: #111827;
}

.cc-box-val {
    font-size: 13px;
    font-weight: 900;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-pill {
    display: inline-flex;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef2ff;
    color: #1d4ed8;
    font-weight: 1000;
    padding: 0 10px;
}

/* 토글 버튼 */
.cc-toggle-col {
    display: grid;
    gap: 10px;
}

.cc-tg {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    cursor: pointer;
    font-weight: 900;
    color: #111827;
    text-align: left;
}

.cc-tg:hover { background: #f9fafb; }

.cc-tg.on {
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
    background: #eef2ff;
}

.cc-tg-k {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #1118270d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 1000;
}

.cc-tg.on .cc-tg-k {
    background: #1d4ed8;
    color: #fff;
}

.cc-tg-t {
    font-weight: 1000;
}

/* 특수권한 */
.cc-special {
    margin-top: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
}

.cc-special-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.cc-special-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cc-note {
    margin-top: 10px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
}

.cc-error {
    margin-top: 10px;
    color: #ef4444;
    font-size: 13px;
    font-weight: 800;
    min-height: 18px;
}

.cc-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 10px 12px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 13px;
    z-index: 99;
}

.hidden { display: none; }

/* info */
.info-section {
    max-width: 720px;
    margin: 40px auto 0;
    padding: 0 16px;
}

.info-section h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}

.info-list {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 14px;
    color: #444;
    line-height: 1.7;
}

.info-list li { margin-bottom: 6px; }

/* ===== 전역 style.css 영향 방어 ===== */
.cc-type button,
.cc-examples button,
.cc-out-grid button,
.cc-perm-grid button,
.cc-special button {
    width: auto !important;
}

.cc-type-btn,
.cc-chip,
.cc-copy,
.cc-tg,
.cc-apply {
    color: inherit !important;
}

/* 적용 버튼: 전역 CSS에 의해 텍스트가 덮이는 문제 방지 */
.cc-apply{
    background: #111827 !important;
    color: #ffffff !important;
    border: none !important;
}

.cc-apply:hover{ opacity: .92; }

/* 혹시 전역에서 button * 색을 덮는 경우를 더 강하게 방어 */
.cc-apply *{
    color: #ffffff !important;
}

/* PC 배치: 입력 1fr + 버튼 110px 유지 (전역 CSS 방어) */
.cc-input-row{
    display: grid !important;
    grid-template-columns: 1fr 110px !important;
    align-items: end !important;
}

.cc-apply{
    width: 110px !important;
    height: 46px !important;
    justify-self: end !important;
}

/* 모바일에서는 버튼이 아래로 내려가고 100% */
@media (max-width: 900px) {
    .cc-input-row{ grid-template-columns: 1fr !important; }
    .cc-apply{ width: 100% !important; }
}


/* 반응형 */
@media (max-width: 900px) {
    .cc-out-grid { grid-template-columns: 1fr; }
    .cc-perm-grid { grid-template-columns: 1fr; }
    .cc-special-grid { grid-template-columns: 1fr; }
    .cc-input-row { grid-template-columns: 1fr; }
    .cc-apply { width: 100%; }
}
