/* NanoBanana2 Admin - 样式表 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: #1a1a2e;
    color: #fff;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand { font-size: 18px; font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-user { font-size: 14px; opacity: .8; }

/* 容器 */
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    transition: background .15s;
}
.btn:hover { background: #eee; }
.btn-primary { background: #4361ee; color: #fff; border-color: #4361ee; }
.btn-primary:hover { background: #3a56d4; }
.btn-danger { background: #e63946; color: #fff; border-color: #e63946; }
.btn-danger:hover { background: #cc2f3b; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* 登录 */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    width: 380px;
}
.login-box h2 { text-align: center; margin-bottom: 24px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.form-group input:focus { outline: none; border-color: #4361ee; }

/* 提示 */
.alert {
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error { background: #fde8e8; color: #c0392b; }
.alert-info { background: #e8f4fd; color: #2980b9; }

/* 仪表盘头部 */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.dashboard-header h1 { font-size: 24px; }
.badge {
    font-size: 14px;
    background: #4361ee;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: normal;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-bar label { font-size: 14px; }
.filter-bar input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* 图片网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.image-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}
.image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.image-thumb {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #eee;
}
.image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-info { padding: 10px 12px; }
.image-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.image-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}
.image-time { font-size: 12px; color: #aaa; }
.status-success { color: #27ae60; }
.status-failed { color: #e63946; }

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
    font-size: 16px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}
.page-info { font-size: 14px; color: #666; }

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.modal-content {
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    width: 360px;
}
.modal-content h3 { margin-bottom: 16px; }
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* 详情页 */
.detail-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.detail-image {
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}
.detail-image img {
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
}
.detail-info {
    padding: 24px;
}
.detail-info h2 {
    margin-bottom: 20px;
    font-size: 20px;
    word-break: break-all;
}
.info-table { width: 100%; border-collapse: collapse; }
.info-table th,
.info-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    text-align: left;
}
.info-table th {
    width: 100px;
    color: #888;
    font-weight: 500;
}
.prompt-cell {
    word-break: break-all;
    max-width: 400px;
}

/* 响应式 */
@media (max-width: 768px) {
    .detail-layout { grid-template-columns: 1fr; }
    .table-wrap { overflow-x: auto; }
}

/* ===== 列表表格 ===== */
.table-wrap {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    overflow: hidden;
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.list-table thead {
    background: #f8f9fc;
    border-bottom: 2px solid #eee;
}

.list-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.list-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background .1s;
}

.list-table tbody tr:last-child {
    border-bottom: none;
}

.list-table tbody tr:hover {
    background: #fafbff;
}

.list-table td {
    padding: 10px 14px;
    vertical-align: middle;
}

/* 缩略图 */
.list-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    background: #eee;
}

/* 文件名 */
.file-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: block;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-link:hover { color: #4361ee; }

.file-size {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

/* 提示词截断 */
.prompt-clip {
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #666;
}

/* 居中列 */
.cell-center {
    text-align: center;
}

/* 时间列 */
.cell-time {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
}

/* 状态标签 */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.tag-success { background: #e6f9ee; color: #27ae60; }
.tag-failed  { background: #fde8e8; color: #e63946; }

