:root {
  --color-primary: #059669;
  --color-primary-dark: #047857;
  --color-bg: #f7faf8;
  --color-surface: #ffffff;
  --color-border: #e0e7e3;
  --color-text: #10241c;
  --color-text-muted: #5b6b63;
  --color-danger: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell { display: flex; flex-direction: column; min-height: 100vh; }
.app-main { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: 24px 20px 64px; }
.app-footer { text-align: center; padding: 24px; color: var(--color-text-muted); font-size: 14px; }

/* Navbar */
.navbar { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.navbar-inner { max-width: 1100px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 24px; }
.navbar-brand { font-weight: 700; font-size: 18px; color: var(--color-text); display: flex; align-items: center; gap: 8px; }
.navbar-brand:hover { text-decoration: none; }
.brand-mark { background: var(--color-primary); color: white; padding: 4px 8px; border-radius: 6px; font-size: 13px; }
.navbar-links { display: flex; gap: 18px; flex: 1; }
.navbar-links a { color: var(--color-text); font-weight: 500; }
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.navbar-user { color: var(--color-text-muted); font-size: 14px; }

/* Buttons */
.btn { border: none; border-radius: 8px; padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-block; text-align: center; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-ghost { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-danger { background: transparent; color: var(--color-danger); border: 1px solid var(--color-danger); }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Hero */
.hero { background: linear-gradient(135deg, #059669, #065f46); border-radius: var(--radius); color: white; padding: 64px 32px; margin-bottom: 40px; text-align: center; }
.hero h1 { font-size: 36px; margin: 0 0 12px; }
.hero p { font-size: 18px; opacity: 0.9; margin: 0 0 24px; }

.section { margin-bottom: 48px; }
.section h2 { margin-bottom: 16px; }

.category-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.category-chip { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px; padding: 8px 16px; color: var(--color-text); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.category-count { background: var(--color-bg); border-radius: 999px; padding: 2px 8px; font-size: 12px; color: var(--color-text-muted); }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary); color: white; font-weight: 700; margin-bottom: 12px; }

/* Search bar */
.search-bar { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.search-input, .search-select, .form-control { border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 12px; font-size: 14px; background: var(--color-surface); color: var(--color-text); }
.search-input { flex: 2; min-width: 200px; }
.search-select { flex: 1; min-width: 160px; }
.search-location { flex: 1; min-width: 140px; }

/* Task grid / cards */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.task-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px; display: block; color: var(--color-text); box-shadow: var(--shadow); }
.task-card:hover { text-decoration: none; border-color: var(--color-primary); }
.task-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.task-category { font-size: 12px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.task-title { margin: 4px 0 8px; font-size: 17px; }
.task-description { color: var(--color-text-muted); font-size: 14px; margin: 0 0 14px; }
.task-card-footer { display: flex; justify-content: space-between; font-size: 13px; color: var(--color-text-muted); flex-wrap: wrap; gap: 6px; }
.task-price { font-weight: 700; color: var(--color-text); }

.task-status, .app-status { font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.status-open { background: #dcfce7; color: #166534; }
.status-created { background: #e0e7ff; color: #3730a3; }
.status-assigned { background: #fef3c7; color: #92400e; }
.status-completed { background: #dbeafe; color: #1e40af; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-accepted { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-withdrawn { background: #f1f5f9; color: #475569; }

/* Task details */
.task-details-main { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 28px; }
.task-details-description { white-space: pre-wrap; color: var(--color-text); line-height: 1.6; }
.task-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 20px 0; }
.task-meta dt { font-size: 12px; color: var(--color-text-muted); text-transform: uppercase; }
.task-meta dd { margin: 4px 0 0; font-weight: 600; }
.task-owner-actions { display: flex; gap: 10px; margin: 16px 0 24px; }

.apply-box { background: var(--color-bg); border-radius: var(--radius); padding: 20px; margin-top: 20px; }
.apply-box textarea, .apply-box input { width: 100%; margin-bottom: 10px; }

.application-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.application-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* Forms */
.form-page { max-width: 640px; }
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-control { width: 100%; }
label { font-size: 13px; font-weight: 600; color: var(--color-text-muted); }

/* Auth */
.auth-page { display: flex; justify-content: center; padding: 40px 0; }
.auth-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 400px; box-shadow: var(--shadow); }
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--color-text-muted); }

/* Verification */
.verification-input { width: 44px; height: 50px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); text-align: center; font-size: 20px; font-weight: 600; outline: none;}
.verification-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.12);}
@media (max-width: 640px) { .verification-code { gap: 6px; } .verification-input { width: 40px; height: 46px;}}

/* Tabs */
.tabs { display: flex; gap: 8px; margin: 20px 0; border-bottom: 1px solid var(--color-border); }
.tab { background: none; border: none; padding: 10px 4px; margin-right: 16px; font-weight: 600; color: var(--color-text-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* Admin reports */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 20px 0; }
.stat-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.stat-card-value { font-size: 28px; font-weight: 700; color: var(--color-primary); }
.stat-card-label { font-size: 13px; color: var(--color-text-muted); }

.report-section { margin: 24px 0; }
.report-section-header { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 20px; font-size: 18px; font-weight: 700; color: var(--color-text); cursor: pointer; text-align: left; }
.report-section-toggle { color: var(--color-text-muted); font-size: 14px; }

/* Misc */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.toast-notice { position: fixed; top: 20px; right: 20px; z-index: 1000; display: flex; align-items: flex-start; gap: 12px; min-width: 280px; max-width: 400px; background: #1f2937; color: #f9fafb; border-left: 4px solid var(--toast-accent, #60a5fa); border-radius: var(--radius); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.25); padding: 14px 16px; font-size: 14px; line-height: 1.4; animation: toast-in 0.2s ease-out; }
.toast-info { --toast-accent: #60a5fa; }
.toast-warning { --toast-accent: #f59e0b; }
.toast-error { --toast-accent: #f87171; }
.toast-success { --toast-accent: #34d399; }
.toast-icon { flex-shrink: 0; font-size: 18px; line-height: 1.3; }
.toast-message { flex: 1; font-weight: 500; }
.toast-close { flex-shrink: 0; background: none; border: none; color: #9ca3af; font-size: 20px; line-height: 1; cursor: pointer; padding: 0; margin-left: 4px; }
.toast-close:hover { color: #f9fafb; }
@keyframes toast-in {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 24px; }

.loading-state { display: flex; align-items: center; gap: 10px; color: var(--color-text-muted); padding: 32px 0; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-panel { background: var(--color-surface); border-radius: var(--radius); width: 100%; max-width: 420px; padding: 20px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 16px; }

@media (max-width: 640px) {
  .form-row, .steps-grid { grid-template-columns: 1fr; }
  .navbar-links { display: none; }
}

/* Clickable names (opens the reviews modal) */
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--color-primary); cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.link-btn-strong { font-weight: 600; }

/* Reviews modal */
.review-summary { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--color-border); }
.review-summary-score { font-size: 28px; font-weight: 700; }
.review-summary-meta { display: flex; flex-direction: column; gap: 2px; }
.review-summary-stars { color: #f59e0b; font-size: 14px; letter-spacing: 1px; }
.review-summary-count { font-size: 13px; color: var(--color-text-muted); }

.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-height: 320px; overflow-y: auto; }
.review-item { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 12px; }
.review-item-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.review-item-stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }
.review-item-comment { margin: 6px 0 4px; font-size: 14px; }
.review-item-date { color: var(--color-text-muted); }

/* Leave-a-review star picker */
.star-picker { display: flex; gap: 6px; }
.star-picker-btn { background: none; border: none; padding: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--color-border); }
.star-picker-btn.selected { color: #f59e0b; }
.star-picker-btn:hover { color: #f59e0b; }

/* Task chat */
.task-chat { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--color-border); }
.task-chat h2 { margin-bottom: 12px; }

.task-chat-messages { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; padding: 16px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 12px; }
.task-chat-messages > p { text-align: center; color: var(--color-text-muted); margin: 20px 0; }

.task-chat-message { width: 40%; align-self: flex-start; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 14px; }
.task-chat-message-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.task-chat-message strong { font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.task-chat-message span { display: block; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.task-chat-message small { font-size: 11px; color: var(--color-text-muted); white-space: nowrap; }

.task-chat-message.mine { align-self: flex-end; background: var(--color-primary); border-color: var(--color-primary); color: white; }
.task-chat-message.mine strong,
.task-chat-message.mine small { color: rgba(255, 255, 255, 0.8); }

.task-chat-input { display: flex; gap: 10px; align-items: flex-end; }
.task-chat-input textarea { flex: 1; resize: vertical; min-height: 44px; }
 
.task-card-header { display: flex; align-items: center; gap: 6px; }
.task-status { margin-left: auto; }
.task-favorite-star { width: 28px; height: 28px; padding: 0; border: none; background: transparent; color: #94a3b8; font-size: 24px; line-height: 28px; text-align: center; cursor: pointer; }
.task-favorite-star:hover { color: #f59e0b; transform: scale(1.12); }
.task-favorite-star.is-favorited { color: #f59e0b; }
.task-favorite-star:focus { outline: none; }
.task-favorite-star:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 50%; }

.favorites-filter { margin: 0.75rem 0; font-size: 0.9rem; }
.favorites-filter label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.favorites-filter input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer; }
.task-cover-image-button { position: relative; display: block; width: 100%; padding: 0; margin: 20px 0; border: 0; border-radius: 16px; overflow: hidden; cursor: pointer; background: #f3f4f6; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.task-cover-image-button:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); }
.task-cover-image { display: block; width: 100%; max-height: 380px; min-height: 180px; object-fit: cover; background: #f3f4f6; }
.task-cover-image-count { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; padding: 7px 12px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; background: rgba(15, 23, 42, 0.72); color: #fff; font-size: 0.82rem; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.task-image-upload { display: flex; align-items: center; gap: 12px; margin: 12px 0 20px; }

.task-image-upload-limit { color: #64748b; font-size: 0.85rem; }

.image-gallery-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 32px; background: rgba(2, 6, 23, 0.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: image-gallery-fade-in 0.2s ease-out; }

.image-gallery-content { position: relative; display: flex; align-items: center; justify-content: center; width: min(1100px, 90vw); height: min(720px, 86vh); max-width: 1100px; max-height: 86vh; padding: 24px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 20px; background: rgba(15, 23, 42, 0.45); box-shadow: 0 25px 80px rgba(0, 0, 0, 0.45); box-sizing: border-box; }

.image-gallery-image { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100% - 20px); border-radius: 12px; object-fit: contain; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }

.image-gallery-close { position: absolute; top: 14px; right: 14px; z-index: 3; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%; background: rgba(15, 23, 42, 0.75); color: #fff; font-size: 1.25rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 0.2s ease, transform 0.2s ease; }

.image-gallery-close:hover { background: rgba(30, 41, 59, 0.95); transform: scale(1.05); }

.image-gallery-delete { position: absolute; top: 14px; left: 14px; z-index: 3; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; background: rgba(220, 38, 38, 0.9); color: #fff; font-size: 0.82rem; font-weight: 600; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 0.2s ease, transform 0.2s ease; }

.image-gallery-delete:hover { background: #dc2626; transform: translateY(-1px); }

.image-gallery-nav { position: absolute; top: 50%; z-index: 3; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%; background: rgba(15, 23, 42, 0.72); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; transform: translateY(-50%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 0.2s ease, transform 0.2s ease; }

.image-gallery-nav:hover { background: rgba(30, 41, 59, 0.95); }

.image-gallery-prev { left: -24px; }

.image-gallery-prev:hover { transform: translateY(-50%) translateX(-2px); }

.image-gallery-next { right: -24px; }

.image-gallery-next:hover { transform: translateY(-50%) translateX(2px); }

.image-gallery-counter { position: absolute; right: 50%; bottom: 14px; left: auto; padding: 7px 13px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; background: rgba(15, 23, 42, 0.75); color: #fff; font-size: 0.8rem; font-weight: 600; transform: translateX(50%); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

.image-gallery-image[src=""] { display: none; }

.task-cover-image[src=""] { display: none; }

@keyframes image-gallery-fade-in { from { opacity: 0; } to { opacity: 1; } }


@media (max-width: 700px) {
    .image-gallery-overlay { padding: 16px; }

    .image-gallery-content { width: 100%; height: 75vh; padding: 16px; border-radius: 16px; }

    .image-gallery-image { max-width: 100%; max-height: calc(100% - 10px); border-radius: 10px; }

    .image-gallery-prev { left: 8px; }

    .image-gallery-next { right: 8px; }

    .image-gallery-nav { width: 42px; height: 42px; font-size: 1.5rem; }

    .image-gallery-delete { top: 10px; left: 10px; min-height: 36px; padding: 0 13px; font-size: 0.78rem; }

    .image-gallery-close { top: 10px; right: 10px; width: 36px; height: 36px; }

    .image-gallery-counter { bottom: 10px; }
}

.password-input-wrapper { position: relative; }
.password-input-wrapper .form-control { padding-right: 42px; }
.password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: var(--color-text-muted); cursor: pointer; padding: 6px; font-size: 18px; line-height: 1; }
.password-toggle:hover { color: var(--color-primary); }

.auth-forgot-link { font-size: 0.80rem; }


/* ---------- Profile ---------- */
.profile-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 28px; display: flex; gap: 24px; box-shadow: var(--shadow); }
.profile-picture { width: 96px; height: 96px; min-width: 96px; border-radius: 50%; object-fit: cover; background: var(--color-bg); border: 1px solid var(--color-border); }
.profile-picture-placeholder { display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; color: var(--color-primary); background: var(--color-bg); }
.profile-picture-small { width: 56px; height: 56px; min-width: 56px; font-size: 20px; }
.profile-details h2 { margin: 0 0 4px; }
.profile-rating { color: var(--color-text-muted); font-size: 14px; margin: 0 0 12px; }
.profile-fields { display: flex; flex-wrap: wrap; gap: 16px 28px; margin: 0 0 12px; }
.profile-fields div { display: flex; flex-direction: column; gap: 2px; }
.profile-fields dt { font-size: 12px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.profile-fields dd { margin: 0; font-weight: 600; }
.profile-bio { white-space: pre-wrap; color: var(--color-text); line-height: 1.6; margin: 0; }
.profile-bio-empty { color: var(--color-text-muted); font-style: italic; }

.profile-picture-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-picture-upload label.btn { cursor: pointer; }

/* ---------- Showcase (profile photo gallery) ---------- */
/* Wraps to as many rows as needed so every photo is visible at once, without a
   "+N" overlay — the section title already shows the total count. Column count
   adapts to viewport width via auto-fill, same responsive approach as .task-grid. */
.showcase-section { margin-top: 24px; }
.showcase-section h3 { margin: 0 0 12px; }
.showcase-empty { color: var(--color-text-muted); }
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }

.showcase-thumb { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--color-bg); }
.showcase-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.showcase-thumb:hover { box-shadow: var(--shadow); }

.showcase-manager { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--color-border); }
.showcase-manager-hint { color: var(--color-text-muted); font-size: 14px; margin: 0 0 16px; }
.showcase-manager .showcase-grid { margin-bottom: 16px; }
.showcase-limit { display: block; margin-top: 8px; color: var(--color-text-muted); font-size: 0.85rem; }

.showcase-thumb-editable { cursor: default; border-radius: 10px; }
.showcase-thumb-delete { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(15, 23, 42, 0.72); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.showcase-thumb-delete:disabled { opacity: 0.5; cursor: not-allowed; }

.review-user-profile { display: flex; gap: 14px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--color-border); }
.review-user-profile-details { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.review-user-profile-meta { margin: 0; font-size: 13px; color: var(--color-text-muted); }
.review-user-profile-bio { margin: 0; font-size: 14px; color: var(--color-text); }
.review-user-profile-link { margin-bottom: 14px; }


/* ---------- Profile picture cropper ---------- */
.crop-tool { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 4px 0 8px; }
.crop-container { position: relative; width: 280px; height: 280px; overflow: hidden; border-radius: 8px; background: #111; touch-action: none; }
.crop-image { position: absolute; top: 0; left: 0; transform-origin: 0 0; max-width: none; user-select: none; -webkit-user-drag: none; cursor: grab; }
.crop-image:active { cursor: grabbing; }
/* The "hole": box-shadow spread large enough to blanket the whole container
   outside the circle, dimming it, while leaving the circle itself untouched. */
.crop-circle-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.55); pointer-events: none; }
.crop-zoom-slider { width: 280px; accent-color: var(--color-primary); }
.crop-actions { display: flex; gap: 10px; }