/* ============================================================
   css/tutoriale.css — Secțiunea Tutoriale
   ============================================================ */

:root {
    --tut-accent:       #7c3aed;
    --tut-accent-light: rgba(124, 58, 237, 0.09);
    --tut-accent-hover: #6d28d9;
    --tut-green:        #10b981;
    --tut-red:          #ef4444;
    --tut-orange:       #f59e0b;
    --tut-bg:           #f1f5f9;
    --tut-surface:      #ffffff;
    --tut-border:       #e2e8f0;
    --tut-text:         #1e293b;
    --tut-muted:        #64748b;
    --tut-radius:       14px;
    --tut-radius-sm:    8px;
    --tut-shadow:       0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
}

/* ── Wrapper ──────────────────────────────────────────────── */
.tut-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.tut-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--tut-accent) 0%, #4f46e5 100%);
    color: #fff;
    border-radius: var(--tut-radius);
    padding: 28px 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.tut-hero__icon {
    font-size: 2.4rem;
    opacity: 0.85;
    flex-shrink: 0;
}
.tut-hero__text { flex: 1; min-width: 200px; }
.tut-hero__text h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 4px;
}
.tut-hero__text p {
    margin: 0;
    opacity: 0.88;
    font-size: 0.95rem;
    line-height: 1.5;
}
.tut-hero__stats {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}
.tut-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.tut-hero__stat strong {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}
.tut-hero__stat span {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Controale ────────────────────────────────────────────── */
.tut-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tut-search-form { flex: 1; min-width: 220px; }
.tut-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.tut-search-icon {
    position: absolute;
    left: 12px;
    color: var(--tut-muted);
    font-size: 0.85rem;
    pointer-events: none;
}
.tut-search-input {
    width: 100%;
    padding: 9px 36px 9px 34px;
    border: 1.5px solid var(--tut-border);
    border-radius: var(--tut-radius-sm);
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--tut-text);
    background: var(--tut-surface);
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.tut-search-input:focus {
    outline: none;
    border-color: var(--tut-accent);
}
.tut-search-clear {
    position: absolute;
    right: 10px;
    color: var(--tut-muted);
    font-size: 0.8rem;
    text-decoration: none;
    padding: 4px;
}
.tut-search-clear:hover { color: var(--tut-red); }

.tut-sort {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.tut-sort__label { font-size: 0.82rem; color: var(--tut-muted); }
.tut-sort__btn {
    padding: 7px 13px;
    border-radius: var(--tut-radius-sm);
    border: 1.5px solid var(--tut-border);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--tut-muted);
    text-decoration: none;
    background: var(--tut-surface);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}
.tut-sort__btn:hover { border-color: var(--tut-accent); color: var(--tut-accent); }
.tut-sort__btn.is-active {
    background: var(--tut-accent);
    border-color: var(--tut-accent);
    color: #fff;
}

.tut-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: var(--tut-accent);
    color: #fff;
    border-radius: var(--tut-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}
.tut-btn-add:hover { background: var(--tut-accent-hover); }

/* ── Rezultat căutare ─────────────────────────────────────── */
.tut-search-result {
    font-size: 0.88rem;
    color: var(--tut-muted);
    margin-bottom: 16px;
}

/* ── Admin banner pending ─────────────────────────────────── */
.tut-admin-banner {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-left: 4px solid var(--tut-orange);
    border-radius: var(--tut-radius-sm);
    padding: 10px 16px;
    font-size: 0.88rem;
    color: #92400e;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tut-admin-banner a { color: #92400e; font-weight: 600; }

/* ── Grid cards ───────────────────────────────────────────── */
.tut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* ── Card ─────────────────────────────────────────────────── */
.tut-card {
    background: var(--tut-surface);
    border-radius: var(--tut-radius);
    box-shadow: var(--tut-shadow);
    border: 1px solid var(--tut-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: transform 0.15s, box-shadow 0.15s;
}
.tut-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
.tut-card--pending { opacity: 0.75; }

/* Thumbnail */
.tut-card__thumb-link { display: block; flex-shrink: 0; }
.tut-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    object-fit: cover;
}
.tut-thumb--placeholder {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tut-accent);
    font-size: 2.5rem;
    aspect-ratio: 16/9;
}
.tut-thumb--img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Status badge */
.tut-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tut-status-badge--pending {
    background: rgba(245,158,11,0.15);
    color: #92400e;
    border: 1px solid rgba(245,158,11,0.3);
}
.tut-status-badge--rejected {
    background: rgba(239,68,68,0.12);
    color: #991b1b;
    border: 1px solid rgba(239,68,68,0.25);
}

/* Body card */
.tut-card__body {
    padding: 16px 16px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tut-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
}
.tut-card__title a {
    color: var(--tut-text);
    text-decoration: none;
}
.tut-card__title a:hover { color: var(--tut-accent); }

.tut-card__desc {
    font-size: 0.85rem;
    color: var(--tut-muted);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.tut-card__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--tut-accent);
    background: var(--tut-accent-light);
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    align-self: flex-start;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background 0.15s;
}
.tut-card__link:hover { background: rgba(124,58,237,0.15); }

