/* humtun-content-engine - global stylesheet (extracted from base.html) */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.navbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.navbar-brand { font-size: 18px; font-weight: 600; color: #1a202c; display: flex; align-items: center; gap: 8px; }
.navbar-brand .badge { font-size: 11px; background: #e6fffa; color: #0d9488; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.navbar-links { display: flex; gap: 4px; align-items: center; }
.navbar-links a { color: #4a5568; text-decoration: none; padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; transition: all 0.15s; }
.navbar-links a:hover { background: #edf2f7; color: #2d3748; }
.navbar-links a.active { background: #4299e1; color: #fff; }
.navbar-links .ext-link { margin-left: 12px; padding-left: 12px; border-left: 1px solid #e2e8f0; color: #718096; font-size: 12px; }

.container { max-width: 1200px; margin: 24px auto; padding: 0 24px; }

.card { background: #fff; border-radius: 8px; border: 1px solid #e2e8f0; padding: 20px; margin-bottom: 16px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-title { font-size: 16px; font-weight: 600; color: #1a202c; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 8px; border: 1px solid #e2e8f0; padding: 20px; text-align: center; }
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: #2b6cb0; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 13px; color: #718096; }
.stat-card.warning .stat-value { color: #d69e2e; }
.stat-card.success .stat-value { color: #38a169; }
.stat-card.danger .stat-value { color: #e53e3e; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #edf2f7; font-size: 13px; }
th { font-weight: 600; color: #4a5568; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
tr:hover { background: #f7fafc; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.badge-draft { background: #ebf8ff; color: #2b6cb0; }
.badge-pending { background: #fef5e7; color: #d69e2e; }
.badge-approved { background: #f0fff4; color: #38a169; }
.badge-rejected { background: #fff5f5; color: #e53e3e; }
.badge-published { background: #e6fffa; color: #0d9488; }
.badge-active { background: #f0fff4; color: #38a169; }
.badge-inactive { background: #edf2f7; color: #718096; }
.badge-failed { background: #fff5f5; color: #e53e3e; }

.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; border: none; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; transition: all 0.15s; }
.btn-primary { background: #4299e1; color: #fff; }
.btn-primary:hover { background: #3182ce; }
.btn-success { background: #38a169; color: #fff; }
.btn-success:hover { background: #2f855a; }
.btn-danger { background: #e53e3e; color: #fff; }
.btn-danger:hover { background: #c53030; }
.btn-warning { background: #d69e2e; color: #fff; }
.btn-warning:hover { background: #b7791f; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; border: 1px solid #cbd5e0; color: #4a5568; }
.btn-outline:hover { background: #edf2f7; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; color: #4a5568; margin-bottom: 6px; font-size: 13px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 14px; font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #4299e1; box-shadow: 0 0 0 3px rgba(66,153,225,0.1); }
.form-group textarea { min-height: 120px; resize: vertical; }

.alert { padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.alert-success { background: #f0fff4; border: 1px solid #9ae6b4; color: #22543d; }
.alert-error { background: #fff5f5; border: 1px solid #feb2b2; color: #742a2a; }
.alert-warning { background: #fffaf0; border: 1px solid #fbd38d; color: #744210; }
.alert-info { background: #ebf8ff; border: 1px solid #90cdf4; color: #2a4365; }

.empty-state { text-align: center; padding: 40px 20px; color: #a0aec0; }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-muted { color: #718096; }
.text-sm { font-size: 12px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

.content-preview { max-height: 400px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 6px; padding: 16px; background: #fff; line-height: 1.8; }
.content-preview h2 { font-size: 18px; margin: 16px 0 8px; color: #1a202c; }
.content-preview h3 { font-size: 15px; margin: 12px 0 6px; color: #2d3748; }
.content-preview p { margin-bottom: 12px; }
.content-preview a { color: #4299e1; }
.content-preview table { margin: 12px 0; }
.content-preview table th, .content-preview table td { border: 1px solid #e2e8f0; padding: 6px 10px; }

.tab-bar { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid #e2e8f0; }
.tab-bar a { padding: 8px 16px; text-decoration: none; color: #718096; font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-bar a.active { color: #4299e1; border-bottom-color: #4299e1; }
.tab-bar a:hover { color: #2b6cb0; }

/* ---- auth pages ---- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #4299e1 0%, #2c5282 100%); }
.auth-card { background: #fff; border-radius: 12px; padding: 32px; width: 360px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-logo { width: 44px; height: 44px; border-radius: 10px; background: #4299e1; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.auth-title { font-size: 17px; font-weight: 600; color: #1a202c; }
.auth-sub { font-size: 12px; color: #a0aec0; }
.auth-heading { font-size: 15px; margin-bottom: 16px; color: #2d3748; }
.auth-hint { font-size: 12px; color: #d69e2e; margin-bottom: 16px; }

/* ---- permission / misc ---- */
.role-admin { color: #e53e3e; }
.role-operator { color: #3182ce; }
.role-sales { color: #d69e2e; }
.role-viewer { color: #718096; }
