/* Bottom Sheet */
.bottom-sheet {
    position: fixed;
    inset: 0;
    z-index: 300;
    visibility: hidden;
    pointer-events: none;
}

.bottom-sheet.active {
    visibility: visible;
    pointer-events: auto;
}

.bottom-sheet-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity 0.25s;
}

.bottom-sheet.active .bottom-sheet-overlay {
    opacity: 1;
}

.bottom-sheet-content {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    padding-bottom: var(--safe-bottom);
}

.bottom-sheet.active .bottom-sheet-content {
    transform: translateX(-50%) translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 10px auto 0;
}

.bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.bottom-sheet-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
}

.bottom-sheet-body {
    padding: 12px 16px 24px;
    overflow-y: auto;
    flex: 1;
}

/* More menu grid */
.more-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.more-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 500;
    transition: background 0.15s;
}

.more-item:hover, .more-item:active {
    background: var(--light-bg);
    color: var(--navy);
}

.more-item i {
    font-size: 1.3rem;
    color: var(--blue);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border-radius: 12px;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 448px;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--text);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: toastIn 0.3s ease;
    pointer-events: auto;
}

.toast.success { background: #065F46; }
.toast.error { background: #991B1B; }
.toast.warning { background: #92400E; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 350;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

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

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.page-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy);
}

.page-header .back-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
}

/* Search bar */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-bar input {
    flex: 1;
}

/* Filter chips */
.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}

.filter-chip {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--white);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.15s;
}

.filter-chip.active {
    background: var(--navy);
    border-color: var(--navy);
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
}

.pagination .active {
    background: var(--navy);
    border-color: var(--navy);
    color: white;
}

/* Profile card */
.profile-card {
    background: linear-gradient(145deg, var(--navy), var(--blue));
    border-radius: var(--radius);
    padding: 24px 20px;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.profile-card .avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin: 0 auto 12px;
    background: rgba(255,255,255,0.15);
    border: 3px solid var(--gold);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold);
}

.profile-card .avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.profile-card .member-no {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 2px;
}

/* Action list */
.action-list a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.action-list a:last-child { border-bottom: none; }

.action-list .action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
}

.action-list .action-arrow {
    margin-left: auto;
    color: var(--gray);
}

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.2s ease-in-out infinite;
    border-radius: 6px;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Login page specific */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(160deg, var(--navy) 0%, var(--blue) 50%, #1a4ab8 100%);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo .logo-circle {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--gold);
    font-size: 1.6rem;
}

.auth-logo h1 {
    font-size: 1.3rem;
    color: var(--navy);
    font-weight: 700;
}

.auth-logo p {
    font-size: 0.85rem;
    color: var(--gray);
}
