/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: #1a1a2e;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand a {
    color: #e94560;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-link {
    color: #eee;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-link:hover { color: #e94560; }
.nav-divider { color: #555; font-size: 0.8rem; }
.nav-user { color: #aaa; font-size: 0.85rem; }
.nav-logout {
    background: rgba(233,69,96,0.15);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
}
.nav-logout:hover { background: rgba(233,69,96,0.3); }

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Typography */
h1 { font-size: 2rem; margin-bottom: 1.5rem; color: #1a1a2e; }
h2 { font-size: 1.4rem; margin-bottom: 1rem; color: #16213e; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.stat-number { font-size: 2.5rem; font-weight: bold; color: #1a1a2e; }
.stat-label { color: #666; font-size: 0.9rem; margin-top: 0.3rem; }
.stat-warning .stat-number { color: #f0a500; }
.stat-error .stat-number { color: #e94560; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary { background: #e94560; color: white; }
.btn-primary:hover { background: #c73852; }
.btn-secondary { background: #16213e; color: white; }
.btn-secondary:hover { background: #1a1a2e; }
.btn-success { background: #0f9b58; color: white; }
.btn-success:hover { background: #0b7a45; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}
.quick-actions h2 { width: 100%; }

/* Table */
.table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-collapse: collapse;
}
.table th, .table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.table th { background: #f8f9fa; font-weight: 600; color: #555; }
.table tr:last-child td { border-bottom: none; }

/* Status Badges */
.status {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-submitted { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }
.status-failed { background: #f8d7da; color: #721c24; }
.status-running { background: #cce5ff; color: #004085; }

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}
.badge-portrait { background: #e8daef; color: #6c3483; }
.badge-walking { background: #d5f5e3; color: #1e8449; }
.badge-lifestyle { background: #fdebd0; color: #b9770e; }

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
.card:hover { transform: translateY(-3px); }
.card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: #eee;
}
.card-body { padding: 1rem; }
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.3rem; }
.card-subtitle { color: #666; font-size: 0.85rem; }
.card-actions { padding: 0.8rem 1rem; border-top: 1px solid #f0f0f0; }

/* Forms */
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #333;
}
.form-control {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-control:focus { border-color: #e94560; outline: none; }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { background: white; }

.form-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 600px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}
.upload-area:hover { border-color: #e94560; }
.upload-area.dragover { border-color: #e94560; background: #fff5f7; }

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}
.gallery-item-info {
    padding: 0.8rem;
    font-size: 0.85rem;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.filters select, .filters input {
    padding: 0.5rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: #e94560;
    transition: width 0.3s;
}

/* Generation Panel */
.gen-panel {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}
.gen-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.gen-option {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.gen-option.selected { border-color: #e94560; background: #fff5f7; }
.gen-option:hover { border-color: #e94560; }

/* Model Detail */
.model-detail {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.model-profile-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 1rem; }
    .model-detail { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}
.toast-success { background: #0f9b58; }
.toast-error { background: #e94560; }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