/* Footer card */
.tut-card__footer {
    padding: 10px 16px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--tut-border);
    gap: 8px;
}
.tut-card__author {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    min-width: 0;
}
.tut-card__author span,
.tut-card__author-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--tut-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
.tut-card__author-link:hover {
    color: var(--tut-accent);
    text-decoration: underline;
}
.tut-card__date {
    font-size: 0.74rem !important;
    color: var(--tut-muted) !important;
    font-weight: 400 !important;
}
.tut-card__meta {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.tut-meta-item {
    font-size: 0.8rem;
    color: var(--tut-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Avatar ───────────────────────────────────────────────── */
.tut-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.tut-av--sm { width: 26px; height: 26px; }
.tut-av--initial {
    background: var(--tut-accent-light);
    color: var(--tut-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}
.tut-av--initial.tut-av--sm { font-size: 0.72rem; }

/* ── Paginare ─────────────────────────────────────────────── */
.tut-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
}
.tut-pg-btn {
    padding: 8px 14px;
    border-radius: var(--tut-radius-sm);
    border: 1.5px solid var(--tut-border);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--tut-text);
    text-decoration: none;
    background: var(--tut-surface);
    transition: all 0.15s;
}
.tut-pg-btn:hover { border-color: var(--tut-accent); color: var(--tut-accent); }
.tut-pg-btn.is-active {
    background: var(--tut-accent);
    border-color: var(--tut-accent);
    color: #fff;
}

/* ── Empty state ──────────────────────────────────────────── */
.tut-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--tut-muted);
}
.tut-empty i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 14px;
    display: block;
}
.tut-empty p { font-size: 1rem; margin: 0 0 20px; }

/* ── Not found ────────────────────────────────────────────── */
.tut-notfound {
    text-align: center;
    padding: 80px 20px;
    color: var(--tut-muted);
}
.tut-notfound i {
    font-size: 3.5rem;
    opacity: 0.25;
    display: block;
    margin-bottom: 16px;
}
.tut-notfound h2 { font-size: 1.4rem; color: var(--tut-text); margin-bottom: 8px; }
.tut-notfound p { margin-bottom: 24px; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.tut-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--tut-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tut-breadcrumb a {
    color: var(--tut-accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tut-breadcrumb a:hover { text-decoration: underline; }
.tut-bc-sep { color: var(--tut-border); font-size: 0.75rem; }
.tut-bc-current { color: var(--tut-text); font-weight: 500; }

/* ── Detail ───────────────────────────────────────────────── */
.tut-detail {
    background: var(--tut-surface);
    border-radius: var(--tut-radius);
    box-shadow: var(--tut-shadow);
    border: 1px solid var(--tut-border);
    overflow: hidden;
    margin-bottom: 28px;
}

.tut-detail__status-banner {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
}
.tut-detail__status-banner--pending {
    background: rgba(245,158,11,0.1);
    color: #92400e;
    border-bottom: 1px solid rgba(245,158,11,0.25);
}
.tut-detail__status-banner--rejected {
    background: rgba(239,68,68,0.08);
    color: #991b1b;
    border-bottom: 1px solid rgba(239,68,68,0.2);
}
.tut-detail__status-banner a { color: inherit; font-weight: 700; }

.tut-detail__top {
    display: flex;
    gap: 24px;
    padding: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.tut-detail__top .tut-thumb {
    width: 280px;
    flex-shrink: 0;
    border-radius: var(--tut-radius-sm);
    overflow: hidden;
    aspect-ratio: 16/9;
}
.tut-detail__top .tut-thumb--placeholder {
    width: 280px;
    border-radius: var(--tut-radius-sm);
    font-size: 4rem;
}
.tut-detail__top .tut-thumb--img {
    width: 280px;
    border-radius: var(--tut-radius-sm);
}

.tut-detail__header {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.tut-detail__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tut-text);
    margin: 0;
    line-height: 1.3;
}
.tut-detail__extlink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--tut-accent);
    color: #fff;
    border-radius: var(--tut-radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    align-self: flex-start;
    transition: background 0.15s;
}
.tut-detail__extlink:hover { background: var(--tut-accent-hover); }
.tut-detail__exthost {
    font-size: 0.78rem;
    opacity: 0.75;
    font-weight: 400;
}

.tut-detail__author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}
.tut-detail__author-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tut-text);
    display: block;
    text-decoration: none;
}
a.tut-detail__author-name:hover {
    color: var(--tut-accent);
    text-decoration: underline;
}
.tut-detail__author-date {
    font-size: 0.78rem;
    color: var(--tut-muted);
    display: block;
}

