/* ============================================================
   云盘系统 全站样式（登录/注册/主界面/管理后台）
   主色：#4f8ef7 蓝色系（对标 123 云盘）
   ============================================================ */
:root {
    --primary: #4f8ef7;
    --primary-dark: #3a76d8;
    --primary-light: #eaf2ff;
    --bg: #f5f7fb;
    --sidebar-bg: #fbfcfe;
    --border: #e8ecf3;
    --text: #2a3547;
    --text-2: #6b7a90;
    --danger: #e5484d;
    --success: #21ba45;
    --radius: 12px;
    --shadow: 0 8px 30px rgba(30, 50, 90, .08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; color: var(--text); background: var(--bg); font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--text-2); }

/* ============ 登录 / 注册页 ============ */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(120deg, #eaf2ff 0%, #f3f0ff 55%, #eef7ff 100%); }
.auth-wrap { flex: 1; display: flex; align-items: stretch; justify-content: center; padding: 40px 20px 90px; gap: 60px; max-width: 1060px; margin: 0 auto; width: 100%; }
.auth-left { display: flex; align-items: center; }
.brand-big { max-width: 380px; }
.logo-badge { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg, var(--primary), #6c5ce7); color: #fff; font-size: 30px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(79, 142, 247, .35); margin-bottom: 20px; }
.brand-big h1 { font-size: 34px; color: #1f2d3d; margin-bottom: 8px; }
.brand-big > p { color: var(--text-2); font-size: 15px; margin-bottom: 22px; }
.brand-big ul { list-style: none; }
.brand-big li { padding: 9px 0; color: #4a5a75; font-size: 14.5px; }
.auth-right { display: flex; align-items: center; }
.auth-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 40px 38px; width: 420px; max-width: 94vw; border: 1px solid var(--border); }
.auth-card h2 { font-size: 24px; color: #1f2d3d; }
.auth-sub { color: var(--text-2); font-size: 13.5px; margin: 8px 0 24px; }
.form-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c4; padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.form-success { background: #e8f8ef; color: #186a3b; border: 1px solid #a8e6c1; padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.input-group { position: relative; margin-bottom: 16px; }
.input-group input, .input-group textarea { width: 100%; padding: 13px 16px 13px 44px; border: 1.5px solid #dde3ee; border-radius: 12px; font-size: 14px; background: #fafbfe; transition: .2s; }
.input-group input:focus, .input-group textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(79, 142, 247, .12); }
.ig-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #9aa8bf; pointer-events: none; }
.pwd-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: none; background: none; cursor: pointer; font-size: 15px; color: #9aa8bf; }
.captcha-group input { padding-right: 140px; }
.captcha-img { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); height: 34px; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); }
.forgot-row { text-align: right; margin: -4px 0 14px; }
.forgot-link { font-size: 13px; color: var(--text-2); }
.forgot-link:hover { color: var(--primary); }
.btn-primary { background: linear-gradient(90deg, var(--primary), #6c5ce7); color: #fff; border: none; border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 600; cursor: pointer; transition: .2s; }
.btn-primary:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(79, 142, 247, .3); }
.btn-block { width: 100%; display: block; }
.reg-row { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--text-2); display: flex; justify-content: center; gap: 14px; align-items: center; }
.admin-entry a { color: var(--text-2); font-size: 12.5px; }
.auth-footer { position: fixed; bottom: 0; left: 0; right: 0; padding: 12px; text-align: center; font-size: 12.5px; color: #7d8ba1; background: rgba(255, 255, 255, .75); backdrop-filter: blur(8px); border-top: 1px solid var(--border); }
.auth-footer .dot { margin: 0 8px; color: #c3ccda; }

/* ============ 弹窗 ============ */
.modal-mask { position: fixed; inset: 0; background: rgba(20, 30, 50, .45); z-index: 100; display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 420px; max-width: 92vw; padding: 26px 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, .2); animation: pop .18s ease; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-head h3 { font-size: 17px; }
.modal-close { cursor: pointer; color: #9aa8bf; font-size: 15px; text-decoration: none; }
.modal-tip { font-size: 12.5px; color: var(--text-2); margin-bottom: 16px; line-height: 1.7; }

/* ============ 主界面布局 ============ */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 232px; background: var(--sidebar-bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.side-logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.side-logo .logo-badge { width: 38px; height: 38px; border-radius: 11px; font-size: 19px; margin: 0; box-shadow: 0 6px 14px rgba(79, 142, 247, .3); }
.side-logo b { font-size: 19px; color: #1f2d3d; }
.search-box { margin: 4px 0 14px; position: relative; }
.search-box input { width: 100%; padding: 10px 14px 10px 36px; border-radius: 10px; border: 1px solid var(--border); background: #f2f5fa; font-size: 13px; transition: .2s; }
.search-box input:focus { outline: none; background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 142, 247, .12); }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #9aa8bf; }
.nav-list { list-style: none; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 10px; color: #4a5a75; cursor: pointer; font-size: 14px; margin-bottom: 3px; transition: .15s; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { background: #eef3fb; color: var(--primary); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.side-cap { padding: 14px 6px 8px; border-top: 1px solid var(--border); }
.cap-bar { height: 8px; background: #edf0f7; border-radius: 6px; overflow: hidden; margin: 8px 0; }
.cap-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #6c5ce7); border-radius: 6px; transition: width .4s; }
.cap-text { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 6px 2px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #6c5ce7, var(--primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.side-user .uname { font-size: 13.5px; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .logout { font-size: 12px; color: var(--text-2); }
.side-version { margin-top: 14px; padding: 8px 8px 0; font-size: 11.5px; color: var(--text-2); opacity: .75; letter-spacing: .3px; }

.main { flex: 1; padding: 22px 26px; min-width: 0; }
.main-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.main-head h2 { font-size: 20px; }
.main-actions { display: flex; gap: 10px; }
.btn { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 9px 16px; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: .15s; color: var(--text); }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-blue { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-blue:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }

/* 文件区 / 空状态 */
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.file-table { width: 100%; border-collapse: collapse; }
.file-table th { text-align: left; font-size: 12.5px; color: var(--text-2); font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.file-table td { padding: 11px 16px; border-bottom: 1px solid #f2f4f9; font-size: 13.5px; }
.file-table tr:hover td { background: #f7faff; }
.fname { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.fname:hover { color: var(--primary); }
.ficon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.ficon.folder { background: #fff4dd; }
.ficon.image { background: #e6f7ee; }
.ficon.video { background: #f3e8ff; }
.ficon.audio { background: #e8f1ff; }
.ficon.doc { background: #e8f1ff; }
.ficon.zip { background: #fdeee6; }
.ficon.file { background: #f0f2f7; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--primary-light); color: var(--primary); }
.tag.gray { background: #f0f2f7; color: var(--text-2); }
.tag.green { background: #e8f8ef; color: #1c7c3c; }
.tag.red { background: #fdecea; color: #c0392b; }
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-2); }
.empty-state .eicon { width: 120px; height: 110px; margin: 0 auto 18px; opacity: .9; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--primary); }

/* 上传进度条 */
.upload-bar { height: 6px; background: #edf0f7; border-radius: 4px; overflow: hidden; min-width: 90px; }
.upload-bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; transition: width .3s; }

/* 任务第二栏（复刻传输列表） */
.task-col { width: 250px; border-right: 1px solid var(--border); padding: 20px 14px; background: #fff; }
.task-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border-radius: 10px; cursor: pointer; margin-bottom: 4px; }
.task-item:hover { background: #f5f8fd; }
.task-item.active { background: var(--primary-light); }
.task-item .tname { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.task-item .badge { min-width: 22px; height: 20px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 11.5px; display: flex; align-items: center; justify-content: center; padding: 0 7px; }
.task-item .badge.zero { background: #e8ecf3; color: var(--text-2); }
.task-groups .task-item.active { font-weight: 600; }

/* 分享弹窗等表单 */
.form-line { margin-bottom: 14px; }
.form-line label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.form-line input, .form-line select { width: 100%; padding: 10px 13px; border: 1.5px solid #dde3ee; border-radius: 10px; font-size: 13.5px; }
.form-line input:focus { outline: none; border-color: var(--primary); }
.copy-box { display: flex; gap: 8px; }
.copy-box input { flex: 1; background: #f7f9fc; }

/* toast */
#toast { position: fixed; top: 26px; left: 50%; transform: translateX(-50%); background: rgba(23, 32, 50, .92); color: #fff; padding: 11px 22px; border-radius: 10px; font-size: 13.5px; z-index: 999; display: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
#toast.ok::before { content: "✔ "; color: #7befa4; }
#toast.err::before { content: "✘ "; color: #ff9b9e; }

/* ============ 管理后台 ============ */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side { width: 210px; background: #1f2a44; color: #c9d3e8; padding: 18px 12px; flex-shrink: 0; }
.admin-side .aside-title { color: #fff; font-size: 17px; font-weight: 700; padding: 6px 10px 18px; display: flex; gap: 8px; align-items: center; }
.admin-side a.nav-item { color: #c9d3e8; }
.admin-side a.nav-item:hover { background: rgba(255, 255, 255, .07); }
.admin-side a.nav-item.active { background: var(--primary); color: #fff; }
.admin-side .side-bottom { margin-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 12px; }
.admin-side .side-version { color: rgba(255, 255, 255, .5); font-size: 11.5px; padding: 10px 10px 0; letter-spacing: .3px; }
.admin-main { flex: 1; padding: 24px 28px; min-width: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-card .num { font-size: 24px; font-weight: 700; color: #1f2d3d; margin-top: 6px; }
.stat-card .lbl { color: var(--text-2); font-size: 12.5px; }
.stat-card.blue { border-top: 3px solid var(--primary); }
.stat-card.green { border-top: 3px solid var(--success); }
.stat-card.orange { border-top: 3px solid #f0823c; }
.stat-card.purple { border-top: 3px solid #6c5ce7; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 11px 14px; font-size: 12.5px; color: var(--text-2); border-bottom: 1px solid var(--border); background: #fafbfd; }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid #f2f4f9; font-size: 13px; }
.admin-table tr:hover td { background: #f8faff; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form input { width: 110px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; }
.switch { position: relative; width: 44px; height: 24px; background: #d5dbe6; border-radius: 20px; cursor: pointer; transition: .2s; border: none; }
.switch::after { content: ""; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.switch.on { background: var(--success); }
.switch.on::after { left: 23px; }
.pager { display: flex; gap: 8px; padding: 14px; justify-content: center; }
.pager a, .pager span { padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text-2); }
.pager .cur { background: var(--primary); border-color: var(--primary); color: #fff; }

@media (max-width: 900px) {
    .auth-left { display: none; }
    .task-col { display: none; }
    .sidebar { width: 72px; }
    .sidebar .side-logo b, .sidebar .nav-item span, .sidebar .cap-text, .sidebar .side-user .uinfo { display: none; }
}
