
/* ====== 后台：资源管理 ====== */
.res-alert { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 0.86rem; display: flex; align-items: center; gap: 6px; }
.res-alert.ok { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.res-alert.err { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.res-card-head { display: flex; align-items: center; gap: 6px; background: #ffffff; font-weight: 700; font-size: 0.92rem; color: #111827; }
.res-card-head i { color: #2563eb; }
.res-filter-clear { margin-left: auto; font-size: 0.78rem; color: #2563eb; text-decoration: none; font-weight: 500; }
.res-filter-clear:hover { text-decoration: underline; }

.res-form .res-grid { display: grid; grid-template-columns: 1.4fr 1.2fr 0.8fr; gap: 12px; }
.res-field label { display: block; font-size: 0.78rem; font-weight: 600; color: #4b5563; margin-bottom: 5px; }
.res-field input, .res-field select {
    width: 100%; height: 38px; padding: 0 12px; font-size: 0.86rem;
    border: 1px solid #e5e7eb; border-radius: 8px; background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.res-field input:focus, .res-field select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.res-field-wide { grid-column: 1 / 3; }
.res-field-btn { display: flex; align-items: flex-end; }
.res-btn { width: 100%; height: 38px; border-radius: 8px; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 5px; }

.res-list { display: flex; flex-direction: column; gap: 8px; }
.res-item {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid #eef1f5; border-radius: 10px; padding: 10px 14px;
    background: #ffffff; transition: border-color 0.15s, box-shadow 0.15s;
}
.res-item:hover { border-color: #dbeafe; box-shadow: 0 3px 10px rgba(37, 99, 235, 0.06); }
.res-icon { width: 36px; height: 36px; border-radius: 9px; background: linear-gradient(135deg, #60a5fa, #2563eb); color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; flex-shrink: 0; }
.res-info { flex: 1; min-width: 0; }
.res-name { font-weight: 600; font-size: 0.88rem; color: #111827; }
.res-url { font-size: 0.76rem; color: #2563eb; text-decoration: none; word-break: break-all; }
.res-url:hover { text-decoration: underline; }
.res-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 3px; font-size: 0.74rem; color: #9ca3af; }
.res-vuln-link { color: #6b7280; text-decoration: none; font-weight: 500; }
.res-vuln-link:hover { color: #2563eb; }
.res-vuln-link i, .res-size i, .res-time i { margin-right: 2px; }
.res-del-btn { border: 1px solid #fecaca; background: #fef2f2; color: #dc2626; border-radius: 8px; font-size: 0.78rem; padding: 5px 12px; }
.res-del-btn:hover { background: #fee2e2; }
.res-empty { text-align: center; padding: 34px 0; color: #9ca3af; }
.res-empty i { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.res-empty p { font-size: 0.84rem; margin: 0; }

@media (max-width: 900px) {
    .res-form .res-grid { grid-template-columns: 1fr 1fr; }
    .res-field-wide { grid-column: 1 / -1; }
    .res-field-btn { grid-column: 1 / -1; }
}

/* ====== 详情页：左栏相关 POC 文件 ====== */
.res-side-card .side-title { display: flex; align-items: center; gap: 5px; }
.res-side-card .side-title i { color: #2563eb; font-size: 0.9rem; }
.res-side-list { display: flex; flex-direction: column; gap: 7px; }
.res-side-item {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px; border: 1px solid #eef1f5; border-radius: 10px;
    text-decoration: none; background: #ffffff;
    transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.res-side-item:hover { border-color: #dbeafe; background: #f0f7ff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08); }
.rsi-icon { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #60a5fa, #2563eb); color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 0.82rem; flex-shrink: 0; }
.rsi-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rsi-name { font-size: 0.82rem; font-weight: 600; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsi-sub { font-size: 0.7rem; color: #9ca3af; }
.rsi-arrow { color: #c3cad6; font-size: 0.85rem; transition: color 0.15s, transform 0.15s; }
.res-side-item:hover .rsi-arrow { color: #2563eb; transform: translateY(1px); }

/* ====== 后台：对象存储配置与文件浏览器 ====== */
.res-s3-state { margin-left: 10px; font-size: 0.74rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.res-s3-state.on { background: #f0fdf4; color: #16a34a; }
.res-s3-state.off { background: #fef2f2; color: #dc2626; }
.res-chev { color: #9ca3af; font-size: 0.85rem; transition: transform 0.2s; }
.card-header[aria-expanded="false"] .res-chev { transform: rotate(-90deg); }

.res-grid-4 { grid-template-columns: 1.4fr 1fr 1fr 0.6fr; }
.res-browser-bar { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 14px; flex-wrap: wrap; }
.res-browser-bar .res-field { min-width: 180px; }
.res-browser-bar .res-grow { flex: 1; min-width: 200px; }
.res-file-list { min-height: 60px; }
.s3-key { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-add-btn { border: 1px solid #bfdbfe; background: #eff6ff; color: #2563eb; border-radius: 8px; font-size: 0.78rem; padding: 5px 12px; flex-shrink: 0; }
.res-add-btn:hover { background: #dbeafe; }
.res-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 目录导航：面包屑 + 文件夹行 */
.s3-crumbs {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
    padding: 9px 14px; margin-bottom: 10px;
    background: #f8fafc; border: 1px solid #eef1f5; border-radius: 10px;
    font-size: 0.84rem;
}
.s3-crumbs > i.bi-folder2-open { color: #2563eb; margin-right: 4px; }
.s3-crumb { color: #2563eb; text-decoration: none; font-weight: 600; }
.s3-crumb:hover { text-decoration: underline; }
.s3-crumb-sep { color: #cbd5e1; font-size: 0.7rem; margin: 0 2px; }
.res-icon-dir { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.s3-dir { cursor: pointer; }
.s3-dir:hover .res-name { color: #d97706; }
.s3-dir-arrow { color: #c3cad6; font-size: 0.85rem; transition: transform 0.15s, color 0.15s; }
.s3-dir:hover .s3-dir-arrow { color: #f59e0b; transform: translateX(2px); }

@media (max-width: 900px) {
    .res-grid-4 { grid-template-columns: 1fr 1fr; }
    .res-grid-4 .res-field-btn { grid-column: 1 / -1; }
    .s3-key { max-width: 180px; }
}
