/* StartGarden Contests — Frontend Styles */

/* ── Base ─────────────────────────────────────────────────────────────────── */

.sg-button {
    display: inline-block;
    padding: 10px 20px;
    background: #ef5656;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    line-height: 1.3;
}
.sg-button:hover {
    background: #d94545;
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}
.sg-button-primary { background: #ef5656; }
.sg-button-ghost {
    background: transparent;
    color: #ef5656;
    border: 1px solid #ef5656;
}
.sg-button-ghost:hover {
    background: #ef5656;
    color: #fff;
}
.sg-button-danger {
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
}
.sg-button-danger:hover {
    background: #ef5656;
    color: #fff;
    border-color: #ef5656;
}
.sg-button-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}
.sg-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */

.sg-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.sg-badge-active   { background: #d4edda; color: #155724; }
.sg-badge-closed   { background: #f8d7da; color: #721c24; }
.sg-badge-winner   { background: #fff3cd; color: #856404; }
.sg-badge-finalist { background: #d1ecf1; color: #0c5460; }
.sg-badge-submitted { background: #e2e3e5; color: #383d41; }
.sg-badge-warning  { background: #fff3cd; color: #856404; }

/* ── Ideas list grid ─────────────────────────────────────────────────────────── */

.sg-ideas-list {
    width: 100%;
}
.sg-ideas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) {
    .sg-ideas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .sg-ideas-grid { grid-template-columns: 1fr; }
}

/* ── Idea card ────────────────────────────────────────────────────────────────── */

.sg-idea-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease;
}
.sg-idea-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.09);
}
.sg-idea-card__image-link {
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
}
.sg-idea-card__image {
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    object-fit: cover !important;
    object-position: center top;
    display: block;
    transition: transform 0.2s ease;
}
.sg-idea-card:hover .sg-idea-card__image {
    transform: scale(1.03);
}
.sg-idea-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.sg-idea-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #e03a3a;
    line-height: 1.35;
    text-decoration: none;
    display: block;
}
.sg-idea-card__title:hover {
    color: #c42828;
    text-decoration: none;
}
.sg-idea-card__excerpt {
    font-size: 14px;
    color: #444;
    line-height: 1.55;
    flex: 1;
    margin: 0;
}
.sg-idea-card__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
    flex-wrap: wrap;
}
.sg-idea-card__vote-btn {
    background: #e03a3a;
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease;
    line-height: 1;
}
.sg-idea-card__vote-btn:hover {
    background: #c42828;
    color: #ffffff;
}
.sg-idea-card__vote-btn--voted {
    background: #2271b1;
}
.sg-idea-card__vote-btn--voted:hover {
    background: #1a5a95;
}
.sg-idea-card__vote-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}
.sg-idea-card__learn-btn {
    background: #ffffff;
    color: #333;
    border: 1px solid #ccc;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
    line-height: 1;
    white-space: nowrap;
}
.sg-idea-card__learn-btn:hover {
    border-color: #999;
    color: #111;
    text-decoration: none;
}
.sg-no-entries {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

/* ── Event closing line ([sg_event_info mode="closing"]) ─────────────────────── */

.sg-event-closing-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #444;
    margin-bottom: 4px;
}
.sg-event-closing-line__label {
    color: #888;
    font-weight: 400;
}
.sg-event-closing-line__date {
    font-weight: 600;
    color: #222;
}

/* ── My votes dropdown ([sg_my_votes]) ───────────────────────────────────────── */

.sg-my-votes {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}
.sg-my-votes__select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.sg-my-votes__select {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 10px 40px 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    cursor: pointer;
    min-width: 140px;
    outline: none;
    transition: border-color 0.15s ease;
}
.sg-my-votes__select:hover {
    border-color: #aaa;
}
.sg-my-votes__select:focus {
    border-color: #e03a3a;
    box-shadow: 0 0 0 3px rgba(224, 58, 58, 0.1);
}
.sg-my-votes__chevron {
    position: absolute;
    right: 12px;
    pointer-events: none;
    color: #888;
    display: flex;
    align-items: center;
}
.sg-my-votes__hint {
    font-size: 13px;
    color: #888;
    margin: 0;
    text-align: right;
}

/* ── Sponsors ────────────────────────────────────────────────────────────── */

.sg-sponsors { margin: 20px 0; }
.sg-sponsors-title { text-align: center; margin-bottom: 12px; }
.sg-sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
}
.sg-sponsor-logo {
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.sg-sponsor-logo:hover { opacity: 1; }

/* ── Event info card ─────────────────────────────────────────────────────────── */

.sg-event-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 28px 32px;
    max-width: 380px;
    font-family: inherit;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}