.tut-detail__desc {
    padding: 0 24px 20px;
    font-size: 0.95rem;
    color: var(--tut-text);
    line-height: 1.7;
    border-top: 1px solid var(--tut-border);
    padding-top: 20px;
}

/* Vot */
.tut-detail__vote {
    padding: 16px 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--tut-border);
}
.tut-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 2px solid var(--tut-border);
    background: var(--tut-surface);
    color: var(--tut-muted);
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
}
.tut-vote-btn:hover {
    border-color: var(--tut-accent);
    color: var(--tut-accent);
    background: var(--tut-accent-light);
}
.tut-vote-btn.is-voted {
    border-color: var(--tut-accent);
    background: var(--tut-accent);
    color: #fff;
}
.tut-vote-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.tut-vote-static {
    font-size: 0.9rem;
    color: var(--tut-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.tut-vote-login {
    font-size: 0.85rem;
    color: var(--tut-accent);
    text-decoration: none;
}
.tut-vote-login:hover { text-decoration: underline; }

/* ── Share ────────────────────────────────────────────────── */
.tut-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tut-border);
}
.tut-share__label {
    font-size: .82rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-right: .25rem;
}
.tut-share-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .9rem;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    font-family: inherit;
}
.tut-share-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.tut-share-btn--copy { background: #f1f5f9; color: var(--tut-text); border: 1px solid var(--tut-border); }
.tut-share-btn--wa   { background: #25D366; color: #fff; }
.tut-share-btn--fb   { background: #1877F2; color: #fff; }
.tut-share-btn--msg  { background: #0084FF; color: #fff; }

@media (max-width: 480px) {
    .tut-share { gap: .4rem; }
    .tut-share-btn { padding: .35rem .7rem; font-size: .78rem; }
}

/* ── Comentarii ───────────────────────────────────────────── */
.tut-comments {
    background: var(--tut-surface);
    border-radius: var(--tut-radius);
    box-shadow: var(--tut-shadow);
    border: 1px solid var(--tut-border);
    padding: 24px;
    margin-bottom: 20px;
}
.tut-comments__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tut-text);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tut-comments__count {
    background: var(--tut-accent-light);
    color: var(--tut-accent);
    border-radius: 20px;
    padding: 1px 10px;
    font-size: 0.8rem;
    font-weight: 600;
}
.tut-comments__empty {
    color: var(--tut-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 20px 0;
}

/* Comentariu individual */
.tut-comment {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--tut-border);
}
.tut-comment:last-child { border-bottom: none; }
.tut-comment__av { flex-shrink: 0; }
.tut-comment__body { flex: 1; min-width: 0; }
.tut-comment__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.tut-comment__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--tut-text);
}
.tut-comment__time {
    font-size: 0.77rem;
    color: var(--tut-muted);
}
.tut-comment__del {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--tut-muted);
    cursor: pointer;
    font-size: 0.78rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.tut-comment__del:hover {
    color: var(--tut-red);
    background: rgba(239,68,68,0.08);
}
.tut-comment__text {
    font-size: 0.9rem;
    color: var(--tut-text);
    line-height: 1.6;
    word-break: break-word;
}

/* Form comentariu */
.tut-comment-form {
    margin-top: 20px;
    border-top: 1px solid var(--tut-border);
    padding-top: 20px;
}
.tut-comment-form__inner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.tut-comment-form__right { flex: 1; }
.tut-comment-form__textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--tut-border);
    border-radius: var(--tut-radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--tut-text);
    resize: vertical;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.tut-comment-form__textarea:focus {
    outline: none;
    border-color: var(--tut-accent);
}
.tut-comment-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}
.tut-comment-form__chars {
    font-size: 0.78rem;
    color: var(--tut-muted);
}
.tut-comment-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--tut-accent);
    color: #fff;
    border: none;
    border-radius: var(--tut-radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.tut-comment-form__submit:hover { background: var(--tut-accent-hover); }
.tut-comment-form__submit:disabled { opacity: 0.6; cursor: not-allowed; }

.tut-comment-login {
    margin-top: 20px;
    padding: 14px;
    background: var(--tut-bg);
    border-radius: var(--tut-radius-sm);
    text-align: center;
    font-size: 0.88rem;
    color: var(--tut-muted);
    border-top: 1px solid var(--tut-border);
}
.tut-comment-login a { color: var(--tut-accent); font-weight: 600; text-decoration: none; }
.tut-comment-login a:hover { text-decoration: underline; }

.tut-comment-msg {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--tut-radius-sm);
    font-size: 0.85rem;
}
.tut-comment-msg--err {
    background: rgba(239,68,68,0.08);
    color: #991b1b;
    border: 1px solid rgba(239,68,68,0.2);
}

