/* ============================================================
   密码本 password.s1.css
   紫罗兰渐变主题 + 玻璃拟态，移动端自适应
   ============================================================ */

.pwd-card {
    background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(245,243,255,0.92));
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.10);
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.pwd-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(99,102,241,0.10), transparent 70%);
    pointer-events: none;
}
.pwd-card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(139,92,246,0.08), transparent 70%);
    pointer-events: none;
}
.pwd-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
    animation: pwd-breath 3s ease-in-out infinite;
}
@keyframes pwd-breath {
    0%, 100% { box-shadow: 0 6px 18px rgba(139,92,246,0.35); }
    50% { box-shadow: 0 6px 26px rgba(99,102,241,0.55); }
}

/* ---------- 登录引导 ---------- */
.pwd-login-guide { text-align: center; padding: 34px 16px 26px; position: relative; z-index: 1; }
.pwd-login-guide i { font-size: 40px; background: linear-gradient(135deg,#8b5cf6,#6366f1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pwd-login-guide h3 { margin: 12px 0 6px; font-size: 1.05rem; color: #1e293b; }
.pwd-login-guide p { margin: 0 0 18px; font-size: 0.85rem; color: #64748b; }
.pwd-login-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pwd-login-btns a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 26px; border-radius: 999px; text-decoration: none;
    font-size: 0.9rem; font-weight: 600; transition: all .25s ease;
}
.pwd-login-btns a.main { background: linear-gradient(135deg,#8b5cf6,#6366f1); color: #fff; box-shadow: 0 6px 16px rgba(139,92,246,0.35); }
.pwd-login-btns a.main:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(99,102,241,0.45); }
.pwd-login-btns a.ghost { border: 1.5px solid rgba(139,92,246,0.45); color: #7c3aed; background: rgba(255,255,255,0.7); }
.pwd-login-btns a.ghost:hover { background: rgba(139,92,246,0.08); }

/* ---------- Tabs ---------- */
.pwd-tabs {
    display: flex; gap: 5px; margin: 6px 0 16px;
    background: rgba(237,233,254,0.55); border: 1px solid rgba(139,92,246,0.28);
    padding: 5px; border-radius: 14px;
    position: relative; z-index: 1;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.pwd-tabs::-webkit-scrollbar { display: none; }
.pwd-tab {
    flex: 1 0 auto; border: none; background: transparent; cursor: pointer;
    padding: 9px 12px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
    color: #94a3b8; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    transition: all .22s ease; white-space: nowrap;
}
.pwd-tab i { font-size: 0.8rem; }
.pwd-tab:hover { color: #7c3aed; }
.pwd-tab.active {
    background: linear-gradient(135deg,#8b5cf6,#6366f1); color: #fff;
    box-shadow: 0 4px 14px rgba(139,92,246,0.35);
}
.pwd-pane { display: none; animation: pwd-slide-in .3s ease; position: relative; z-index: 1; }
.pwd-pane.active { display: block; }
@keyframes pwd-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 汇总卡 ---------- */
.pwd-summary-card {
    display: flex; align-items: center; gap: 14px;
    background: linear-gradient(135deg, #ede9fe 0%, #c7d2fe 100%);
    border-radius: 16px; padding: 18px 20px;
    border: 1px solid rgba(139,92,246,0.4);
    box-shadow: 0 6px 20px rgba(139,92,246,0.10);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.pwd-summary-item { flex: 1; min-width: 80px; text-align: center; }
.pwd-sum-num { font-size: 1.5rem; font-weight: 800; color: #5b21b6; }
.pwd-sum-label { font-size: 0.78rem; color: #6d28d9; margin-top: 2px; }
.pwd-summary-divider { width: 1px; height: 36px; background: rgba(139,92,246,0.25); }
.pwd-add-btn {
    border: none; cursor: pointer;
    padding: 10px 20px; border-radius: 12px;
    font-size: 0.88rem; font-weight: 600; color: #fff;
    background: linear-gradient(135deg,#8b5cf6,#6366f1);
    box-shadow: 0 6px 16px rgba(139,92,246,0.35);
    display: inline-flex; align-items: center; gap: 6px;
    transition: all .25s ease;
}
.pwd-add-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(99,102,241,0.45); }

/* ---------- 卡片网格（Tab1） ---------- */
.pwd-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pwd-record-card {
    background: rgba(255,255,255,0.8); border: 1px solid rgba(139,92,246,0.18);
    border-radius: 14px; padding: 14px; cursor: pointer;
    transition: all .2s ease; position: relative;
}
.pwd-record-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(139,92,246,0.16);
    border-color: rgba(139,92,246,0.4);
}
.pwd-rc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pwd-rc-avatar {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg,#8b5cf6,#6366f1); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.pwd-rc-title { font-size: 0.92rem; font-weight: 700; color: #1e293b; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwd-rc-cat { display: inline-block; font-size: 0.68rem; color: #7c3aed; background: rgba(139,92,246,0.1); padding: 2px 8px; border-radius: 999px; }
.pwd-rc-user { font-size: 0.8rem; color: #64748b; display: flex; align-items: center; gap: 6px; }
.pwd-rc-user i { color: #8b5cf6; }
.pwd-rc-url { font-size: 0.72rem; color: #94a3b8; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwd-rc-actions { display: flex; gap: 6px; margin-top: 10px; }
.pwd-rc-btn {
    flex: 1; border: none; cursor: pointer;
    padding: 7px; border-radius: 8px;
    font-size: 0.75rem; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    transition: all .2s;
}
.pwd-rc-btn.view { background: rgba(139,92,246,0.1); color: #7c3aed; }
.pwd-rc-btn.view:hover { background: rgba(139,92,246,0.2); }
.pwd-rc-btn.edit { background: rgba(59,130,246,0.1); color: #2563eb; }
.pwd-rc-btn.edit:hover { background: rgba(59,130,246,0.2); }
.pwd-rc-btn.del { background: rgba(239,68,68,0.08); color: #ef4444; }
.pwd-rc-btn.del:hover { background: rgba(239,68,68,0.18); }

/* ---------- 分类页 ---------- */
.pwd-category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pwd-cat-card {
    background: rgba(255,255,255,0.8); border: 1px solid rgba(139,92,246,0.2);
    border-radius: 14px; padding: 16px; text-align: center; cursor: pointer;
    transition: all .2s;
}
.pwd-cat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139,92,246,0.15); border-color: rgba(139,92,246,0.4); }
.pwd-cat-icon { font-size: 1.5rem; color: #8b5cf6; margin-bottom: 6px; }
.pwd-cat-name { font-size: 0.85rem; font-weight: 600; color: #1e293b; }
.pwd-cat-count { font-size: 0.72rem; color: #94a3b8; margin-top: 2px; }

/* ---------- 全部列表 ---------- */
.pwd-search-row {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.8); border: 1px solid rgba(139,92,246,0.2);
    border-radius: 12px; padding: 10px 14px; margin-bottom: 12px;
}
.pwd-search-row i { color: #8b5cf6; }
.pwd-search-row input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 0.88rem; color: #1e293b;
}
.pwd-all-list { display: flex; flex-direction: column; gap: 8px; }
.pwd-all-item {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.8); border: 1px solid rgba(139,92,246,0.18);
    border-radius: 12px; padding: 12px 14px;
}
.pwd-ai-dot { width: 8px; height: 8px; border-radius: 50%; background: #8b5cf6; flex-shrink: 0; }
.pwd-ai-info { flex: 1; min-width: 0; }
.pwd-ai-name { font-size: 0.88rem; font-weight: 600; color: #1e293b; }
.pwd-ai-meta { font-size: 0.75rem; color: #94a3b8; margin-top: 2px; }
.pwd-ai-actions { display: flex; gap: 6px; }
.pwd-ai-btn {
    border: none; background: transparent; cursor: pointer;
    width: 32px; height: 32px; border-radius: 8px;
    font-size: 0.8rem; transition: all .2s;
}
.pwd-ai-btn.view { color: #7c3aed; }
.pwd-ai-btn.view:hover { background: rgba(139,92,246,0.1); }
.pwd-ai-btn.copy { color: #2563eb; }
.pwd-ai-btn.copy:hover { background: rgba(59,130,246,0.1); }
.pwd-ai-btn.edit { color: #2563eb; }
.pwd-ai-btn.edit:hover { background: rgba(59,130,246,0.1); }
.pwd-ai-btn.del { color: #ef4444; }
.pwd-ai-btn.del:hover { background: rgba(239,68,68,0.1); }

/* ---------- 空状态 ---------- */
.pwd-empty { text-align: center; padding: 36px 16px; color: #94a3b8; }
.pwd-empty i { font-size: 2.2rem; margin-bottom: 10px; opacity: 0.5; color: #8b5cf6; }
.pwd-empty div { font-size: 0.85rem; }

/* ---------- 表单 ---------- */
.pwd-form-card {
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(139,92,246,0.22);
    border-radius: 16px; padding: 18px;
}
.pwd-form-title { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; color: #5b21b6; margin-bottom: 16px; }
.pwd-form-title i { color: #8b5cf6; }
.pwd-field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.pwd-field { flex: 1; min-width: 140px; margin-bottom: 14px; }
.pwd-field label { display: block; font-size: 0.82rem; font-weight: 600; color: #475569; margin-bottom: 7px; }
.pwd-field label i { color: #8b5cf6; margin-right: 4px; }
.pwd-field input[type="text"], .pwd-field input[type="password"], .pwd-field input[type="url"], .pwd-field textarea {
    width: 100%; padding: 10px 12px; border: 1.5px solid rgba(139,92,246,0.25);
    border-radius: 10px; font-size: 0.88rem; color: #1e293b;
    background: #fff; box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
.pwd-field textarea { resize: vertical; min-height: 64px; font-family: inherit; }
.pwd-field input:focus, .pwd-field textarea:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.12); }

.pwd-pwd-input-wrap { position: relative; }
.pwd-pwd-input-wrap input { padding-right: 42px; }
.pwd-toggle-eye {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    border: none; background: transparent; cursor: pointer; color: #94a3b8;
    font-size: 0.85rem; padding: 4px;
}
.pwd-toggle-eye:hover { color: #8b5cf6; }

.pwd-gen-btn {
    border: none; cursor: pointer;
    padding: 7px 12px; border-radius: 8px;
    font-size: 0.75rem; font-weight: 600; color: #7c3aed;
    background: rgba(139,92,246,0.1);
    transition: all .2s;
}
.pwd-gen-btn:hover { background: rgba(139,92,246,0.2); }

.pwd-save-row { display: flex; gap: 10px; margin-top: 6px; }
.pwd-save-btn {
    flex: 1; border: none; cursor: pointer;
    padding: 12px 20px; border-radius: 12px;
    font-size: 0.92rem; font-weight: 600; color: #fff;
    background: linear-gradient(135deg,#8b5cf6,#6366f1);
    box-shadow: 0 6px 16px rgba(139,92,246,0.35);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .25s ease;
}
.pwd-save-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(99,102,241,0.45); }
.pwd-cancel-btn {
    border: 1.5px solid rgba(139,92,246,0.4); cursor: pointer;
    padding: 12px 20px; border-radius: 12px;
    font-size: 0.92rem; font-weight: 600; color: #7c3aed; background: rgba(255,255,255,0.7);
    transition: all .2s;
}
.pwd-cancel-btn:hover { background: rgba(139,92,246,0.08); }

/* ---------- Toast ---------- */
.pwd-toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: #fff; padding: 12px 20px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 10px;
    font-size: 0.88rem; font-weight: 500; z-index: 999999;
    border-left: 4px solid #8b5cf6;
    animation: pwd-toast-in .3s ease;
    max-width: 90vw;
}
.pwd-toast.success { border-left-color: #10b981; }
.pwd-toast.error { border-left-color: #ef4444; }
.pwd-toast.warning { border-left-color: #f59e0b; }
.pwd-toast.info { border-left-color: #3b82f6; }
.pwd-toast i { font-size: 1rem; }
.pwd-toast.success i { color: #10b981; }
.pwd-toast.error i { color: #ef4444; }
.pwd-toast.warning i { color: #f59e0b; }
.pwd-toast.info i { color: #3b82f6; }
@keyframes pwd-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-15px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- 弹窗 ---------- */
.pwd-modal-mask {
    position: fixed; inset: 0; background: rgba(15,23,42,0.45);
    z-index: 999998; display: flex; align-items: center; justify-content: center;
    padding: 16px; animation: pwd-fade .2s ease;
}
@keyframes pwd-fade { from { opacity: 0; } to { opacity: 1; } }
.pwd-modal {
    background: #fff; border-radius: 18px; max-width: 440px; width: 100%;
    padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: pwd-pop .25s ease;
    max-height: 88vh; overflow-y: auto;
}
@keyframes pwd-pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.pwd-modal-title { font-size: 1.05rem; font-weight: 700; color: #5b21b6; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.pwd-modal-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; gap: 10px; }
.pwd-modal-row:last-child { border-bottom: none; }
.pwd-modal-row .pwd-mr-label { color: #64748b; flex-shrink: 0; }
.pwd-modal-row .pwd-mr-val { font-weight: 600; color: #1e293b; text-align: right; word-break: break-all; }
.pwd-modal-row .pwd-mr-val.mono { font-family: 'Courier New', monospace; letter-spacing: 0.5px; }
.pwd-pwd-cell { display: flex; align-items: center; gap: 8px; }
.pwd-pwd-cell .pwd-mr-val { flex: 1; }
.pwd-pwd-cell button {
    border: none; background: rgba(139,92,246,0.1); color: #7c3aed;
    width: 28px; height: 28px; border-radius: 7px; cursor: pointer; font-size: 0.75rem;
    transition: all .2s;
}
.pwd-pwd-cell button:hover { background: rgba(139,92,246,0.2); }
.pwd-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.pwd-modal-btn {
    flex: 1; border: none; cursor: pointer; padding: 10px; border-radius: 10px;
    font-size: 0.88rem; font-weight: 600; transition: all .2s;
}
.pwd-modal-btn.primary { background: linear-gradient(135deg,#8b5cf6,#6366f1); color: #fff; }
.pwd-modal-btn.primary:hover { transform: translateY(-1px); }
.pwd-modal-btn.ghost { background: rgba(139,92,246,0.08); color: #7c3aed; }

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
    .pwd-card { padding: 14px; border-radius: 16px; }
    .pwd-tab { padding: 8px 10px; font-size: 0.78rem; }
    .pwd-tab i { display: none; }
    .pwd-summary-card { padding: 14px; }
    .pwd-sum-num { font-size: 1.25rem; }
    .pwd-add-btn { padding: 9px 16px; font-size: 0.82rem; }
    .pwd-card-grid { grid-template-columns: 1fr; }
    .pwd-category-grid { grid-template-columns: repeat(2, 1fr); }
    .pwd-field { min-width: 100%; }
}
