/* 表单页面通用样式 —— 用于登录/注册/找回密码/管理后台等页面 */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.05);
}

.auth-card h1 {
    font-size: 1.8rem;
    text-align: center;
    color: var(--text-strong, #0f1419);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted, #3d4452);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-strong, #0f1419);
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #4f5fc4;
    box-shadow: 0 0 0 3px rgba(79, 95, 196, 0.15);
}

.form-row-inline {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.form-row-inline input {
    flex: 1;
}

.captcha-question {
    background: #f0f2f8;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    color: #0f1419;
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
}

.btn-refresh-captcha {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #0051a8;
    transition: background 0.2s ease;
}

.btn-refresh-captcha:hover {
    background: #f0f2f8;
}

.btn-send-code {
    background: linear-gradient(135deg, #4f5fc4, #6b3f8e);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.btn-send-code:hover {
    opacity: 0.9;
}

.btn-send-code:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4f5fc4, #6b3f8e);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 95, 196, 0.35);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-footer-links {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.9rem;
}

.form-footer-links a {
    color: #0051a8;
    text-decoration: none;
}

.form-footer-links a:hover {
    text-decoration: underline;
}

.form-message {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

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

.form-message.error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5b7b1;
}

.form-message.success {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}

.form-message.info {
    background: #eef6fc;
    color: #2874a6;
    border: 1px solid #a9cce3;
}

.admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-orange, #c9660a), var(--accent-orange-dark, #a8560a));
    color: white;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* ---- 管理后台专用样式 ---- */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.stat-card {
    background: var(--card-bg-tint, #f3f5fc);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-strong, #0f1419);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted, #3d4452);
    margin-top: 0.3rem;
}

.dashboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #eee;
    flex-wrap: wrap;
}

.dashboard-tab-btn {
    padding: 8px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted, #3d4452);
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.dashboard-tab-btn.active {
    color: #4f5fc4;
    border-bottom-color: #4f5fc4;
    font-weight: 600;
}

.data-table-wrapper {
    overflow-x: auto;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table.data-table th,
table.data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    word-break: break-all;
}

table.data-table th {
    background: #f8f9fa;
    color: var(--text-strong, #0f1419);
    font-weight: 600;
    white-space: nowrap;
}

table.data-table tr:hover td {
    background: #fafbff;
}

.tag-success {
    color: #1e8449;
    font-weight: 600;
}

.tag-fail {
    color: #c0392b;
    font-weight: 600;
}

.tag-role-admin {
    background: linear-gradient(135deg, var(--accent-orange, #c9660a), var(--accent-orange-dark, #a8560a));
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
}

.tag-role-user {
    background: #e9ecef;
    color: #555;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
}

/* ---- 开源项目页面专用 ---- */
.upload-zone {
    border: 2px dashed rgba(79, 95, 196, 0.35);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
    background: rgba(79, 95, 196, 0.04);
}

.file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fafbff;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.file-list-item .file-meta {
    font-size: 0.85rem;
    color: var(--text-muted, #3d4452);
}

.file-list-actions a,
.file-list-actions button {
    margin-left: 0.5rem;
}

.btn-small {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-download {
    background: linear-gradient(135deg, #4f5fc4, #6b3f8e);
    color: white;
}

.btn-delete {
    background: #fdecea;
    color: #c0392b;
}

/* ---- 开源项目文件夹导航区 ---- */
.folder-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}

.folder-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.folder-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    background: #eef0fb;
    color: #0f1419;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    border: 1px solid #d7dbf3;
}

.folder-chip:hover {
    background: #dfe3fa;
}

.folder-chip.active {
    background: #4f5fc4;
    color: #ffffff;
    border-color: #4f5fc4;
}

.folder-chip-actions {
    display: inline-flex;
    gap: 2px;
    margin-left: -6px;
}

.folder-mini-btn {
    border: none;
    background: #f0f0f5;
    color: var(--text-muted, #3d4452);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    cursor: pointer;
    line-height: 1;
}

.folder-mini-btn:hover {
    background: #d7dbf3;
    color: var(--text-strong, #0f1419);
}

.folder-admin-actions {
    display: flex;
    align-items: center;
}

.folder-tag {
    display: inline-block;
    background: #eef0fb;
    color: #0f1419;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 500;
    margin-left: 6px;
}

/* ---- 表单校验提示文字 ---- */
.field-hint {
    font-size: 0.82rem;
    color: var(--text-muted, #3d4452);
    margin-top: 0.4rem;
}

.field-hint-error {
    color: #c0392b;
}

@media (max-width: 600px) {
    .auth-card {
        padding: 1.5rem;
    }
}
