/* Explain: Styles for the Tim Pengelola Website page, including task display. */
/* Halaman Tim Pengelola Website desa.
   Satu kartu memuat tombol berkas SK Tim Pengelola di bagian atas dan tabel
   susunan tim di bawahnya. Foto diri ditampilkan dalam bingkai lingkaran di
   kolom kedua, tepat setelah kolom nomor urut, sehingga susunan tim mudah
   dibaca pada layar lebar maupun layar ponsel. */
.tp-card {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-card);
}

.tp-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--primary-color) 6%, var(--surface-color));
    padding: 1.1rem 1.35rem;
}

.tp-card-head-text {
    min-width: 0;
}

.tp-card-head-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--charcoal-color);
}

.tp-card-head-note {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-muted);
}

.tp-sk-btn {
    display: inline-flex;
    min-height: 2.75rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 999px;
    background: var(--accent-color);
    padding: 0 1.4rem;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--cream-color);
    transition: background 300ms ease;
}

.tp-sk-btn:hover {
    background: var(--primary-hover);
}

.tp-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.tp-table {
    width: 100%;
    min-width: 46rem;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.tp-table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    padding: 0.9rem 1rem;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    color: var(--cream-color);
}

.tp-table tbody td {
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    vertical-align: middle;
    color: var(--charcoal-color);
}

.tp-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--primary-color) 3.5%, transparent);
}

.tp-table tbody tr:hover {
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
}

.tp-table tbody tr:last-child td {
    border-bottom: 0;
}

.tp-col-no {
    width: 4.25rem;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--primary-hover);
}

.tp-photo {
    display: inline-flex;
    height: 3.4rem;
    width: 3.4rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--surface-color);
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color) 10%, var(--surface-color));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--charcoal-color) 16%, transparent);
}

.tp-photo img {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center top;
}

.tp-photo-empty {
    color: color-mix(in srgb, var(--primary-color) 48%, transparent);
    font-size: 1.25rem;
}

.tp-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
    color: var(--charcoal-color);
}

.tp-role {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    padding: 0.25rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.5;
    color: var(--primary-hover);
}

.tp-unit {
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-muted);
}

.tp-empty {
    margin: 0;
    padding: 2.5rem 1.5rem;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.75;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .tp-card {
        border-radius: 1.5rem;
    }

    .tp-card-head {
        padding: 1rem 1.1rem;
    }

    .tp-sk-btn {
        width: 100%;
    }

    .tp-photo {
        height: 2.9rem;
        width: 2.9rem;
    }
}

/* Kolom Tugas pada tabel tim pengelola website.
   Tombol Lihat Tugas membuka jendela berisi daftar tugas anggota tim, sedangkan
   anggota tim yang belum memiliki tugas ditandai tanda pisah agar barisnya
   tetap rapi tanpa tombol kosong. */
.tp-col-tugas {
    width: 12rem;
}

.tp-tugas-btn {
    display: inline-flex;
    min-height: 2.4rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-color);
    padding: 0 1rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--primary-hover);
    cursor: pointer;
    transition: background 300ms ease, border-color 300ms ease, color 300ms ease;
}

.tp-tugas-btn i {
    font-size: 0.82rem;
    color: var(--secondary-color);
}

.tp-tugas-btn:hover,
.tp-tugas-btn:focus-visible {
    border-color: transparent;
    background: var(--primary-color);
    color: var(--cream-color);
}

.tp-tugas-btn:hover i,
.tp-tugas-btn:focus-visible i {
    color: var(--cream-color);
}

.tp-tugas-count {
    display: inline-flex;
    min-width: 1.4rem;
    height: 1.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    padding: 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--primary-hover);
}

.tp-tugas-btn:hover .tp-tugas-count,
.tp-tugas-btn:focus-visible .tp-tugas-count {
    background: color-mix(in srgb, var(--cream-color) 28%, transparent);
    color: var(--cream-color);
}

.tp-tugas-none {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Daftar tugas anggota tim pada jendela tugas.
   Setiap tugas diberi nomor dan kotak tersendiri, sehingga tugas yang
   jumlahnya lebih dari satu tetap mudah dibaca. */
.tp-tugas-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: tpTugas;
}

.tp-tugas-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    background: color-mix(in srgb, var(--primary-color) 5%, var(--surface-color));
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.7;
    color: var(--charcoal-color);
}

.tp-tugas-list li::before {
    counter-increment: tpTugas;
    content: counter(tpTugas);
    display: inline-flex;
    height: 1.5rem;
    width: 1.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color) 14%, transparent);
    color: var(--primary-hover);
    font-size: 0.72rem;
    font-weight: 900;
}

@media (prefers-reduced-motion: reduce) {
    .tp-tugas-btn {
        transition: none;
    }
}