:root {
    --iro-bg: #f5f5f4;
    --iro-surface: #ffffff;
    --iro-border: #e7e5e4;
    --iro-text: #292524;
    --iro-muted: #78716c;
    --iro-soft: #a8a29e;
    --iro-mall: #b45309;
    --iro-mall-light: #fffbeb;
    --iro-mall-border: #fde68a;
    --iro-lp: #6d28d9;
    --iro-lp-light: #f5f3ff;
    --iro-lp-border: #ddd6fe;
    --iro-radius: 14px;
    --iro-radius-sm: 10px;
    --iro-accent: #d97706;
    --iro-danger: #c62828;
    --iro-success: #2e7d32;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--iro-bg);
    color: var(--iro-text);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    padding: 16px 16px 32px;
    max-width: 680px;
    margin: 0 auto;
}

.container-narrow { max-width: 480px; }

/* 顶栏 */
.iro-header, .header {
    background: var(--iro-surface);
    padding: 12px 16px;
    border-bottom: 1px solid var(--iro-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.iro-header h1, .header h1 { font-size: 18px; color: var(--iro-text); margin: 0; font-weight: 700; }
.iro-header h1 a, .header h1 a { color: inherit; text-decoration: none; }
.iro-header .header-left, .header .header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.iro-header .header-nav a, .header .header-nav a {
    color: var(--iro-accent);
    text-decoration: none;
    margin-right: 12px;
    font-size: 14px;
    font-weight: 500;
}
.iro-header .header-nav a.nav-lp, .header .header-nav a.nav-lp { color: #7c3aed; }
.iro-header .header-nav a.active, .header .header-nav a.active { font-weight: 700; color: var(--iro-mall); }
.iro-header .header-nav a.nav-lp.active, .header .header-nav a.nav-lp.active { color: var(--iro-lp); }
.iro-header .header-actions, .header .header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.iro-header .header-user-info, .header .header-user-info {
    color: var(--iro-muted);
    font-size: 13px;
    max-width: 36vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.header-actions a { font-size: 14px; text-decoration: none; }
.header-actions a[href*="profile"] { color: var(--iro-accent); }
.header-actions a[onclick*="Logout"], .header-actions a[href*="logout"] { color: var(--iro-danger); }

/* 面板 / 卡片 */
.iro-panel,
.index-module,
.index-activity-section {
    margin-top: 16px;
    padding: 18px 16px 20px;
    background: var(--iro-surface);
    border: 1px solid var(--iro-border);
    border-radius: var(--iro-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.iro-panel:first-child,
.index-module:first-of-type { margin-top: 0; }

.iro-panel-head,
.index-module-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f5f5f4;
}
.iro-panel-title,
.index-module-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.iro-panel-title i,
.index-module-title i { font-size: 15px; opacity: 0.85; }
.iro-panel-note,
.index-module-note {
    margin: 0 0 14px;
    font-size: 12px;
    color: var(--iro-muted);
    line-height: 1.55;
}

.page-header {
    background: var(--iro-surface);
    border: 1px solid var(--iro-border);
    border-radius: var(--iro-radius);
    padding: 18px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.page-header h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--iro-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-header p { font-size: 13px; color: var(--iro-muted); margin: 0; line-height: 1.5; }

.iro-card {
    background: var(--iro-surface);
    border: 1px solid var(--iro-border);
    border-radius: var(--iro-radius);
    padding: 20px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.iro-card h2 { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--iro-text); }
.iro-card .hint {
    font-size: 12px;
    color: var(--iro-soft);
    margin: 0 0 16px;
    line-height: 1.55;
}

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label,
.form-row label {
    display: block;
    font-size: 13px;
    color: var(--iro-muted);
    margin-bottom: 6px;
    font-weight: 600;
}
.form-group .sub,
.form-row .sub { font-weight: normal; color: var(--iro-soft); font-size: 12px; }
.form-group input,
.form-group select,
.form-group textarea,
.form-row input,
.form-row textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--iro-border);
    border-radius: var(--iro-radius-sm);
    font-size: 15px;
    background: #fff;
    font-family: inherit;
    color: var(--iro-text);
}
.form-group input:focus,
.form-group select:focus,
.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}
.form-group input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.form-row { margin-bottom: 12px; }
.form-row textarea { min-height: 72px; resize: vertical; line-height: 1.45; }
.readonly { background: #fafaf9 !important; color: var(--iro-muted) !important; }

.section-title {
    font-size: 13px;
    color: var(--iro-mall);
    margin: 20px 0 12px;
    padding-top: 4px;
    border-top: 1px solid #f5f5f4;
    font-weight: 700;
}
.section-title:first-of-type { border-top: none; margin-top: 0; }

/* 按钮 */
.iro-btn,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: var(--iro-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #fbbf24, var(--iro-accent));
    color: #fff;
    text-decoration: none;
}
.iro-btn:disabled,
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--iro-accent); color: #fff; }
.btn-secondary { background: #f5f5f4; color: var(--iro-text); border: 1px solid var(--iro-border); }

/* 链接 */
.iro-link { color: var(--iro-accent); font-size: 14px; font-weight: 600; text-decoration: none; }
.iro-link.lp { color: var(--iro-lp); }
.iro-link-back { display: inline-block; margin-top: 16px; text-align: center; width: 100%; }

/* 消息 */
.msg { font-size: 14px; margin-top: 12px; display: none; line-height: 1.5; }
.msg.err { color: var(--iro-danger); }
.msg.ok { color: var(--iro-success); }
.error-message { color: var(--iro-danger); font-size: 14px; margin-top: 12px; display: none; }
.loading { text-align: center; color: var(--iro-muted); margin-top: 12px; display: none; font-size: 14px; }

/* 空状态 */
.empty-state-box {
    text-align: center;
    padding: 28px 16px;
    background: #fafaf9;
    border: 1px dashed var(--iro-border);
    border-radius: var(--iro-radius-sm);
    color: var(--iro-soft);
    font-size: 13px;
    line-height: 1.6;
}
.empty-state-box i { display: block; font-size: 22px; color: #d6d3d1; margin-bottom: 8px; }
.guest-tip { text-align: center; padding: 48px 20px; color: var(--iro-muted); }

/* 动态列表 */
.activity-list { list-style: none; margin: 0; padding: 0; background: var(--iro-surface); }
.activity-list.block {
    border: 1px solid var(--iro-border);
    border-radius: var(--iro-radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f4;
}
.activity-list.block .activity-item { padding: 14px 16px; }
.activity-item:last-child { border-bottom: none; }
.activity-item.is-clickable { cursor: pointer; }
.activity-item.is-clickable:active { background: var(--iro-mall-light); }
.activity-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
    margin-top: 6px;
    box-shadow: 0 0 0 3px #fef3c7;
}
.activity-body { flex: 1; min-width: 0; }
.activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}
.activity-who { font-size: 14px; font-weight: 600; color: var(--iro-mall); margin-right: 6px; }
.activity-time { font-size: 11px; color: var(--iro-soft); white-space: nowrap; flex-shrink: 0; }
.activity-text { font-size: 13px; color: var(--iro-muted); line-height: 1.45; }
.activity-main { font-size: 14px; color: var(--iro-text); flex: 1; line-height: 1.45; }
.activity-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; width: 100%; }

/* 分页 */
.pagination {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span.page-current {
    padding: 8px 14px;
    border-radius: var(--iro-radius-sm);
    text-decoration: none;
    font-size: 13px;
    border: 1px solid var(--iro-border);
    background: var(--iro-surface);
    color: var(--iro-muted);
}
.pagination span.page-current {
    background: var(--iro-accent);
    border-color: var(--iro-accent);
    color: #fff;
    font-weight: 600;
}
.pagination a.disabled { color: #d6d3d1; pointer-events: none; }
.pagination-summary { text-align: center; font-size: 12px; color: var(--iro-soft); margin-top: 8px; }

/* 登录页 */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(160deg, #fffbeb 0%, #fde68a 45%, #fbbf24 100%);
}
.auth-card {
    background: var(--iro-surface);
    border: 1px solid var(--iro-mall-border);
    border-radius: var(--iro-radius);
    box-shadow: 0 8px 32px rgba(180, 83, 9, 0.12);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h1 { color: #92400e; font-size: 28px; margin: 0 0 8px; font-weight: 800; letter-spacing: -0.02em; }
.auth-header p { color: var(--iro-muted); font-size: 14px; margin: 0; }
