/* ── 通用样式 ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* ── 登录页 ── */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2rem;
}

#wx_login_container {
    min-width: 300px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── 管理页面布局 ── */
.app-header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.2rem;
    font-weight: 600;
}

.app-content {
    max-width: 960px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

/* ── 卡片列表 ── */
.card-list {
    list-style: none;
}

.card-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-item .title {
    font-size: 1rem;
    font-weight: 500;
}

.card-item .arrow {
    color: #999;
    font-size: 1.2rem;
}

/* ── 按钮 ── */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
}

.btn-danger:hover {
    background: #ff7875;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* ── 分享码 ── */
.share-code-bar {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.75rem;
    background: none;
    border: none;
    padding: 0;
}

.share-code-bar .share-code {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #1890ff;
    background: none;
    border: none;
    padding: 0;
    user-select: all;
}

/* ── 拖拽上传区 ── */
.drop-zone {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    color: #999;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s, background 0.3s;
}

.drop-zone.dragover {
    border-color: #1890ff;
    background: #e6f7ff;
    color: #1890ff;
}

/* ── 音频文件列表 ── */
.audio-list {
    list-style: none;
}

.audio-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.audio-item .info {
    flex: 1;
}

.audio-item .name {
    font-weight: 500;
}

.audio-item .meta {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.25rem;
}

.audio-item .actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ── 状态标签 ── */
.count-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    background: #f0f0f0;
    color: #666;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: normal;
    vertical-align: middle;
}

.status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-ready {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.status-uploading {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.status-analyzing {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.status-error {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

/* ── 模态框 ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    width: 90%;
    max-width: 420px;
}

.modal h3 {
    margin-bottom: 1rem;
}

.modal input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ── 开关 ── */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 22px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #1890ff;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* ── 面包屑 ── */
.breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #1890ff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #999;
}

/* ── 工具栏 ── */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* ── 提示信息 ── */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}
