/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex: 1;
}

.required {
    color: #dc3545;
}

.form-message {
    display: block;
    margin-top: 4px;
    font-size: 12px;
}

.form-message.success {
    color: #28a745;
}

.form-message.error {
    color: #dc3545;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* Cards */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.pagination .active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* =============================================
   Common Auth Header Styles
   ============================================= */
.auth-header {
    height: 80px;
    background: #fff;
    border-bottom: 1px solid #E6E6E6;
    position: sticky;
    top: 0;
    z-index: 100;
}

.auth-header .header-inner {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.auth-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 2px;
}

.auth-header .logo-coinshot {
    height: 32px;
    width: auto;
}

.auth-header .logo-biz-img {
    height: 26px;
    width: auto;
}

/* Nav Tabs */
.auth-header .nav-tabs {
    display: flex;
    background: #F3F3F3;
    border-radius: 24px;
    padding: 4px;
}

.auth-header .nav-tab {
    padding: 10px 16px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    color: #4E4E4E;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-header .nav-tab.active {
    background: #0F2A44;
    color: #fff;
}

/* Header Right */
.auth-header .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.auth-header .header-link {
    font-size: 16px;
    font-weight: 400;
    color: #191919;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 10px;
    transition: color 0.2s;
}

.auth-header .header-link:hover {
    color: #0F2B44;
}

/* Language Select (auth-header / sidebar 공통) */
.lang-select {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 400;
    color: #191919;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 10px;
    user-select: none;
}

.lang-select svg {
    color: #191919;
    transition: transform 0.2s;
}

.lang-select.open svg {
    transform: rotate(180deg);
}

/* 드롭다운 패널 */
.lang-select .lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 140px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #ECECEC;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: none;
    z-index: 1000;
}

.lang-select.open .lang-dropdown {
    display: block;
}

.lang-select .lang-option {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 400;
    color: #3A3A3A;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.lang-select .lang-option:hover {
    background-color: #F6F6F6;
}

.lang-select .lang-option.active {
    color: #0F2A44;
    font-weight: 600;
    background-color: #F0F4F8;
}

/* Header Buttons */
.auth-header .btn-header-login {
    padding: 10px 16px;
    border: 1px solid #0F2A44;
    border-radius: 10px;
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    color: #0F2A44;
    text-decoration: none;
    transition: all 0.2s;
}

.auth-header .btn-header-login:hover {
    background: #f6f6f6;
}

.auth-header .btn-header-signup {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #0F2A44;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
}

.auth-header .btn-header-signup:hover {
    background: #1A3A5C;
}

/* Mobile Menu Button */
.auth-header .btn-mobile-menu {
    display: none;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    color: #333;
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-header .header-inner {
        padding: 0 20px;
    }

    .auth-header .header-link {
        display: none;
    }

    .auth-header .lang-select {
        display: none;
    }
}

@media (max-width: 768px) {
    .auth-header .nav-tabs {
        display: none;
    }

    .auth-header .header-right {
        gap: 12px;
    }

    .auth-header .btn-header-login,
    .auth-header .btn-header-signup {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .auth-header .header-right {
        display: none;
    }

    .auth-header .btn-mobile-menu {
        display: flex;
    }
}

/* =============================================
   Common Auth Footer Styles
   ============================================= */
.auth-footer {
    background: #f5f5f5;
    padding: 40px 20px;
}

.auth-footer .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.auth-footer .footer-links {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.auth-footer .footer-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}

.auth-footer .footer-link:hover {
    text-decoration: underline;
}

.auth-footer .footer-links .divider {
    color: #ddd;
}

.auth-footer .footer-section {
    margin-bottom: 20px;
}

.auth-footer .footer-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.auth-footer .footer-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.auth-footer .footer-text a {
    color: #666;
    text-decoration: none;
}

.auth-footer .footer-text a:hover {
    text-decoration: underline;
}

.auth-footer .copyright {
    font-size: 12px;
    color: #999;
    margin-top: 16px;
}

/* =============================================
   Common Modal
   ============================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: 90%;
    max-width: 400px;
    background: var(--color-white, #fff);
    border-radius: 16px;
    padding: 32px 24px 24px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-container.large {
    max-width: 560px;
}

.modal-overlay.show .modal-container {
    transform: translateY(0);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary, #0F2A44);
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.4;
}

.modal-content {
    font-size: 15px;
    color: var(--color-gray-600, #666);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 24px;
    max-height: 300px;
    overflow-y: auto;
}

.modal-content.terms-content {
    text-align: left;
}

/* 약관 본문 (모달에 fetch되는 /static/terms/*.html 의 .terms-doc) */
.terms-doc h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary, #0F2A44);
    margin: 0 0 16px;
}

