/* ============================================================
 * 账本管理样式 - book.css
 * ============================================================ */

:root {
    --primary: #B8860B;
    --accent: #D4AF37;
    --bg: #F7F9FC;
    --card: #fff;
    --text: #1A202C;
    --text-sub: #718096;
    --border: #E2E8F0;
}

body {
    background: var(--bg);
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text);
    padding-bottom: 40px;
}

/* 账本卡片 */
.book-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid var(--border); border-radius: 16px;
    padding: 20px; margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.06);
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(184, 134, 11, 0.12);
    border-color: var(--primary);
}
.book-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0; transition: all 0.3s ease;
}
.book-card:hover::before { opacity: 1; }

.book-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 12px; }
.book-title-section { display: flex; align-items: center; gap: 8px; min-width: 0; }
.book-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }

.default-radio {
    width: 20px; height: 20px; border: 1px solid var(--border); border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; flex-shrink: 0;
}
.default-radio:hover { border-color: var(--primary); }
.default-radio.is-default {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent) 0%, #d4af6a 100%);
}
.default-radio.is-default::after {
    content: '\e670'; font-family: 'iconfont'; color: white; font-size: 12px; font-weight: bold;
}

.book-title {
    font-size: 16px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.book-badges { display: none; }
.book-badges-inline { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.book-actions-inline { display: flex; gap: 6px; align-items: center; flex-shrink: 0; margin-left: auto; }

.book-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-sub); }
.book-meta-item { display: flex; align-items: center; gap: 4px; }

/* 成员管理 */
.member-section { margin-bottom: 24px; }
.member-section:last-child { margin-bottom: 0; }
.member-section-title {
    font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px; padding-bottom: 8px;
    border-bottom: 2px solid rgba(184, 134, 11, 0.1);
}
.member-list-container { max-height: none; overflow-y: visible; overflow-x: hidden; padding-right: 0; }
.member-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0; }
.member-info { flex: 1; display: flex; flex-direction: column; gap: 6px; margin-left: 12px; }
.member-name-row { display: flex; align-items: center; gap: 8px; }
.member-owner-badge {
    font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 6px;
    background: linear-gradient(135deg, #CFAF60 0%, #D4B872 100%); color: #fff;
    box-shadow: 0 2px 6px rgba(207, 175, 96, 0.3);
}
.member-actions {
    display: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .book-card { padding: 18px; }
    .book-header { flex-direction: row; align-items: center; gap: 8px; }
    .book-title-section, .book-title-row { gap: 6px; }
    .book-title { font-size: 16px; }
    .book-badges-inline { gap: 4px; }
    .book-actions-inline { gap: 10px; }
    .action-btn-icon { width: 28px; height: 28px; font-size: 12px; }
    .book-meta { font-size: 14px; gap: 8px; }
    .member-section-title { font-size: 14px; }
    .member-card { padding: 12px; }
    .member-avatar { width: 36px; height: 36px; font-size: 16px; }
    .member-name { font-size: 14px; }
    .member-email { font-size: 11px; }
    .member-permission { font-size: 10px; padding: 3px 8px; }
    .member-select { font-size: 14px; padding: 10px 10px; }
    .member-remove-btn { font-size: 14px; padding: 10px 12px; }
    .member-card-header .member-remove-btn {
        width: 32px; height: 32px; padding: 0;
        display: flex; align-items: center; justify-content: center;
        border-radius: 8px; flex-shrink: 0; margin-left: 8px;
    }
}

@media (max-width: 480px) {
    .book-title { font-size: 16px; }
    .action-btn-icon { width: 28px; height: 28px; font-size: 16px; }
    .book-card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .member-actions { width: 100%; flex-direction: column; gap: 8px; }
    .member-select, .member-remove-btn { width: 25%; justify-content: center; }
    .member-card-header .member-remove-btn { width: 32px; }
}
