.jafo-dashboard {
	max-width: 960px;
	margin: 0 auto;
}

.jafo-section {
	margin-bottom: 2.5em;
	padding: 1.5em;
	border: 1px solid #ddd;
	border-radius: 6px;
}

.jafo-section h2 {
	margin-top: 0;
}

.jafo-notice {
	background: #fff8e5;
	border-left: 4px solid #dba617;
	padding: 0.75em 1em;
}

.jafo-notice.jafo-finalized {
	background: #edfaef;
	border-left-color: #46b450;
}

.jafo-upload-owner {
	margin-bottom: 1.5em;
	padding-bottom: 1.5em;
	border-bottom: 1px dashed #ccc;
}

.jafo-upload-owner:last-child {
	border-bottom: none;
}

.jafo-existing-photos {
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
}

.jafo-existing-photos li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4em;
	font-size: 0.9em;
}

.jafo-thumb {
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #ccc;
}

.jafo-upload-form label {
	display: block;
	margin-bottom: 0.75em;
}

.jafo-upload-form input[type="text"],
.jafo-upload-form input[type="file"] {
	display: block;
	width: 100%;
	max-width: 420px;
	margin-top: 0.3em;
}

.jafo-voting-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.5em;
}

.jafo-voting-item {
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 0.75em;
	text-align: center;
}

.jafo-thumb-large {
	width: 100%;
	height: 160px;
	object-fit: cover;
	border-radius: 4px;
}

.jafo-voting-meta {
	display: flex;
	justify-content: space-between;
	font-size: 0.85em;
	margin: 0.5em 0;
}

.jafo-rating-select {
	width: 100%;
}

.jafo-rating-status {
	display: block;
	font-size: 0.8em;
	color: #46b450;
	min-height: 1.2em;
}

.jafo-history-table {
	width: 100%;
	border-collapse: collapse;
}

.jafo-history-table th,
.jafo-history-table td {
	padding: 0.5em;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: top;
}

/* ==========================================================================
   Compact/utility dashboard ([jafo_dashboard]) - scoped under .jafo-dash so
   the rules above (still used by the standalone [jafo_upload]/[jafo_voting]/
   [jafo_history] shortcodes) are left untouched.
   ========================================================================== */

.jafo-dash {
	--jafo-ink: #1A1D21;
	--jafo-muted: #7B828C;
	--jafo-line: #E6E7E9;
	--jafo-panel: #FFFFFF;
	--jafo-accent: #2F5D8A;
	--jafo-accent-soft: #E4ECF3;
	--jafo-good: #2F6B4F;
	--jafo-good-soft: #E4EFE9;
	--jafo-warn: #9A6A1E;
	--jafo-warn-soft: #F4EAD8;
	--jafo-danger: #A23B2E;

	max-width: 1040px;
	margin: 0 auto;
	color: var(--jafo-ink);
	font-size: 14px;
}

.jafo-dash * { box-sizing: border-box; }

.jafo-dash-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}
.jafo-dash-brand { font-weight: 800; font-size: 14px; }
.jafo-dash-user {
	color: var(--jafo-muted); font-size: 12.5px; text-decoration: none;
	display: inline-flex; align-items: center; gap: 5px;
}
.jafo-dash-user:hover { color: var(--jafo-accent); }
.jafo-user-icon { width: 15px; height: 15px; flex-shrink: 0; }

.jafo-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1px;
	background: var(--jafo-line);
	border: 1px solid var(--jafo-line);
	margin-bottom: 16px;
}
.jafo-stat-tile { background: var(--jafo-panel); padding: 12px 14px; }
.jafo-stat-label {
	font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em;
	color: var(--jafo-muted); margin-bottom: 5px;
}
.jafo-stat-value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.jafo-stat-value small { font-size: 12px; font-weight: 500; color: var(--jafo-muted); }
.jafo-stat-value--sm { font-size: 15px; }
.jafo-stat-value--pill { font-size: 13px; }

.jafo-panel {
	background: var(--jafo-panel);
	border: 1px solid var(--jafo-line);
	margin-bottom: 14px;
}
.jafo-panel-hd { padding: 9px 14px; border-bottom: 1px solid var(--jafo-line); font-weight: 700; font-size: 12.5px; }
.jafo-panel-bd { padding: 14px; }
.jafo-panel--notice .jafo-panel-hd { color: var(--jafo-warn); }

