/* ============ Team-Version: Login, Anwesenheit, Rollen ============ */

/* Login-Karte (ersetzt die frühere Lizenzcode-Eingabe) */
.team-auth-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 40px;
    width: min(420px, 90vw);
    color: white;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.team-auth-card .ta-title { font-size: 1.4rem; font-weight: 700; }
.team-auth-card .ta-sub { font-size: 0.88rem; color: rgba(255,255,255,0.6); margin-bottom: 10px; line-height: 1.45; }
.team-auth-card input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    outline: none;
}
.team-auth-card input::placeholder { color: rgba(255,255,255,0.45); }
.team-auth-card input:focus { border-color: rgba(255,255,255,0.6); }
.team-auth-card .ta-status { font-size: 0.85rem; min-height: 20px; }
.team-auth-card .ta-btn {
    width: 100%;
    padding: 12px;
    background: #cc0000;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.team-auth-card .ta-btn:hover { background: #b30000; }
.team-auth-card .ta-btn:active { transform: scale(0.98); }
.team-auth-card .ta-btn-ghost {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
}
.team-auth-card .ta-btn-ghost:hover { background: rgba(255,255,255,0.16); }
.team-auth-card .ta-hint { font-size: 0.78rem; color: rgba(255,255,255,0.45); margin-top: 6px; }
.team-auth-card .ta-hint a { color: rgba(255,255,255,0.8); }
.team-auth-card .ta-legal { font-size: 0.72rem; text-align: center; margin-top: 4px; }
.team-auth-card .ta-legal a { color: rgba(255,255,255,0.45); text-decoration: none; }
.team-auth-card .ta-legal a:hover { color: rgba(255,255,255,0.8); text-decoration: underline; }

/* Kopfzeile: Sync-Status, Meeting-Datum, Online-Avatare */
#team-presence {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    margin-left: 12px;
    flex-shrink: 0;
}
.team-sync { font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.team-sync-ok { color: #16a34a; }
.team-sync-saving { color: #d97706; }
.team-sync-error { color: #dc2626; }
.team-meeting [hidden] { display: none; }
.team-meeting {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
}
.team-meeting select,
.team-meeting input {
    font: inherit;
    font-size: 0.8rem;
    padding: 3px 6px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    background: white;
}
.team-avatars { display: flex; }
.team-avatar {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    margin-left: -6px;
    cursor: default;
}
.team-avatar:first-child { margin-left: 0; }
.team-avatar.me { outline: 2px solid #16a34a; outline-offset: -1px; }
.team-avatar i {
    position: absolute;
    right: -4px;
    bottom: -4px;
    font-style: normal;
    font-size: 0.6rem;
    background: #fbbf24;
    color: #1a1a2e;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* „wird gerade bearbeitet von …“ an Einträgen */
.team-lock {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #92400e;
    background: #fef3c7;
    padding: 1px 6px;
    border-radius: 4px;
}

/* Hinweis-Toasts */
#team-toasts {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.team-toast {
    background: #1a2744;
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s;
}
.team-toast.show { opacity: 1; transform: none; }
.team-toast-warn { background: #92400e; }
.team-toast-error { background: #b91c1c; }

/* Rollen: ohne Bearbeiter-Recht keine Bearbeiten-Knöpfe */
.team-no-edit [onclick^="openAddMember"],
.team-no-edit [onclick^="editMember"],
.team-no-edit [onclick^="deleteMember"],
.team-no-edit [onclick^="addVisitor"],
.team-no-edit [onclick^="removeVisitor"],
.team-no-edit [onclick^="openVisitorEdit"],
.team-no-edit [onclick^="openSubstituteModal"],
.team-no-edit [onclick^="saveSubstitute"],
.team-no-edit [onclick^="removeSubstitute"],
.team-no-edit [onclick^="toggleMemberStatus"],
.team-no-edit [onclick^="openAddSv"],
.team-no-edit [onclick^="openEditSv"],
.team-no-edit [onclick^="openPdfImport"],
.team-no-edit [onclick^="openMemberSync"],
.team-no-edit [onclick^="openImportExport"] { display: none !important; }

/* ohne Präsentator-Recht kein Durchklicken/Beamer */
.team-no-present #btn-next,
.team-no-present #btn-back,
.team-no-present [onclick^="openDisplayWindow"],
.team-no-present [onclick^="resetMeeting"],
.team-no-present #ctrl-timer-controls,
.team-no-present [onclick^="showAgendaItem"],
.team-no-present [onclick^="showAgendaRound"],
.team-no-present [onclick^="showCoordinatorReport"],
.team-no-present [onclick^="showAugenTimer"] { display: none !important; }

/* Leiste über der Mitglieder-Reihenfolge: Würfeln */
.member-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 16px 0;
}
.member-tools-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--muted, #6b7280);
    cursor: pointer;
    user-select: none;
}
.team-no-edit.team-no-present #member-tools { display: none !important; }