/* ── Buton înapoi ─────────────────────────────────────────── */
.tut-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--tut-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.15s;
    margin-bottom: 16px;
}
.tut-btn-back:hover { color: var(--tut-accent); }

/* ── Form adăugare tutorial ───────────────────────────────── */
.tut-required { color: #ef4444; font-size: 0.8em; margin-left: 3px; }
.tut-optional { color: var(--tut-muted); font-size: 0.8em; margin-left: 3px; }

.tut-char-hint {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--tut-muted);
    margin-top: 4px;
}
.tut-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--tut-muted);
    margin-top: 4px;
}

/* Upload area */
.tut-upload-area {
    border: 2px dashed var(--tut-border);
    border-radius: var(--tut-radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tut-upload-area:hover,
.tut-upload-area.is-dragging {
    border-color: var(--tut-accent);
    background: var(--tut-accent-light);
}
.tut-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px;
    color: var(--tut-muted);
    text-align: center;
}
.tut-upload-placeholder i { font-size: 2rem; color: var(--tut-accent); opacity: 0.6; }
.tut-upload-placeholder span { font-size: 0.9rem; font-weight: 500; }
.tut-upload-placeholder small { font-size: 0.75rem; }

.tut-upload-preview {
    width: 100%;
    position: relative;
}
.tut-upload-preview img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.tut-upload-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.tut-upload-remove:hover { background: rgba(239,68,68,0.8); }

.tut-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.tut-upload-msg {
    font-size: 0.82rem;
    color: var(--tut-muted);
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: var(--tut-radius-sm);
}
.tut-upload-msg--err {
    background: rgba(239,68,68,0.08);
    color: #991b1b;
}

/* Info box */
.tut-info-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--tut-accent-light);
    border: 1px solid rgba(124,58,237,0.2);
    border-radius: var(--tut-radius-sm);
    padding: 12px 14px;
    font-size: 0.85rem;
    color: #4c1d95;
    margin-top: 4px;
}
.tut-info-box i { margin-top: 2px; flex-shrink: 0; }

