/* KazanTube AI — Partner Dashboard ─────────────────────── */

.ktai-partner-dashboard { max-width: 1100px; margin: 0 auto; padding: 20px 16px; font-size: 14px; }

/* Header */
.ktai-pp-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.ktai-pp-header h2 { margin: 0; font-size: 20px; color: #1d2327; }
.ktai-pp-header .pp-meta { color: #646970; font-size: 13px; margin-top: 4px; }

/* Module nav */
.ktai-module-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid #dcdcde; }
.ktai-module-nav a { text-decoration: none; color: #2271b1; font-size: 13px; padding: 5px 12px; border: 1px solid #dcdcde; border-radius: 4px; background: #fff; }
.ktai-module-nav a:hover { background: #f0f6fc; border-color: #a7aaad; }

/* Module sections */
.ktai-pp-module { margin-bottom: 32px; }
.ktai-pp-module h3 { font-size: 15px; border-bottom: 1px solid #dcdcde; padding-bottom: 8px; margin-bottom: 16px; color: #1d2327; }

/* Stat cards */
.ktai-pp-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.ktai-pp-stat { background: #fff; border: 1px solid #dcdcde; border-radius: 6px; padding: 12px 16px; min-width: 110px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.ktai-pp-stat .stat-num { font-size: 24px; font-weight: 700; color: #1d2327; line-height: 1; }
.ktai-pp-stat .stat-lbl { font-size: 12px; color: #646970; margin-top: 3px; }

/* Tables */
.ktai-pp-table-wrap { overflow-x: auto; margin-bottom: 14px; border: 1px solid #dcdcde; border-radius: 4px; }
.ktai-pp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ktai-pp-table th { background: #f6f7f7; font-weight: 600; padding: 8px 10px; text-align: left; border-bottom: 2px solid #dcdcde; white-space: nowrap; }
.ktai-pp-table td { padding: 8px 10px; border-bottom: 1px solid #f0f0f1; vertical-align: top; }
.ktai-pp-table tr:last-child td { border-bottom: 0; }
.ktai-pp-table tr:hover td { background: #fafafa; }
.ktai-pp-table .row-actions { font-size: 12px; margin-top: 3px; }
.ktai-pp-table .row-actions a { color: #2271b1; text-decoration: none; margin-right: 6px; }
.ktai-pp-table .row-actions a:hover { text-decoration: underline; }

/* Badges */
.ktai-pp-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.ktai-pp-badge-new        { background: #ddeeff; color: #0a4a8a; }
.ktai-pp-badge-viewed     { background: #e8f4fd; color: #1a6491; }
.ktai-pp-badge-contacted  { background: #fff3cd; color: #7a5c00; }
.ktai-pp-badge-quote      { background: #e8daef; color: #5a2070; }
.ktai-pp-badge-converted  { background: #d4edda; color: #155724; }
.ktai-pp-badge-policy     { background: #cce5ff; color: #004085; }
.ktai-pp-badge-lost       { background: #f8d7da; color: #721c24; }
.ktai-pp-badge-pending    { background: #fff3cd; color: #856404; }
.ktai-pp-badge-sent       { background: #d1ecf1; color: #0c5460; }
.ktai-pp-badge-accepted   { background: #d4edda; color: #155724; }
.ktai-pp-badge-rejected   { background: #f8d7da; color: #721c24; }
.ktai-pp-badge-expired    { background: #e2e3e5; color: #383d41; }
.ktai-pp-badge-yes        { background: #d4edda; color: #155724; }
.ktai-pp-badge-no         { background: #f8d7da; color: #721c24; }

/* Inline action forms within lead rows */
.ktai-pp-action-form { background: #f9f9f9; border: 1px solid #dcdcde; border-radius: 4px; padding: 10px 12px; margin-top: 8px; }
.ktai-pp-action-form label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 3px; color: #50575e; }
.ktai-pp-action-form select,
.ktai-pp-action-form input[type="text"],
.ktai-pp-action-form input[type="date"],
.ktai-pp-action-form input[type="number"],
.ktai-pp-action-form textarea { width: 100%; max-width: 340px; margin-bottom: 6px; font-size: 13px; padding: 4px 8px; border: 1px solid #c3c4c7; border-radius: 3px; box-sizing: border-box; }
.ktai-pp-action-form .button { font-size: 13px; }

/* Info / disclaimer boxes */
.ktai-pp-info { background: #f0f6fc; border-left: 3px solid #2271b1; padding: 10px 14px; margin: 8px 0; font-size: 13px; border-radius: 0 4px 4px 0; line-height: 1.5; }
.ktai-pp-info.is-warning { border-left-color: #dba617; background: #fffce0; }
.ktai-pp-info p { margin: 0 0 5px; }
.ktai-pp-info p:last-child { margin-bottom: 0; }

/* Notices */
.ktai-pp-notice { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; font-size: 13px; }
.ktai-pp-notice.is-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.ktai-pp-notice.is-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Access denied / login prompt */
.ktai-pp-denied { text-align: center; padding: 48px 20px; color: #646970; }
.ktai-pp-denied p { font-size: 15px; }
.ktai-pp-login-prompt { text-align: center; padding: 40px 20px; font-size: 15px; }
.ktai-pp-login-prompt a { color: #2271b1; }

/* Pagination */
.ktai-pp-pagination { display: flex; gap: 5px; flex-wrap: wrap; margin: 12px 0; }
.ktai-pp-pagination a,
.ktai-pp-pagination span { padding: 4px 10px; border: 1px solid #dcdcde; border-radius: 3px; text-decoration: none; color: #2271b1; font-size: 13px; background: #fff; display: inline-block; }
.ktai-pp-pagination .current-page { background: #2271b1; color: #fff; border-color: #2271b1; cursor: default; }
.ktai-pp-pagination a:hover { background: #f6f7f7; }

/* Placeholder module */
.ktai-pp-placeholder { text-align: center; padding: 32px; color: #646970; background: #f6f7f7; border: 1px dashed #dcdcde; border-radius: 4px; font-size: 13px; }

/* Responsive */
@media (max-width: 640px) {
    .ktai-pp-stats { gap: 8px; }
    .ktai-pp-stat { min-width: 90px; padding: 10px 12px; }
    .ktai-pp-stat .stat-num { font-size: 20px; }
    .ktai-pp-table th, .ktai-pp-table td { padding: 6px 7px; font-size: 12px; }
    .ktai-module-nav a { font-size: 12px; padding: 4px 9px; }
    .ktai-partner-dashboard { padding: 12px 10px; }
}
