/* ─── assets/css/admin.css ───────────────────────────────────────────────────*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red: #D04F54; --red-dark: #b53e43; --yellow: #F0D56A; --yellow-dark: #d4b94a;
  --dark: #1a1a1a; --mid: #555; --white: #fff;
  --shadow: 0 4px 24px rgba(0,0,0,.10); --shadow-lg: 0 12px 48px rgba(0,0,0,.16);
  --radius: 12px; --radius-sm: 6px;
}
body { font-family: 'Inter', sans-serif; background: #f2f2f2; color: var(--dark); min-height: 100vh; }

/* LOGIN */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--yellow); padding: 24px; }
.login-card { background: white; border-radius: var(--radius); padding: 44px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.logo-mark { width: 48px; height: 48px; background: var(--red); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-weight: 900; color: white; font-size: 16px; flex-shrink: 0; }

/* ADMIN LAYOUT */
.admin-header { background: var(--dark); color: white; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; height: 64px; position: sticky; top: 0; z-index: 10; }
.admin-header h1 { font-size: 1.15rem; font-weight: 700; }
.admin-header h1 span { color: var(--yellow); }
.admin-body { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.admin-tab { padding: 10px 22px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; background: white; color: var(--mid); border: 2px solid transparent; transition: all .2s; cursor: pointer; }
.admin-tab:hover { border-color: var(--red); color: var(--red); }
.admin-tab.active { background: var(--red); color: white; border-color: var(--red); }
.admin-section { display: none; }
.admin-section.active { display: block; }
.admin-card { background: white; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); margin-bottom: 24px; }
.admin-card h3 { font-size: 1.05rem; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.admin-card h3::before { content: ''; width: 4px; height: 20px; background: var(--red); border-radius: 2px; display: inline-block; }
.hint { font-size: 13px; color: var(--mid); margin-bottom: 16px; }
.loading { text-align: center; padding: 32px; color: var(--mid); font-size: 14px; }

/* FORM */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group-admin { margin-bottom: 16px; }
.form-group-admin label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--mid); }
.form-group-admin input, .form-group-admin textarea, .form-group-admin select {
  width: 100%; padding: 10px 14px; border: 2px solid #e0e0e0; border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: 14px; outline: none; transition: border-color .2s; background: white;
}
.form-group-admin input:focus, .form-group-admin textarea:focus, .form-group-admin select:focus { border-color: var(--red); }
.form-group-admin textarea { resize: vertical; min-height: 90px; }
#je-cat-select { flex: 1; }

/* BUTTONS */
.btn-admin { padding: 11px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; transition: all .2s; cursor: pointer; border: none; font-family: 'Inter', sans-serif; }
.btn-save { background: var(--red); color: white; }
.btn-save:hover:not(:disabled) { background: var(--red-dark); }
.btn-save:disabled { opacity: .5; cursor: not-allowed; }
.btn-cancel { background: #f0f0f0; color: var(--mid); }
.btn-cancel:hover { background: #e0e0e0; }
.btn-danger { background: #fee; color: #c00; }
.btn-danger:hover { background: #fdd; }
.btn-add { background: var(--yellow); color: var(--dark); border: 2px solid var(--yellow-dark); }
.btn-add:hover { background: var(--yellow-dark); }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* JOBS LIST */
.jobs-admin-list { display: flex; flex-direction: column; gap: 10px; }
.job-admin-item { background: #fafafa; border-radius: var(--radius-sm); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border: 2px solid #ebebeb; gap: 16px; transition: border-color .2s; }
.job-admin-item:hover { border-color: var(--red); }
.job-admin-info { flex: 1; min-width: 0; }
.job-admin-title { font-weight: 700; font-size: 14px; }
.job-admin-meta { font-size: 12px; color: var(--mid); margin-top: 3px; }
.job-admin-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* IMAGE UPLOAD */
.img-upload-area { border: 2px dashed #ccc; border-radius: var(--radius-sm); padding: 24px; text-align: center; cursor: pointer; transition: border-color .2s; }
.img-upload-area:hover { border-color: var(--red); }
.img-upload-area p { color: var(--mid); font-size: 14px; margin-bottom: 4px; }
.img-upload-area small { color: #999; font-size: 12px; }
.img-preview-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.img-preview-item { position: relative; }
.img-preview-item img, .img-preview-item video { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); display: block; background: #000; }
.video-badge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: white; font-size: 20px; text-shadow: 0 1px 4px rgba(0,0,0,.6); pointer-events: none; }
.img-preview-remove { position: absolute; top: -6px; right: -6px; background: var(--red); color: white; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ALERTS */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.alert-error { background: #fce; color: #900; }
.alert-success { background: #d4edda; color: #155724; }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: var(--radius); padding: 40px; width: 100%; max-width: 620px; position: relative; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--mid); line-height: 1; }
.modal h2 { font-size: 1.4rem; margin-bottom: 24px; }

/* TOAST */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--dark); color: white; padding: 14px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; z-index: 9999; transform: translateY(100px); opacity: 0; transition: all .3s; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success::before { content: '✓'; color: #4caf50; }
.toast.error::before { content: '✗'; color: var(--red); }

@media (max-width: 600px) {
  .admin-body { padding: 20px 16px; }
  .admin-card { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 24px; }
  .admin-tabs { gap: 6px; }
  .admin-tab { padding: 8px 14px; font-size: 13px; }
}