/* Eroare form */
.tut-form-err {
    padding: 12px 16px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-left: 4px solid var(--tut-red);
    border-radius: var(--tut-radius-sm);
    color: #991b1b;
    font-size: 0.88rem;
    margin-bottom: 18px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

/* Buton cancel */
.tut-btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: 1.5px solid var(--tut-border);
    border-radius: var(--tut-radius-sm);
    color: var(--tut-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
    white-space: nowrap;
}
.tut-btn-cancel:hover { border-color: var(--tut-accent); color: var(--tut-accent); }

/* Mesaj success (din session flash) */
.tut-success-flash {
    padding: 14px 18px;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    border-left: 4px solid var(--tut-green);
    border-radius: var(--tut-radius-sm);
    color: #065f46;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    gap: 9px;
    align-items: center;
}

/* ── Edit tutorial inline ─────────────────────────────────── */
.tut-edit-wrap {
    margin: 0 0 24px;
}
.tut-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1px solid var(--tut-accent);
    color: var(--tut-accent);
    border-radius: var(--tut-radius-sm);
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.tut-btn-edit:hover {
    background: var(--tut-accent-light);
}
.tut-edit-form-wrap {
    background: var(--tut-surface);
    border: 1px solid var(--tut-border);
    border-radius: var(--tut-radius);
    padding: 24px;
    margin-top: 14px;
}
.tut-edit-form-wrap__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--tut-text);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tut-edit-field {
    margin-bottom: 16px;
}
.tut-edit-field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tut-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.tut-edit-charcount {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.8rem;
}
.tut-edit-field input,
.tut-edit-field textarea {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--tut-border);
    border-radius: var(--tut-radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--tut-text);
    background: var(--tut-bg);
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.tut-edit-field input:focus,
.tut-edit-field textarea:focus {
    outline: none;
    border-color: var(--tut-accent);
    background: #fff;
}
.tut-edit-field textarea {
    resize: vertical;
    min-height: 160px;
}
.tut-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}
.tut-btn-edit-cancel {
    padding: 8px 18px;
    border: 1px solid var(--tut-border);
    border-radius: var(--tut-radius-sm);
    background: transparent;
    color: var(--tut-muted);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tut-btn-edit-cancel:hover { background: var(--tut-bg); }
.tut-btn-edit-save {
    padding: 8px 20px;
    border: none;
    border-radius: var(--tut-radius-sm);
    background: var(--tut-accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}
.tut-btn-edit-save:hover { background: var(--tut-accent-hover); }
.tut-btn-edit-save:disabled { opacity: 0.6; cursor: default; }
.tut-edit-msg {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: var(--tut-radius-sm);
    color: #b91c1c;
    font-size: 0.85rem;
}

/* ── Edit / Ștergere comentariu ───────────────────────────── */
.tut-comment__edit {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--tut-muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}
.tut-comment__edit:hover { color: var(--tut-accent); background: var(--tut-accent-light); }

.tut-comment__del {
    background: transparent;
    border: none;
    color: var(--tut-muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}
.tut-comment__del:hover { color: var(--tut-red); background: rgba(239,68,68,0.08); }

/* Când autorul are ambele butoane (edit + del), edit e primul și împinge del la dreapta */
.tut-comment__head .tut-comment__edit { margin-left: auto; }
.tut-comment__head .tut-comment__del  { margin-left: 0; }

.tut-comment__edit-form {
    margin-top: 8px;
}
.tut-comment__edit-ta {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--tut-border);
    border-radius: var(--tut-radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--tut-text);
    background: var(--tut-bg);
    resize: vertical;
    min-height: 70px;
    transition: border-color 0.15s;
}
.tut-comment__edit-ta:focus { outline: none; border-color: var(--tut-accent); background: #fff; }
.tut-comment__edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    justify-content: flex-end;
}
.tut-comment__edit-cancel,
.tut-comment__edit-save {
    padding: 5px 14px;
    border-radius: var(--tut-radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--tut-border);
    background: transparent;
    color: var(--tut-muted);
    transition: background 0.15s;
}
.tut-comment__edit-cancel:hover { background: var(--tut-bg); }
.tut-comment__edit-save {
    background: var(--tut-accent);
    border-color: var(--tut-accent);
    color: #fff;
}
.tut-comment__edit-save:hover { background: var(--tut-accent-hover); }
.tut-comment__edit-save:disabled { opacity: 0.6; cursor: default; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
    .tut-hero { padding: 20px; gap: 14px; }
    .tut-hero__text h1 { font-size: 1.25rem; }
    .tut-hero__stats { gap: 16px; }

    .tut-controls { flex-direction: column; align-items: stretch; }
    .tut-sort { justify-content: flex-start; }

    .tut-grid { grid-template-columns: 1fr; }

    .tut-detail__top { flex-direction: column; }
    .tut-detail__top .tut-thumb,
    .tut-detail__top .tut-thumb--placeholder,
    .tut-detail__top .tut-thumb--img { width: 100%; }

    .tut-comment-form__inner { flex-direction: column; }
}