.sg-event-card__icon {
    width: 40px;
    height: 40px;
    background: #fef2f2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.sg-event-card__icon svg {
    width: 20px;
    height: 20px;
    color: #ef5656;
    stroke: #ef5656;
}
.sg-event-card__title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
    line-height: 1.2;
}
.sg-event-card__date {
    font-size: 15px;
    font-weight: 500;
    color: #222;
    margin-bottom: 4px;
}
.sg-event-card__location {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}
.sg-event-card__closing {
    background: #f7f7f7;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #444;
}
.sg-event-card__closing span {
    color: #ef5656;
    font-weight: 500;
}
.sg-event-card__closed {
    color: #888;
    font-style: italic;
}
.sg-event-card__btn {
    display: inline-block;
    background: #ef5656;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 28px;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    line-height: 1;
}
.sg-event-card__btn:hover {
    background: #d94545;
    color: #ffffff;
    text-decoration: none;
}
.sg-event-card__btn--100 {
    background: #111;
}
.sg-event-card__btn--100:hover {
    background: #333;
}

/* ── Dashboard ───────────────────────────────────────────────────────────── */

.sg-dashboard { max-width: 900px; margin: 0 auto; }

.sg-dashboard-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.sg-notice-warning { background: #fff3cd; border: 1px solid #ffc107; color: #856404; }
.sg-notice-info    { background: #d1ecf1; border: 1px solid #bee5eb; color: #0c5460; }
.sg-notice-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }

.sg-dashboard-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 24px;
}
.sg-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.sg-tab:hover         { color: #ef5656; text-decoration: none; }
.sg-tab-active        { color: #ef5656; border-bottom-color: #ef5656; }
.sg-tab-attention     { color: #856404; }
.sg-tab-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef5656;
}

.sg-dashboard-content { padding: 0 0 40px; }

/* ── Tab panels ──────────────────────────────────────────────────────────── */

.sg-event-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.sg-event-banner h3 { margin: 0; }

.sg-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.sg-section-header h3 { margin: 0; }

.sg-votes-used {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #555;
}
.sg-votes-bar {
    display: flex;
    gap: 4px;
}
.sg-vote-pip {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e5e5e5;
    border: 1px solid #ccc;
}
.sg-vote-pip-used {
    background: #ef5656;
    border-color: #d94545;
}

/* ── Entry rows ──────────────────────────────────────────────────────────── */

.sg-entries-list { display: flex; flex-direction: column; gap: 12px; }
.sg-entry-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}
.sg-entry-thumb {
    width: 80px;
    height: 54px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    flex-shrink: 0;
}
.sg-entry-thumb-placeholder { background-color: #e0e0e0; }
.sg-entry-video-thumb { flex-shrink: 0; }
.sg-entry-info { flex: 1; min-width: 0; }
.sg-entry-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sg-entry-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sg-vote-count { font-size: 0.85rem; color: #666; }
.sg-entry-actions { display: flex; gap: 6px; flex-shrink: 0; }
.sg-empty { color: #888; font-style: italic; margin: 20px 0; }

.sg-100-notice {
    margin-top: 24px;
    padding: 12px 16px;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 0.88rem;
    color: #555;
}
.sg-100-notice p { margin: 0; }

/* ── Profile form ────────────────────────────────────────────────────────── */

.sg-profile-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.sg-profile-expiry { font-size: 0.85rem; color: #666; }
.sg-form-section { margin-bottom: 28px; }
.sg-form-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.sg-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 20px; }
.sg-field label {
    font-size: 0.88rem;
    font-weight: 500;
    color: #444;
    margin-bottom: 4px;
}
.sg-field input,
.sg-field select,
.sg-field textarea {
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    background: #fafafa;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.sg-field input:focus,
.sg-field select:focus,
.sg-field textarea:focus {
    outline: none;
    border-color: #ef5656;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(239,86,86,0.1);
}
.sg-field textarea { resize: vertical; min-height: 100px; }
.sg-field-row {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}
.sg-field-row-2 { grid-template-columns: 1fr 1fr; }
.sg-field-row-3 { grid-template-columns: 2fr 1fr 1fr; }
.sg-form-submit { margin-top: 28px; padding-top: 20px; border-top: 1px solid #eee; }

/* ── Gate prompts ────────────────────────────────────────────────────────── */

.sg-gate-prompt {
    text-align: center;
    padding: 32px 20px;
    background: #fff9f9;
    border: 1px solid #f5c6c6;
    border-radius: 10px;
    max-width: 560px;
    margin: 0 auto;
}
.sg-gate-prompt p { margin-bottom: 16px; }
.sg-profile-required { background: #fffbf0; border-color: #ffc107; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .sg-field-row-2,
    .sg-field-row-3 { grid-template-columns: 1fr; }
    .sg-dashboard-tabs { overflow-x: auto; }
    .sg-tab { padding: 10px 14px; font-size: 0.88rem; }
    .sg-entry-row { flex-wrap: wrap; }
    .sg-entry-actions { width: 100%; }
    .sg-ideas-grid > .col-md-4 { width: 100%; }
}

/* ── Idea detail page ([sg_idea_detail]) ─────────────────────────────────────── */

.sg-idea-detail {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 60px;
}
.sg-idea-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    margin-bottom: 32px;
    transition: color 0.15s;
}
.sg-idea-detail__back:hover { color: #333; text-decoration: none; }
.sg-idea-detail__back svg  { width: 14px; height: 14px; flex-shrink: 0; }

.sg-idea-detail__hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 48px;
}
.sg-idea-detail__meta { padding-top: 8px; }

.sg-idea-detail__title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    color: #111;
    line-height: 1.2;
    margin: 0 0 16px;
}
.sg-idea-detail__excerpt {
    font-size: 15px;
    color: #555;
    line-height: 1.65;
    margin: 0 0 28px;
}
.sg-idea-detail__vote-wrap { margin-bottom: 16px; }

.sg-idea-detail__vote-btn {
    display: inline-block;
    background: #e03a3a;
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
    line-height: 1;
}
.sg-idea-detail__vote-btn:hover  { background: #c42828; color: #fff; text-decoration: none; }
.sg-idea-detail__vote-btn--voted { background: #2271b1; }
.sg-idea-detail__vote-btn--voted:hover { background: #1a5a95; }
.sg-idea-detail__vote-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sg-idea-detail__vote-note {
    font-size: 13px;
    color: #666;
    margin: 10px 0 0;
}
.sg-idea-detail__voting-closed {
    font-size: 13px;
    color: #999;
    margin: 0 0 16px;
    font-style: italic;
}
.sg-idea-detail__website {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    margin-top: 4px;
    transition: color 0.15s;
}
.sg-idea-detail__website:hover { color: #111; text-decoration: none; }
.sg-idea-detail__website svg   { opacity: 0.55; flex-shrink: 0; }

.sg-idea-detail__image-wrap {
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
}
.sg-idea-detail__image {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.sg-idea-detail__body {
    border-top: 1px solid #eee;
    padding-top: 36px;
}
.sg-idea-detail__body-heading {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 18px;
}
.sg-idea-detail__content {
    font-size: 15px;
    color: #333;
    line-height: 1.8;
    max-width: 720px;
}
.sg-idea-detail__content p { margin-bottom: 1em; }
.sg-idea-detail__content p:last-child { margin-bottom: 0; }

.sg-idea-detail__links {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.sg-idea-detail__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    padding: 7px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.15s, color 0.15s;
}
.sg-idea-detail__link:hover { border-color: #999; color: #222; text-decoration: none; }

@media (max-width: 768px) {
    .sg-idea-detail__hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .sg-idea-detail__image-wrap { order: -1; }
}

/* ── Contest header styles ───────────────────────────────────────────────────── */

/* 5x5 — white background */
.sg-contest-5x5 .elementor-88 {
    background-color: #ffffff;
}

/* 100 — black background */
.sg-contest-100 .elementor-88 {
    background-color: #000000;
}

/* Logo swap — hide the default img on 100 pages, show SVG instead */
.sg-contest-100 .elementor-element-8fc76b5 img {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}
.sg-contest-100 .elementor-element-8fc76b5 {
    position: relative;
    min-height: 60px;
}
.sg-contest-100 .elementor-element-8fc76b5::after {
    content: '';
    display: block;
    width: 100%;
    height: 60px;
    background: url('/wp-content/uploads/2026/04/100-startgarden-logo-1.svg') no-repeat center left;
    background-size: contain;
    cursor: pointer;
}

/* ── Auth modal ──────────────────────────────────────────────────────────────── */

.sg-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sg-modal[hidden] { display: none; }

.sg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.sg-modal__box {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.sg-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #888;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.sg-modal__close:hover { color: #222; background: #f0f0f0; }

.sg-modal__tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 24px;
}
.sg-modal__tab {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.sg-modal__tab--active { color: #ef5656; border-bottom-color: #ef5656; }
.sg-modal__tab:hover:not(.sg-modal__tab--active) { color: #444; }

.sg-modal__error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #dc2626;
    margin-bottom: 16px;
}

.sg-auth-form { display: flex; flex-direction: column; gap: 16px; }
.sg-auth-form__submit { width: 100%; justify-content: center; margin-top: 4px; }
.sg-auth-form__forgot { font-size: 13px; color: #888; text-decoration: none; }
.sg-auth-form__forgot:hover { color: #ef5656; }
.sg-auth-form__switch {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin: 0;
}
.sg-auth-form__switch-tab {
    background: none;
    border: none;
    padding: 0;
    color: #ef5656;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}
.sg-field--row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}
.sg-checkbox-label input { width: 15px; height: 15px; }
.sg-field-hint { font-size: 12px; color: #999; margin-top: 2px; }

/* ── User nav ─────────────────────────────────────────────────────────────────── */

.sg-nav { display: flex; align-items: center; gap: 10px; }

.sg-nav--guest .sg-nav__register {
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.15s;
}
.sg-nav--guest .sg-nav__register:hover { opacity: 1; }
.sg-nav--guest .sg-nav__login {
    background: #ef5656;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.sg-nav--guest .sg-nav__login:hover { background: #d94545; }

.sg-nav--authed .sg-nav__dashboard {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}
.sg-nav__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ef5656;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sg-nav__badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    position: absolute;
    top: -2px;
    left: 22px;
    border: 2px solid #fff;
}
.sg-nav--authed .sg-nav__logout {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    transition: color 0.15s;
}
.sg-nav--authed .sg-nav__logout:hover { color: #ef5656; }

/* 100 contest header — invert nav colors */
.sg-contest-100 .sg-nav--guest .sg-nav__register { color: #fff; border-color: rgba(255,255,255,0.5); }
.sg-contest-100 .sg-nav--authed .sg-nav__dashboard { color: #fff; }
.sg-contest-100 .sg-nav__avatar { background: #fff; color: #000; }
.sg-contest-100 .sg-nav__badge { border-color: #000; }
.sg-contest-100 .sg-nav--authed .sg-nav__logout { color: rgba(255,255,255,0.6); }
.sg-contest-100 .sg-nav--authed .sg-nav__logout:hover { color: #fff; }

/* ── Profile form ─────────────────────────────────────────────────────────────── */

.sg-profile-form-wrap { max-width: 860px; }

.sg-profile-form .sg-form-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 20px;
}
.sg-form-section__title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.sg-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}
.sg-field label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}
.sg-field input[type="text"],
.sg-field input[type="email"],
.sg-field input[type="tel"],
.sg-field input[type="url"],
.sg-field input[type="number"],
.sg-field input[type="date"],
.sg-field input[type="password"],
.sg-field select,
.sg-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #222;
    background: #fafafa;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
}
.sg-field input:focus,
.sg-field select:focus,
.sg-field textarea:focus {
    border-color: #ef5656;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 86, 86, 0.1);
}
.sg-field input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}
.sg-field textarea { resize: vertical; min-height: 90px; }
.sg-field select { cursor: pointer; }

.sg-field-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}
.sg-field-row:last-child { margin-bottom: 0; }
.sg-field-row-2 { grid-template-columns: repeat(2, 1fr); }
.sg-field-row-3 { grid-template-columns: repeat(3, 1fr); }
.sg-field-row-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 700px) {
    .sg-field-row-2,
    .sg-field-row-3,
    .sg-field-row-4 { grid-template-columns: 1fr; }
}

.sg-required { color: #ef5656; margin-left: 2px; }

.sg-checkbox-label--block {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: #444;
    line-height: 1.5;
    cursor: pointer;
}
.sg-checkbox-label--block input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #ef5656;
}

.sg-form-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}
.sg-form-notice--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.sg-form-notice--error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.sg-form-submit {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0 24px;
    flex-wrap: wrap;
}
.sg-form-submit__note {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* ── Shared button styles ──────────────────────────────────────────────────── */

.sg-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1;
}
.sg-button:hover { background: #f5f5f5; text-decoration: none; color: #111; }

.sg-button-primary {
    background: #ef5656;
    color: #fff;
    border-color: #ef5656;
}
.sg-button-primary:hover { background: #d94545; border-color: #d94545; color: #fff; }

.sg-button-large { padding: 13px 28px; font-size: 15px; }

/* ── Gate prompt (login required) ───────────────────────────────────────────── */

.sg-gate-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 40px 32px;
    background: #fff8f8;
    border: 1px solid #ffd0d0;
    border-radius: 12px;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}
.sg-gate-prompt p {
    font-size: 15px;
    color: #444;
    margin: 0;
}
.sg-gate-prompt .sg-button {
    min-width: 120px;
}
.sg-gate-prompt .sg-button + .sg-button {
    margin-left: 8px;
}

/* ── Google Sign-In button ───────────────────────────────────────────────────── */

.sg-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    margin-bottom: 16px;
}
.sg-google-btn:hover {
    background: #f8f8f8;
    border-color: #bbb;
    color: #333;
}
.sg-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #aaa;
    font-size: 13px;
}
.sg-auth-divider::before,
.sg-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

/* ── Video thumbnail loader ───────────────────────────────────────────────────── */

.sg-entry-video-thumb {
    width: 120px;
    height: 68px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: #f0f0f0;
}
.sg-thumb-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}
.sg-thumb-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #ef5656;
    border-radius: 50%;
    animation: sg-spin 0.7s linear infinite;
    position: absolute;
}
@keyframes sg-spin {
    to { transform: rotate(360deg); }
}