/* GTP Staff Portal — Front-end styles */
.aipm-portal-wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 60px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; }
.aipm-portal-header { margin-bottom: 28px; }
.aipm-portal-header h1 { font-size: 26px; margin: 0 0 6px; color: #1a1a1a; }
.aipm-portal-header p  { color: #666; margin: 0; font-size: 15px; }

/* Section title */
.aipm-portal-section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: #888; font-weight: 600; margin: 0 0 12px; }
.aipm-portal-count { background: #e8f0fe; color: #1a56db; border-radius: 20px; padding: 1px 9px; font-size: 12px; font-weight: 700; vertical-align: middle; margin-left: 6px; }

/* Job cards (list view) */
.aipm-portal-job-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.aipm-portal-job-list--faded { opacity: .75; }

.aipm-portal-job-card {
    display: block; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 16px 18px; text-decoration: none; color: inherit;
    transition: box-shadow .15s, border-color .15s;
    border-left: 4px solid #e5e7eb;
}
.aipm-portal-job-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.09); border-color: #c5cad2; text-decoration: none; color: inherit; }
.aipm-portal-card-status-blocked     { border-left-color: #e74c3c; }
.aipm-portal-card-status-assigned    { border-left-color: #3b82f6; }
.aipm-portal-card-status-in_progress { border-left-color: #10b981; }
.aipm-portal-card-status-done        { border-left-color: #6b7280; }

.aipm-portal-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.aipm-portal-card-icon   { font-size: 18px; }
.aipm-portal-card-title  { font-size: 16px; font-weight: 600; color: #111; margin-bottom: 4px; line-height: 1.4; }
.aipm-portal-card-client { font-size: 13px; color: #666; margin-bottom: 6px; }
.aipm-portal-card-meta   { display: flex; gap: 14px; font-size: 12px; color: #888; }

/* Status / priority badges */
.aipm-portal-status-badge, .aipm-portal-priority-badge {
    font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: .3px;
}
.aipm-portal-status-assigned      { background: #dbeafe; color: #1d4ed8; }
.aipm-portal-status-in_progress   { background: #d1fae5; color: #065f46; }
.aipm-portal-status-blocked       { background: #fee2e2; color: #991b1b; }
.aipm-portal-status-done          { background: #f3f4f6; color: #374151; }
.aipm-portal-status-pending_review{ background: #fef3c7; color: #92400e; }
.aipm-portal-status-reallocate    { background: #fed7aa; color: #9a3412; }
.aipm-portal-status-abandoned     { background: #f3f4f6; color: #6b7280; }
.aipm-portal-status-new           { background: #f0f0f0; color: #555; }

.aipm-portal-priority-urgent { background: #fee2e2; color: #991b1b; }
.aipm-portal-priority-high   { background: #ffedd5; color: #9a3412; }

/* Single job detail */
.aipm-portal-back { margin-bottom: 20px; }
.aipm-portal-back a { color: #3b82f6; text-decoration: none; font-size: 14px; }
.aipm-portal-back a:hover { text-decoration: underline; }

.aipm-portal-job-detail { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 28px; }
.aipm-portal-detail-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.aipm-portal-job-num { font-size: 13px; color: #aaa; margin-left: auto; }
.aipm-portal-job-title { font-size: 22px; font-weight: 700; color: #111; margin: 0 0 8px; line-height: 1.3; }
.aipm-portal-client { font-size: 14px; color: #555; margin: 0 0 12px; }
.aipm-portal-meta-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #666; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }

.aipm-portal-section { margin-bottom: 24px; }
.aipm-portal-section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: #888; font-weight: 600; margin: 0 0 10px; }
.aipm-portal-prose { font-size: 15px; color: #333; line-height: 1.7; }

/* Action plan steps */
.aipm-portal-step { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.aipm-portal-step-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; min-width: 24px; background: #1a3c6b; color: #fff; border-radius: 50%; font-size: 12px; font-weight: 700; margin-top: 2px; }

/* Status buttons */
.aipm-portal-status-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.aipm-portal-status-btn {
    padding: 9px 18px; border-radius: 6px; border: 2px solid transparent;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: .15s;
}
.aipm-portal-status-btn:hover { opacity: .85; transform: translateY(-1px); }
.aipm-portal-status-btn:active { transform: translateY(0); }
.aipm-status-done       { background: #10b981; color: #fff; }
.aipm-status-progress   { background: #3b82f6; color: #fff; }
.aipm-status-blocked    { background: #ef4444; color: #fff; }
.aipm-status-info       { background: #8b5cf6; color: #fff; }
.aipm-status-reallocate { background: #f97316; color: #fff; }
.aipm-status-abandoned  { background: #9ca3af; color: #fff; }

/* Note / textarea */
.aipm-portal-textarea {
    width: 100%; min-height: 90px; padding: 10px 14px; border: 1px solid #d1d5db;
    border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical;
    box-sizing: border-box; line-height: 1.6; transition: border-color .15s;
}
.aipm-portal-textarea:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }

/* Buttons */
.aipm-portal-btn { display: inline-block; padding: 10px 22px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: .15s; margin-top: 8px; }
.aipm-btn-primary { background: #1a3c6b; color: #fff; }
.aipm-btn-primary:hover { background: #152f55; color: #fff; text-decoration: none; }

/* Activity thread */
.aipm-portal-thread { display: flex; flex-direction: column; gap: 10px; }
.aipm-portal-note { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 14px; }
.aipm-portal-note-status_change { background: #fffbeb; border-color: #fde68a; }
.aipm-portal-note-note          { background: #f0f9ff; border-color: #bae6fd; }
.aipm-portal-note-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 12px; color: #888; }
.aipm-portal-note-meta strong { color: #444; font-size: 13px; }
.aipm-portal-note-body { font-size: 13px; color: #333; line-height: 1.6; white-space: pre-wrap; }

/* Completed toggle */
.aipm-portal-completed-toggle { margin-top: 24px; }
.aipm-portal-completed-toggle summary { font-size: 13px; color: #888; cursor: pointer; padding: 4px 0; }

/* Empty state */
.aipm-portal-empty { text-align: center; padding: 48px 20px; color: #888; }
.aipm-portal-empty p { font-size: 16px; margin-top: 12px; }

/* Notice */
.aipm-portal-notice { background: #fff3cd; border: 1px solid #ffc107; border-radius: 8px; padding: 16px 20px; color: #664d03; font-size: 14px; }
.aipm-portal-notice--error { background: #fee2e2; border-color: #f87171; color: #991b1b; }

/* Login card */
.aipm-portal-login h2 { font-size: 22px; margin: 0 0 10px; }
.aipm-portal-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 32px 28px; }

/* Feedback messages */
.aipm-portal-success { background: #d1fae5; border: 1px solid #6ee7b7; border-radius: 6px; padding: 12px 16px; color: #065f46; font-size: 14px; font-weight: 500; margin-top: 10px; }
.aipm-portal-error   { background: #fee2e2; border: 1px solid #fca5a5; border-radius: 6px; padding: 12px 16px; color: #991b1b; font-size: 14px; margin-top: 10px; }

@media (max-width: 600px) {
    .aipm-portal-job-detail { padding: 18px; }
    .aipm-portal-status-btns { gap: 6px; }
    .aipm-portal-status-btn { padding: 8px 14px; font-size: 13px; }
}

/* ── Dashboard header ──────────────────────────────────────── */
.aipm-portal-dash-header { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:16px; margin-bottom:24px; }
.aipm-portal-dash-header h1 { margin:0 0 6px; font-size:26px; }
.aipm-portal-dash-header p  { margin:0; color:#666; font-size:15px; }
.aipm-portal-dash-stats { display:flex; gap:10px; }
.aipm-dash-stat { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:12px 18px; text-align:center; min-width:70px; }
.aipm-dash-stat--red   { border-top:3px solid #ef4444; }
.aipm-dash-stat--green { border-top:3px solid #10b981; }
.aipm-dash-stat-num    { display:block; font-size:24px; font-weight:700; line-height:1; color:#111; }
.aipm-dash-stat-label  { display:block; font-size:11px; color:#888; margin-top:3px; }

/* ── Magic link banner ─────────────────────────────────────── */
.aipm-portal-magic-banner {
    background:#eff6ff; border:1px solid #bfdbfe; border-radius:8px;
    padding:10px 16px; font-size:13px; color:#1e40af; margin-bottom:20px;
}
.aipm-portal-magic-banner a { color:#1d4ed8; font-weight:600; }