.jafo-hint { color: var(--jafo-muted); font-size: 13px; margin: 0; }
.jafo-micro-hint { color: var(--jafo-muted); font-size: 11.5px; margin: 4px 0 0; }
.jafo-task-thema { color: var(--jafo-muted); font-size: 13px; margin: -4px 0 12px; }

.jafo-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
@media (max-width: 720px) { .jafo-cols { grid-template-columns: 1fr; } }

.jafo-dash .jafo-upload-owner {
	border-bottom: 1px solid var(--jafo-line);
	margin: 0 0 14px;
	padding: 0 0 14px;
}
.jafo-dash .jafo-upload-owner:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.jafo-owner-label { font-size: 12px; font-weight: 700; color: var(--jafo-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.03em; }

.jafo-dash .jafo-task-list { list-style: none; margin: 0 0 10px; padding: 0; display: block; }
.jafo-task-row {
	display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
	padding: 12px 0; border-bottom: 1px dashed var(--jafo-line);
}
.jafo-task-row:last-child { border-bottom: none; }
.jafo-thumb-sm { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--jafo-line); flex-shrink: 0; }
.jafo-thumb-sm.jafo-thumb-clickable {
	width: min(400px, 100%); aspect-ratio: 1 / 1; height: auto; cursor: zoom-in;
}
.jafo-thumb-xs { width: 28px; height: 28px; object-fit: cover; border-radius: 3px; border: 1px solid var(--jafo-line); }
.jafo-task-row-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.jafo-task-row-meta strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jafo-task-row-meta span { font-size: 11.5px; color: var(--jafo-muted); }
.jafo-task-row-actions { display: flex; gap: 10px; flex-shrink: 0; }

.jafo-lightbox {
	position: fixed; inset: 0; background: rgba(0, 0, 0, .85);
	display: flex; align-items: center; justify-content: center;
	z-index: 100000; padding: 24px; cursor: zoom-out;
}
.jafo-lightbox-scroll { max-width: 100%; max-height: 100%; overflow: auto; display: flex; align-items: center; justify-content: center; }
.jafo-lightbox-scroll img { max-width: 100%; max-height: 90vh; object-fit: contain; cursor: zoom-in; }
.jafo-lightbox-scroll img.is-zoomed { max-width: none; max-height: none; width: auto; transform: scale(2); cursor: zoom-out; }
.jafo-lightbox-close {
	position: absolute; top: 16px; right: 20px; background: none; border: none;
	color: #fff; font-size: 28px; line-height: 1; cursor: pointer; padding: 4px 10px;
}

.jafo-link-btn {
	background: none; border: none; padding: 0; cursor: pointer;
	font-size: 12px; font-weight: 600; color: var(--jafo-accent); text-decoration: none;
	font-family: inherit;
}
.jafo-link-btn:hover { text-decoration: underline; }
.jafo-link-btn--danger { color: var(--jafo-danger); }

.jafo-hidden { display: none !important; }

.jafo-photo-title-wrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jafo-title-edit-row { display: inline-flex; align-items: center; gap: 6px; }
.jafo-title-edit-input { font-size: 13px; padding: 3px 6px; max-width: 160px; }

.jafo-dash .jafo-compact-form {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px;
}
.jafo-dash .jafo-compact-form input[type="text"] {
	flex: 1 1 160px; min-width: 140px;
}
.jafo-dash input[type="text"],
.jafo-dash input[type="file"] {
	border: 1px solid var(--jafo-line); border-radius: 5px; padding: 7px 10px;
	font-size: 13px; font-family: inherit; color: var(--jafo-ink); background: var(--jafo-panel);
}
.jafo-dash input[type="file"] { padding: 5px; max-width: 220px; flex: 1 1 200px; }
.jafo-dash input[type="text"]:focus, .jafo-dash input[type="file"]:focus {
	outline: 2px solid var(--jafo-accent); outline-offset: 1px;
}
.jafo-dash .jafo-upload-status { font-size: 12px; color: var(--jafo-danger); flex-basis: 100%; }