.terms-doc h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary, #0F2A44);
    margin: 18px 0 6px;
}

.terms-doc h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-gray-600, #444);
    margin: 12px 0 4px;
}

.terms-doc p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--color-gray-600, #555);
    margin: 6px 0;
}

.terms-doc ol,
.terms-doc ul {
    margin: 6px 0 6px 18px;
    padding: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--color-gray-600, #555);
}

.terms-doc li {
    margin: 3px 0;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-buttons.single {
    justify-content: center;
}

.modal-btn {
    flex: 1;
    height: 52px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.cancel {
    background: var(--color-white, #fff);
    border: 1px solid var(--color-primary, #0F2A44);
    color: var(--color-primary, #0F2A44);
}

.modal-btn.cancel:hover {
    background: #F0F4F8;
}

.modal-btn.confirm {
    background: var(--color-primary, #0F2A44);
    border: none;
    color: var(--color-white, #fff);
}

.modal-btn.confirm:hover {
    background: var(--color-primary-light, #1A3A5C);
}

.modal-buttons.single .modal-btn {
    flex: none;
    width: 100%;
}

/* =============================================
   Common Select / Dropdown
   ============================================= */

/* Native select wrapper */
.cs-select-wrap {
    position: relative;
}

.cs-select {
    width: 100%;
    height: 48px;
    background-color: #F6F6F6;
    border: none;
    border-radius: 12px;
    padding: 0 48px 0 16px;
    font-size: 16px;
    font-weight: 400;
    color: #999;
    line-height: 24px;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
}

.cs-select:focus {
    box-shadow: 0 0 0 2px rgba(15, 42, 68, 0.15);
}

.cs-select.has-value {
    color: #3A3A3A;
}

.cs-select.error {
    box-shadow: 0 0 0 1px #dc3545;
}

.cs-select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Custom dropdown */
.cs-dropdown {
    position: relative;
}

.cs-dropdown-trigger {
    width: 100%;
    height: 48px;
    background-color: #F6F6F6;
    border: none;
    border-radius: 12px;
    padding: 0 48px 0 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    outline: none;
}

.cs-dropdown-trigger:focus {
    box-shadow: 0 0 0 2px rgba(15, 42, 68, 0.15);
}

.cs-dropdown-text {
    font-size: 16px;
    font-weight: 400;
    color: #A5A5A5;
    line-height: 24px;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
}

.cs-dropdown-trigger.has-value .cs-dropdown-text {
    color: #3A3A3A;
}

.cs-dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s;
}

.cs-dropdown.open .cs-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.cs-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    padding: 10px 12px;
    z-index: 50;
    max-height: 316px; /* 아이템 8개(37px) + 패널 padding(20px) → 9개부터 스크롤 */
    overflow-y: auto;
}

.cs-dropdown.open .cs-dropdown-panel {
    display: block;
}

.cs-dropdown-item {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    color: #4f5968;
    line-height: 1.5;
    cursor: pointer;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
}

.cs-dropdown-item:hover {
    background-color: #f3f5f9;
}

.cs-dropdown-item.selected {
    background-color: #f3f5f9;
    font-weight: 500;
}

.cs-dropdown.error .cs-dropdown-trigger {
    box-shadow: 0 0 0 1px #dc3545;
}

/* =============================================
   Common Custom Select (cs-select)
   - native <select> 를 Figma 디자인 드롭다운으로 변환
   ============================================= */

.cs-select-wrap {
    position: relative;
    width: 100%;
}

/* Trigger - select의 기존 스타일을 JS에서 상속받음. 여기는 공통 레이아웃만 */
.cs-select-trigger {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    outline: none;
    box-sizing: border-box;
    width: 100%;
}

.cs-select-trigger:focus {
    box-shadow: 0 0 0 2px rgba(15, 42, 68, 0.15);
}

/* Text */
.cs-select-text {
    flex: 1;
    font-size: inherit;
    font-weight: 400;
    color: #A5A5A5;
    line-height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-select-text.has-value {
    color: #3A3A3A;
}

/* Arrow icon */
.cs-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
}

.cs-select-wrap.open .cs-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Panel - Figma 257:4888 디자인 */
.cs-select-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    padding: 10px 12px;
    z-index: 50;
    max-height: 316px; /* 아이템 8개(37px) + 패널 padding(20px) → 9개부터 스크롤 */
    overflow-y: auto;
}

.cs-select-wrap.open .cs-select-panel {
    display: block;
}

/* Item - Figma 257:4888 디자인 */
.cs-select-item {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    color: #4f5968;
    line-height: 1.5;
    cursor: pointer;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
}

.cs-select-item:hover {
    background-color: #f3f5f9;
}

.cs-select-item.selected {
    background-color: #f3f5f9;
    font-weight: 500;
}

/* =============================================
   Common Password Condition Tags (cs-pw-)
   Figma design: 391-16196
   ============================================= */

.cs-pw-conditions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cs-pw-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 34px;
    padding: 0 16px;
    border: 1px solid #C6C6C6;
    border-radius: 8px;
    background-color: #fff;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #4E4E4E;
    line-height: 18px;
    transition: all 0.2s;
}

.cs-pw-tag svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #C6C6C6;
    transition: color 0.2s;
}

.cs-pw-tag.valid {
    background-color: #E8FFEE;
    border-color: #27ED70;
}

.cs-pw-tag.valid svg {
    color: #27ED70;
}

.cs-pw-error {
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #FF6262;
    line-height: 20px;
    margin: 0;
    min-height: 0;
}

.cs-pw-error:empty {
    display: none;
}

/* =============================================
   Common Password Eye Toggle (cs-pw-eye-)
   Figma design: 126-9946 (eye-off), 126-10049 (eye-on)
   ============================================= */

.cs-pw-eye-wrap {
    position: relative;
}

.cs-pw-eye-wrap input[type="password"],
.cs-pw-eye-wrap input[type="text"] {
    padding-right: 48px;
}

/* 브라우저 네이티브 비밀번호 표시 아이콘 숨김 (Edge/Chrome 이중 아이콘 방지) */
.cs-pw-eye-wrap input[type="password"]::-ms-reveal,
.cs-pw-eye-wrap input[type="password"]::-ms-clear {
    display: none;
}

.cs-pw-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.cs-pw-eye-btn .cs-eye-on {
    display: none;
}

.cs-pw-eye-btn .cs-eye-off {
    display: block;
}

.cs-pw-eye-btn.active .cs-eye-on {
    display: block;
}

.cs-pw-eye-btn.active .cs-eye-off {
    display: none;
}

/* =============================================
   Common Document Upload Modal (cs-doc-)
   ============================================= */

.cs-doc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(25, 25, 25, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cs-doc-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cs-doc-modal {
    width: 534px;
    background: #fff;
    border-radius: 8px;
    padding: 32px 24px 24px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.cs-doc-overlay.show .cs-doc-modal {
    transform: translateY(0);
}

.cs-doc-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.cs-doc-title {
    font-size: 18px;
    font-weight: 700;
    color: #3A3A3A;
    line-height: 24px;
}

.cs-doc-upload-btn {
    height: 32px;
    padding: 0 16px;
    background-color: #00CC4C;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
}

.cs-doc-upload-btn:hover {
    background-color: #00B343;
}

.cs-doc-body {
    background-color: #F6F6F6;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    min-height: 284px;
    display: flex;
    flex-direction: column;
}

.cs-doc-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cs-doc-info-label {
    font-size: 14px;
    font-weight: 500;
    color: #3A3A3A;
    line-height: 20px;
}

.cs-doc-info-count {
    font-size: 14px;
    font-weight: 500;
    color: #3A3A3A;
    line-height: 20px;
}

.cs-doc-content {
    flex: 1;
    position: relative;
    overflow-y: auto;
    max-height: 400px;
}

.cs-doc-content.dragover {
    outline: 2px dashed #00CC4C;
    outline-offset: -2px;
    border-radius: 8px;
    background-color: rgba(0, 204, 76, 0.04);
}

/* Empty state */
.cs-doc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 0;
}

.cs-doc-empty.hidden {
    display: none;
}

.cs-doc-empty-icon {
    width: 40px;
    height: 40px;
}

.cs-doc-empty-text {
    font-size: 14px;
    font-weight: 400;
    color: #000;
    line-height: 20px;
    text-align: center;
}

/* File list */
.cs-doc-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-doc-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cs-doc-file-left {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.cs-doc-file-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #3A3A3A;
}

.cs-doc-file-name {
    font-size: 14px;
    font-weight: 400;
    color: #3A3A3A;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-doc-file-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-left: 12px;
}

.cs-doc-file-preview {
    font-size: 14px;
    font-weight: 400;
    color: #999;
    line-height: 20px;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
    white-space: nowrap;
    transition: color 0.2s;
}

.cs-doc-file-preview:hover {
    color: #3A3A3A;
}

.cs-doc-file-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3A3A3A;
    transition: color 0.2s;
}

.cs-doc-file-remove:hover {
    color: #dc3545;
}

.cs-doc-file-remove svg {
    width: 18px;
    height: 18px;
}

/* Custom scrollbar */
.cs-doc-content::-webkit-scrollbar {
    width: 3px;
}

.cs-doc-content::-webkit-scrollbar-track {
    background: transparent;
}

.cs-doc-content::-webkit-scrollbar-thumb {
    background-color: #D3D3D3;
    border-radius: 8px;
}

/* Footer buttons */
.cs-doc-footer {
    display: flex;
    gap: 8px;
}

.cs-doc-btn-cancel {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
    background-color: #fff;
    border: 1px solid #0F2A44;
    color: #0F2A44;
    text-align: center;
}

.cs-doc-btn-cancel:hover {
    background-color: #F6F6F6;
}

.cs-doc-btn-confirm {
    width: 293px;
    height: 48px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
    background-color: #0F2A44;
    color: #fff;
    border: none;
    text-align: center;
}

.cs-doc-btn-confirm:hover:not(:disabled) {
    background-color: #1A3A5C;
}

.cs-doc-btn-confirm:disabled {
    background-color: #D3D3D3;
    color: #fff;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .cs-doc-modal {
        width: calc(100% - 32px);
        max-width: 534px;
        padding: 24px 16px 16px;
    }
}

/* =============================================
   Common Toast (cs-toast)
   Figma design: 506-21871 (Toast popup)
   ============================================= */
#cs-toast-container {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.cs-toast {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    max-width: min(90vw, 520px);
    padding: 12px 16px;
    background-color: #666;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.cs-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.cs-toast-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-toast-message {
    flex: 1;
    font-family: 'Noto Sans', 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    color: #fff;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.cs-toast.cs-toast-error {
    background-color: #FF6262;
}

/* 국기 아이콘 (공통) — countryFlag() 가 생성하는 <img class="flag">.
   리소스(icon_flag_*)가 이미 원형+테두리 SVG라 border-radius 는 보강용. */
.flag {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    flex-shrink: 0;
    display: inline-block;
}
