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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f6fb;
    color: #333;
}

.hidden {
    display: none !important;
}

/* 로그인 페이지 */
.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 8px;
}

.logo-s {
    font-size: 3rem;
    font-weight: bold;
    color: #FA4C99;
    position: relative;
}

.logo-s::after {
    content: '❤';
    position: absolute;
    top: -5px;
    right: -8px;
    font-size: 0.8rem;
}

.logo-text {
    font-size: 1.5rem;
    color: #FA4C99;
    font-weight: 500;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.form-field input {
    padding: 0.75rem;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
}

.form-field input:focus {
    outline: none;
    border-color: #FA4C99;
}

.btn-login {
    padding: 0.75rem;
    background: #87CEEB;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
}

.btn-login:hover {
    background: #6BB6D6;
}

.error-message {
    color: #c33;
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

/* 관리자 페이지 */
.admin-page {
    display: flex;
    min-height: 100vh;
}

/* 사이드바 */
.sidebar {
    width: 250px;
    background: #f5f5f5;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
}

.sidebar .logo {
    margin-bottom: 2rem;
    justify-content: flex-start;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-item:hover {
    background: #e8e8e8;
}

.nav-item.active {
    background: #B0E0E6;
    color: #333;
    font-weight: 500;
}

.logout-link {
    margin-top: auto;
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    text-align: center;
}

.logout-link:hover {
    color: #333;
}

/* 메인 콘텐츠 */
.main-content {
    flex: 1;
    padding: 2rem;
    background: #fff;
}

.content-page {
    display: none;
}

.content-page.active {
    display: block;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #333;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.daily-expenditure {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

/* 탭 */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
}

.tabs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    background: #E4E7F1;
    color: #5a5f6f;
    transition: background 0.2s, color 0.2s;
}

.tab-btn.active {
    background: #FA4C99;
    color: #fff;
}

.tab-btn:hover:not(.active) {
    background: #d7dbe8;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 테이블 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.data-table thead {
    background: #f8f8f8;
}

.data-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    font-size: 0.9rem;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background: #f8f8f8;
}

.item-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.item-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
    box-shadow: inset 0 1px 2px rgba(15, 26, 64, 0.1);
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-thumb.placeholder {
    background: #f6f6f6;
}

.empty-message {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.btn-detail {
    padding: 0.5rem 1rem;
    background: #888;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-detail:hover {
    background: #666;
}

.btn-detail.pink {
    background: #FA4C99;
}

.btn-detail.pink:hover {
    background: #e6399e;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
}

.pagination button:hover:not(:disabled) {
    background: #f0f0f0;
}

.pagination button.active {
    background: #FA4C99;
    color: #fff;
    border-color: #FA4C99;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 추가하기 버튼 */
.add-button-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.btn-add {
    padding: 0.75rem 1.5rem;
    background: #87CEEB;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
}

.btn-add:hover {
    background: #6BB6D6;
}

/* 체크박스 스타일 */
.process-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 아이템 폼 */
.form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: nowrap;
}

.form-header .page-title {
    margin: 0;
}

.back-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    padding: 0.5rem;
}

.back-btn:hover {
    color: #FA4C99;
}

.item-form {
    max-width: 600px;
}

.item-form .form-field {
    margin-bottom: 2rem;
}

.item-form .form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.item-form .form-field input[type="text"],
.item-form .form-field input[type="number"],
.item-form .form-field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.item-form .form-field textarea {
    resize: vertical;
    min-height: 150px;
}

.item-form .form-field input:focus {
    outline: none;
    border-color: #FA4C99;
}

.image-input-group {
    display: flex;
    gap: 0.5rem;
}

.image-input-group input {
    flex: 1;
}

.btn-file {
    padding: 0.75rem 1.5rem;
    background: #FA4C99;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
}

.btn-file:hover {
    background: #e6399e;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-delete {
    padding: 0.75rem 1.5rem;
    background: #888;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.btn-delete:hover {
    background: #666;
}

.btn-save {
    padding: 0.75rem 1.5rem;
    background: #87CEEB;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.btn-save:hover {
    background: #6BB6D6;
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #333;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

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

.modal-buttons.single button {
    width: 100%;
}

.btn-cancel {
    padding: 0.75rem 2rem;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    flex: 1;
}

.btn-cancel:hover {
    background: #d0d0d0;
}

.btn-confirm {
    padding: 0.75rem 2rem;
    background: #FA4C99;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    flex: 1;
}

.btn-confirm:hover {
    background: #e6399e;
}

/* 회원 상세보기 */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    background: #f0f0f0;
}

#memberDetailPage {
    background: #f8faff;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
}

