/* Staff Productivity Tracker styles */

.spt-wrap { max-width: 1100px; }

.spt-hello { font-size: 14px; color: #646970; font-weight: 400; margin-left: 8px; }
.spt-datehead { font-size: 15px; color: #50575e; margin-top: -6px; }

/* Flash / notices */
.spt-flash { padding: 10px 14px; border-radius: 6px; margin: 12px 0; font-weight: 600; }
.spt-flash.spt-ok { background: #edfaef; border: 1px solid #3a7d44; color: #205c2a; }
.spt-flash.spt-err { background: #fcf0f1; border: 1px solid #d63638; color: #a00; }

/* Panels */
.spt-panel {
	background: #fff; border: 1px solid #dcdcde; border-radius: 8px;
	padding: 18px 20px; margin: 14px 0; box-shadow: 0 1px 1px rgba(0,0,0,.03);
}

/* Cards */
.spt-cards { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0; }
.spt-card {
	flex: 1 1 160px; background: #fff; border: 1px solid #dcdcde; border-radius: 8px;
	padding: 16px 18px; display: flex; flex-direction: column; gap: 4px;
}
.spt-card-num { font-size: 26px; font-weight: 700; color: #1d2327; line-height: 1.1; }
.spt-card-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #646970; }

/* Filters */
.spt-filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 14px 0; }
.spt-filters label { font-size: 12px; color: #50575e; }
.spt-filters input, .spt-filters select { display: block; margin-top: 4px; }

/* Start grid */
.spt-start-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; align-items: end; }
.spt-field { display: flex; flex-direction: column; }
.spt-field-full { grid-column: 1 / -1; }
.spt-field label { font-size: 12px; font-weight: 600; color: #50575e; margin-bottom: 4px; }
.spt-field input, .spt-field select { width: 100%; }

/* Timer panel */
.spt-timer-panel h2 { margin-top: 0; }
.spt-running-box { text-align: center; padding: 8px 0 4px; }
.spt-running-task { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.spt-elapsed {
	font-size: 52px; font-weight: 700; font-variant-numeric: tabular-nums;
	letter-spacing: 1px; color: #2271b1; margin: 6px 0;
}
.spt-started-at { color: #646970; margin: 0 0 14px; }
.spt-stop { background: #d63638 !important; border-color: #b32d2e !important; color: #fff !important; }
.spt-stop:hover { background: #b32d2e !important; }

/* Target bar */
.spt-target-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.spt-bar { height: 14px; background: #f0f0f1; border-radius: 8px; overflow: hidden; }
.spt-bar-fill { height: 100%; background: linear-gradient(90deg,#3a7d44,#2271b1); transition: width .4s ease; }

/* Assigned tasks, productivity and live board */
.spt-assigned-item { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:12px 0; border-bottom:1px solid #eee; }
.spt-assigned-item:last-child { border-bottom:0; }
.spt-chart-row { margin:14px 0; }
.spt-chart-label { display:flex; justify-content:space-between; margin-bottom:5px; }
.spt-overall { display:grid; grid-template-columns:1fr auto; gap:2px 18px; align-items:center; margin-top:20px; padding-top:16px; border-top:1px solid #dcdcde; }
.spt-overall > span:last-child { color:#646970; }
.spt-score { grid-row:1 / span 2; grid-column:2; font-size:34px; font-weight:700; color:#2271b1; }
.spt-live-board { margin:20px 0; padding:22px; border:2px solid #2271b1; border-radius:10px; background:#f6fbff; overflow-x:auto; }
.spt-live-board h2 { margin:0; font-size:22px; }
.spt-live-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; }
.spt-live-heading p { margin-bottom:0; }
.spt-live-controls { display:flex; flex-direction:column; align-items:flex-end; gap:6px; white-space:nowrap; }
.spt-live-controls .dashicons,.spt-call-user .dashicons { font-size:17px; width:18px; height:18px; vertical-align:text-bottom; }
.spt-live-updated { color:#646970; }
.spt-call-directory { margin:16px 0; padding:12px; border:1px solid #b6d7f2; border-radius:8px; background:#fff; }
.spt-call-directory-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.spt-call-person { display:inline-flex; align-items:center; gap:5px; padding:5px 6px 5px 10px; border:1px solid #dcdcde; border-radius:18px; background:#f6f7f7; }
.spt-call-person > span:first-child { font-weight:600; }
.spt-call-person .button { padding:3px 7px; font-size:11px; }
.spt-is-refreshing { opacity:.72; }
.spt-is-refreshing .spt-refresh-activity .dashicons { animation:spt-spin .8s linear infinite; }
@keyframes spt-spin { to { transform:rotate(360deg); } }
.spt-live-pulse { display:inline-block; width:10px; height:10px; border-radius:50%; background:#00a32a; margin-right:10px; box-shadow:0 0 0 5px rgba(0,163,42,.12); }
.spt-call-user { display:inline-flex; align-items:center; gap:3px; color:#167329; font-weight:600; text-decoration:none; }
.spt-jitsi-call { display:inline-flex; align-items:center; gap:3px; margin:2px 5px 2px 0; color:#135e96; font-weight:600; cursor:pointer; }
.spt-jitsi-call .dashicons { width:18px; height:18px; font-size:17px; }
.spt-no-phone { display:inline-flex; align-items:center; gap:3px; color:#787c82; font-size:12px; }

/* Embedded Jitsi calling */
.spt-call-overlay { position:fixed; inset:0; z-index:100000; padding:24px; background:rgba(10,20,34,.82); box-sizing:border-box; }
.spt-call-dialog { width:min(1100px,100%); max-height:calc(100vh - 48px); margin:0 auto; padding:18px; overflow:auto; border-radius:12px; background:#fff; box-shadow:0 18px 65px rgba(0,0,0,.35); box-sizing:border-box; }
.spt-call-top { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; }
.spt-call-top h2 { margin:0 0 4px; font-size:23px; }
.spt-call-top p { margin:0; color:#50575e; }
.spt-call-state { padding:5px 11px; border-radius:16px; background:#edfaef; color:#205c2a; font-weight:700; }
.spt-call-actions { display:flex; justify-content:center; gap:12px; padding:45px 15px; }
.spt-call-actions .button { min-width:125px; padding:10px 18px; font-size:16px; }
.spt-call-decline,.spt-call-end { border-color:#d63638 !important; color:#b32d2e !important; }
.spt-call-audio-tools { display:flex; align-items:center; gap:9px; flex-wrap:wrap; margin:12px 0 0; padding:10px; border:1px solid #b6d7f2; border-radius:8px; background:#f6fbff; }
.spt-call-audio-tools .dashicons { width:18px; height:18px; font-size:17px; vertical-align:text-bottom; }
.spt-call-audio-help { color:#50575e; font-size:12px; }
.spt-jitsi-container { width:100%; height:min(70vh,700px); min-height:430px; margin-top:15px; overflow:hidden; border-radius:9px; background:#111; }
.spt-call-footer { display:flex; justify-content:space-between; align-items:center; gap:15px; margin-top:12px; color:#646970; }
.spt-call-history { margin:20px 0; padding:20px; border:1px solid #dcdcde; border-radius:10px; background:#fff; }
.spt-call-history h2 { margin-top:0; }
.spt-call-history h2 .dashicons { margin-right:7px; color:#2271b1; }
.spt-call-status-ended,.spt-call-status-accepted { background:#edfaef; color:#205c2a; }
.spt-call-status-ringing { background:#fff4ce; color:#6d4c00; }
.spt-call-status-missed,.spt-call-status-declined,.spt-call-status-cancelled { background:#fcf0f1; color:#a00; }

/* Persistent team chat */
.spt-group-chat { margin:20px 0; padding:20px; border:1px solid #c3c4c7; border-radius:10px; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.spt-chat-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.spt-chat-heading h2 { margin:0; }
.spt-chat-heading h2 .dashicons { margin-right:7px; color:#2271b1; }
.spt-chat-heading p { margin:5px 0 12px; color:#646970; }
.spt-chat-status { padding:4px 9px; border-radius:12px; background:#edfaef; color:#205c2a; font-weight:600; }
.spt-chat-messages { height:290px; overflow-y:auto; padding:12px; border:1px solid #dcdcde; border-radius:8px; background:#f6f7f7; }
.spt-chat-message { max-width:78%; margin:0 0 10px; padding:9px 11px; border-radius:5px 12px 12px; background:#fff; border:1px solid #dcdcde; }
.spt-chat-own { margin-left:auto; border-color:#9ec9ee; background:#eaf5ff; border-radius:12px 5px 12px 12px; }
.spt-chat-meta { display:flex; justify-content:space-between; gap:12px; margin-bottom:4px; font-size:11px; }
.spt-chat-meta time { color:#646970; white-space:nowrap; }
.spt-chat-text { white-space:normal; overflow-wrap:anywhere; }
.spt-chat-empty { color:#646970; text-align:center; font-style:italic; }
.spt-chat-form { display:flex; gap:10px; align-items:flex-end; margin-top:10px; }
.spt-chat-form .spt-chat-input { flex:1; width:100%; max-width:none; resize:vertical; }
.spt-status { display:inline-block; padding:3px 8px; border-radius:12px; font-weight:600; }
.spt-status-assigned,.spt-status-pending { background:#fff4ce; color:#6d4c00; }
.spt-status-approved { background:#edfaef; color:#205c2a; }
.spt-status-rejected { background:#fcf0f1; color:#a00; }
.spt-leave-note { padding:12px; border-left:4px solid #d63638; background:#fcf0f1; }
.spt-form textarea { width:100%; max-width:560px; }
.spt-performance-dashboard { margin:18px 0; padding:20px; border-radius:12px; background:linear-gradient(135deg,#152a46,#2271b1); color:#fff; }
.spt-performance-dashboard h2 { color:#fff; margin:0 0 16px; }
.spt-kpi-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.spt-kpi { min-height:86px; padding:14px; border:1px solid rgba(255,255,255,.2); border-radius:9px; background:rgba(255,255,255,.1); display:flex; flex-direction:column; gap:5px; }
.spt-kpi-current { grid-column:span 2; }
.spt-kpi-label { font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:#cfe5ff; }
.spt-kpi strong { font-size:23px; line-height:1.2; color:#fff; }
.spt-kpi-current strong { font-size:18px; }
.spt-kpi small { color:#dbeeff; }
.spt-performance-compact { margin:0 0 18px; padding:14px; }
.spt-performance-compact .spt-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.spt-performance-compact .spt-kpi-current { grid-column:span 2; }
.spt-dashboard-leave { margin-top:24px; }
.spt-leave-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; max-width:560px; }
.spt-leave-grid p { margin:0; }

/* Comprehensive administration dashboard */
.spt-admin-dashboard { max-width:1600px; }
.spt-dashboard-title { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:0 0 16px; }
.spt-dashboard-title h1 { margin-bottom:3px; }
.spt-dashboard-title p { margin:0; color:#646970; }
.spt-dashboard-live { white-space:nowrap; padding:8px 13px; border-radius:20px; background:#edfaef; color:#205c2a; font-weight:600; }
.spt-admin-kpis { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin:18px 0; }
.spt-admin-kpi { display:flex; align-items:center; gap:12px; padding:16px; border:1px solid #dcdcde; border-radius:10px; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.spt-admin-kpi .dashicons { width:34px; height:34px; font-size:30px; color:#2271b1; }
.spt-admin-kpi div { display:flex; flex-direction:column; min-width:0; }
.spt-admin-kpi strong { font-size:25px; line-height:1.1; }
.spt-admin-kpi span:last-child { color:#646970; font-size:12px; }
.spt-admin-section { margin:22px 0; padding:20px; border:1px solid #dcdcde; border-radius:10px; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.03); }
.spt-admin-section > h2 { margin-top:0; }
.spt-admin-columns { display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:start; }
.spt-admin-columns .spt-admin-section { margin:0; min-width:0; }
.spt-table-scroll { overflow-x:auto; }
.spt-management-table,.spt-email-log,.spt-shortcodes,.spt-live-board table { border-collapse:collapse; width:100%; }
.spt-management-table th,.spt-management-table td,.spt-email-log th,.spt-email-log td,.spt-shortcodes th,.spt-shortcodes td,.spt-live-board th,.spt-live-board td { padding:9px 10px; border-bottom:1px solid #e2e4e7; text-align:left; vertical-align:middle; }
.spt-management-table th,.spt-email-log th,.spt-shortcodes th,.spt-live-board th { background:#f6f7f7; font-weight:600; white-space:nowrap; }
.spt-mini-progress { min-width:135px; }
.spt-mini-progress > div:first-child { display:flex; justify-content:space-between; gap:8px; font-size:12px; margin-bottom:4px; }
.spt-mini-progress .spt-bar { height:9px; }
.spt-mini-progress small { color:#646970; }
.spt-bar-behind { background:linear-gradient(90deg,#d63638,#f0a000); }
.spt-bar-achieved { background:linear-gradient(90deg,#00a32a,#2271b1); }
.spt-negative { color:#b32d2e; }
.spt-positive { color:#167329; }
.spt-muted { color:#787c82; }
.spt-email-summary { display:flex; gap:10px; flex-wrap:wrap; margin:0 0 14px; }
.spt-email-summary span { flex:1; min-width:85px; display:flex; flex-direction:column; padding:10px; border-radius:8px; background:#f6f7f7; color:#646970; }
.spt-email-summary strong { font-size:22px; color:#1d2327; }
.spt-access-message { max-width:760px; margin:20px auto; }
.spt-shortcodes code { font-size:13px; user-select:all; }

/* Make admin-style tables and controls usable inside front-end shortcodes. */
.spt-wrap table.widefat { width:100%; border:1px solid #dcdcde; border-collapse:collapse; background:#fff; }
.spt-wrap .button { display:inline-block; box-sizing:border-box; padding:6px 12px; border:1px solid #2271b1; border-radius:4px; background:#f6f7f7; color:#2271b1; text-decoration:none; cursor:pointer; line-height:1.4; }
.spt-wrap .button-primary { background:#2271b1; color:#fff; }
.spt-wrap input,.spt-wrap select,.spt-wrap textarea { box-sizing:border-box; padding:6px 8px; border:1px solid #8c8f94; border-radius:4px; }

/* Dots + badges */
.spt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.spt-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.spt-badge-on { background: #edfaef; color: #205c2a; }
.spt-badge-off { background: #f6f7f7; color: #646970; }
.spt-running { color: #2271b1; font-weight: 600; }

/* Layout columns */
.spt-columns { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.spt-col { flex: 1 1 280px; }
.spt-col-wide { flex: 2 1 480px; }
.spt-form input[type=text], .spt-form input[type=email], .spt-form input[type=number], .spt-form input[type=tel] { width: 100%; max-width: 320px; }

/* Inline forms in the employee table */
.spt-inline { display: flex; gap: 6px; align-items: center; }
.spt-inline input[type=text], .spt-inline input[type=tel] { width: 130px; }

/* Manual entry */
.spt-manual { margin: 18px 0; }
.spt-manual summary { cursor: pointer; font-weight: 600; color: #2271b1; }

/* Log table tweaks */
.spt-log td, .spt-breakdown td { vertical-align: middle; }
.spt-empty { color: #646970; font-style: italic; }

/* Types settings table */
.spt-types-table { max-width: 560px; margin: 10px 0 18px; }
.spt-types-table input[type=text] { width: 100%; }

@media (max-width: 782px) {
	.spt-start-grid { grid-template-columns: 1fr; }
	.spt-elapsed { font-size: 40px; }
	.spt-kpi-grid,.spt-performance-compact .spt-kpi-grid,.spt-leave-grid { grid-template-columns:1fr; }
	.spt-kpi-current,.spt-performance-compact .spt-kpi-current { grid-column:span 1; }
	.spt-admin-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
	.spt-admin-columns { grid-template-columns:1fr; }
	.spt-dashboard-title { align-items:flex-start; flex-direction:column; }
	.spt-live-heading,.spt-chat-heading { flex-direction:column; }
	.spt-live-controls { align-items:flex-start; }
	.spt-chat-message { max-width:92%; }
	.spt-call-overlay { padding:0; }
	.spt-call-dialog { min-height:100vh; max-height:100vh; border-radius:0; padding:12px; }
	.spt-jitsi-container { height:68vh; min-height:360px; }
	.spt-call-footer { align-items:flex-start; flex-direction:column; }
}
