/* ==========================================================================
   快捷门户 - 选项二 (极简流体磨砂 / iOS 风格) 核心样式表
   ========================================================================== */

/* --- 1. 变量定义与全局重置 --- */
:root {
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 'Microsoft YaHei', sans-serif;
    
    /* 极致细腻的 iOS 磨砂色彩调配 */
    --color-text-primary: #1d1d1f;
    --color-text-secondary: #515154;
    --color-text-muted: #86868b;
    --color-bg-base: #f5f5f7;
    
    /* 磨砂玻璃专属半透明变量 */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.55);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
    --glass-blur: blur(20px);
    
    /* 系统主题彩蛋配色 */
    --color-primary: #0071e3;         /* Apple Blue */
    --color-primary-hover: #0077ed;
    --color-primary-light: rgba(0, 113, 227, 0.1);
    
    --color-danger: #ff453a;          /* Apple Red */
    --color-danger-hover: #ff5247;
    --color-danger-light: rgba(255, 69, 58, 0.1);
    
    --color-success: #30d158;         /* Apple Green */
    --color-warning: #ff9f0a;         /* Apple Orange */
    --color-purple: #af52de;          /* Apple Purple */
    
    /* 圆角与动画曲线 */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition-ios: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-base);
    color: var(--color-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- 2. 动态流体色彩渐变背景 --- */
.bg-gradient-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: #fbfbfd;
    filter: blur(80px); /* 强化雾化柔和度 */
    transition: opacity 0.5s ease;
}

.bg-image-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.5s ease;
}

.gradient-blob {
    position: absolute;
    width: 65vw;
    height: 65vw;
    border-radius: var(--radius-full);
    opacity: 0.35;
    mix-blend-mode: multiply;
    animation: blob-float 24s infinite ease-in-out alternate;
}

.blob-peach {
    background: radial-gradient(circle, #ffdad5 0%, rgba(255,218,213,0) 70%);
    top: -15%;
    left: -10%;
    animation-delay: 0s;
}

.blob-lilac {
    background: radial-gradient(circle, #f0e1ff 0%, rgba(240,225,255,0) 70%);
    bottom: -10%;
    right: -5%;
    width: 70vw;
    height: 70vw;
    animation-delay: -4s;
    animation-duration: 28s;
}

.blob-sky {
    background: radial-gradient(circle, #e1f5ff 0%, rgba(225,245,255,0) 70%);
    top: 30%;
    left: 45%;
    width: 55vw;
    height: 55vw;
    animation-delay: -8s;
    animation-duration: 20s;
}

@keyframes blob-float {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    33% {
        transform: translate(5%, 8%) scale(1.08) rotate(120deg);
    }
    66% {
        transform: translate(-4%, 4%) scale(0.95) rotate(240deg);
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(360deg);
    }
}

/* --- 3. 页面主框架布局 --- */
.portal-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 40px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* --- 4. 头部导航及工具栏 --- */
.portal-header {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    transition: var(--transition-ios);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.title-area h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1d1d1f 30%, #515154 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-area p {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.time-widget {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#widget-time {
    font-size: 19px;
    font-weight: 600;
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    letter-spacing: 0.5px;
}

#widget-date {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 极简磨砂搜索框 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0);
    border-radius: var(--radius-md);
    padding: 0 16px;
    width: 320px;
    height: 46px;
    transition: var(--transition-ios);
}

.search-box:focus-within {
    background: #ffffff;
    width: 380px;
    border-color: rgba(0, 113, 227, 0.25);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1), 0 4px 12px rgba(0,0,0,0.02);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    margin-right: 10px;
    flex-shrink: 0;
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    font-size: 14px;
    font-family: var(--font-primary);
    color: var(--color-text-primary);
}

.search-box input::placeholder {
    color: var(--color-text-muted);
}

.clear-btn {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px;
    display: none; /* 默认隐藏，输入时显示 */
    align-items: center;
    justify-content: center;
}

.clear-btn svg {
    width: 14px;
    height: 14px;
}

.clear-btn:hover {
    color: var(--color-text-primary);
}

/* --- 5. 通用按钮设计 (iOS 按钮) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    height: 46px;
    padding: 0 20px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text-primary);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

.btn-danger {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.btn-danger:hover {
    background: var(--color-danger);
    color: #ffffff;
}

.btn-link-danger {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-link-danger:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

/* --- 6. 分类过滤 Tab (Capsules) --- */
.category-nav {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.category-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.category-tabs {
    display: flex;
    gap: 10px;
    padding: 4px;
}

.tab-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-full);
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-ios);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.tab-item:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--color-text-primary);
    transform: translateY(-1px);
}