.member-detail-container {
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 26, 64, 0.08);
}

.profile-image-container {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.membership-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.membership-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    border-radius: 8px;
    font-weight: 600;
    width: fit-content;
}

.crown-icon {
    font-size: 1.2rem;
}

.membership-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.membership-stat {
    background: #f5f6fb;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    min-width: 140px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.membership-stat span:last-child {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111;
}

.stat-label {
    font-size: 0.9rem;
    color: #777;
}

.membership-stat.link {
    cursor: pointer;
}

.membership-stat.link:hover {
    border-color: #87CEEB;
    background: #eef8ff;
}

.detail-section {
    margin-bottom: 0;
    padding: 1.75rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

.detail-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.info-item span {
    color: #333;
    font-size: 1rem;
}

.info-value {
    display: block;
    width: 100%;
    background: #f5f6fb;
    border: 1px solid #edf0fb;
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    font-weight: 500;
    color: #111;
    box-shadow: inset 0 1px 2px rgba(15, 26, 64, 0.04);
}

.info-item input {
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
}

.info-item input:focus {
    outline: none;
    border-color: #FA4C99;
}

.gray-box {
    padding: 0.75rem;
    background: #f5f5f5;
    border-radius: 4px;
    color: #666;
}

.rating-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.rating-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
    font-size: 1.5rem;
}

.star {
    color: #FFD700;
}

.star.empty {
    color: #e0e0e0;
}

.content-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item.empty {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-edit-rating {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 8px;
    background: #87CEEB;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-edit-rating:hover {
    background: #6BB6D6;
}

/* 섹션 헤더 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-edit-rating {
    padding: 0.5rem 1rem;
    background: #87CEEB;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
}

.btn-edit-rating:hover {
    background: #6BB6D6;
}

/* 평가 점수 수정 모달 */
.rating-modal-content {
    max-width: 500px;
    width: 90%;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: #333;
}

.rating-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rating-form-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating-form-item label {
    font-weight: 500;
    color: #333;
    font-size: 1rem;
}

.star-rating {
    display: flex;
    gap: 0.25rem;
    cursor: pointer;
}

.star-rating .star {
    font-size: 2rem;
    color: #e0e0e0;
    transition: color 0.2s;
    user-select: none;
}

.star-rating .star.filled,
.star-rating .star:hover,
.star-rating .star.active {
    color: #FFD700;
}

.star-rating {
    display: flex;
    gap: 0.25rem;
    cursor: pointer;
}

.star-rating .star {
    font-size: 2rem;
    color: #e0e0e0;
    transition: color 0.2s;
    user-select: none;
}

.star-rating .star:hover,
.star-rating .star.active {
    color: #FFD700;
}

.star-rating .star.filled {
    color: #FFD700;
}

/* 구독자 모달 */
.subscriber-modal {
    max-width: 420px;
    width: 95%;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.subscriber-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.btn-add {
    padding: 0.5rem 1rem;
    background: #FA4C99;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-add:hover {
    opacity: 0.9;
}

.subscriber-list {
    max-height: 420px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.subscriber-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.75rem;
}

.subscriber-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
}

.subscriber-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subscriber-name {
    flex: 1;
    font-size: 0.95rem;
    color: #333;
}

.btn-manage {
    padding: 0.4rem 0.8rem;
    background: #87CEEB;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-manage:hover {
    background: #6BB6D6;
}