.jafo-btn-sm {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--jafo-panel); border: 1px solid var(--jafo-line); color: var(--jafo-ink);
	font-size: 12.5px; font-weight: 700; padding: 7px 14px; border-radius: 6px;
	cursor: pointer; text-decoration: none; font-family: inherit;
}
.jafo-btn-sm:hover { border-color: var(--jafo-accent); color: var(--jafo-accent); }
.jafo-btn-primary,
.jafo-btn-upload { background: var(--jafo-accent); border-color: var(--jafo-accent); color: #fff; }
.jafo-btn-primary:hover,
.jafo-btn-upload:hover { background: var(--jafo-accent); opacity: 0.9; color: #fff; }

.jafo-voting-cta {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	background: var(--jafo-accent-soft); border-radius: 6px; padding: 12px 16px; margin-top: 14px;
}
.jafo-voting-cta strong { display: block; font-size: 13.5px; }
.jafo-voting-cta span { font-size: 12px; color: var(--jafo-muted); }

.jafo-list { list-style: none; margin: 0; padding: 0; }
.jafo-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--jafo-line); font-size: 12.5px; }
.jafo-list li:last-child { border-bottom: none; }
.jafo-list-date { color: var(--jafo-muted); font-variant-numeric: tabular-nums; }

.jafo-inline-list { list-style: none; margin: 0; padding: 0; }
.jafo-inline-list li { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 12.5px; }
.jafo-inline-list code { background: var(--jafo-accent-soft); padding: 2px 6px; border-radius: 4px; font-size: 11.5px; }
.jafo-inline-list button { background: none; border: 1px solid var(--jafo-line); border-radius: 5px; padding: 4px 10px; font-size: 11.5px; cursor: pointer; font-family: inherit; }
.jafo-inline-list button:hover { border-color: var(--jafo-accent); color: var(--jafo-accent); }

.jafo-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.jafo-inline-form label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.jafo-inline-form input[type="text"] { flex: 1 1 200px; }

.jafo-pill { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.jafo-pill--good { background: var(--jafo-good-soft); color: var(--jafo-good); }
.jafo-pill--warn { background: var(--jafo-warn-soft); color: var(--jafo-warn); }
.jafo-pill--info { background: var(--jafo-accent-soft); color: var(--jafo-accent); }

.jafo-table-wrap { overflow-x: auto; }
.jafo-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 480px; }
.jafo-table th {
	text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.03em;
	color: var(--jafo-muted); padding: 6px 10px; border-bottom: 1px solid var(--jafo-line);
}
.jafo-table td { padding: 7px 10px; border-bottom: 1px solid var(--jafo-line); vertical-align: middle; }
.jafo-table tbody tr:last-child td { border-bottom: none; }
.jafo-nowrap { white-space: nowrap; }

.jafo-details { font-size: 12px; }
.jafo-details summary { cursor: pointer; color: var(--jafo-accent); font-weight: 600; }
.jafo-exif-list { list-style: none; margin: 6px 0 0; padding: 0; color: var(--jafo-muted); }
.jafo-exif-list li { padding: 2px 0; }

.jafo-login-gate { max-width: 360px; margin: 2em auto 0; }
.jafo-login-gate #jafo-loginform p { margin: 0 0 12px; }
.jafo-login-gate #jafo-loginform label {
	display: block; margin-bottom: 5px; font-size: 12.5px; font-weight: 600; color: var(--jafo-ink);
}
.jafo-login-gate #jafo-loginform input[type="text"],
.jafo-login-gate #jafo-loginform input[type="password"] {
	width: 100%; box-sizing: border-box; padding: 8px 10px;
	border: 1px solid var(--jafo-line); border-radius: 6px;
}
.jafo-login-gate .login-remember label { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.jafo-login-gate .login-remember input { margin: 0; }
.jafo-login-gate .login-submit { display: flex; align-items: center; gap: 12px; }
.jafo-login-gate #jafo-loginform input[type="submit"] {
	background: var(--jafo-accent); color: #fff; border: none; border-radius: 6px;
	padding: 9px 18px; font-weight: 600; cursor: pointer;
}
.jafo-login-lostpassword { font-size: 12.5px; margin-top: 4px; }

.jafo-login-switch {
	margin: 0 0 4px; padding: 10px 12px; background: var(--jafo-accent-soft);
	border-radius: 6px; font-size: 12.5px; display: flex; align-items: center;
	justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.jafo-login-switch a { color: var(--jafo-accent); font-weight: 600; text-decoration: none; }
.jafo-login-switch a:hover { text-decoration: underline; }
.jafo-login-switch-hint { font-size: 12px; color: var(--jafo-muted); margin: 0 0 16px; }

@media (max-width: 640px) {
	.jafo-stats { grid-template-columns: repeat(2, 1fr); }
	.jafo-voting-cta { flex-direction: column; align-items: flex-start; }
}
