/* ===== 모달 ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.modal {
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    max-width: 480px;
    width: 90vw;
    padding: 32px 28px;
    position: relative;
    z-index: 1010;
    animation: modal-fade-in 0.25s cubic-bezier(.4, 0, .2, 1);
}

@media (max-width: 768px) {
    .modal {
        padding: 18px 8px;
        max-width: 98vw;
    }
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1020;
    transition: color 0.15s;
}

.modal-close:hover {
    /* 색상은 color.css에서 관리 */
}

/* ===== 폼 ===== */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.98rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1.5px solid #e5e7eb;
    font-size: 1rem;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
    resize: none;
    background: white;
    cursor: pointer;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
    /* border-color는 color.css에서 관리 */
}

.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
    cursor: not-allowed;
}

/* 인풋 에러/성공 상태 */
.form-input.error,
.form-textarea.error,
.form-select.error {
    /* border-color, background은 color.css에서 관리 */
}

.form-input.success,
.form-textarea.success,
.form-select.success {
    /* border-color, background은 color.css에서 관리 */
}

/* 인풋 아이콘 */
.input-icon {
    position: relative;
}

.input-icon>.icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1em;
    pointer-events: none;
}

.input-icon>input,
.input-icon>textarea {
    padding-left: 36px;
}

/* ===== 테이블 ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    font-size: 1rem;
}

.table th,
.table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    font-size: 1.02rem;
}

.table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 1024px) {

    .table th,
    .table td {
        padding: 10px 8px;
    }
}

@media (max-width: 768px) {

    .table,
    .table thead,
    .table tbody,
    .table tr,
    .table th,
    .table td {
        display: block;
        width: 100%;
    }

    .table th,
    .table td {
        box-sizing: border-box;
        padding: 8px 4px;
        border-bottom: 1px solid #e5e7eb;
    }

    .table tr {
        margin-bottom: 12px;
        border-radius: 6px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    }

    .table thead {
        display: none;
    }

    .table td:before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        margin-bottom: 2px;
        font-size: 0.95em;
    }
}

/* ===== 애니메이션/상태 ===== */
.fade-in {
    animation: fadeIn 0.3s cubic-bezier(.4, 0, .2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s cubic-bezier(.4, 0, .2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 유틸리티 ===== */
.rounded {
    border-radius: 8px !important;
}

.shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14) !important;
}

.hide-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

:root{
  --pf-text:#2c3e50;
  --pf-sub:#6c757d;
  --pf-border:#dee2e6;
  --pf-brand:#24316C;
  --pf-soft:#f1f3f5;
}

/* 카드 (라운드 없음, 우리 톤) */
.card {
  border:1px solid var(--pf-border) !important;
  background:#fff !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:0;
}
.card-header, .card-body, .card-footer { padding: 16px 18px; }
.card-header { border-bottom: 1px solid #e9ecef; }
.card-footer { border-top: 1px solid #e9ecef; }

/* 레이아웃 */
.mypage-grid{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap:16px;
}
@media (max-width: 960px){
  .mypage-grid{ grid-template-columns: 1fr; }
}

/* 프로필 */
.mypage-profile{ align-self: start; }
.mypage-avatar-wrap{ display:flex; flex-direction:column; align-items:center; gap:12px; padding:16px; }
.mypage-avatar{
  width: 160px; height:160px; object-fit:cover; display:block;
  border:1px solid var(--pf-border);
  background:#f4f6f8;
}
.mypage-profile-meta{ padding:0 16px 16px; border-top:1px dashed #ecf0f2; margin-top:8px; }
.mypage-profile-meta .meta-name{ font-weight:700; color:var(--pf-text); margin-bottom:4px; }
.mypage-profile-meta .meta-id,
.mypage-profile-meta .meta-phone{ color:var(--pf-sub); font-size:13px; }

/* 정보 */
.mypage-info-header{ display:flex; justify-content:space-between; align-items:center; }
.form-row{ display:flex; flex-direction:column; gap:6px; padding:10px 0; }
.form-row + .form-row{ border-top:1px dashed #ecf0f2; }
.basic-form input, .basic-form select, .basic-form textarea{
  border: 1.5px solid #e5e7eb; font-size:1rem; transition: border .2s, box-shadow .2s;
  outline: none; padding: 8px 12px; border-radius:0 !important; background:#fff; color:var(--pf-text);
}
.basic-form input:focus, .basic-form select:focus, .basic-form textarea:focus{
  border-color:#b8c0c7; box-shadow:0 0 0 3px rgba(36,49,108,.08);
}
.row-inline{ display:flex; gap:8px; align-items:center; }

/* 읽기 전용 모드 */
.basic-form.is-readonly input,
.basic-form.is-readonly select,
.basic-form.is-readonly textarea{
  background: transparent !important;
  border-color: transparent !important;
  padding-left: 0 !important;
  color: var(--pf-text) !important;
  box-shadow: none !important;
}
.basic-form.is-readonly input[disabled]::placeholder{ color:transparent; }
.basic-form.is-readonly .address-search-btn{ display:none !important; }
.basic-form.is-readonly label{ color:#7b8a97; }



.basic-profile-img{
    color: gray;
    width: 60%;
    height: 60%;
    object-fit: cover;
}

/* ===== 커스텀 셀렉트 박스 ===== */
.custom-select-wrapper {
    position: relative;
    display: inline-block;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.custom-select:hover {
    border-color: #B8B8B8;
}

.custom-select:focus {
    border-color: #1A7DFF;
    box-shadow: 0 0 0 3px rgba(26, 125, 255, 0.1);
}

.custom-select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.custom-select-wrapper:hover::after {
    border-top-color: #333;
}

.custom-select:focus + .custom-select-wrapper::after,
.custom-select-wrapper:has(.custom-select:focus)::after {
    transform: translateY(-50%) rotate(180deg);
}

/* ===== 차트 컨테이너 ===== */
.chart-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    min-height: 200px;
}

.doughnut-chart-container {
    position: relative;
    width: 320px;
    height: 320px;
    overflow: hidden;
}

/* ===== Notice Swiper Styles ===== */
.notice-swiper-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.noticeSwiper {
    width: 100%;
    height: 100%;
    padding-right: 40px;
}

.noticeSwiper .swiper-slide {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: auto !important;
}

.noticeSwiper .swiper-slide h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #303030;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.noticeSwiper .swiper-slide small {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Swiper Navigation Buttons */
.notice-swiper-btn-next,
.notice-swiper-btn-prev {
    position: absolute;
    right: 0;
    width: 30px;
    height: 30px;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    transition: all 0.2s ease;
}

.notice-swiper-btn-next::after,
.notice-swiper-btn-prev::after {
    font-size: 16px;
    font-weight: 700;
}

.notice-swiper-btn-prev {
    top: 0;
}

.notice-swiper-btn-next {
    bottom: 0;
}

.notice-swiper-btn-next:hover,
.notice-swiper-btn-prev:hover {
    color: #1F407F;
}

.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Swiper Pagination */
.notice-swiper-pagination {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px !important;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notice-swiper-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: #D1D5DB;
    opacity: 1;
    margin: 0 !important;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notice-swiper-pagination .swiper-pagination-bullet-active {
    background: #1F407F;
    height: 20px;
    border-radius: 3px;
}