.tab-item.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
}

/* --- 7. 卡片网格与卡片设计 --- */
.grid-section {
    flex-grow: 1;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

/* 磨砂玻璃卡片 */
.link-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 22px;
    display: flex;
    flex-direction: column;
    height: 190px;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: var(--transition-ios);
    overflow: hidden;
}

/* 卡片背景隐约的彩色晕光 */
.link-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-light) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    z-index: 0;
    transition: var(--transition-ios);
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px 0 rgba(31, 38, 135, 0.1);
    border-color: rgba(255, 255, 255, 0.85);
}

.link-card:hover::before {
    opacity: 0.6;
    transform: translate(-10%, 10%);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
}

/* 柔和圆角的图标容器 */
.card-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--accent-light);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-ios);
}

.card-icon-box svg {
    width: 22px;
    height: 22px;
}

.link-card:hover .card-icon-box {
    transform: scale(1.08) rotate(-3deg);
    background: var(--accent-color);
    color: #ffffff;
}

/* 网页状态指示器 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.03);
    color: var(--color-text-muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--color-text-muted);
}

.status-badge.online {
    background: rgba(48, 209, 88, 0.08);
    color: #248a3a;
}
.status-badge.online .status-dot {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

/* 管理编辑齿轮 */
.edit-card-btn {
    background: rgba(0, 0, 0, 0.03);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition-fast);
}

.edit-card-btn svg {
    width: 14px;
    height: 14px;
}

.edit-card-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--color-text-primary);
}

.link-card:hover .edit-card-btn {
    opacity: 1;
}

/* 卡片内容区 */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-bottom {
    position: relative;
    z-index: 1;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-tag {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    background: var(--accent-light);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.card-go-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.03);
    color: var(--color-text-secondary);
    transition: var(--transition-ios);
}

.card-go-arrow svg {
    width: 12px;
    height: 12px;
    transition: var(--transition-fast);
}

.link-card:hover .card-go-arrow {
    background: var(--accent-color);
    color: #ffffff;
}

.link-card:hover .card-go-arrow svg {
    transform: translate(1px, -1px);
}

/* --- 8. 空状态样式 --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--glass-bg);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
}

.empty-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.03);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.empty-icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.empty-state h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--color-text-muted);
}



/* --- 10. iOS Sheet 抽屉表单面板 --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 480px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 32px;
}

.drawer-overlay.active .drawer-panel {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.drawer-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.close-btn {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--color-text-primary);
}

/* 抽屉表单群 */
.drawer-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.form-group label .required {
    color: var(--color-danger);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-family: var(--font-primary);
    font-size: 14px;
    outline: none;
    color: var(--color-text-primary);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    background: #ffffff;
    border-color: rgba(0, 113, 227, 0.25);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrapper select {
    width: 100%;
    appearance: none; /* 移除默认下拉三角 */
    -webkit-appearance: none;
    padding-right: 40px;
}

.select-arrow {
    position: absolute;
    right: 16px;
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    pointer-events: none;
}

/* 图标选择器网格 */
.icon-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.icon-option {
    border: 1px solid rgba(0,0,0,0.06);
    background: rgba(0,0,0,0.02);
    border-radius: var(--radius-md);
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.icon-option:hover {
    background: rgba(0,0,0,0.05);
    color: var(--color-text-primary);
}

.icon-option.selected {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.icon-option svg {
    width: 20px;
    height: 20px;
}

/* 主题颜色选择器 */
.color-selector {
    display: flex;
    gap: 12px;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.color-option.selected {
    box-shadow: 0 0 0 2px var(--color-primary);
    transform: scale(1.1);
}

/* 错误提示 */
.error-msg {
    font-size: 12px;
    color: var(--color-danger);
    font-weight: 500;
    display: none;
}

.form-group.has-error input {
    border-color: var(--color-danger);
    background: rgba(255, 69, 58, 0.03);
}

.form-group.has-error .error-msg {
    display: block;
}

/* 表单提交区域 */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.submit-group {
    display: flex;
    gap: 10px;
}

.submit-group button {
    flex: 1;
}

/* --- 10.5 管理中心大模态框 (iOS 风格) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 980px;
    max-width: 95%;
    height: 640px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title-group h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.modal-title-group p {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.modal-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 管理中心侧边栏 */
.mgmt-sidebar {
    width: 220px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.01);
}

.mgmt-tab-btn {
    border: none;
    background: none;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}

.mgmt-tab-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--color-text-primary);
}

.mgmt-tab-btn.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.mgmt-tab-btn svg {
    width: 16px;
    height: 16px;
}

/* 管理中心内容区 */
.mgmt-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: #ffffff;
}

.mgmt-section {
    display: none;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.mgmt-section.active {
    display: flex;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.btn-sm {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: var(--radius-md);
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

/* 管理端数据表格 */
.table-wrapper {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fafafb;
}

.mgmt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.mgmt-table th {
    background: rgba(0, 0, 0, 0.02);
    color: var(--color-text-muted);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mgmt-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--color-text-primary);
    vertical-align: middle;
    word-break: break-all;
}

.mgmt-table tr:last-child td {
    border-bottom: none;
}

.mgmt-table td a {
    color: var(--color-primary);
    text-decoration: none;
}

.mgmt-table td a:hover {
    text-decoration: underline;
}

/* 行内按钮组 */
.table-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-icon-only {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(0, 0, 0, 0.03);
    color: var(--color-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon-only:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text-primary);
}

.btn-icon-only.btn-edit:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.btn-icon-only.btn-delete:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.btn-icon-only.btn-pwd:hover {
    background: rgba(255, 159, 10, 0.1);
    color: var(--color-warning);
}

.btn-icon-only svg {
    width: 14px;
    height: 14px;
}

/* 分类管理界面 */
.add-cat-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.03);
    margin-bottom: 12px;
}

.add-cat-form .form-row {
    display: flex;
    gap: 10px;
}

.add-cat-form input {
    flex: 1;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    height: 42px;
}

.add-cat-form button {
    height: 42px;
}

#cat-error-msg {
    margin-top: -4px;
    margin-left: 4px;
}

.cat-list-wrapper {
    flex: 1;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    background: #fafafb;
    padding: 8px;
    max-height: 320px;
}

.cat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cat-item-row {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.cat-item-row:hover {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.cat-name-view {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* 行内重命名输入框 */
.cat-rename-input {
    border: 1px solid var(--color-primary) !important;
    background: #ffffff !important;
    border-radius: var(--radius-sm) !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    width: 200px;
    height: 28px !important;
    outline: none;
}

.cat-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.cat-system-tag {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-text-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 6px;
    border-radius: 4px;
}


/* --- 10.7 开发者常驻底部名片样式 --- */
.dev-bottom-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 16px 24px;
    width: 100%;
    max-width: 480px;
    margin: 24px auto 0 auto;
    cursor: default;
    transition: var(--transition-ios);
}

.dev-bottom-card:hover {
    box-shadow: 0 12px 32px rgba(31, 38, 135, 0.08);
}

.badge-avatar-box {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(88, 86, 214, 0.08);
    color: #5856d6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.badge-avatar-box svg {
    width: 20px;
    height: 20px;
}

.badge-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: #30d158;
    border: 2px solid #ffffff;
    box-shadow: 0 0 6px #30d158;
}

.badge-info-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    gap: 4px;
}

.badge-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-desc {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
    line-height: 1.4;
    word-break: break-all;
}

/* 分类加密锁图标 */
.tab-lock-icon {
    width: 12px;
    height: 12px;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}

/* 分类网址数量角标 */
.tab-count-badge {
    font-size: 10px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text-secondary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.tab-item.active .tab-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* --- 11. 手机平板响应式适配 --- */
@media (max-width: 900px) {
    .portal-header {
        padding: 20px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box:focus-within {
        width: 100%;
    }
    
    .header-right {
        width: 100%;
    }
    
    .header-right button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .portal-container {
        padding: 20px 16px;
        gap: 20px;
    }
    
    .header-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .time-widget {
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        padding-left: 0;
        padding-top: 12px;
        width: 100%;
    }
    
    .drawer-panel {
        width: 100%;
        padding: 20px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }


    /* 管理中心移动端适配 */
    .modal-container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
        border: none;
    }
    .modal-body {
        flex-direction: column;
    }
    .mgmt-sidebar {
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding: 10px;
        overflow-x: auto;
        flex-shrink: 0;
    }
    .mgmt-sidebar::-webkit-scrollbar {
        display: none;
    }
    .mgmt-tab-btn {
        padding: 8px 12px;
        white-space: nowrap;
    }
    .mgmt-content {
        padding: 16px;
    }
    .mgmt-table th:nth-child(3),
    .mgmt-table td:nth-child(3) {
        display: none; /* 在手机端隐藏过长的链接列 */
    }
}
